]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
analyzer: stash values for CPython plugin [PR107646]
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
cf58b896
GA
12023-08-01 Lewis Hyatt <lhyatt@gmail.com>
2
3 * c-parser.cc (pragma_lex_discard_to_eol): New function.
4 (c_init_preprocess): New function.
5
a2f31d79
GA
62023-07-31 Hamza Mahfooz <someguy@effective-light.com>
7
8 PR c/65213
9 * c-decl.cc (start_decl): Handle
10 -Wmissing-variable-declarations.
11
122023-07-31 Chung-Lin Tang <cltang@codesourcery.com>
13
14 * c-parser.cc (c_parser_oacc_host_data): Add checking requiring OpenACC
15 host_data construct to have an use_device clause.
16
14bfda60
GA
172023-06-29 Qing Zhao <qing.zhao@oracle.com>
18
19 PR c/77650
20 * c-decl.cc (finish_struct): Issue warnings for new option.
21
222023-06-29 Qing Zhao <qing.zhao@oracle.com>
23
24 * c-decl.cc (finish_struct): Set TYPE_INCLUDES_FLEXARRAY for
25 struct/union type.
26
272023-06-29 Richard Biener <rguenther@suse.de>
28
29 PR c/110454
30 * c-typeck.cc (convert_argument): Sink formal_prec compute
31 to where TYPE_PRECISION is valid to use.
32
332023-06-29 Eugene Rozenfeld <erozen@microsoft.com>
34
35 * Make-lang.in: Pass correct stage cc1 when processing
36 profile data collected while building target libraries
37
f10a4ce0
GA
382023-06-16 David Malcolm <dmalcolm@redhat.com>
39
40 PR c/107583
41 * c-parser.cc (c_parser_declspecs): Add hints to "unknown type
42 name" error.
43
9d250bdb
GA
442023-06-12 Tobias Burnus <tobias@codesourcery.com>
45
46 * c-parser.cc (c_parser_omp_clause_map): Reword error message for
47 clearness especially with 'omp target (enter/exit) data.'
48
4f0d4825
GA
492023-06-06 Kwok Cheung Yeung <kcy@codesourcery.com>
50 Tobias Burnus <tobias@codesourcery.com>
51
52 * c-parser.cc (c_parser_omp_clause_defaultmap,
53 c_parser_omp_clause_map): Parse 'present'.
54 (c_parser_omp_clause_to, c_parser_omp_clause_from): Remove.
55 (c_parser_omp_clause_from_to): New; parse to/from clauses with
56 optional present modifer.
57 (c_parser_omp_all_clauses): Update call.
58 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
59 c_parser_omp_target_exit_data): Handle new map enum values
60 for 'present' mapping.
61
df2762ac
GA
622023-05-30 Tobias Burnus <tobias@codesourcery.com>
63
64 PR c/109999
65 * c-parser.cc (c_parser_oacc_all_clauses,
66 c_parser_omp_all_clauses): Improve error wording.
67
03c7c418
GA
682023-05-23 Martin Uecker <uecker@tugraz.at>
69
70 PR c/109450
71 * c-decl.cc (add_decl_expr): New function.
72 (grokdeclarator): Add decl expr for size expression in
73 types pointed to by parameters declared as arrays.
74
752023-05-23 Martin Uecker <uecker@tugraz.at>
76
77 PR c/70418
78 PR c/106465
79 PR c/107557
80 PR c/108423
81 * c-decl.cc (start_decl): Make sure size expression are
82 evaluated only in correct context.
83 (grokdeclarator): Size expression in fields may need a bind
84 expression, make sure DECL_EXPR is always created.
85 (grokfield, declspecs_add_type): Pass along size expressions.
86 (finish_struct): Remove unneeded DECL_EXPR.
87 (start_function): Evaluate size expressions for nested functions.
88 * c-parser.cc (c_parser_struct_declarations,
89 c_parser_struct_or_union_specifier): Pass along size expressions.
90 (c_parser_declaration_or_fndef): Evaluate size expression.
91 (c_parser_objc_at_property_declaration,
92 c_parser_objc_class_instance_variables): Adapt.
93 * c-tree.h (grokfield): Adapt declaration.
94
5df01f89
GA
952023-05-19 Martin Uecker <uecker@tugraz.at>
96
97 * c-decl.cc (set_type_context): Remove.
98 (pop_scope, diagnose_mismatched_decls, pushdecl):
99 Remove dead code.
100 * c-typeck.cc (comptypes_internal): Remove dead code.
101 (same_translation_unit_p): Remove.
102 (tagged_types_tu_compatible_p): Some fixes.
103
1042023-05-19 Joseph Myers <joseph@codesourcery.com>
105
106 * c-decl.cc (diagnose_mismatched_decls): Do not handle
107 thread-local declarations as tentative definitions for C2x.
108 (finish_decl): Do not allow thread-local definition with
109 incomplete type for C2x.
110
b2776076
GA
1112023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
112
113 * c-convert.cc (c_convert): Ditto.
114 * c-decl.cc (merge_decls): Ditto.
115 * c-parser.cc (c_parser_omp_clause_reduction): Ditto.
116 (c_parser_omp_declare_reduction): Ditto.
117 * c-typeck.cc (build_component_ref): Ditto.
118 (convert_argument): Ditto.
119 (pointer_diff): Ditto.
120 (build_unary_op): Ditto.
121 (build_c_cast): Ditto.
122 (build_modify_expr): Ditto.
123 (store_init_value): Ditto.
124 (constexpr_init_fits_real_type): Ditto.
125 (check_constexpr_init): Ditto.
126 (c_finish_return): Ditto.
127 (handle_omp_array_sections_1): Ditto.
128 (c_finish_omp_clauses): Ditto.
129 * gimple-parser.cc (c_finish_gimple_return): Ditto.
130
0d566057
GA
1312023-05-16 Joseph Myers <joseph@codesourcery.com>
132
133 * c-decl.cc (check_for_loop_decls): Use pedwarn_c11 for
134 diagnostics.
135
3427b51b
GA
1362023-05-15 Joseph Myers <joseph@codesourcery.com>
137
138 * c-decl.cc (grokdeclarator): Ignore _Atomic on function return
139 type for C2x.
140
4d68c7f7
GA
1412023-04-30 Andrew Pinski <apinski@marvell.com>
142
143 * c-typeck.cc (process_init_element): Print out array type
144 for excessive elements.
145
1462023-04-30 Andrew Pinski <apinski@marvell.com>
147
148 PR c/107926
149 * c-typeck.cc (process_init_element): Move the check
150 for string cst until after the error message.
151
50205195
GA
1522023-04-28 Eugene Rozenfeld <erozen@microsoft.com>
153
154 * Make-lang.in: Merge perf data collected when compiling cc1 and runtime libraries
155
32a98ccd
GA
1562023-04-27 Jakub Jelinek <jakub@redhat.com>
157
158 PR c/109409
159 * c-parser.cc (c_parser_initializer): Move diagnostics about
160 initialization of variable sized object with non-empty initializer
161 after c_parser_expr_no_commas call and ret.set_error (); after it.
162
1632023-04-27 Jakub Jelinek <jakub@redhat.com>
164
165 PR c/107682
166 PR c/109412
167 * c-typeck.cc (pop_init_level): If constructor_type is FUNCTION_TYPE,
168 reject empty initializer as invalid.
169
4a3dbcbd
GA
1702023-04-26 Richard Biener <rguenther@suse.de>
171
172 * gimple-parser.cc (c_parser_parse_gimple_body): Avoid
173 last_stmt.
174
49cea02d
GA
1752023-04-25 Tobias Burnus <tobias@codesourcery.com>
176
177 * c-parser.cc (c_parser_omp_scan_loop_body): Handle
178 zero exec statements before/after 'omp scan'.
179
ce4e4f37
GA
1802023-04-20 Jakub Jelinek <jakub@redhat.com>
181
182 PR c/107041
183 * c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-mismatch
184 warning on acc_on_device declaration.
185
579cdc1e
GA
1862023-03-28 David Malcolm <dmalcolm@redhat.com>
187
188 PR c/107002
189 * c-typeck.cc (parser_build_binary_op): Update for new param of
190 check_for_xor_used_as_pow.
191
c8065441
GA
1922023-03-10 Jakub Jelinek <jakub@redhat.com>
193
194 PR c/108079
195 * c-decl.cc (pop_scope): Suppress OPT_Wunused_variable warning
196 after diagnosing it.
197
6f9e2f14
GA
1982023-02-28 Jakub Jelinek <jakub@redhat.com>
199
200 PR sanitizer/108894
201 * c-decl.cc (strict_flex_array_level_of): Move to c-common.cc
202 and rename to c_strict_flex_array_level_of.
203 (is_flexible_array_member_p): Adjust caller.
204
0263e9d5
GA
2052023-02-18 Martin Uecker <uecker@tugraz.at>
206
207 PR c/108375
208 * c-decl.cc (decl_jump_unsafe): Use c_type_variably_modified_p.
209 (diagnose_mismatched_decl): Dito.
210 (warn_about_goto): Dito:
211 (c_check_switch_jump_warnings): Dito.
212 (finish_decl): Dito.
213 (finish_struct): Dito.
214 (grokdeclarator): Set C_TYPE_VARIABLY_MODIFIED.
215 (finish_struct): Set C_TYPE_VARIABLY_MODIFIED.
216 * c-objc-common.cc (c_var_mod_p): New function.
217 (c_var_unspec_p): Remove.
218 * c-objc-common.h: Set lang hook.
219 * c-parser.cc (c_parser_declararion_or_fndef): Use c_type_variably_modified_p.
220 (c_parser_typeof_specifier): Dito.
221 (c_parser_has_attribute_expression): Dito.
222 (c_parser_generic_selection): Dito.
223 * c-tree.h: Define C_TYPE_VARIABLY_MODIFIED and define c_var_mode_p.
224 * c-typeck.cc: Remove c_vla_mod_p and use C_TYPE_VARIABLY_MODIFIED.
225
88cc4495
GA
2262023-02-16 Patrick Palka <ppalka@redhat.com>
227
228 * c-parser.h: Mechanically drop static from static inline
229 functions via s/^static inline/inline/g.
230
d7a47ed1
GA
2312023-02-10 Joseph Myers <joseph@codesourcery.com>
232
233 * c-convert.cc (c_convert): Allow conversion of a null pointer
234 constant to nullptr_t.
235 * c-typeck.cc (null_pointer_constant_p): Remove static.
236 (convert_for_assignment): Allow conversion of a null pointer
237 constant to nullptr_t.
238 (digest_init): Handle NULLPTR_TYPE among scalar conversions.
239 * c-tree.h (null_pointer_constant_p): Declare.
240
e92e2c96
GA
2412023-02-09 Tobias Burnus <tobias@codesourcery.com>
242
243 * c-parser.cc (c_parser_omp_allocate): Parse align
244 clause and check for restrictions.
245
f6fc79d0
GA
2462023-02-08 Joseph Myers <joseph@codesourcery.com>
247
248 * c-typeck.cc (check_constexpr_init): Remove argument
249 null_pointer_constant. Only check pointer initializers for being
250 null.
251 (digest_init): Update calls to check_constexpr_init.
252
a37a0cb3
GA
2532023-02-02 Joseph Myers <joseph@codesourcery.com>
254
255 * c-typeck.cc (build_binary_op): Allow comparisons between
256 pointers and nullptr_t values that are not null pointer constants.
257
2582023-02-02 Joseph Myers <joseph@codesourcery.com>
259
260 * c-typeck.cc: Include "realmpfr.h".
261 (constexpr_init_fits_real_type): Do not allow signaling NaN
262 conversions to different types with the same mode. Handle
263 conversions from binary to decimal types.
264 (check_constexpr_init): Do not disallow real initializers for
265 complex types. Do not disallow binary initializers for decimal
266 floating types.
267
317525b0
GA
2682023-01-31 Marek Polacek <polacek@redhat.com>
269
270 PR c++/107593
271 PR c++/108597
272 * c-objc-common.cc (instantiation_dependent_expression_p): New.
273
338eb0f0
GA
2742023-01-27 Joseph Myers <joseph@codesourcery.com>
275
276 * c-parser.cc (c_parser_declaration_or_fndef): Do not allow braces
277 around auto initializer.
278
f457a62e
GA
2792023-01-16 Jakub Jelinek <jakub@redhat.com>
280
281 PR c++/105593
282 * c-parser.cc (c_parser_initializer): Check warning_enabled_at
283 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
284 of warn_init_self.
285
5013c3bb
GA
2862023-01-14 Jakub Jelinek <jakub@redhat.com>
287
288 PR c++/108365
289 * c-typeck.cc (build_binary_op): Use may_shorten_divmod for integral
290 division or modulo.
291
2922023-01-13 Qing Zhao <qing.zhao@oracle.com>
293
294 * c-decl.cc (strict_flex_array_level_of): ... here.
295
81ed98bc
GA
2962023-01-11 Jakub Jelinek <jakub@redhat.com>
297
298 PR c/105972
299 * c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind
300 markers for K&R function parameter declarations of nested functions.
301
84723aca
GA
3022023-01-09 Joseph Myers <joseph@codesourcery.com>
303
304 * c-decl.cc (build_compound_literal): Call record_inline_static.
305
d808db1f
GA
3062023-01-06 Joseph Myers <joseph@codesourcery.com>
307
308 * c-parser.cc (c_parser_postfix_expression): Handle integer
309 generic arguments to functions passed to __builtin_tgmath as
310 _Float32x if any argument has _FloatNx or _Complex _FloatNx type.
311 Do not handle integer arguments to some narrowing functions as
312 _Float64.
313
d2ef2327
GA
3142022-12-19 Jakub Jelinek <jakub@redhat.com>
315
316 PR c/108043
317 * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
318 compound literals with function type.
319
4bc2d9f6
GA
3202022-12-07 Joseph Myers <joseph@codesourcery.com>
321
322 * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
323 auto, constexpr and a type used together.
324
3fe66f7f
GA
3252022-12-06 Qing Zhao <qing.zhao@oracle.com>
326
327 * c-decl.cc (is_flexible_array_member_p): Call new function
328 strict_flex_array_level_of.
329
9a1b4f1d
GA
3302022-11-24 Florian Weimer <fweimer@redhat.com>
331
332 PR c/107805
333 * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
334 from type to specs.
335
add89840
GA
3362022-11-17 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
337
338 * c-decl.cc (start_function): Set the result decl source
339 location to the location of the typespec.
340
3412022-11-17 David Malcolm <dmalcolm@redhat.com>
342
343 PR analyzer/107711
344 * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
345 to cpp_create_reader, rather than ident_hash, so that the new
346 reader gets its own hash table.
347
cdc34229
GA
3482022-11-15 David Malcolm <dmalcolm@redhat.com>
349
350 PR analyzer/106302
351 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
352 (class ana::c_translation_unit): New.
353 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
354
30d77d49
GA
3552022-11-12 Joseph Myers <joseph@codesourcery.com>
356
357 * c-decl.cc (start_underspecified_init)
358 (finish_underspecified_init): Handle name == NULL_TREE for
359 compound literals.
360 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
361 (shadow_tag_warned): Check for constexpr.
362 (start_decl): Add parameter do_push.
363 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
364 (grokdeclarator): Handle constexpr.
365 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
366 (declspecs_add_scspec): Handle constexpr.
367 * c-parser.cc (c_token_starts_compound_literal)
368 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
369 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
370 (c_parser_compound_literal_scspecs)
371 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
372 Update calls to start_init.
373 (c_parser_declaration_or_fndef, c_parser_initializer)
374 (c_parser_initval): Pass true for new argument of
375 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
376 constexpr compound literals.
377 (c_parser_static_assert_declaration_no_semi)
378 (c_parser_enum_specifier, c_parser_struct_declaration)
379 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
380 Call convert_lvalue_to_rvalue on expressions required to be
381 integer constant expressions.
382 (c_parser_omp_declare_reduction): Update call to start_init.
383 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
384 (C_DECL_DECLARED_CONSTEXPR): New macros.
385 (struct c_declspecs): Add constexpr_p.
386 (start_decl, convert_lvalue_to_rvalue, start_init): Update
387 prototypes.
388 * c-typeck.cc (require_constant_value, require_constant_elements):
389 Change to bool.
390 (require_constexpr_value, maybe_get_constexpr_init)
391 (constexpr_init_fits_real_type, check_constexpr_init): New.
392 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
393 maybe_get_constexpr_init.
394 (store_init_value): Update call to digest_init.
395 (digest_init): Add parameters int_const_expr, arith_const_expr and
396 require_constexpr. Check constexpr initializers.
397 (constructor_top_level): Remove.
398 (struct initializer_stack): Remove top_level. Add
399 require_constexpr_value.
400 (start_init): Remove parameter top_level. Add parameters
401 init_require_constant and init_require_constexpr. Save
402 require_constexpr_value on stack.
403 (pop_init_level): Use a null pointer constant for zero initializer
404 of pointer initialized with {}.
405 (output_init_element): Update call to digest_init. Avoid passing
406 null pointer constants of pointer type through digest_init a
407 second time when initializing a constexpr object.
408
d29260ce
GA
4092022-11-03 Joseph Myers <joseph@codesourcery.com>
410
411 * c-decl.cc (in_underspecified_init, start_underspecified_init)
412 (finish_underspecified_init): New.
413 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
414 Give errors inside initializers of underspecified declarations.
415 (grokdeclarator): Handle (erroneous) case of C2X auto on a
416 parameter.
417 (declspecs_add_type): Handle c2x_auto_p case.
418 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
419 C2X mode.
420 (finish_declspecs): Handle c2x_auto_p.
421 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
422 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
423 (struct c_declspecs): Add c2x_auto_p.
424 (start_underspecified_init, finish_underspecified_init): New
425 prototypes.
426 * c-typeck.cc (build_external_ref): Give error for underspecified
427 declaration referenced in its initializer.
428
3055829a
GA
4292022-10-28 Joseph Myers <joseph@codesourcery.com>
430
431 * c-decl.cc (grokdeclarator): Pass
432 arg_info->no_named_args_stdarg_p to build_function_type.
433 (grokparms): Check arg_info->no_named_args_stdarg_p before
434 converting () to (void).
435 (build_arg_info): Initialize no_named_args_stdarg_p.
436 (get_parm_info): Set no_named_args_stdarg_p.
437 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
438 build_function_type.
439 (store_parm_decls): Count (...) functions as prototyped.
440 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
441 parenthesis to start parameter list.
442 (c_parser_parms_list_declarator): Always allow '...' with no
443 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
444 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
445 * c-typeck.cc (composite_type): Handle
446 TYPE_NO_NAMED_ARGS_STDARG_P.
447 (function_types_compatible_p): Compare
448 TYPE_NO_NAMED_ARGS_STDARG_P.
449
4502022-10-28 Jakub Jelinek <jakub@redhat.com>
451
452 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
453 comma before the first clause.
454 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
455 c_parser_omp_flush, c_parser_omp_scan_loop_body,
456 c_parser_omp_ordered, c_finish_omp_declare_variant,
457 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
458 c_parser_omp_requires, c_parser_omp_error,
459 c_parser_omp_assumption_clauses): Likewise.
460
4612022-10-28 Joseph Myers <joseph@codesourcery.com>
462
463 PR c/61469
464 * c-convert.cc (c_convert): Handle enums with underlying boolean
465 type like bool.
466 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
467 enums with enum type specifier, but give errors for storage class
468 specifiers, qualifiers or alignment specifiers in non-definition
469 declarations of such enums.
470 (grokdeclarator): Give error for non-definition use of type
471 specifier with an enum type specifier.
472 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
473 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
474 (xref_tag): Update call to parser_xref_tag.
475 (start_enum): Add argument fixed_underlying_type. Complete enum
476 type with a fixed underlying type given in the definition. Give
477 error for defining without a fixed underlying type in the
478 definition if one was given in a prior declaration. Do not mark
479 enums with fixed underlying type as packed for -fshort-enums.
480 Store the enum type in the_enum.
481 (finish_enum): Do not adjust types of values or check their range
482 for an enum with a fixed underlying type. Set underlying type of
483 enum and variants.
484 (build_enumerator): Check enumeration constants for enum with
485 fixed underlying type against that type and convert to that type.
486 Increment in the underlying integer type, with handling for bool.
487 (c_simulate_enum_decl): Update call to start_enum.
488 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
489 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
490 rather than recomputing an underlying type based on size.
491 * c-parser.cc (c_parser_declspecs)
492 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
493 Set has_enum_type_specifier for type specifiers.
494 (c_parser_enum_specifier): Handle enum type specifiers.
495 (c_parser_struct_or_union_specifier): Update call to
496 parser_xref_tag.
497 (c_parser_omp_atomic): Check for boolean increment or decrement
498 using C_BOOLEAN_TYPE_P.
499 * c-tree.h (C_BOOLEAN_TYPE_P): New.
500 (struct c_typespec): Add has_enum_type_specifier.
501 (struct c_declspecs): Add enum_type_specifier_ref_p.
502 (struct c_enum_contents): Add enum_type.
503 (start_enum, parser_xref_tag): Update prototypes.
504 * c-typeck.cc (composite_type): Allow for enumerated types
505 compatible with bool.
506 (common_type, comptypes_internal, perform_integral_promotions):
507 Use ENUM_UNDERLYING_TYPE.
508 (parser_build_binary_op, build_unary_op, convert_for_assignment)
509 (c_finish_return, c_start_switch, build_binary_op): Check for
510 boolean types using C_BOOLEAN_TYPE_P.
511
4e939ae1
GA
5122022-10-24 Jakub Jelinek <jakub@redhat.com>
513
514 PR c++/107358
515 * c-typeck.cc (build_binary_op): Pass operands before excess precision
516 promotions to scalar_to_vector call.
517
5182022-10-24 Arsen Arsenović <arsen@aarsen.me>
519
520 * c-decl.cc (finish_function): Ignore hosted when deciding
521 whether to implicitly return zero, but check noreturn.
522 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
523 requirements to just MAIN_NAME_P when hosted, or `int main'
524 otherwise.
525
47a6ae56
GA
5262022-10-20 Richard Biener <rguenther@suse.de>
527
528 PR c/107305
529 PR c/107306
530 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
531 the parsed IL and zap the body on error.
532
21de009f
GA
5332022-10-18 Joseph Myers <joseph@codesourcery.com>
534
535 PR c/107164
536 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
537 with previous declaration visible.
538
5392022-10-18 Joseph Myers <joseph@codesourcery.com>
540
541 PR c/36113
542 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
543 convert all to the type of the enumeration. pedwarn if no integer
544 type fits all enumerators and default to
545 widest_integer_literal_type_node in that case. Otherwise pedwarn
546 for type wider than intmax_t.
547 (build_enumerator): pedwarn for enumerators outside the range of
548 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
549 enumerators outside the range of int. On overflow, attempt to
550 find a wider type that can hold the value of the next enumerator.
551 Do not convert value to type determined with
552 c_common_type_for_size.
553
baeec7cc
GA
5542022-10-14 Jakub Jelinek <jakub@redhat.com>
555
556 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
557 double.
558
5592022-10-14 Joseph Myers <joseph@codesourcery.com>
560
561 * c-decl.cc (build_compound_literal): Add parameter scspecs.
562 Handle storage class specifiers.
563 * c-parser.cc (c_token_starts_compound_literal)
564 (c_parser_compound_literal_scspecs): New.
565 (c_parser_postfix_expression_after_paren_type): Add parameter
566 scspecs. Call pedwarn_c11 for use of storage class specifiers.
567 Update call to build_compound_literal.
568 (c_parser_cast_expression, c_parser_sizeof_expression)
569 (c_parser_alignof_expression): Handle storage class specifiers for
570 compound literals. Update calls to
571 c_parser_postfix_expression_after_paren_type.
572 (c_parser_postfix_expression): Update syntax comment.
573 * c-tree.h (build_compound_literal): Update prototype.
574 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
575 register compound literal.
576
9ff6c33e
GA
5772022-10-07 Qing Zhao <qing.zhao@oracle.com>
578
579 * c-decl.cc (flexible_array_member_type_p): New function.
580 (one_element_array_type_p): Likewise.
581 (zero_length_array_type_p): Likewise.
582 (add_flexible_array_elts_to_size): Call new utility
583 routine flexible_array_member_type_p.
584 (is_flexible_array_member_p): New function.
585 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
586
629d04d3
GA
5872022-10-06 Joseph Myers <joseph@codesourcery.com>
588
589 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
590 and not C2x.
591 (c_keyword_starts_typename, c_token_starts_declspecs)
592 (c_parser_declspecs, c_parser_objc_selector): Handle
593 RID_TYPEOF_UNQUAL.
594 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
595 Distinguish typeof for C2x from __typeof__ for all standard
596 versions and typeof before C2x.
597 * c-typeck.cc (build_function_call_vec): Use unqualified version
598 of non-void return type.
599 (build_unary_op): Use unqualified type for increment and
600 decrement.
601
6022022-10-06 Jakub Jelinek <jakub@redhat.com>
603
604 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
605 call for holds clause on assume construct.
606
6072022-10-06 Jakub Jelinek <jakub@redhat.com>
608
609 PR c++/106654
610 * c-parser.cc (handle_assume_attribute): New function.
611 (c_parser_declaration_or_fndef): Handle assume attribute.
612 (c_parser_attribute_arguments): Add assume_attr argument,
613 if true, parse first argument as conditional expression.
614 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
615 c_parser_attribute_arguments callers.
616 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
617 assume attribute.
618
85872a69
GA
6192022-10-04 Jakub Jelinek <jakub@redhat.com>
620
621 * c-lang.h (struct c_omp_declare_target_attr): New type.
622 (current_omp_declare_target_attribute): Change type from
623 int to vec<c_omp_declare_target_attr, va_gc> *.
624 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
625 If last pushed directive was begin declare target, use different
626 wording and simplify format strings for easier translations.
627 (c_parser_omp_clause_device_type): Uncomment
628 check_no_duplicate_clause call.
629 (c_parser_omp_declare_target): Adjust for the
630 current_omp_declare_target_attribute type change, push { -1 }.
631 Use error_at rather than warning_at for declare target with
632 only device_type clauses.
633 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
634 (c_parser_omp_begin): Add begin declare target support.
635 (c_parser_omp_end): Adjust for the
636 current_omp_declare_target_attribute type change, adjust
637 diagnostics wording and simplify format strings for easier
638 translations.
639 * c-decl.cc (current_omp_declare_target_attribute): Change type from
640 int to vec<c_omp_declare_target_attr, va_gc> *.
641 (c_decl_attributes): Adjust for the
642 current_omp_declare_target_attribute type change. If device_type
643 was present on begin declare target, add "omp declare target host"
644 and/or "omp declare target nohost" attributes.
645
bbdcdf5c
GA
6462022-09-29 Joseph Myers <joseph@codesourcery.com>
647
648 * c-decl.cc (handle_std_noreturn_attribute): New function.
649 (std_attribute_table): Add _Noreturn and noreturn.
650
1f16a020
GA
6512022-09-27 Jakub Jelinek <jakub@redhat.com>
652
653 * c-lang.h (current_omp_begin_assumes): Declare.
654 * c-parser.cc: Include bitmap.h.
655 (c_parser_omp_end_declare_target): Rename to ...
656 (c_parser_omp_end): ... this. Handle also end assumes.
657 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
658 c_parser_omp_assumes, c_parser_omp_assume): New functions.
659 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
660 without corresponding #pragma omp end assumes.
661 (c_parser_pragma): Use %s in may only be used at file scope
662 diagnostics to decrease number of translatable messages. Handle
663 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
664 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
665 for it rather than c_parser_omp_end_declare_target.
666 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
667 * c-decl.cc (current_omp_begin_assumes): Define.
668
28a61ecd
GA
6692022-09-24 Jakub Jelinek <jakub@redhat.com>
670
671 PR c/106981
672 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
673 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
674 t2 have different types.
675
279c6715
GA
6762022-09-22 David Malcolm <dmalcolm@redhat.com>
677
678 PR c/106830
679 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
680 (c_parser_cast_expression): Likewise.
681 (c_parser_alignof_expression): Likewise.
682 (c_parser_postfix_expression_after_paren_type): Likewise.
683 (c_parser_postfix_expression_after_primary): Likewise.
684 (c_parser_expression): Likewise.
685 (c_parser_omp_variable_list): Likewise.
686 (c_parser_transaction_expression): Likewise.
687 * c-tree.h (c_expr::set_error): Likewise.
688 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
689 (parser_build_unary_op): Likewise.
690 (parser_build_binary_op): Likewise.
691 (digest_init): Likewise.
692 (pop_init_level): Likewise.
693 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
694
43be56c4
GA
6952022-09-19 Marek Polacek <polacek@redhat.com>
696
697 PR c/106947
698 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
699 notes.
700
d0fc05e8
GA
7012022-09-15 Richard Biener <rguenther@suse.de>
702
703 * c-decl.cc (build_void_list_node): Remove.
704
ff822367
GA
7052022-09-14 Julian Brown <julian@codesourcery.com>
706
707 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
708 on error.
709
fe2a8ce9
GA
7102022-09-07 Joseph Myers <joseph@codesourcery.com>
711
712 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
713 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
714 for C2x spellings of keywords.
715 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
716
25aeb922
GA
7172022-09-06 Jakub Jelinek <jakub@redhat.com>
718
719 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
720 in omp_cur_iteration - 1 has integer_type_node type.
721
83f2f228
GA
7222022-09-03 Jakub Jelinek <jakub@redhat.com>
723
724 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
725 (c_parser_omp_clause_depend_sink): Renamed to ...
726 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
727 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
728 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
729 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
730 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
731 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
732 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
733 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
734 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
735 (c_parser_omp_clause_doacross): New function.
736 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
737 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
738 OMP_CLAUSE_DEPEND_SOURCE.
739 (c_parser_omp_for_loop): Don't diagnose here linear clause together
740 with ordered with argument.
741 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
742 for simd.
743 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
744 (c_parser_omp_ordered): Handle also doacross and adjust for it
745 diagnostic wording.
746 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
747 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
748
c64b0947
GA
7492022-09-02 David Malcolm <dmalcolm@redhat.com>
750
751 PR c/90885
752 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
753 (c_parser_expr_no_commas): Likewise.
754 (c_parser_conditional_expression): Likewise.
755 (c_parser_binary_expression): Clear m_decimal when popping the
756 stack.
757 (c_parser_unary_expression): Clear ret.m_decimal.
758 (c_parser_has_attribute_expression): Likewise for result.
759 (c_parser_predefined_identifier): Likewise for expr.
760 (c_parser_postfix_expression): Likewise for expr.
761 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
762 token.
763 * c-tree.h (c_expr::m_decimal): New bitfield.
764 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
765 (parser_build_binary_op): Call check_for_xor_used_as_pow.
766
bb0a1556
GA
7672022-09-01 Joseph Myers <joseph@codesourcery.com>
768
769 * c-decl.cc (grokparms): Handle () in a function declaration the
770 same as (void) for C2X.
771
542c60c4
GA
7722022-08-31 Joseph Myers <joseph@codesourcery.com>
773
774 * c-parser.cc (c_parser_label): Pass attributes to do_case.
775 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
776 c_add_case_label.
777
16f542d6
GA
7782022-08-26 Jakub Jelinek <jakub@redhat.com>
779
780 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
781
5d4389dc
GA
7822022-08-25 Marek Polacek <polacek@redhat.com>
783
784 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
785 Give a better diagnostic when converting to nullptr_t.
786 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
787 initialization.
788 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
789 (c_parser_postfix_expression): Handle RID_NULLPTR.
790 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
791 nullptr_node.
792 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
793 (build_conditional_expr): Handle the case when the second/third operand
794 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
795 (convert_for_assignment): Handle converting an expression of type
796 nullptr_t to pointer/bool.
797 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
798 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
799
8002022-08-25 Joseph Myers <joseph@codesourcery.com>
801
802 * c-decl.cc (start_decl): Do not diagnose initialization of
803 variable-sized objects here.
804 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
805 callers changed.
806 (c_parser_initializer): Diagnose initialization of variable-sized
807 objects other than with braced initializer.
808 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
809 braces and update diagnostic text. Diagnose initialization of
810 variable-sized objects with nonempty braces.
811 * c-typeck.cc (digest_init): Update diagnostic for initialization
812 of variable-sized objects.
813 (really_start_incremental_init, set_designator)
814 (process_init_element): Update comments.
815 (pop_init_level): Allow scalar empty initializers.
816
0342f034
GA
8172022-08-17 Tobias Burnus <tobias@codesourcery.com>
818 Chung-Lin Tang <cltang@codesourcery.com>
819
820 PR c++/104493
821 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
822 instead of removed langhook.
823 * c-typeck.cc (c_finish_omp_clauses): Likewise.
824
5cd525f0
GA
8252022-08-11 Marek Polacek <polacek@redhat.com>
826
827 PR middle-end/102633
828 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
829 Call suppress_warning.
830 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
831 (c_parser_omp_declare_reduction): Pass omp_priv down to
832 c_parser_initializer.
833
5f17badb
GA
8342022-08-08 Tom Honermann <tom@honermann.net>
835
836 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
837 of CPP_UTF8STRING when char8_t support is enabled.
838 * c-typeck.cc (digest_init): Allow initialization of an array
839 of character type by a string literal with type array of
840 char8_t.
841
32510382
GA
8422022-08-01 David Malcolm <dmalcolm@redhat.com>
843
844 * c-typeck.cc (build_c_cast): Quote names of address spaces in
845 diagnostics.
846 (convert_for_assignment): Add a note to address space mismatch
847 diagnostics, specifying the expected and actual types.
848
b53ebbc5
GA
8492022-07-10 Lewis Hyatt <lhyatt@gmail.com>
850
851 PR preprocessor/97498
852 * c-parser.cc (c_parser_pragma): Set input_location to the
853 location of the pragma, rather than the start of the line.
854
8467574d
GA
8552022-07-04 Tobias Burnus <tobias@codesourcery.com>
856 Chung-Lin Tang <cltang@codesourcery.com>
857 Thomas Schwinge <thomas@codesourcery.com>
858
859 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
860 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
861 OMP_REQUIRES_TARGET_USED.
862 (c_parser_omp_requires): Remove sorry.
863
ed974488
GA
8642022-07-01 Tobias Burnus <tobias@codesourcery.com>
865
866 * c-parser.cc (c_parser_omp_target_enter_data,
867 c_parser_omp_target_exit_data): Accept tofrom
868 map-type modifier but use 'to' / 'from' internally.
869
bc7e9f76
GA
8702022-06-16 David Malcolm <dmalcolm@redhat.com>
871
872 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
873 group the warning with any note.
874 (warn_about_goto): Likewise to group error or warning with note.
875 Bail out if the warning wasn't emitted, to avoid emitting orphan
876 notes.
877 (lookup_label_for_goto): Add auto_diagnostic_group to
878 group the error with the note.
879 (check_earlier_gotos): Likewise.
880 (c_check_switch_jump_warnings): Likewise for any error/warning.
881 Conditionalize emission of the notes.
882 (diagnose_uninitialized_cst_member): Likewise for warning,
883 conditionalizing emission of the note.
884 (grokdeclarator): Add auto_diagnostic_group to group the "array
885 type has incomplete element type" error with any note.
886 (parser_xref_tag): Add auto_diagnostic_group to group warnings
887 with their notes. Conditionalize emission of notes.
888 (start_struct): Add auto_diagnostic_group to group the
889 "redefinition of" errors with any note.
890 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
891 (check_for_loop_decls): Likewise for pre-C99 error.
892
445ba599
GA
8932022-06-07 Jakub Jelinek <jakub@redhat.com>
894
895 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
896 style linear clause modifiers. Set
897 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
898 old style modifiers are used.
899 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
900 with val modifier on simd or for if the old style modifiers are
901 used.
902
b168441c
GA
9032022-06-02 David Malcolm <dmalcolm@redhat.com>
904
905 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
906 (c_get_sarif_source_language): New.
907 * c-tree.h (c_get_sarif_source_language): New decl.
908
820ead45
GA
9092022-05-31 Jason Merrill <jason@redhat.com>
910
911 * Make-lang.in (c.tags): Look at *.cc.
912
9132022-05-31 Jakub Jelinek <jakub@redhat.com>
914
915 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
916 clauses.
917
37b3b5da
GA
9182022-05-28 Jakub Jelinek <jakub@redhat.com>
919
920 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
921 seen first, use "%<to%>" or "%<enter%>" depending on
922 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
923 "%<to%> or %<enter%>" wording.
924
d9176e64
GA
9252022-05-27 Jakub Jelinek <jakub@redhat.com>
926
927 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
928 (c_parser_omp_all_clauses): For to clause on declare target, use
929 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
930 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
931 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
932 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
933 OMP_CLAUSE_TO_DECLARE.
934 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
935 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
936 name in diagnostics instead of
937 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
938
3dff965c
GA
9392022-05-25 Jakub Jelinek <jakub@redhat.com>
940
941 PR c/91134
942 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
943 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
944 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
945 diagnostic and fixit hint if DATUM has pointer type.
946 * c-parser.cc (c_parser_postfix_expression,
947 c_parser_omp_variable_list): Adjust build_component_ref callers.
948 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
949 Likewise.
950
768f49a2
GA
9512022-05-24 Jakub Jelinek <jakub@redhat.com>
952
953 PR c/105378
954 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
955
1cda629f
GA
9562022-05-18 Marek Polacek <polacek@redhat.com>
957
958 PR c/105131
959 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
960 mismatches.
961 * c-tree.h (comptypes_check_enum_int): Declare.
962 * c-typeck.cc (comptypes): No longer static.
963
3d9439b1
GA
9642022-05-17 Marek Polacek <polacek@redhat.com>
965
966 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
967 its value.
968
9692022-05-17 Jakub Jelinek <jakub@redhat.com>
970
971 * c-parser.cc (c_parser_omp_clause_depend): Parse
972 inoutset depend-kind.
973 (c_parser_omp_depobj): Likewise.
974
702bd11f
GA
9752022-05-16 Martin Liska <mliska@suse.cz>
976
977 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
978
49ace834
GA
9792022-05-12 Jakub Jelinek <jakub@redhat.com>
980
981 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
982 if flag_openmp.
983 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
984 in postfix expressions.
985 (c_parser_omp_variable_list): Handle omp_all_memory in depend
986 clause.
987 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
988 keyword in depend clause as null_pointer_node, diagnose invalid
989 uses.
990
bd022ff9
GA
9912022-05-09 Martin Liska <mliska@suse.cz>
992
993 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
994 macros.
995 (c_parser_binary_expression): Likewise.
996
a1947c92
GA
9972022-05-07 Marek Polacek <polacek@redhat.com>
998
999 PR c++/101833
1000 PR c++/47634
1001 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
1002
405eda0d
GA
10032022-04-08 Jakub Jelinek <jakub@redhat.com>
1004
1005 PR c/105149
1006 * c-typeck.cc (c_build_va_arg): Reject function types.
1007
a2287813
GA
10082022-03-22 Marek Polacek <polacek@redhat.com>
1009
1010 PR c/82283
1011 PR c/84685
1012 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
1013 (start_init): Set it.
1014 (finish_init): Restore constructor_designated.
1015 (push_init_level): Set constructor_designated to the value of
1016 constructor_designated in the upper constructor_stack.
1017
57eeedda
GA
10182022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1019
1020 PR other/65095
1021 * c-typeck.cc (handle_omp_array_sections_1)
1022 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
1023 instead of 'c_omp_map_clause_name'.
1024
8cc4f9cd
GA
10252022-03-09 Joseph Myers <joseph@codesourcery.com>
1026
1027 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
1028 differently from earlier standards for unprototyped function type
1029 compatibility.
1030
10312022-03-09 Jakub Jelinek <jakub@redhat.com>
1032
1033 PR c/104711
1034 * c-fold.cc (c_fully_fold_internal): Don't emit
1035 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
1036 * c-typeck.cc (build_binary_op): Likewise.
1037
e6533e2e
GA
10382022-03-07 Jakub Jelinek <jakub@redhat.com>
1039
1040 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
1041 literal.
1042
4bf3bac1
GA
10432022-02-23 Richard Biener <rguenther@suse.de>
1044
1045 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
1046 SSA names without definition.
1047 (c_parser_gimple_declaration): Handle pointer typed SSA names.
1048
0bdb0498
GA
10492022-02-17 Jakub Jelinek <jakub@redhat.com>
1050
1051 PR c/104532
1052 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
1053 convert_lvalue_to_rvalue and build_indirect_ref instead of
1054 build_simple_mem_ref.
1055
e8d68f0a
GA
10562022-02-11 Richard Biener <rguenther@suse.de>
1057
1058 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
1059 VEC_COND_EXPRs.
1060
a645583d
GA
10612022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1062
1063 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
1064 clause.
1065 (c_parser_omp_variable_list): Handle array sections.
1066 (c_parser_omp_clause_has_device_addr): Added.
1067 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
1068 case.
1069 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
1070 OMP_CLAUSE_MASK.
1071 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
1072 (c_finish_omp_clauses): Handle array sections.
1073
3adf509f
GA
10742022-02-09 Jakub Jelinek <jakub@redhat.com>
1075
1076 PR c/104427
1077 * c-parser.cc (c_parser_postfix_expression)
1078 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
1079 instead of build1_loc to build PAREN_EXPR.
1080 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
1081 * c-fold.cc (c_fully_fold_internal): Likewise.
1082
fc829782
GA
10832022-01-17 Martin Liska <mliska@suse.cz>
1084
1085 * Make-lang.in: Rename .c names to .cc.
1086 * c-convert.cc: Likewise.
1087 * c-decl.cc (struct lang_identifier): Likewise.
1088 (pop_scope): Likewise.
1089 (finish_decl): Likewise.
1090 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
1091 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
1092 * c-parser.h (GCC_C_PARSER_H): Likewise.
1093 * c-tree.h (c_keyword_starts_typename): Likewise.
1094 (finish_declspecs): Likewise.
1095 (c_get_alias_set): Likewise.
1096 (enum c_oracle_request): Likewise.
1097 (tag_exists_p): Likewise.
1098 (set_c_expr_source_range): Likewise.
1099 * c-typeck.cc (c_common_type): Likewise.
1100 (c_finish_omp_clauses): Likewise.
1101 * config-lang.in: Likewise.
1102
11032022-01-17 Martin Liska <mliska@suse.cz>
1104
1105 * c-aux-info.c: Moved to...
1106 * c-aux-info.cc: ...here.
1107 * c-convert.c: Moved to...
1108 * c-convert.cc: ...here.
1109 * c-decl.c: Moved to...
1110 * c-decl.cc: ...here.
1111 * c-errors.c: Moved to...
1112 * c-errors.cc: ...here.
1113 * c-fold.c: Moved to...
1114 * c-fold.cc: ...here.
1115 * c-lang.c: Moved to...
1116 * c-lang.cc: ...here.
1117 * c-objc-common.c: Moved to...
1118 * c-objc-common.cc: ...here.
1119 * c-parser.c: Moved to...
1120 * c-parser.cc: ...here.
1121 * c-typeck.c: Moved to...
1122 * c-typeck.cc: ...here.
1123 * gccspec.c: Moved to...
1124 * gccspec.cc: ...here.
1125 * gimple-parser.c: Moved to...
1126 * gimple-parser.cc: ...here.
1127
11282022-01-17 Andrew Stubbs <ams@codesourcery.com>
1129
1130 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
1131
617db51d
GA
11322022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
1133
1134 PR c++/103705
1135 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
1136 outer node for ARRAY_REFs.
1137
62eb5308
GA
11382022-01-01 Jakub Jelinek <jakub@redhat.com>
1139
1140 PR objc/103639
1141 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
1142 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
1143
2554e2da
GA
11442021-12-17 Marek Polacek <polacek@redhat.com>
1145
1146 PR c/103649
1147 * c-decl.c (c_warn_unused_attributes): Don't warn for
1148 attribute_ignored_p.
1149 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
1150 arguments when the attribute is ignored.
1151
9c6586bc
GA
11522021-12-14 Jakub Jelinek <jakub@redhat.com>
1153
1154 PR c/103587
1155 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
1156 consume the pragma and silently skip to the pragma eol.
1157
c8dcf64b
GA
11582021-12-12 Jonathan Wakely <jwakely@redhat.com>
1159
1160 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
1161 * c-parser.c: Likewise.
1162
4b4839e3
GA
11632021-12-09 Jakub Jelinek <jakub@redhat.com>
1164
1165 PR pch/71934
1166 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
1167 to resort_data.new_value.
1168
641ff219
GA
11692021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1170
1171 * c-parser.c (struct omp_dim): New struct type for use inside
1172 c_parser_omp_variable_list.
1173 (c_parser_omp_variable_list): Allow multiple levels of array and
1174 component accesses in array section base-pointer expression.
1175 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
1176 c_parser_omp_var_list_parens.
1177 (c_parser_omp_clause_from): Likewise.
1178 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
1179 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
1180 POINTER_PLUS_EXPR.
1181 (c_finish_omp_clauses): Extend allowed ranged of expressions
1182 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
1183
11842021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1185
1186 PR middle-end/92120
1187 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
1188 call to c_parser_omp_variable_list to 'true'.
1189 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
1190 array base handling.
1191 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
1192
c177e806
GA
11932021-11-30 Thomas Schwinge <thomas@codesourcery.com>
1194
1195 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
1196 orphan loop" checking.
1197
11982021-11-30 Cesar Philippidis <cesar@codesourcery.com>
1199 Thomas Schwinge <thomas@codesourcery.com>
1200
1201 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
1202 OpenACC gang reductions.
1203
12042021-11-30 Richard Biener <rguenther@suse.de>
1205
1206 * gimple-parser.c (c_parser_gimple_postfix_expression):
1207 avoid unreachable code after break.
1208
87cd82c8
GA
12092021-11-29 Eric Gallager <egallager@gcc.gnu.org>
1210
1211 PR other/103021
1212 * Make-lang.in: Use ETAGS variable in TAGS target.
1213
12142021-11-29 Richard Biener <rguenther@suse.de>
1215
1216 * c-typeck.c (c_tree_equal): Remove unreachable return.
1217 * c-parser.c (get_matching_symbol): Likewise.
1218
e1d43592
GA
12192021-11-23 Jakub Jelinek <jakub@redhat.com>
1220
1221 * c-typeck.c (c_clone_omp_udr): Don't initialize
1222 id.transform_lang_insert_block.
1223
9c077398
GA
12242021-11-19 Martin Sebor <msebor@redhat.com>
1225
1226 PR c++/33925
1227 PR c/102867
1228 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
1229 code resulting from macro expansion.
1230
12312021-11-19 Martin Liska <mliska@suse.cz>
1232
1233 Revert:
1234 2021-11-19 Martin Liska <mliska@suse.cz>
1235
1236 * c-parser.c (add_debug_begin_stmt): Use option directly.
1237
483092d3
GA
12382021-11-18 Matthias Kretz <m.kretz@gsi.de>
1239
1240 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
1241 * c-parser.c (c_parser_postfix_expression): Likewise.
1242
12432021-11-18 Martin Liska <mliska@suse.cz>
1244
1245 * c-parser.c (add_debug_begin_stmt): Use option directly.
1246
280d2838
GA
12472021-11-17 Martin Sebor <msebor@redhat.com>
1248
1249 PR c/101702
1250 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
1251 bounds before deciding if they're constant.
1252
e2b57363
GA
12532021-11-15 Jakub Jelinek <jakub@redhat.com>
1254
1255 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
1256 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
1257
b39265d4
GA
12582021-11-11 Jakub Jelinek <jakub@redhat.com>
1259
1260 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
1261 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
1262 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
1263 OMP_CLAUSE_NUM_TEAMS_EXPR.
1264 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
1265 combined target teams even lower-bound expression.
1266
12672021-11-11 Richard Biener <rguenther@suse.de>
1268
1269 * gimple-parser.c: Shuffle bitmap.h include.
1270
18ae471f
GA
12712021-11-03 Joseph Myers <joseph@codesourcery.com>
1272
1273 PR c/103031
1274 * c-convert.c (c_convert): New function, based on convert.
1275 (convert): Make into wrapper of c_convert.
1276 (convert_init): New function.
1277 * c-typeck.c (enum impl_conv): Add ic_init_const.
1278 (convert_for_assignment): Handle ic_init_const like ic_init. Add
1279 new argument to convert_and_check call.
1280 (digest_init): Pass ic_init_const to convert_for_assignment for
1281 initializers required to be constant.
1282
b4df2dd3
GA
12832021-11-02 Richard Sandiford <richard.sandiford@arm.com>
1284
1285 * c-tree.h (c_simulate_record_decl): Declare.
1286 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
1287 * c-decl.c (c_simulate_record_decl): New function.
1288
c2bd5d8a
GA
12892021-10-22 Eric Gallager <egallager@gcc.gnu.org>
1290
1291 PR other/102663
1292 * Make-lang.in: Add dummy c.install-dvi target.
1293
93d183a5
GA
12942021-10-15 Richard Biener <rguenther@suse.de>
1295
1296 PR c/102763
1297 * gimple-parser.c
1298 (c_parser_gimple_postfix_expression_after_primary): Check
1299 for a pointer do be dereferenced by ->.
1300
5d5885c9
GA
13012021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1302
1303 * c-parser.c (c_finish_omp_declare_variant): Change call from
1304 c_omp_check_context_selector to omp_check_context_selector. Change
1305 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
1306
c9db17b8
GA
13072021-10-09 Jakub Jelinek <jakub@redhat.com>
1308
1309 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
1310 (c_parser_omp_scan_loop_body): Use it.
1311 (c_parser_omp_sections_scope): Likewise.
1312
50e20ee6
GA
13132021-10-07 Richard Biener <rguenther@suse.de>
1314
1315 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
1316
bb6194e0
GA
13172021-10-05 Richard Biener <rguenther@suse.de>
1318
1319 PR c/102605
1320 * gimple-parser.c (c_parser_gimple_postfix_expression):
1321 Accept more address _Literals.
1322
da9c5f78
GA
13232021-10-04 Marek Polacek <polacek@redhat.com>
1324
1325 PR c++/97573
1326 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
1327
9d116bcc
GA
13282021-10-01 Martin Sebor <msebor@redhat.com>
1329
1330 PR c/102103
1331 * c-typeck.c (maybe_warn_for_null_address): New function.
1332 (build_binary_op): Call it.
1333
13342021-10-01 Jakub Jelinek <jakub@redhat.com>
1335 Richard Biener <rguenther@suse.de>
1336
1337 PR sanitizer/102515
1338 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1339 for division even for SANITIZE_SI_OVERFLOW.
1340
13412021-10-01 Jakub Jelinek <jakub@redhat.com>
1342
1343 * c-parser.c (c_parser_omp_clause_order): Set
1344 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
1345
fd133479
GA
13462021-09-28 Andrew Pinski <apinski@marvell.com>
1347
1348 PR c/32122
1349 * c-parser.c (c_parser_statement_after_labels): Pass
1350 the c_expr instead of the tree to c_finish_goto_ptr.
1351 * c-typeck.c (c_finish_goto_ptr): Change the second
1352 argument type to c_expr.
1353 * c-tree.h (c_finish_goto_ptr): Likewise.
1354 Error out if the expression was not of a pointer type.
1355
e4777439
GA
13562021-09-22 Jakub Jelinek <jakub@redhat.com>
1357
1358 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
1359 modifiers.
1360
cf74e7b5
GA
13612021-09-18 Jakub Jelinek <jakub@redhat.com>
1362
1363 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
1364 and reproducible modifiers.
1365 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
1366
13672021-09-18 Jakub Jelinek <jakub@redhat.com>
1368
1369 * c-parser.c (c_parser_omp_clause_default): Handle private and
1370 firstprivate arguments, adjust diagnostics on unknown argument.
1371
0a4cb439
GA
13722021-09-17 Jakub Jelinek <jakub@redhat.com>
1373
1374 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
1375 is true.
1376
a26206ec
GA
13772021-09-10 Jakub Jelinek <jakub@redhat.com>
1378
1379 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
1380 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
1381 don't call build_conditional_expr, instead build a COND_EXPR directly.
1382 (c_parser_binary_expression): Avoid calling parser_build_binary_op
1383 if omp_atomic_lhs even in more cases for >, < or ==.
1384 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
1385 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
1386 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
1387 * c-typeck.c (build_binary_op): For flag_openmp only handle
1388 MIN_EXPR/MAX_EXPR.
1389
b2748138
GA
13902021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1391
1392 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
1393 directive.
1394
e11c6046
GA
13952021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1396
1397 * c-decl.c (enum deprecated_states): Add unavailable state.
1398 (merge_decls): Copy unavailability.
1399 (quals_from_declspecs): Handle unavailable case.
1400 (start_decl): Amend the logic handling suppression of nested
1401 deprecation states to include unavailability.
1402 (smallest_type_quals_location): Amend comment.
1403 (grokdeclarator): Handle the unavailable deprecation state.
1404 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
1405 * c-tree.h (struct c_declspecs): Add unavailable_p.
1406 * c-typeck.c (build_component_ref): Handle unavailability.
1407 (build_external_ref): Likewise.
1408
14092021-09-01 Roger Sayle <roger@nextmovesoftware.com>
1410 Joseph Myers <joseph@codesourcery.com>
1411
1412 PR c/79412
1413 * c-decl.c (duplicate_decls): On significant mismatches, mark the
1414 types of both (non-function) decls as error_mark_node, so that the
1415 middle-end can see the code is malformed.
1416 (free_attr_access_data): Don't process if the type has been set to
1417 error_mark_node.
1418
6d51ee43
GA
14192021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
1420
1421 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
1422 and 'ancestor' in 'target device' clauses.
1423
38b19c5b
GA
14242021-08-23 Jakub Jelinek <jakub@redhat.com>
1425
1426 * c-parser.c (c_parser_omp_clause_num_tasks,
1427 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
1428
5b2876f9
GA
14292021-08-22 Martin Uecker <muecker@gwdg.de>
1430
1431 PR c/98397
1432 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
1433 for pointers to arrays with qualifiers.
1434 (build_conditional_expr): For C23 don't lose qualifiers for pointers
1435 to arrays when the other pointer is a void pointer. Update warnings.
1436 (convert_for_assignment): Update warnings for C2X when converting from
1437 void* with qualifiers to a pointer to array with the same qualifiers.
1438
7c9e1645
GA
14392021-08-20 Jakub Jelinek <jakub@redhat.com>
1440
1441 * c-parser.c (c_parser_omp_error): New function.
1442 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
1443
14442021-08-20 Jakub Jelinek <jakub@redhat.com>
1445
1446 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
1447 comma at the end of list.
1448 (c_parser_omp_requires): Likewise.
1449
b57fba5e
GA
14502021-08-19 Jakub Jelinek <jakub@redhat.com>
1451
1452 * c-parser.c (c_parser_omp_requires): Don't call
1453 c_parser_peek_2nd_token and optionally consume token if current
1454 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
1455
6e529985
GA
14562021-08-18 Jakub Jelinek <jakub@redhat.com>
1457
1458 * c-parser.c (c_parser_omp_nothing): New function.
1459 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
1460
14612021-08-18 Jakub Jelinek <jakub@redhat.com>
1462
1463 * c-parser.c (c_parser_statement_after_labels): Add restart label
1464 near the start of the function. If c_parser_pragma returns false,
1465 goto restart.
1466 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
1467 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
1468 return what c_parser_omp_declare returned. Return true instead of
1469 false after emitting errors that the directive is not allowed in
1470 pragma_stmt context.
1471 (c_parser_omp_ordered): Return true instead of
1472 false after emitting errors that the directive is not allowed in
1473 pragma_stmt context.
1474 (c_parser_omp_target_update): Likewise.
1475 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
1476 Change return type from tree to bool, return false if the
1477 directive should be ignored in pragma_stmt contexts.
1478 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
1479 return their result directly.
1480 (c_parser_omp_cancellation_point): Change return type from void to
1481 bool, return false if the directive should be ignored in pragma_stmt
1482 contexts.
1483 (c_parser_omp_declare): Likewise.
1484
2d14d64b
GA
14852021-08-17 Jakub Jelinek <jakub@redhat.com>
1486
1487 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
1488 (c_parser_omp_scope): New function.
1489 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
1490
72be20e2
GA
14912021-08-12 Jakub Jelinek <jakub@redhat.com>
1492
1493 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
1494 (c_parser_omp_clause_filter): New function.
1495 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
1496 (OMP_MASKED_CLAUSE_MASK): Define.
1497 (c_parser_omp_masked): New function.
1498 (c_parser_omp_parallel): Handle parallel masked.
1499 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
1500 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
1501
15022021-08-12 Martin Uecker <muecker@gwdg.de>
1503
1504 PR c/101838
1505 PR c/29970
1506 * c-typeck.c (c_expr_sizeof_type): Evaluate
1507 size expressions for structs of variable size.
1508
15092021-08-12 Tobias Burnus <tobias@codesourcery.com>
1510
1511 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
1512 'primary' as alias for 'master'.
1513
3ae564ea
GA
15142021-08-10 Martin Uecker <muecker@gwdg.de>
1515
1516 PR c/29970
1517 * c-typeck.c (c_expr_sizeof_expr): Evaluate
1518 size expressions for structs of variable size.
1519
f92f4778
GA
15202021-08-06 Tamar Christina <tamar.christina@arm.com>
1521
1522 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
1523 * c-tree.h (c_simulate_enum_decl): Likewise.
1524
15252021-08-06 Martin Sebor <msebor@redhat.com>
1526
1527 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
1528 vec arguments to by-reference.
1529 (c_finish_omp_declare_simd): Same.
1530 (c_parser_compound_statement_nostart): Same.
1531 (c_parser_for_statement): Same.
1532 (c_parser_objc_methodprotolist): Same.
1533 (c_parser_oacc_routine): Same.
1534 (c_parser_omp_for_loop): Same.
1535 (c_parser_omp_declare_simd): Same.
1536
419c6c68
GA
15372021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1538 Joseph Myers <joseph@codesourcery.com>
1539 Cesar Philippidis <cesar@codesourcery.com>
1540
1541 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
1542 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
1543 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1544 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1545
92d45509
GA
15462021-07-20 Martin Sebor <msebor@redhat.com>
1547
1548 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
1549 by-const-reference.
1550 * c-typeck.c (c_build_function_call_vec): Same.
1551
d97d71a1
GA
15522021-07-15 Martin Sebor <msebor@redhat.com>
1553
1554 PR c/101289
1555 PR c/97548
1556 * c-decl.c (get_parm_array_spec): Strip nops.
1557
6fba0eea
GA
15582021-07-06 Martin Sebor <msebor@redhat.com>
1559
1560 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
1561
7a60a6e8
GA
15622021-07-02 Jakub Jelinek <jakub@redhat.com>
1563
1564 PR c/101297
1565 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
1566 appears before a CPP_NAME.
1567
90708f87
GA
15682021-06-25 Martin Sebor <msebor@redhat.com>
1569
1570 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
1571 warning_suppressed_p, suppress_warning, and copy_no_warning.
1572 (diagnose_mismatched_decls): Same.
1573 (duplicate_decls): Same.
1574 (grokdeclarator): Same.
1575 (finish_function): Same.
1576 (c_write_global_declarations_1): Same.
1577 * c-fold.c (c_fully_fold_internal): Same.
1578 * c-parser.c (c_parser_expr_no_commas): Same.
1579 (c_parser_postfix_expression): Same.
1580 * c-typeck.c (array_to_pointer_conversion): Same.
1581 (function_to_pointer_conversion): Same.
1582 (default_function_array_conversion): Same.
1583 (convert_lvalue_to_rvalue): Same.
1584 (default_conversion): Same.
1585 (build_indirect_ref): Same.
1586 (build_function_call_vec): Same.
1587 (build_atomic_assign): Same.
1588 (build_unary_op): Same.
1589 (c_finish_return): Same.
1590 (emit_side_effect_warnings): Same.
1591 (c_finish_stmt_expr): Same.
1592 (c_omp_clause_copy_ctor): Same.
1593
9aa8327e
GA
15942021-06-24 Jakub Jelinek <jakub@redhat.com>
1595
1596 PR c/101176
1597 * c-parser.c (c_parser_has_attribute_expression): Set source range for
1598 the result.
1599
16002021-06-24 Jakub Jelinek <jakub@redhat.com>
1601
1602 PR c/101171
1603 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
1604 error_mark_node.
1605
16062021-06-24 Jakub Jelinek <jakub@redhat.com>
1607
1608 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
1609 C_ORT_OMP for clauses on target construct.
1610 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
1611 (c_parser_omp_target): For non-combined target add
1612 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
1613 C_ORT_OMP_TARGET to c_finish_omp_clauses.
1614 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
1615 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
1616 never present on C_ORT_*DECLARE_SIMD.
1617 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
1618 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
1619 corresponding map clauses.
1620
2f080224
GA
16212021-06-21 Jakub Jelinek <jakub@redhat.com>
1622
1623 PR inline-asm/100785
1624 * c-typeck.c (c_mark_addressable): Diagnose trying to make
1625 bit-fields addressable.
1626
ede6c356
GA
16272021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1628
1629 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
1630 similar.
1631
8dc48181
GA
16322021-06-14 Tobias Burnus <tobias@codesourcery.com>
1633
1634 PR c/100913
1635 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
1636 var in the error case.
1637
438aac59
GA
16382021-06-07 Eric Botcazou <ebotcazou@adacore.com>
1639
1640 PR c/100920
1641 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
1642 spot built-in functions.
1643
7d6987e9
GA
16442021-06-06 Jakub Jelinek <jakub@redhat.com>
1645
1646 PR c/100902
1647 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
1648 even when target is combined with other constructs.
1649
16502021-06-06 Eric Botcazou <ebotcazou@adacore.com>
1651
1652 PR c/100920
1653 * c-decl.c (finish_struct): Fix thinko in previous change.
1654 * c-typeck.c (convert_for_assignment): Do not warn on pointer
1655 assignment and initialization for storage order purposes if the
1656 RHS is a call to a DECL_IS_MALLOC function.
1657
600f90cb
GA
16582021-06-04 Martin Sebor <msebor@redhat.com>
1659
1660 PR c/100783
1661 * c-objc-common.c (print_type): Handle erroneous types.
1662
440c8a0a
GA
16632021-06-03 Jakub Jelinek <jakub@redhat.com>
1664
1665 PR c++/100859
1666 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
1667 after depend only cases.
1668
ee682192
GA
16692021-05-31 Richard Biener <rguenther@suse.de>
1670
1671 PR c++/88601
1672 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
1673 * c-parser.c (c_parser_postfix_expression): Likewise.
1674
48166757
GA
16752021-05-28 Richard Biener <rguenther@suse.de>
1676
1677 PR c/100803
1678 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
1679 invalid if conditions.
1680
16812021-05-28 Jakub Jelinek <jakub@redhat.com>
1682
1683 PR middle-end/99928
1684 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
1685 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1686 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
1687 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
1688 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
1689 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
1690 if present in map_head, map_field_head or map_firstprivate_head
1691 bitmaps.
1692
16932021-05-28 Tobias Burnus <tobias@codesourcery.com>
1694
1695 * c-parser.c (c_parser_omp_clause_affinity): New.
1696 (c_parser_omp_clause_name, c_parser_omp_variable_list,
1697 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
1698 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
1699 c_finish_omp_clauses): Likewise.
1700
01c59ef2
GA
17012021-05-26 Eric Botcazou <ebotcazou@adacore.com>
1702
1703 PR c/100653
1704 * c-decl.c (finish_struct): Warn for a union containing an aggregate
1705 field with a differing scalar storage order.
1706
2832d51b
GA
17072021-05-21 Jakub Jelinek <jakub@redhat.com>
1708
1709 PR middle-end/99928
1710 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
1711 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
1712 if a decl is mentioned both in map clause and in such firstprivate
1713 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
1714
65f32e5d
GA
17152021-05-19 Jakub Jelinek <jakub@redhat.com>
1716
1717 PR middle-end/99928
1718 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
1719 master when combined with taskloop.
1720 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
1721 parallel master when not combined with taskloop.
1722
a8daf9a1
GA
17232021-05-18 Richard Biener <rguenther@suse.de>
1724
1725 PR c/100522
1726 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
1727 Diagnose calls to non-functions.
1728 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
1729
a7ffc1ef
GA
17302021-05-17 Richard Biener <rguenther@suse.de>
1731
1732 PR c/100625
1733 * gimple-parser.c (c_parser_gimple_label): Avoid building
1734 a GIMPLE label with NULL label decl.
1735
f9af11c7
GA
17362021-05-13 Martin Sebor <msebor@redhat.com>
1737
1738 PR c/100550
1739 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
1740
0ff3a0f2
GA
17412021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1742
1743 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
1744 'close'.
1745
aa891c56
GA
17462021-05-10 Martin Liska <mliska@suse.cz>
1747
1748 * c-aux-info.c (affix_data_type): Use startswith
1749 function instead of strncmp.
1750 * c-typeck.c (build_function_call_vec): Likewise.
1751 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
1752
62d87a32
GA
17532021-05-07 Eric Botcazou <ebotcazou@adacore.com>
1754
1755 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
1756 on the address of a pointer field in a record with reverse SSO.
1757
99e8df7a
GA
17582021-05-04 Tobias Burnus <tobias@codesourcery.com>
1759
1760 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
1761 for || and && reductions.
1762
3c8e539d
GA
17632021-04-29 Joseph Myers <joseph@codesourcery.com>
1764
1765 * c-typeck.c (function_types_compatible_p): For C2X, treat
1766 unprototyped function as compatible with non-variadic prototyped
1767 function even if some argument types are changed by the default
1768 argument promotions.
1769
ee351f7f
GA
17702021-04-15 Martin Sebor <msebor@redhat.com>
1771
1772 PR c/99420
1773 PR c/99972
1774 * c-decl.c (pushdecl): Always propagate type attribute.
1775
17762021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1777
1778 PR c/98852
1779 * c-typeck.c (c_common_type): Do not drop attributes that
1780 affect type identity.
1781
1d54b138
GA
17822021-04-10 Jakub Jelinek <jakub@redhat.com>
1783
1784 PR c/99990
1785 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
1786 error_mark_node.
1787
4493b1c1
GA
17882021-03-25 Jakub Jelinek <jakub@redhat.com>
1789
1790 PR c++/99565
1791 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
1792 to operand_equal_p.
1793
5f256a70
GA
17942021-03-19 Jakub Jelinek <jakub@redhat.com>
1795
1796 PR c/99588
1797 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
1798 with modifycode NOP_EXPR produces and mark the _Atomic var as read
1799 if found.
1800 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
1801 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
1802 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
1803
3c5b6d24
GA
18042021-03-15 Tobias Burnus <tobias@codesourcery.com>
1805
1806 PR c++/99509
1807 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
1808 ensure that the varpool node is marked as offloadable.
1809
ceae9533
GA
18102021-03-05 Tobias Burnus <tobias@codesourcery.com>
1811
1812 PR c/99137
1813 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
1814
4028d01a
GA
18152021-02-24 Martin Sebor <msebor@redhat.com>
1816
1817 PR middle-end/97172
1818 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
1819
bf81237e
GA
18202021-02-18 Jakub Jelinek <jakub@redhat.com>
1821
1822 PR c/99136
1823 * c-typeck.c (c_finish_return): Don't wrap retval into
1824 EXCESS_PRECISION_EXPR in functions that return void.
1825
0c5cdb31
GA
18262021-02-11 Marek Polacek <polacek@redhat.com>
1827
1828 * c-parser.c (c_parser_if_statement): Use vec_free.
1829
a19dd5e6
GA
18302021-02-04 Martin Sebor <msebor@redhat.com>
1831
1832 PR c/97882
1833 * c-decl.c (locate_old_decl): Add type to diagnostic output.
1834 (diagnose_mismatched_decls): Same.
1835 (start_function): Introduce temporaries for better readability.
1836 * c-typeck.c (comptypes_internal): Only consider complete enum
1837 types in comparisons with integers.
1838
f7884fb1
GA
18392021-02-01 Martin Sebor <msebor@redhat.com>
1840
1841 PR middle-end/97172
1842 * c-decl.c (free_attr_access_data): New function.
1843 (c_parse_final_cleanups): Call free_attr_access_data.
1844
59cf67d1
GA
18452021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1846
1847 * c-parser.c (c_parser_omp_clause_detach): New.
1848 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
1849 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
1850 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
1851 clause. Prevent use of detach with mergeable and overriding the
1852 data sharing mode of the event handle.
1853
2f7f0d32
GA
18542021-01-15 Jakub Jelinek <jakub@redhat.com>
1855
1856 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
1857 unqualified element type and then call c_build_qualified_type on the
1858 ARRAY_TYPE.
1859
7d187e4f
GA
18602021-01-07 Richard Biener <rguenther@suse.de>
1861
1862 * gimple-parser.c (c_parser_gimple_compound_statement): Only
1863 reallocate loop array if it is too small.
1864
eefe499f
GA
18652020-12-16 Martin Uecker <muecker@gwdg.de>
1866
1867 PR c/98047
1868 * c-typeck.c (build_modify_expr): Drop qualifiers.
1869
18702020-12-16 Martin Uecker <muecker@gwdg.de>
1871
1872 PR c/98260
1873 * c-parser.c (c_parser_expression): Look into
1874 nop expression when marking expressions as read.
1875
d52945ce
GA
18762020-12-14 Martin Liska <mliska@suse.cz>
1877
1878 PR sanitizer/98204
1879 * c-typeck.c (pointer_diff): Do not emit a top-level
1880 sanitization.
1881 (build_binary_op): Likewise.
1882
ca2bd949
GA
18832020-12-09 Tobias Burnus <tobias@codesourcery.com>
1884
1885 * c-parser.c (c_parser_omp_allocate): New.
1886 (c_parser_omp_construct): Call it.
1887
18882020-12-09 Richard Biener <rguenther@suse.de>
1889
1890 PR c/98200
1891 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
1892 early on error.
1893
bc8a7013
GA
18942020-12-07 Martin Uecker <muecker@gwdg.de>
1895
1896 PR c/97981
1897 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
1898 that drops qualifiers to the end of the function.
1899
d48df6f2
GA
19002020-11-26 Martin Uecker <muecker@gwdg.de>
1901
1902 PR c/65455
1903 PR c/92935
1904 * c-parser.c (c_parser_declaration_or_fndef): Remove
1905 redundant code to drop qualifiers of _Atomic types for __auto_type.
1906 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
1907 types for __typeof__.
1908
1e2c9a27
GA
19092020-11-24 Jakub Jelinek <jakub@redhat.com>
1910
1911 PR c/97958
1912 * c-parser.c (c_parser_binary_expression): For omp atomic binary
1913 expressions, use make_node instead of build2 to avoid checking build2
1914 performs.
1915
8e6198d0
GA
19162020-11-23 Joseph Myers <joseph@codesourcery.com>
1917
1918 PR c/95630
1919 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
1920 for comparisons of complete and incomplete pointers.
1921
7a97e2fc
GA
19222020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1923
1924 * c-aux-info.c (gen_type): Support opaque types.
1925
82e5048e
GA
19262020-11-20 Martin Sebor <msebor@redhat.com>
1927
1928 PR middle-end/97879
1929 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
1930
19312020-11-20 Jakub Jelinek <jakub@redhat.com>
1932
1933 PR other/97911
1934 * Make-lang.in (c.serial): Change from goal to a variable.
1935 (.PHONY): Drop c.serial.
1936
19372020-11-20 Martin Uecker <muecker@gwdg.de>
1938
1939 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1940
d62586ee
GA
19412020-11-19 Jakub Jelinek <jakub@redhat.com>
1942
1943 PR c/97860
1944 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1945 error_operand_p.
1946
25bb75f8
GA
19472020-11-18 Jakub Jelinek <jakub@redhat.com>
1948
1949 * Make-lang.in (c.serial): New goal.
1950 (.PHONY): Add c.serial c.prev.
1951 (cc1$(exeext)): Call LINK_PROGRESS.
1952
77f67db2
GA
19532020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1954
1955 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1956 goto too.
1957 * c-typeck.c (build_asm_expr): Remove an assert checking output
1958 absence for asm goto.
1959
19602020-11-13 Jakub Jelinek <jakub@redhat.com>
1961
1962 * c-typeck.c (c_finish_omp_clauses): Don't clear
1963 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1964
19652020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1966
1967 PR objc/77404
1968 * c-parser.c (c_parser_objc_class_definition): Pass the
1969 location of the class name to the interface declaration.
1970
bb622641
GA
19712020-11-10 Strager Neds <strager.nds@gmail.com>
1972
1973 * c-decl.c (merge_decls): Use new overload of
1974 set_decl_section_name.
1975
19762020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1977
1978 * c-parser.c (c_parser_omp_target_data): Add use of
1979 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1980 handled map clause kind.
1981 (c_parser_omp_target_enter_data): Likewise.
1982 (c_parser_omp_target_exit_data): Likewise.
1983 (c_parser_omp_target): Likewise.
1984 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1985 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1986 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1987 same struct field access to co-exist on OpenMP construct.
1988
2da7ee05
GA
19892020-11-07 Martin Uecker <muecker@gwdg.de>
1990
1991 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1992 (c_parser_all_labels): Likewise.
1993
44cab2d8
GA
19942020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1995
1996 * c-parser.c (c_parser_objc_at_property_declaration):
1997 Improve parsing fidelity. Associate better location info
1998 with @property attributes. Clean up the interface to
1999 objc_add_property_declaration ().
2000
20012020-11-06 Nathan Sidwell <nathan@acm.org>
2002
2003 * c-decl.c (diagnose_mismatched_decls): Rename
2004 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2005 (warn_if_shadowing, implicitly_declare, names_builtin_p)
2006 (collect_source_refs): Likewise.
2007 * c-typeck.c (inform_declaration, inform_for_arg)
2008 (convert_for_assignment): Likewise.
2009
20102020-11-06 Tobias Burnus <tobias@codesourcery.com>
2011
2012 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
2013 OpenACC matching.
2014 (c_parser_omp_construct): Update call.
2015
35c125cb
GA
20162020-11-04 Jakub Jelinek <jakub@redhat.com>
2017
2018 PR c++/97670
2019 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
2020 find underlying decl to clear in the aligned_head bitmap.
2021
20222020-11-04 Joseph Myers <joseph@codesourcery.com>
2023
2024 * c-decl.c (handle_nodiscard_attribute): New.
2025 (std_attribute_table): Add nodiscard.
2026 * c-parser.c (c_parser_std_attribute): Expect argument to
2027 nodiscard attribute to be a string. Do not special-case ignoring
2028 nodiscard.
2029 * c-typeck.c (maybe_warn_nodiscard): New.
2030 (build_compound_expr, emit_side_effect_warnings): Call
2031 maybe_warn_nodiscard.
2032 (c_process_expr_stmt, c_finish_stmt_expr): Also call
2033 emit_side_effect_warnings if warn_unused_result.
2034
4f0606fe
GA
20352020-10-29 Asher Gordon <AsDaGo@posteo.net>
2036
2037 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
2038 with XDELETE.
2039 (finish_init): Likewise.
2040 (pop_init_level): Likewise.
2041
e93aae4a
GA
20422020-10-28 Joseph Myers <joseph@codesourcery.com>
2043
2044 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
2045 error_at for omitted parameter name.
2046
20472020-10-28 Jakub Jelinek <jakub@redhat.com>
2048
2049 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
2050 (c_parser_omp_clause_allocate): New function.
2051 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
2052 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2053 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
2054 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
2055 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
2056 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
2057 PRAGMA_OMP_CLAUSE_ALLOCATE.
2058 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
2059
89bb01e7
GA
20602020-10-27 Joseph Myers <joseph@codesourcery.com>
2061
2062 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
2063 standard attributes.
2064
efe71fcc
GA
20652020-10-23 Marek Polacek <polacek@redhat.com>
2066
2067 PR c++/91741
2068 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
2069 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
2070 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
2071 * c-tree.h (char_type_p): Declare.
2072 * c-typeck.c (char_type_p): No longer static.
2073
20742020-10-23 Martin Sebor <msebor@redhat.com>
2075
2076 PR middle-end/97552
2077 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
2078
2fe5b7d1
GA
20792020-09-19 Martin Sebor <msebor@redhat.com>
2080
2081 PR c/50584
2082 * c-decl.c (lookup_last_decl): Define new function.
2083 (c_decl_attributes): Call it.
2084 (start_decl): Add argument and use it.
2085 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
2086 (get_parm_array_spec): Define new function.
2087 (push_parm_decl): Call get_parm_array_spec.
2088 (start_function): Call warn_parm_array_mismatch. Build attribute
2089 access and add it to current function.
2090 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
2091 in forms of array parameters.
2092 * c-tree.h (start_decl): Add argument.
2093
20942020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2095
2096 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
2097 with...
2098 (in_statement): New.
2099 (start_function): Adjust for above change.
2100 (c_push_function_context, c_pop_function_context): Likewise.
2101 * c-lang.h (struct language_function): Likewise.
2102 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
2103 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
2104 New.
2105 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
2106 (c_parser_switch_statement): Adjust break/switch context handling
2107 and calls to renamed functions.
2108 (c_parser_while_statement): Adjust break/switch context handling and
2109 build a WHILE_STMT.
2110 (c_parser_do_statement): Ditto, with DO_STMT respectively.
2111 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
2112 (c_parser_omp_for_loop): Adjust break/switch context handling.
2113 * c-tree.h (c_break_label, c_cont_label): Delete.
2114 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2115 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
2116 (in_statement, switch_statement_break_seen_p): Declare.
2117 (c_start_case, c_finish_case): Renamed to...
2118 (c_start_switch, c_finish_switch).
2119 (c_finish_bc_stmt): Adjust arguments.
2120 * c-typeck.c (build_function_call_vec): Don't try to print
2121 statements with %qE format.
2122 (struct c_switch): Rename switch_expr field to switch_stmt.
2123 Add break_stmt_seen_p field.
2124 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
2125 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
2126 (do_case): Update for changes to struct c_switch.
2127 (c_finish_case): Rename to c_finish_switch. Update for changes to
2128 struct c_switch and change of representation from SWITCH_EXPR to
2129 SWITCH_STMT.
2130 (c_finish_loop): Delete.
2131 (c_finish_bc_stmt): Update to reflect changes to break/continue
2132 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
2133 of a GOTO_EXPR except for objc foreach loops.
2134
e1a4a8a0
GA
21352020-09-01 Jakub Jelinek <jakub@redhat.com>
2136
2137 PR c++/96867
2138 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
2139 only on PARM_DECLs.
2140
8f7ea26a
GA
21412020-08-28 Martin Sebor <msebor@redhat.com>
2142
2143 PR c/96596
2144 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
2145 argument type.
2146
8b394f01
GA
21472020-08-27 Martin Liska <mliska@suse.cz>
2148
2149 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
2150 growth function to true.
2151
db0f6efe
GA
21522020-08-25 Tobias Burnus <tobias@codesourcery.com>
2153
2154 PR c/96678
2155 * c-typeck.c (handle_omp_array_sections_1): Talk about
2156 array function parameter in the error message.
2157
5c265693
GA
21582020-08-18 Jakub Jelinek <jakub@redhat.com>
2159
2160 PR c/96571
2161 * c-parser.c (c_parser_generic_selection): Change match_found from bool
2162 to int, holding index of the match. Call mark_exp_read on the selector
2163 expression and on expressions other than the selected one.
2164
4967ca2f
GA
21652020-08-01 Richard Sandiford <richard.sandiford@arm.com>
2166
2167 PR c/96377
2168 * c-typeck.c (process_init_element): Split test for whether to
2169 recurse into a record, union or array into...
2170 (initialize_elementwise_p): ...this new function. Don't recurse
2171 into a vector type if the initialization value is also a vector.
2172
48cc2e46
GA
21732020-07-31 Richard Biener <rguenther@suse.de>
2174
2175 PR debug/96383
2176 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
2177 Define to c_common_finalize_early_debug.
2178
3ea9abca
GA
21792020-07-22 Tobias Burnus <tobias@codesourcery.com>
2180
2181 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
2182 (c_parser_omp_critical): Permit hint(0) clause without named critical.
2183 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
2184
30430061
GA
21852020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
2186
2187 PR target/95237
2188 * c-decl.c (finish_decl): Call target hook
2189 lower_local_decl_alignment to lower local decl alignment.
2190
3f8ca9cb
GA
21912020-07-09 Julian Brown <julian@codesourcery.com>
2192 Thomas Schwinge <thomas@codesourcery.com>
2193
2194 PR middle-end/95270
2195 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
2196 for standalone attach/detach clauses.
2197
a82c4c4c 21982020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2199
2200 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
2201 set, warn for conversion between pointers that point to incompatible
2202 scalar storage orders.
2203
f60ee68d
GA
22042020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
2205
2206 * c-parser.c (c_parser_statement_after_labels): Pass correct
2207 parameters to c_parser_do_statement.
2208
56638b9b
GA
22092020-06-16 Jakub Jelinek <jakub@redhat.com>
2210
2211 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
2212 c_in_omp_for.
2213 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
2214 premature c_fully_fold. Defer explicit c_fully_fold calls to after
2215 c_finish_omp_for.
2216 * c-tree.h (c_in_omp_for): Declare.
2217 * c-typeck.c (c_in_omp_for): Define.
2218 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
2219 (digest_init): Likewise.
2220 (build_binary_op): Likewise.
2221
22222020-06-16 Jakub Jelinek <jakub@redhat.com>
2223
2224 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
2225 from kind by comma rather than colon.
2226
1a59f3db
GA
22272020-06-05 Mark Wielaard <mark@klomp.org>
2228
2229 * c-decl.c (implicit_decl_warning): When warned and olddecl is
2230 an undeclared builtin, then add a fixit header hint, if found.
2231 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
2232 warning_at about implicit builtin declaration type mismatch.
2233
9a5b7438
GA
22342020-06-03 Mark Wielaard <mark@klomp.org>
2235
2236 * c-parser.c (struct c_parser): Add seen_string_literal
2237 bitfield.
2238 (c_parser_consume_token): Reset seen_string_literal.
2239 (c_parser_error_richloc): Add name_hint if seen_string_literal
2240 and next token is a CPP_NAME and we have a missing header
2241 suggestion for the name.
2242 (c_parser_string_literal): Set seen_string_literal.
2243
22442020-06-03 Mark Wielaard <mark@klomp.org>
2245
2246 * c-parser.c (c_parser_postfix_expression_after_primary): Add
2247 scope with matching_parens after CPP_OPEN_PAREN.
2248
22492020-06-03 Tobias Burnus <tobias@codesourcery.com>
2250
2251 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
2252
53ffb43a
GA
22532020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
2254
2255 * Make-lang.in: Remove extra slash.
2256
8f66f175
ML
22572020-05-19 Martin Liska <mliska@suse.cz>
2258
2259 * c-parser.c: Fix typo.
2260
49ddde69
JJ
22612020-05-14 Jakub Jelinek <jakub@redhat.com>
2262
2263 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
2264
eb72dc66
RB
22652020-05-07 Richard Biener <rguenther@suse.de>
2266
2267 PR middle-end/94703
2268 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
2269 DECL_GIMPLE_REG_P.
2270
bf915591
JJ
22712020-04-30 Jakub Jelinek <jakub@redhat.com>
2272
2273 PR c/94842
2274 * c-decl.c (set_labels_context_r): In addition to context-less
2275 LABEL_DECLs adjust also LABEL_DECLs with context equal to
2276 parent function if any.
2277 (store_parm_decls): Adjust comment.
2278
e1113ffb
JJ
22792020-04-19 Jakub Jelinek <jakub@redhat.com>
2280
2281 PR objc/94637
2282 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
2283 two CPP_COLON tokens.
2284
2e389749
JJ
22852020-04-17 Jakub Jelinek <jakub@redhat.com>
2286
2287 PR other/94629
2288 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
2289 to data.clauses.
2290
2dc9294c
JJ
22912020-04-15 Jakub Jelinek <jakub@redhat.com>
2292
2293 PR c/94593
2294 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
2295 requires directive when not at file scope.
2296
13e41d8b
TB
22972020-04-08 Tobias Burnus <tobias@codesourcery.com>
2298
2299 PR middle-end/94120
2300 * c-decl.c (c_check_in_current_scope): New function.
2301 * c-tree.h (c_check_in_current_scope): Declare it.
2302 * c-parser.c (c_parser_oacc_declare): Add check that variables
2303 are declared in the same scope as the directive. Fix handling
2304 of namespace vars.
2305
4df50a05
JJ
23062020-04-07 Jakub Jelinek <jakub@redhat.com>
2307
2308 PR c++/94512
2309 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
2310 if c_parser_omp_master succeeded.
2311
5db9e893
JJ
23122020-03-23 Jakub Jelinek <jakub@redhat.com>
2313
2314 PR gcov-profile/94029
2315 PR c/94239
2316 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
2317 the function_start_locus location. Don't do that afterwards for the
2318 __GIMPLE body parsing.
2319
9def91e9
JJ
23202020-03-19 Jakub Jelinek <jakub@redhat.com>
2321
2322 PR gcov-profile/94029
2323 * c-tree.h (finish_function): Add location_t argument defaulted to
2324 input_location.
2325 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
2326 set it to the locus of closing } if non-NULL.
2327 (c_parser_compound_statement_nostart): Return locus of closing }.
2328 (c_parser_parse_rtl_body): Likewise.
2329 (c_parser_declaration_or_fndef): Propagate locus of closing } to
2330 finish_function.
2331 * c-decl.c (finish_function): Add end_loc argument, use it instead of
2332 input_location to set function_end_locus.
2333
046c5890
JJ
23342020-03-17 Jakub Jelinek <jakub@redhat.com>
2335
2336 PR c/94172
2337 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
2338 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
2339 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
2340 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
2341 ENUMERAL_TYPEs.
2342 (finish_incomplete_vars): New function, moved from finish_struct. Use
2343 relayout_decl instead of layout_decl.
2344 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
2345 being TYPE_VFIELD. Use finish_incomplete_vars.
2346 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
2347 finish_incomplete_vars.
2348 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2349 also on ENUMERAL_TYPEs.
2350
c015ff8c
JJ
23512020-03-16 Jakub Jelinek <jakub@redhat.com>
2352
2353 PR c/94179
2354 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
2355
f2e9fe5f
MS
23562020-03-13 Martin Sebor <msebor@redhat.com>
2357
2358 PR c/94040
2359 * c-decl.c (builtin_structptr_type_count): New constant.
2360 (match_builtin_function_types): Reject decls that are incompatible
2361 in types pointed to by pointers.
2362 (diagnose_mismatched_decls): Adjust comments.
2363
c9d70946
JM
23642020-03-05 Joseph Myers <joseph@codesourcery.com>
2365
2366 PR c/93577
2367 * c-typeck.c (pop_init_level): Do not diagnose initializers as
2368 empty when initialized type is error_mark_node.
2369 (set_designator, process_init_element): Ignore initializers for
2370 elements of a variable-size type or of error_mark_node.
2371
726e292d
MS
23722020-03-01 Martin Sebor <msebor@redhat.com>
2373
2374 PR middle-end/93926
2375 * c-decl.c (types_close_enough_to_match): New function.
2376 (match_builtin_function_types):
2377 (diagnose_mismatched_decls): Add missing inform call to a warning.
2378
a499c2f8
MS
23792020-03-01 Martin Sebor <msebor@redhat.com>
2380
2381 PR c/93812
2382 * c-typeck.c (build_functype_attribute_variant): New function.
2383 (composite_type): Call it.
2384
9c3da8cc
JJ
23852020-02-25 Jakub Jelinek <jakub@redhat.com>
2386
2387 PR other/93912
2388 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
2389 Rename last argument from probablity to probability.
2390
bacdd5e9
JJ
23912020-02-13 Jakub Jelinek <jakub@redhat.com>
2392
2393 PR c/93576
2394 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
2395 *expr if it has side effects.
2396
f9eb0973
JL
23972020-01-30 Jeff Law <law@redhat.com>
2398
2399 PR c/88660
2400 * c-parser.c (c_parser_switch_statement): Make sure to request
2401 marking the switch expr as used.
2402
ac68e287
JM
24032020-01-22 Joseph Myers <joseph@codesourcery.com>
2404
2405 PR c/93348
2406 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
2407 argument with integer operands.
2408
852f0ae8
KK
24092020-01-16 Kerem Kat <keremkat@gmail.com>
2410
2411 PR c/92833
2412 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
2413 to support 4 available tokens.
2414
e2346a33
JM
24152020-01-15 Joseph Myers <joseph@codesourcery.com>
2416
2417 PR c/93072
2418 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
2419 determine whether to set DECL_CONTEXT.
2420
3d77686d
JM
24212020-01-13 Joseph Myers <joseph@codesourcery.com>
2422
2423 PR c/93241
2424 * c-typeck.c (build_c_cast): Check for expressions with integer
2425 operands that can occur in an unevaluated part of an integer
2426 constant expression and call note_integer_operands as needed.
2427
f74c4b2c
RB
24282019-01-08 Richard Biener <rguenther@suse.de>
2429
2430 PR middle-end/93199
2431 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
2432 permanently.
2433
8d9254fc
JJ
24342020-01-01 Jakub Jelinek <jakub@redhat.com>
2435
2436 Update copyright years.
2437
39292e25
EB
24382019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2439
2440 * c-decl.c (collect_source_ref_cb): Delete.
2441 (for_each_global_decl): Rename into...
2442 (collect_source_refs): ...this. Call collect_source_ref directly.
2443 (c_parse_final_cleanups): Always call collect_source_ref on the main
2444 input filename.
2445
519d7496
JB
24462019-12-19 Julian Brown <julian@codesourcery.com>
2447 Cesar Philippidis <cesar@codesourcery.com>
2448
2449 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
2450 detach clauses.
2451 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
2452 Allow deref (->) in variable lists if true.
2453 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
2454 Pass to c_parser_omp_variable_list.
2455 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
2456 call to c_parser_omp_variable_list.
2457 (c_parser_oacc_all_clauses): Support attach and detach clauses.
2458 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
2459 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
2460 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
2461 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
2462 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
2463 and detach. Support deref.
2464 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
2465 GOMP_MAP_ALWAYS_POINTER for OpenACC.
2466 (c_oacc_check_attachments): New function.
2467 (c_finish_omp_clauses): Check attach/detach arguments for being
2468 pointers using above. Support deref.
2469
a6163563
JB
24702019-12-19 Julian Brown <julian@codesourcery.com>
2471 Maciej W. Rozycki <macro@codesourcery.com>
2472 Tobias Burnus <tobias@codesourcery.com>
2473 Thomas Schwinge <thomas@codesourcery.com>
2474
2475 * c-parser.c (c_parser_omp_clause_name): Support no_create.
2476 (c_parser_oacc_data_clause): Likewise.
2477 (c_parser_oacc_all_clauses): Likewise.
2478 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2479 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
2480 PRAGMA_OACC_CLAUSE_NO_CREATE.
2481 * c-typeck.c (handle_omp_array_sections): Support
2482 GOMP_MAP_NO_ALLOC.
2483
d68f5d45
DM
24842019-12-09 David Malcolm <dmalcolm@redhat.com>
2485
2486 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2487 Replace label_text ctor calls.
2488
4691bf46
JM
24892019-12-04 Joseph Myers <joseph@codesourcery.com>
2490
2491 PR c/36941
2492 PR c/88827
2493 * c-typeck.c (convert_lvalue_to_rvalue): Call
2494 require_complete_type for arguments not of void types.
2495 (build_indirect_ref): Do not diagnose dereferencing pointers to
2496 incomplete types.
2497 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
2498
85d11957
JM
24992019-12-03 Joseph Myers <joseph@codesourcery.com>
2500
2501 PR c/88704
2502 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
2503 old-style parameter definitions.
2504
4569f8b3
SL
25052019-12-01 Sandra Loosemore <sandra@codesourcery.com>
2506
2507 PR target/92499
2508
2509 * c-decl.c (flexible_array_type_p): Move to common code.
2510
65ef05d0
RS
25112019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2512
2513 * c-decl.c (start_decl): Allow initialization of variables whose
2514 size is a POLY_INT_CST.
2515 (finish_decl): Use verify_type_context to check whether the target
2516 allows variables with a particular type to have static or thread-local
2517 storage duration. Don't raise a second error if such variables do
2518 not have a constant size.
2519 (grokdeclarator): Use verify_type_context to check whether the
2520 target allows fields or array elements to have a particular type.
2521 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
2522 the target allows pointer difference for the types involved.
2523 (build_unary_op): Likewise for pointer increment and decrement.
2524
34b43828
JM
25252019-11-29 Joseph Myers <joseph@codesourcery.com>
2526
2527 * c-parser.c (struct c_parser): Add members raw_tokens and
2528 raw_tokens_used.
2529 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
2530 using previously-lexed raw tokens.
2531 (c_parser_peek_nth_token_raw)
2532 (c_parser_check_balanced_raw_token_sequence): New functions.
2533 (c_parser_nth_token_starts_std_attributes): Use
2534 c_parser_check_balanced_raw_token_sequence for Objective-C.
2535
5b8d9367
JM
25362019-11-25 Joseph Myers <joseph@codesourcery.com>
2537
2538 PR c/91985
2539 * c-decl.c (finish_declspecs): Use int instead of decimal
2540 floating-point types if decimal floating-point not supported.
2541
1723e1be
JM
25422019-11-25 Joseph Myers <joseph@codesourcery.com>
2543
2544 * c-tree.h (struct c_declarator): Use a structure for id member.
2545 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
2546 declarators at the start, not when handling individual declarators
2547 later. Use u.id.id instead of u.id.
2548 (grokfield): Use u.id.id instead of u.id.
2549 (build_id_declarator): Set u.id.id and u.id.attrs.
2550 (finish_declspecs): Handle postfix attributes in case of typedef
2551 name or typeof used.
2552 * c-parser.c (c_parser_direct_declarator)
2553 (c_parser_direct_declarator_inner): Place declarator for
2554 attributes inside that for function or array, not outside. Set
2555 u.id.attrs for identifiers.
2556 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
2557 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
2558 instead of u.id.
2559
bdaf8be1
JJ
25602019-11-22 Jakub Jelinek <jakub@redhat.com>
2561
2562 PR c/90677
2563 * c-decl.c (identifier_global_tag): Define.
2564
3e00ba47
RB
25652019-11-20 Richard Biener <rguenther@suse.de>
2566
2567 PR c/92088
2568 * c-decl.c (grokdeclarator): Prevent inlining of nested
2569 function with VLA arguments.
2570
8c5b727a
JM
25712019-11-20 Joseph Myers <joseph@codesourcery.com>
2572
2573 * c-decl.c (c_warn_type_attributes): New function.
2574 (groktypename, grokdeclarator, finish_declspecs): Call
2575 c_warn_type_attributes before applying attributes to types.
2576 * c-tree.h (c_warn_type_attributes): Declare.
2577
192961ff
JM
25782019-11-19 Joseph Myers <joseph@codesourcery.com>
2579
2580 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
2581 standard attributes.
2582 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
2583 pedwarn for unknown standard attributes and return error_mark_node
2584 for them.
2585
20a38017
MM
25862019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
2587
2588 * c-parser.c (c_parser_parse_rtl_body): Always call
2589 run_rtl_passes, even if startwith pass is not provided.
2590
d5fbe5e0
JM
25912019-11-15 Joseph Myers <joseph@codesourcery.com>
2592
2593 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
2594 duplicate standard attributes.
2595
97cc1187
JM
25962019-11-15 Joseph Myers <joseph@codesourcery.com>
2597
2598 * c-decl.c (std_attribute_table): Add maybe_unused.
2599
f8aea5e3
JM
26002019-11-15 Joseph Myers <joseph@codesourcery.com>
2601
2602 * c-decl.c (std_attribute_table): Add fallthrough.
2603 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
2604 attribute at top level.
2605
2cc94aa8
JM
26062019-11-15 Joseph Myers <joseph@codesourcery.com>
2607
2608 * c-decl.c (std_attribute_table): New.
2609 (c_init_decl_processing): Register attributes from
2610 std_attribute_table.
2611 * c-parser.c (c_parser_attribute_arguments): Add arguments
2612 require_string and allow_empty_args. All callers changed.
2613 (c_parser_std_attribute): Set require_string argument for
2614 "deprecated" attribute.
2615
7c5890cc
JM
26162019-11-14 Joseph Myers <joseph@codesourcery.com>
2617
2618 * c-parser.c (c_parser_postfix_expression)
2619 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
2620 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
2621
e8738f4e
RS
26222019-11-14 Richard Sandiford <richard.sandiford@arm.com>
2623
2624 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
2625 of build_same_sized_truth_vector_type.
2626 (build_vec_cmp): Likewise.
2627
b2417b59
JJ
26282019-11-14 Jakub Jelinek <jakub@redhat.com>
2629
bedb7f04
JJ
2630 * c-parser.c (c_parser_omp_context_selector): Don't require score
2631 argument to fit into shwi, just to be INTEGER_CST. Diagnose
2632 negative score.
2633
b2417b59
JJ
2634 * c-parser.c (c_parser_omp_context_selector): Rename
2635 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
2636 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
2637 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
2638 and string literals.
2639
4e03c3a7
JM
26402019-11-14 Joseph Myers <joseph@codesourcery.com>
2641
2642 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
2643 ctsk_tagfirstref_attrs.
2644 (struct c_declspecs): Update description of attrs. Add
2645 postfix_attrs and non_std_attrs_seen_p. Increase size of
2646 typespec_kind bit-field.
2647 (c_warn_unused_attributes): New declaration.
2648 (parser_xref_tag): Update prototype.
2649 * c-decl.c (c_warn_unused_attributes): New function.
2650 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
2651 ctsk_tagref_attrs. Handle attribute declarations.
2652 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
2653 (grokdeclarator): Handle standard attributes.
2654 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
2655 attributes to incomplete type reference.
2656 (xref_tag): Update call to parser_xref_tag.
2657 (declspecs_add_addrspace, declspecs_add_type)
2658 (declspecs_add_scspec, declspecs_add_attrs): Set
2659 non_std_attrs_seen_p.
2660 (finish_declspecs): Apply postfix standard attributes to type.
2661 * c-parser.c (c_token_starts_declspecs)
2662 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
2663 (c_parser_next_tokens_start_declaration): Update comments.
2664 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
2665 parser->tokens[2] to parser->tokens[1].
2666 (c_parser_nth_token_starts_std_attributes)
2667 (c_parser_std_attribute_specifier_sequence): New functions.
2668 (c_parser_declaration_or_fndef): Add arguments have_attrs and
2669 attrs. All callers changed. Handle standard attributes.
2670 (c_parser_parms_declarator, c_parser_parms_list_declarator)
2671 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
2672 All callers changed.
2673 (c_parser_declspecs): Add arguments start_std_attr_ok and
2674 end_std_attr_ok. All callers changed. Handle standard
2675 attributes.
2676 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2677 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
2678 (c_parser_compound_statement_nostart, c_parser_all_labels)
2679 (c_parser_label, c_parser_statement, c_parser_for_statement):
2680 Handle standard attributes.
2681 * c-parser.h (c_parser_declspecs): Update prototype.
2682 * gimple-parser.c (c_parser_gimple_declaration): Update call to
2683 c_parser_declspecs.
2684
0c29cac4
ML
26852019-11-12 Martin Liska <mliska@suse.cz>
2686
2687 * gimple-parser.c: Do not include params.h.
2688
028d4092
ML
26892019-11-12 Martin Liska <mliska@suse.cz>
2690
2691 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
2692 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
2693 macro.
2694
62aee289
MR
26952019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2696 Frederik Harwath <frederik@codesourcery.com>
2697
2698 gcc/c/
2699 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
2700 (c_parser_oacc_kernels_parallel): Rename function to...
2701 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
2702 (c_parser_omp_construct): Update accordingly.
2703
2704
7cec9588
JJ
27052019-11-11 Jakub Jelinek <jakub@redhat.com>
2706
2707 * c-parser.c (c_parser_translation_unit): Diagnose declare target
2708 without corresponding end declare target.
2709
f486280c
RS
27102019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2711
2712 * c-convert.c (convert): Only handle vector conversions if one of
2713 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
2714 allows it.
2715 * c-typeck.c (build_array_ref): Only allow vector indexing if the
2716 vectors satisfy gnu_vector_type_p.
2717 (build_unary_op): Only allow unary operators to be applied to
2718 vectors if they satisfy gnu_vector_type_p.
2719 (digest_init): Only allow by-element initialization of vectors
2720 if they satisfy gnu_vector_type_p.
2721 (really_start_incremental_init): Likewise.
2722 (push_init_level): Likewise.
2723 (pop_init_level): Likewise.
2724 (process_init_element): Likewise.
2725 (build_binary_op): Only allow binary operators to be applied to
2726 vectors if they satisfy gnu_vector_type_p.
2727
017c6491
JM
27282019-11-08 Joseph Myers <joseph@codesourcery.com>
2729
2730 * c-decl.c (grokparms): Convert () in a function definition to
2731 (void) for C2x.
2732 (store_parm_decls_oldstyle): Pedwarn for C2x.
2733 (store_parm_decls): Update comment about () not generating a
2734 prototype.
2735
c01bd174
JM
27362019-11-07 Joseph Myers <joseph@codesourcery.com>
2737
2738 * c-parser.c (c_parser_attribute_arguments): New function.
2739 Factored out of c_parser_gnu_attribute.
2740 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
2741 (c_parser_balanced_token_sequence, c_parser_std_attribute)
2742 (c_parser_std_attribute_specifier): New functions.
2743 (c_parser_transaction_attributes): Use
2744 c_parser_std_attribute_specifier.
2745
471c5330
JM
27462019-11-07 Joseph Myers <joseph@codesourcery.com>
2747
2748 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
2749 lex_joined_string and translate_strings_p.
2750 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
2751 c_lex_with_flags.
2752 (c_parser_string_literal): New function.
2753 (c_parser_static_assert_declaration_no_semi): Use
2754 c_parser_string_literal. Do not set lex_untranslated_string.
2755 (c_parser_asm_string_literal): Use c_parser_string_literal.
2756 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
2757 (c_parser_gnu_attributes): Set and restore translate_strings_p
2758 instead of lex_untranslated_string.
2759 (c_parser_asm_statement): Do not set lex_untranslated_string.
2760 (c_parser_asm_operands): Likewise.
2761 (c_parser_has_attribute_expression): Set and restore
2762 translate_strings_p instead of lex_untranslated_string.
2763 (c_parser_postfix_expression): Use c_parser_string_literal.
2764 (pragma_lex): Likewise.
2765 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
2766 (c_parse_file): Set translate_strings_p.
2767 * gimple-parser.c (c_parser_gimple_postfix_expression)
2768 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
2769 * c-parser.c (c_parser_string_literal): Declare function.
2770
d0c464d2
JJ
27712019-11-02 Jakub Jelinek <jakub@redhat.com>
2772
2773 * c-parser.c (c_finish_omp_declare_variant): Use
2774 omp_get_context_selector instead of c_omp_get_context_selector.
2775
ac2cfa6c
RS
27762019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2777
2778 * c-tree.h (c_simulate_enum_decl): Declare.
2779 * c-decl.c (c_simulate_enum_decl): New function.
2780 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
2781
74078538
RS
27822019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2783
2784 * c-tree.h (c_simulate_builtin_function_decl): Declare.
2785 * c-decl.c (c_simulate_builtin_function_decl): New function.
2786 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
2787 to the above.
2788
ad1539d5
MS
27892019-10-28 Martin Sebor <msebor@redhat.com>
2790
2791 PR c/66970
2792 * c-decl.c (names_builtin_p): Define a new function.
2793
cb73e4e7
RB
27942019-10-28 Richard Biener <rguenther@suse.de>
2795
2796 PR c/92249
2797 * gimple-parser.c (c_parser_parse_gimple_body): Make
2798 current_bb the entry block initially to easier recover
2799 from errors.
2800 (c_parser_gimple_compound_statement): Adjust.
2801
135df52c
JJ
28022019-10-24 Jakub Jelinek <jakub@redhat.com>
2803
2804 * c-parser.c (c_finish_omp_declare_variant): Use
2805 omp_context_selector_matches instead of
2806 c_omp_context_selector_matches.
2807 * c-decl.c (c_decl_attributes): Add "omp declare target block"
2808 attribute in between declare target and end declare target
2809 pragmas.
2810
783bfe5e
JM
28112019-10-15 Joseph Myers <joseph@codesourcery.com>
2812
2813 * c-parser.c (c_parser_attribute_any_word): Rename to
2814 c_parser_gnu_attribute_any_word. All callers changed.
2815 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
2816 callers changed.
2817 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
2818 callers changed.
2819 (c_parser_declaration_or_fndef, c_parser_declspecs)
2820 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2821 (c_parser_struct_declaration, c_parser_declarator)
2822 (c_parser_gnu_attribute, c_parser_compound_statement)
2823 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
2824 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
2825 attribute-related syntax productions.
2826
56898e43
RS
28272019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2828
2829 * c-objc-common.c (useful_aka_type_p): Replace with...
2830 (get_aka_type): ...this new function. Given the original type,
2831 decide which aka type to print (if any). Only look through typedefs
2832 if user_facing_original_type_p.
2833 (print_type): Update accordingly.
2834
b9424661
JJ
28352019-10-14 Jakub Jelinek <jakub@redhat.com>
2836
2837 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
2838 into int NESTED, if it is 2, diagnose missing commas in between
2839 clauses.
2840 (c_parser_omp_context_selector): Pass 2 as last argument to
2841 c_parser_omp_all_clauses.
2842
20de9568
JJ
28432019-10-12 Jakub Jelinek <jakub@redhat.com>
2844
2845 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
2846 For simd properties, put them directly into TREE_VALUE.
2847 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
2848 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
2849 add "omp declare variant base" attribute rather than
2850 "omp declare variant".
2851
fe2bc27c
JM
28522019-10-11 Joseph Myers <joseph@codesourcery.com>
2853
2854 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
2855
94e7f906
JJ
28562019-10-10 Jakub Jelinek <jakub@redhat.com>
2857
2858 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
2859 true, terminate processing on closing paren and don't skip to end of
2860 pragma line.
2861 (c_parser_omp_declare_simd): Handle also declare variant.
2862 (omp_construct_selectors, omp_device_selectors,
2863 omp_implementation_selectors, omp_user_selectors): New variables.
2864 (c_parser_omp_context_selector,
2865 c_parser_omp_context_selector_specification,
2866 c_finish_omp_declare_variant): New functions.
2867 (c_finish_omp_declare_simd): Handle both declare simd and
2868 declare variant.
2869 (c_parser_omp_declare): Handle declare variant.
2870
93313b94
JM
28712019-10-02 Joseph Myers <joseph@codesourcery.com>
2872
2873 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
2874 CPP_COLON tokens.
2875
55879815
RS
28762019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2877
2878 * c-objc-common.c (useful_aka_type_p): New function.
2879 (print_type): Use it to decide whether an aka type is worth printing.
2880
59bc434a
JJ
28812019-09-27 Jakub Jelinek <jakub@redhat.com>
2882
2883 PR c++/88203
2884 * c-parser.c (c_parser_predefined_identifier): New function.
2885 (c_parser_postfix_expression): Use it.
2886 (c_parser_omp_variable_list): Parse predefined identifiers.
2887 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
2888 in shared and firstprivate clauses, even when they are predetermined
2889 shared.
2890
c6447c20
RS
28912019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2892
2893 * c-typeck.c (build_function_call_vec): Take the original function
2894 decl as an optional final parameter. Pass all built-in calls to
2895 check_builtin_function_arguments.
2896
522da4c2
EB
28972019-09-20 Eric Botcazou <ebotcazou@adacore.com>
2898
2899 PR c/91815
2900 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
2901 of identifiers in the external scope only for variables and functions.
2902
68e2c199
PK
29032019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2904
2905 PR c/78736
2906 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2907
22f8849d
IS
29082019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2909
2910 PR pch/61250
2911 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
2912 after determining that the first token is not
2913 PRAGMA_GCC_PCH_PREPROCESS.
2914
db376f45
EB
29152019-08-22 Eric Botcazou <ebotcazou@adacore.com>
2916
2917 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
2918 FUNCTION_DECL to the right value in the presence of nested declarators.
2919
4d732405
RS
29202019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2921
2922 PR middle-end/91421
2923 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
2924
cb1180d5
RS
29252019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2926
2927 PR middle-end/91421
2928 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
2929 of a built_in_function.
2930 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2931
77eb117f
JJ
29322019-08-10 Jakub Jelinek <jakub@redhat.com>
2933
2934 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
2935 (c_parser_omp_clause_device_type): New function.
2936 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2937 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2938 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2939 diagnostics for declare target with clauses nested in clause-less
2940 declare target declaration-definition-seq.
2941 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2942
2c3b8bad
JJ
29432019-08-09 Jakub Jelinek <jakub@redhat.com>
2944
bb522e2e
JJ
2945 * c-parser.c (check_no_duplicate_clause): Simplify using
2946 omp_find_clause.
2947 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2948 directive name modifiers.
2949 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2950
2c3b8bad
JJ
2951 PR c/91401
2952 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2953 check_no_duplicate_clause call. Comment it out, instead emit a
2954 warning for duplicate dist_schedule clauses.
2955
99769e7f
RS
29562019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2957
2958 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2959
8860d270
JJ
29602019-08-08 Jakub Jelinek <jakub@redhat.com>
2961
2962 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2963 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2964 instead of generic_head to track duplicates.
2965
398e3feb
JJ
29662019-08-07 Jakub Jelinek <jakub@redhat.com>
2967
2968 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2969 (c_parser_omp_clause_use_device_addr): New function.
2970 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2971 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2972 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2973 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2974 map or use_device_* clauses.
2975 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2976 in OpenMP, require pointer type rather than pointer or array type.
2977 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2978
a28351e7
JJ
29792019-07-31 Jakub Jelinek <jakub@redhat.com>
2980
2981 PR c/91192
2982 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2983 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2984 case.
2985
6343b6bf
ML
29862019-07-25 Martin Liska <mliska@suse.cz>
2987 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2988
2989 PR c++/23383
2990 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2991
cb50701e
ML
29922019-07-25 Martin Liska <mliska@suse.cz>
2993
2994 * c-decl.c (merge_decls): Use new macros
2995 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2996
62e3e66f
RB
29972019-07-23 Richard Biener <rguenther@suse.de>
2998
2999 PR tree-optimization/83518
3000 * gimple-parser.c (c_parser_parse_gimple_body): When we have
3001 a CFG also rebuild cgraph edges.
3002
554a530f
JJ
30032019-07-20 Jakub Jelinek <jakub@redhat.com>
3004
3005 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
3006 (c_parser_omp_clause_bind): New function.
3007 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
3008 (OMP_LOOP_CLAUSE_MASK): Define.
3009 (c_parser_omp_loop): New function.
3010 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
3011 loop combined with parallel or teams.
3012 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
3013 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
3014
d119bf79
RS
30152019-07-18 Richard Sandiford <richard.sandiford@arm.com>
3016
3017 PR c/53633
3018 * c-decl.c (finish_function): Check targetm.warn_func_return
3019 before issuing a -Wreturn-type warning.
3020
ab20d992 30212019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
3022
3023 * gimple-parser.c (c_parser_gimple_try_stmt): New.
3024 (c_parser_compound_statement): Call it.
3025
1fdd6f04
JJ
30262019-07-12 Jakub Jelinek <jakub@redhat.com>
3027
3028 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
3029 (c_parser_omp_clause_order): New function.
3030 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
3031 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
3032 PRAGMA_OMP_CLAUSE_ORDER.
3033 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
3034
8389386c
RB
30352019-07-10 Richard Biener <rguenther@suse.de>
3036
3037 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
3038 _Literal (int *) &x for address literals.
3039
99b1c316
MS
30402019-07-09 Martin Sebor <msebor@redhat.com>
3041
3042 PR c++/61339
3043 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
3044 to class.
3045 (field_decl_cmp): Same.
3046 * c-parser.c (c_parser_struct_or_union_specifier): Same.
3047 * c-tree.h: Same.
3048 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
3049
6c1dae73
MS
30502019-07-09 Martin Sebor <msebor@redhat.com>
3051
3052 PR c++/61339
3053 * c-decl.c: Change class-key from class to struct and vice versa
3054 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
3055 * gimple-parser.c: Same.
3056
69b5279e
RB
30572019-07-01 Richard Biener <rguenther@suse.de>
3058
3059 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3060 _Literal (char *) &"foo" for address literals pointing to
3061 STRING_CSTs.
3062
ab20d992
JJ
30632019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3064
3065 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
3066 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
3067 C incompatibility if alternate "__intN__" form is used.
3068
1e3d475e
MS
30692019-06-24 Martin Sebor <msebor@redhat.com>
3070
3071 * c-typeck.c (build_binary_op): Hyphenate floating-point.
3072
bf38f7e9
JJ
30732019-06-10 Jakub Jelinek <jakub@redhat.com>
3074
3075 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
3076 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
3077 (c_parser_omp_scan_loop_body): New function.
3078 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
3079 inscan reduction clauses.
3080 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
3081 non-inscan reductions on the same construct, or inscan reductions with
3082 ordered or schedule clauses, or inscan array reductions.
3083
65985d78
MS
30842019-06-05 Martin Sebor <msebor@redhat.com>
3085
3086 PR c/90737
3087 * c-typeck.c (c_finish_return): Only consider functions returning
3088 pointers as candidates for -Wreturn-local-addr.
3089
0ecf545c
MS
30902019-06-05 Martin Sebor <msebor@redhat.com>
3091
3092 * c-decl.c (start_decl): Adjust quoting and hyphenation
3093 in diagnostics.
3094 (finish_decl): Same.
3095 (finish_enum): Same.
3096 (start_function): Same.
3097 (declspecs_add_type): Same.
3098 * c-parser.c (warn_for_abs): Same.
3099 * c-typeck.c (build_binary_op): Same.
3100
e03436e7
TS
31012019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3102
b48f44bf
TS
3103 PR c/89433
3104 * c-parser.c (c_finish_oacc_routine): Rework checking if already
3105 marked with an OpenACC 'routine' directive.
3106
5bf04509
TS
3107 PR c/89433
3108 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
3109 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
3110
e03436e7
TS
3111 PR c/89433
3112 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
3113 clauses from "omp declare target" attribute.
3114
a9c697b8
MS
31152019-05-16 Martin Sebor <msebor@redhat.com>
3116
ab20d992
JJ
3117 * c-decl.c (start_decl): Quote keywords, operators, and
3118 types in diagnostics.
3119 (finish_decl): Same.
3120 * c-parser.c (c_parser_asm_statement): Same.
3121 (c_parser_conditional_expression): Same.
3122 (c_parser_transaction_cancel): Same.
3123 * c-typeck.c (c_common_type): Same.
3124 (build_conditional_expr): Same.
3125 (digest_init): Same.
3126 (process_init_element): Same.
3127 (build_binary_op): Same.
a9c697b8 3128
c4499192
RB
31292019-05-17 Richard Biener <rguenther@suse.de>
3130
3131 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
3132 (c_parser_gimple_unary_expression): Likewise.
3133 (c_parser_gimple_parentized_ternary_expression): New function.
3134
adfe6e4b
RB
31352019-05-16 Richard Biener <rguenther@suse.de>
3136
3137 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
3138 (c_parser_gimple_unary_expression): Likewise.
3139
186dabf2
RB
31402019-05-15 Richard Biener <rguenther@suse.de>
3141
3142 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3143 __BIT_FIELD_REF.
3144
1158c5b4
RB
31452019-05-14 Richard Biener <rguenther@suse.de>
3146
3147 * gimple-parser.c (c_parser_gimple_statement): Remove
3148 questionable auto-promotion to VIEW_CONVERT_EXPR.
3149 (c_parser_gimple_typespec): Split out from __MEM parsing.
3150 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
3151 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
3152 as __VIEW_CONVERT with -gimple.
3153
fd4485aa
ML
31542019-05-09 Martin Liska <mliska@suse.cz>
3155
3156 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
3157 __MAX.
3158 (c_parser_gimple_unary_expression): Parse also binary expression
3159 __MIN and __MAX.
3160 (c_parser_gimple_parentized_binary_expression): New function.
3161
d276406a
ML
31622019-05-09 Martin Liska <mliska@suse.cz>
3163
3164 * gimple-parser.c (struct gimple_parser): Add probability.
3165 for gimple_parser_edge.
3166 (gimple_parser::push_edge): Add new argument probability.
3167 (c_parser_gimple_parse_bb_spec): Parse also probability
3168 if present.
3169 (c_parser_parse_gimple_body): Set edge probability.
3170 (c_parser_gimple_compound_statement): Consume token
3171 before calling c_parser_gimple_goto_stmt.
3172 Parse BB counts.
3173 (c_parser_gimple_statement): Pass new argument.
3174 (c_parser_gimple_goto_stmt): Likewise.
3175 (c_parser_gimple_if_stmt): Likewise.
3176 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
3177 * c-parser.c (c_parser_declaration_or_fndef): Pass
3178 hot_bb_threshold argument.
3179 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
3180 field.
3181 (c_parser_gimple_parse_bb_spec_edge_probability): New.
3182
f179b64e
JJ
31832019-04-26 Jakub Jelinek <jakub@redhat.com>
3184
3185 PR debug/90197
3186 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
3187 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
3188 (c_parser_do_statement): Likewise.
3189 (c_parser_for_statement): Likewise. Formatting fixes.
3190 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
3191 emit DEBUG_BEGIN_STMTs if needed.
3192
e7178413
JJ
31932019-04-19 Jakub Jelinek <jakub@redhat.com>
3194
c280b7ee
JJ
3195 PR c/89888
3196 * c-typeck.c (struct c_switch): Remove outside_range_p member.
3197 (c_start_case): Don't clear it.
3198 (do_case): Adjust c_add_case_label caller.
3199 (c_finish_case): Adjust c_do_switch_warnings caller.
3200
e7178413
JJ
3201 PR c++/90108
3202 * c-decl.c (merge_decls): If remove is main variant and
3203 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
3204 variant that has newdecl as TYPE_NAME if any.
3205
60a2c645
JJ
32062019-04-12 Jakub Jelinek <jakub@redhat.com>
3207
3208 PR c/89933
3209 * c-decl.c (merge_decls): When newdecl's type is its main variant,
3210 don't try to remove it from the variant list, but instead assert
3211 it has no variants.
3212
2a82beaa
RB
32132019-04-01 Richard Biener <rguenther@suse.de>
3214
3215 PR c/71598
3216 * c-tree.h (c_get_alias_set): Declare.
3217 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
3218 * c-objc-common.c (c_get_alias_set): Treat enumeral types
3219 as the underlying integer type.
3220
bec1da64
MS
32212019-03-19 Martin Sebor <msebor@redhat.com>
3222
3223 PR tree-optimization/89688
3224 * c-decl.c (finish_decl): Call braced_lists_to_string for more
3225 kinds of initializers.
3226
855cd9b1
JJ
32272019-03-19 Jakub Jelinek <jakub@redhat.com>
3228
3229 PR c/89734
3230 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
3231 return type even if quals_used is 0. Formatting fixes.
3232
baa09dc5
RB
32332019-03-14 Richard Biener <rguenther@suse.de>
3234
3235 * c-tree.h (enum c_declspec_il): New.
3236 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
3237 enum bitfield.
3238 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
3239 Pass start pass and declspec_il to c_parser_parse_gimple_body.
3240 (c_parser_declspecs): Adjust.
3241 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
3242 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
3243 and bitmap.h.
3244 (struct gimple_parser): New.
3245 (gimple_parser::push_edge): New method.
3246 (c_parser_gimple_parse_bb_spec): New helper.
3247 (c_parser_parse_gimple_body): Get start pass and IL specification.
3248 Initialize SSA and CFG.
3249 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
3250 Build a gimple_parser parsing state and pass it along.
3251 (c_parser_gimple_statement): Change intermittend __PHI internal
3252 function argument for the edge.
3253 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
3254 (c_parser_gimple_goto_stmt): Record edges to build.
3255 (c_parser_gimple_if_stmt): Likewise.
3256 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
3257 (c_parser_gimple_or_rtl_pass_list): Likewise.
3258
a3f9f006
ML
32592019-03-11 Martin Liska <mliska@suse.cz>
3260
3261 * c-decl.c (check_for_loop_decls): Wrap an option name
3262 in a string format message and fix GNU coding style.
3263 * c-parser.c (c_parser_declspecs): Likewise.
3264
1db01ff9
JJ
32652019-03-08 Jakub Jelinek <jakub@redhat.com>
3266
3267 PR tree-optimization/89550
3268 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
3269 returned true.
3270 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
3271 or warning returned true.
3272
66dcb747
JJ
32732019-02-28 Jakub Jelinek <jakub@redhat.com>
3274
3275 PR c/89525
3276 * c-typeck.c (convert_arguments): Call inform_declaration only if
3277 the previous warning_at call returned true.
3278
2263c9f2
TS
32792019-02-22 Thomas Schwinge <thomas@codesourcery.com>
3280
3281 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
3282 parameter. Adjust all users.
3283 (c_parser_oacc_simple_clause): Replace parser with loc formal
3284 parameter. Adjust all users.
3285
ab20d992 32862019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
3287
3288 PR c/87924
3289 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
3290 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
3291
5f88ba10
JJ
32922019-02-15 Jakub Jelinek <jakub@redhat.com>
3293
3294 PR c/89340
3295 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
3296 before c_decl_attributes rather than after it.
3297
cfc30fd1
JJ
32982019-02-06 Jakub Jelinek <jakub@redhat.com>
3299
3300 PR c/89211
3301 * c-parser.c (c_parser_declaration_or_fndef): Don't update
3302 DECL_ARGUMENTS of d if it has been defined already. Use a single if
3303 instead of 3 nested ifs.
3304
fbe83e6b
JM
33052019-02-06 Joseph Myers <joseph@codesourcery.com>
3306
3307 PR c/88584
3308 * c-decl.c (finish_decl): Do not complete array types for arrays
3309 with external linkage not at file scope.
3310
f461f938
RB
33112019-02-05 Richard Biener <rguenther@suse.de>
3312
3313 PR c/88606
3314 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
3315 all type variants when not supported.
3316
fe509359
JJ
33172019-01-30 Jakub Jelinek <jakub@redhat.com>
3318
3319 PR c/89061
3320 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
3321 * c-decl.c (decl_jump_unsafe): Return false for
3322 C_DECL_COMPOUND_LITERAL_P decls.
3323 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
3324
6a335b96
JJ
33252019-01-29 Jakub Jelinek <jakub@redhat.com>
3326
f4b7e754
JJ
3327 PR c/89045
3328 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
3329 scope.
3330
6a335b96
JJ
3331 PR c/86125
3332 * c-decl.c (last_fileptr_type): Remove.
3333 (last_structptr_types): New variable.
3334 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
3335 {old,new}rettype instead of the types themselves. Assert
3336 last_structptr_types array has the same number of elements
3337 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
3338 argument oldtype and newtype. Instead of handling
3339 just fileptr_type_node specially, handle all builtin_structptr_types
3340 pointer nodes. Formatting fix.
3341
d8b5a1a0
MS
33422019-01-24 Martin Sebor <msebor@redhat.com>
3343
3344 PR c/86125
3345 PR c/88886
3346 PR middle-end/86308
3347 * c-decl.c (match_builtin_function_types): Add arguments.
3348 (diagnose_mismatched_decls): Diagnose mismatched declarations
3349 of built-ins more strictly.
3350
e21c4491
JJ
33512019-01-24 Jakub Jelinek <jakub@redhat.com>
3352
3353 PR c++/88976
3354 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
3355 on #pragma omp cancel with different modifiers.
3356
420183d9
L
33572019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3358
3359 PR c/51628
3360 PR c/88664
3361 * c-typeck.c (convert_for_assignment): Upate the
3362 warn_for_address_or_pointer_of_packed_member call.
3363
17ad43dd
TH
33642019-01-16 Tom Honermann <tom@honermann.net>
3365 Jason Merrill <jason@redhat.com>
3366
3367 * c-typeck.c (digest_init): Revised the error message produced for
3368 ill-formed cases of array initialization with a string literal.
3369 (error_init): Make variadic.
3370
5f07d78a
JJ
33712019-01-12 Jakub Jelinek <jakub@redhat.com>
3372
3373 * c-typeck.c (convert_for_assignment): Fix a comment typo.
3374
c4581bbf
JJ
33752019-01-07 Jakub Jelinek <jakub@redhat.com>
3376
3377 PR c/88701
3378 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
3379 if current_function_decl is non-NULL.
3380
65c5b1eb
JM
33812019-01-07 Joseph Myers <joseph@codesourcery.com>
3382
3383 PR c/88720
3384 PR c/88726
3385 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
3386 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
3387 functions declared but never defined only for external scope, not
3388 for other scopes.
3389
d8fcab68
JJ
33902019-01-07 Jakub Jelinek <jakub@redhat.com>
3391
3392 PR c++/85052
3393 * c-parser.c (c_parser_postfix_expression): Parse
3394 __builtin_convertvector.
3395
a5544970
JJ
33962019-01-01 Jakub Jelinek <jakub@redhat.com>
3397
3398 Update copyright years.
3399
da77eace
L
34002018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3401
3402 PR c/51628
3403 * c-typeck.c (convert_for_assignment): Call
3404 warn_for_address_or_pointer_of_packed_member.
3405
1edf8866
SB
34062018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3407
3408 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
3409 a more specific error message (instead of just falling through).
3410
db4fd626
SB
34112018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3412
3413 * c-parser.c (c_parser_asm_statement): Keep track of the location each
3414 asm qualifier is first seen; use that to give nicer "duplicate asm
3415 qualifier" messages. Delete 'quals" variable, instead pass the
3416 "is_volatile_ flag to build_asm_stmt directly.
3417 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
3418 * c-typeck.c (build_asm_stmt): Ditto; adjust.
3419
9c9cfcbb
SB
34202018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3421
3422 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
3423 "done" boolean variable.
3424
a14feb3c
DM
34252018-12-19 David Malcolm <dmalcolm@redhat.com>
3426
3427 PR c++/87504
3428 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
3429 Move from here to gcc-rich-location.h and gcc-rich-location.c.
3430 (build_binary_op): Use struct op_location_t and
3431 class binary_op_rich_location.
3432
6d939173
JJ
34332018-12-11 Jakub Jelinek <jakub@redhat.com>
3434
3435 PR sanitizer/88426
3436 * c-convert.c (convert): Call c_fully_fold before calling
3437 ubsan_instrument_float_cast.
3438
b7055028
SB
34392018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
3440
3441 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
3442 setting "quals".
3443
5b76e75f
SB
34442018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3445
3446 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
3447 after asm. Pass a flag for it to build_asm_expr.
3448 * c-tree.h (build_asm_expr): Update declaration.
3449 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
3450 set ASM_INLINE_P.
3451
30bd42b9
SB
34522018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3453
3454 PR inline-asm/55681
3455 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
3456 combination of volatile and goto, in any order, without repetitions.
3457
9df6c0e4
JB
34582018-12-04 James Norris <jnorris@codesourcery.com>
3459 Cesar Philippidis <cesar@codesourcery.com>
3460 Julian Brown <julian@codesourcery.com>
3461
3462 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
3463 code.
3464
f44697b7
RB
34652018-11-30 Richard Biener <rguenther@suse.de>
3466
3467 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3468 _Literal (type) { ... } as empty aggregate or vector constructor.
3469
550dfbdc
MS
34702018-11-29 Martin Sebor <msebor@redhat.com>
3471
3472 PR c/88091
3473 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
3474 (convert_arguments): Add comments. Pass additional argument to
3475 the function above.
3476
673670da
MS
34772018-11-29 Martin Sebor <msebor@redhat.com>
3478
3479 PR c/88172
3480 PR testsuite/88208
3481 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
3482
db1d09b0
MS
34832018-11-23 Martin Sebor <msebor@redhat.com>
3484
3485 PR testsuite/88098
3486 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
3487 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
3488
98f08eb8
MS
34892018-11-20 Martin Sebor <msebor@redhat.com>
3490
3491 * c-parser.c (c_parser_has_attribute_expression): New function.
3492 (c_parser_attribute): New function.
3493 (c_parser_attributes): Move code into c_parser_attribute.
3494 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
3495
cd5da983
MS
34962018-11-15 Martin Sebor <msebor@redhat.com>
3497
3498 PR c/83656
3499 * c-decl.c (header_for_builtin_fn): Declare.
3500 (diagnose_mismatched_decls): Diagnose declarations of built-in
3501 functions without a prototype.
3502 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
3503 (convert_argument): Same.
3504 (convert_arguments): Factor code out into convert_argument.
3505 Detect mismatches between built-in formal arguments in calls
3506 to built-in without prototype.
3507 (build_conditional_expr): Same.
3508 (type_or_builtin_type): New function.
3509 (convert_for_assignment): Add argument. Conditionally issue
3510 warnings instead of errors for mismatches.
3511
620e594b
DM
35122018-11-13 David Malcolm <dmalcolm@redhat.com>
3513
3514 * c-decl.c: Replace "source_location" with "location_t".
3515 * c-tree.h: Likewise.
3516 * c-typeck.c: Likewise.
3517 * gimple-parser.c: Likewise.
3518
3179ebae
JJ
35192018-11-09 Jakub Jelinek <jakub@redhat.com>
3520
81a227c6
JJ
3521 * c-parser.c (c_parser_omp_clause_final): Use
3522 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
3523 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
3524 parsing instead of c_parser_paren_condition.
3525 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
3526 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
3527 c_fully_fold instead of c_parser_condition.
3528 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
3529 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
3530 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
3531 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
3532 c_parser_expr_no_commas instead of c_parser_expression.
3533
98c91c56
JJ
3534 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
3535 reduction clause with inscan modifier.
3536
3179ebae
JJ
3537 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
3538 clauses other than atomic_default_mem_order.
3539
28567c40
JJ
35402018-11-08 Jakub Jelinek <jakub@redhat.com>
3541
3542 * c-parser.c: Include memmode.h.
3543 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
3544 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
3545 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
3546 task_reduction clauses.
3547 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
3548 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
3549 section, or lvalue assignment expression.
3550 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
3551 (c_parser_omp_clause_lastprivate): Parse optional
3552 conditional: modifier.
3553 (c_parser_omp_clause_hint): Require constant integer expression rather
3554 than just integer expression.
3555 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
3556 clause.
3557 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
3558 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
3559 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
3560 functions.
3561 (c_parser_omp_clause_depend): Parse iterator modifier and handle
3562 iterators. Parse mutexinoutset and depobj kinds.
3563 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
3564 callers.
3565 (c_parser_omp_all_clauses): Likewise. Handle
3566 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
3567 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3568 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
3569 default memory order from requires directive if any. Adjust
3570 c_finish_omp_atomic caller.
3571 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
3572 (c_parser_omp_flush): Parse flush with memory-order-clause.
3573 (c_parser_omp_for_loop): Allow NE_EXPR even in
3574 OpenMP loops, adjust c_finish_omp_for caller.
3575 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
3576 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
3577 Allow to be called while parsing combined parallel master.
3578 Parse combined master taskloop{, simd}.
3579 (c_parser_omp_parallel): Parse combined
3580 parallel master{, taskloop{, simd}} constructs.
3581 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
3582 (OMP_TASKGROUP_CLAUSE_MASK): Define.
3583 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
3584 (OMP_TASKWAIT_CLAUSE_MASK): Define.
3585 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
3586 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
3587 around teams body. Use SET_EXPR_LOCATION.
3588 (c_parser_omp_target_data): Allow target data
3589 with only use_device_ptr clauses.
3590 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
3591 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
3592 (c_parser_omp_requires): New function.
3593 (c_finish_taskloop_clauses): New function.
3594 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
3595 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
3596 declaration. Disallow in_reduction clause when combined with parallel
3597 master.
3598 (c_parser_omp_construct): Adjust c_parser_omp_master and
3599 c_parser_omp_taskgroup callers.
3600 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
3601 other than cancel.
3602 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
3603 like OMP_CLAUSE_REDUCTION.
3604 (handle_omp_array_sections): Likewise. Call save_expr on array
3605 reductions before calling build_index_type. Handle depend clauses
3606 with iterators.
3607 (struct c_find_omp_var_s): New type.
3608 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
3609 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
3610 with static, runtime or auto schedule kinds. Call save_expr for whole
3611 array reduction sizes. Diagnose reductions with zero sized elements
3612 or variable length structures. Diagnose nogroup clause used with
3613 reduction clause(s). Handle depend clause with
3614 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
3615 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
3616 some different type for other kinds. Use build_unary_op with
3617 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
3618 Handle depend clauses with iterators. Remove no longer needed special
3619 case that predetermined const qualified vars may be specified in
3620 firstprivate clause. Complain if const qualified vars are mentioned
3621 in data-sharing clauses other than firstprivate or shared. Use
3622 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
3623 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
3624 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
3625 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
3626
7e2de6df
DM
36272018-10-29 David Malcolm <dmalcolm@redhat.com>
3628
3629 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
3630 logic for change to name_hint::operator bool.
3631 (undeclared_variable): Likewise.
3632 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3633 (c_parser_parameter_declaration): Likewise.
3634
9f936c86
JM
36352018-10-17 Joseph Myers <joseph@codesourcery.com>
3636
3637 * c-errors.c (pedwarn_c11): New function.
3638 * c-parser.c (disable_extension_diagnostics): Save
3639 warn_c11_c2x_compat and set it to 0.
3640 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
3641 (c_parser_static_assert_declaration_no_semi): Handle
3642 _Static_assert without string constant.
3643 * c-tree.h (pedwarn_c11): New prototype.
3644
033eb567
DM
36452018-10-17 David Malcolm <dmalcolm@redhat.com>
3646
3647 * Make-lang.in (selftest-c): New.
3648 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3649 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
3650 from gcc/Makefile.in.
3651
0edf3afe
RB
36522018-10-02 Richard Biener <rguenther@suse.de>
3653
3654 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
3655
8313a764
JM
36562018-09-26 Joseph Myers <joseph@codesourcery.com>
3657
3658 PR c/87390
3659 * c-typeck.c (build_binary_op): Use excess precision for
3660 comparisons of integers and floating-point for C11 and later.
3661
ce6f0888
MJ
36622018-09-26 Martin Jambor <mjambor@suse.cz>
3663
3664 PR c/87347
3665 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 3666 comment.
ce6f0888 3667
9c4a4b3c
DM
36682018-09-17 David Malcolm <dmalcolm@redhat.com>
3669
3670 * c-objc-common.c (range_label_for_type_mismatch::get_text):
3671 Update for new param.
3672 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
3673 Likewise.
3674
80c6d1f4
MJ
36752018-09-17 Martin Jambor <mjambor@suse.cz>
3676
3677 PR c/63886
3678 * c-parser.c: (warn_for_abs): New function.
3679 (c_parser_postfix_expression_after_primary): Call it.
3680
4a426e36
BE
36812018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3682
3683 * c-typeck.c (digest_init): Shorten overlength strings.
3684
6d900107
BE
36852018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3686
3687 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
3688
b5764229
BE
36892018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3690
3691 * c-decl.c (finish_decl): Call braced_list_to_string here ...
3692 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
3693
22eea6b2
AM
36942018-08-30 Alexander Monakov <amonakov@ispras.ru>
3695
3696 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
3697 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
3698
85204e23
DM
36992018-08-27 David Malcolm <dmalcolm@redhat.com>
3700
3701 PR 87091
3702 * c-decl.c (implicitly_declare): Update call to
3703 maybe_add_include_fixit to suggest overriding the location, as it
3704 is for a note.
3705 * c-objc-common.c (c_tree_printer): Update for conversion of
3706 show_caret_p to a tri-state.
3707
3d78e008
ML
37082018-08-27 Martin Liska <mliska@suse.cz>
3709
3710 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
3711 fndecl_built_in_p and remove check for FUNCTION_DECL if
3712 possible.
3d78e008
ML
3713 (diagnose_mismatched_decls): Likewise.
3714 (merge_decls): Likewise.
3715 (warn_if_shadowing): Likewise.
3716 (pushdecl): Likewise.
3717 (implicitly_declare): Likewise.
3718 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3719 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
3720 * c-typeck.c (build_function_call_vec): Likewise.
3721 (convert_arguments): Likewise.
3722
097f82ec
DM
37232018-08-20 David Malcolm <dmalcolm@redhat.com>
3724
3725 PR other/84889
3726 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
3727 (diagnose_mismatched_decls): Likewise, in various places.
3728 (warn_if_shadowing): Likewise.
3729 (implicit_decl_warning): Likewise.
3730 (implicitly_declare): Likewise.
3731 (undeclared_variable): Likewise.
3732 (declare_label): Likewise.
3733 (grokdeclarator): Likewise.
3734 (start_function): Likewise.
3735 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3736 (c_parser_parameter_declaration): Likewise.
3737 (c_parser_binary_expression): Likewise.
3738 * c-typeck.c (c_expr_sizeof_expr): Likewise.
3739 (parser_build_binary_op): Likewise.
3740 (build_unary_op): Likewise.
3741 (error_init): Likewise.
3742 (pedwarn_init): Likewise.
3743 (warning_init): Likewise.
3744 (convert_for_assignment): Likewise.
3745
96e6ae57
DM
37462018-08-15 David Malcolm <dmalcolm@redhat.com>
3747
3748 * c-objc-common.c: Include "gcc-rich-location.h".
3749 (c_tree_printer): Move implemenation of '%T' to...
3750 (print_type): ...this new function.
3751 (range_label_for_type_mismatch::get_text): New function.
3752 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
3753 range for the various ic_argpass cases.
3754 (class maybe_range_label_for_tree_type_mismatch): New class.
3755 (build_binary_op): Use it when calling binary_op_error.
3756
0cd020ae 37572018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 3758
0cd020ae
PK
3759 * c-decl.c (start_decl): Do not warn if variables is named as main
3760 and is a local variable.
3761
72733314
IS
37622018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3763
3764 PR c/19315
3765 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
3766 objects of unknown size.
3767
23aa9f7c
MS
37682018-08-13 Martin Sebor <msebor@redhat.com>
3769
3770 PR tree-optimization/71625
3771 * c-parser.c (c_parser_declaration_or_fndef): Call
3772 braced_list_to_string.
3773
e5e7e50d
BH
37742018-08-03 Bogdan Harjoc <harjoc@gmail.com>
3775
3776 PR c/86690
3777 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
3778 errors.
3779
8a45b051
MS
37802018-08-01 Martin Sebor <msebor@redhat.com>
3781
3782 PR tree-optimization/86650
3783 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
3784 and TREE_BLOCK (t) from within percent_K_format to this callsite.
3785
5922dcb5
JJ
37862018-08-01 Jakub Jelinek <jakub@redhat.com>
3787
3788 PR c/85704
3789 * c-typeck.c (init_field_decl_cmp): New function.
3790 (output_pending_init_elements): Use it for field comparisons
3791 instead of pure bit_position comparisons.
3792
9b452033
JJ
37932018-07-12 Jakub Jelinek <jakub@redhat.com>
3794
3795 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
3796 type here, instead add "omp declare target implicit" attribute.
3797 (finish_decl): Diagnose vars without mappable type here.
3798
ab20d992
JJ
37992018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3800 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3801 Cesar Philippidis <cesar@codesourcery.com>
3802
3803 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
3804 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
3805 to their non-present_or_* counterparts. Make 'self' an alias to
3806 PRAGMA_OACC_CLAUSE_HOST.
3807 (c_parser_oacc_data_clause): Update GOMP mappings for
3808 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
3809 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
3810 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
3811 Remove support for present_or_* clauses.
3812 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3813 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
3814 (OACC_DECLARE_CLAUSE_MASK): Likewise.
3815 (OACC_DATA_CLAUSE_MASK): Likewise.
3816 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3817 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
3818 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
3819 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
3820 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
3821
e197e64e
KV
38222018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3823
3824 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
3825 * gimple-parser.c (c_parser_gimple_statement): Likewise.
3826 (c_parser_gimple_unary_expression): Likewise.
3827
487f2f61
JJ
38282018-06-15 Jakub Jelinek <jakub@redhat.com>
3829
3830 PR c/86093
3831 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
3832 before doing POINTER_DIFF_EXPR.
3833
e4d44a37
MP
38342018-06-07 Marek Polacek <polacek@redhat.com>
3835
3836 PR c/85318
3837 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
3838 for loop initial declarations.
3839
b67b9225
DP
38402018-05-30 David Pagan <dave.pagan@oracle.com>
3841
3842 PR c/55976
3843 * c-decl.c (grokdeclarator): Update check for return type warnings.
3844 (start_function): Likewise.
3845 (finish_function): Likewise.
3846 * c-typeck.c (c_finish_return): Update check for return type warnings.
3847 Pass OPT_Wreturn_type to pedwarn when appropriate.
3848
c566cc9f
RS
38492018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
3850
3851 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
3852 __FMA_EXPR handlng.
3853
e4f81565
RS
38542018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3855
3856 * gimple-parser.c: Include internal-fn.h.
3857 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
3858 (c_parser_gimple_call_internal): New function.
3859 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
3860 Fix typos in comment.
3861
79e7b1fe
JJ
38622018-05-10 Jakub Jelinek <jakub@redhat.com>
3863
3864 PR c++/85662
3865 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
3866 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
3867 fold_convert_loc.
3868 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
3869 fold_offsetof_1, pass argtype as TYPE to it and drop the
3870 fold_convert_loc.
3871
f7584c81
DP
38722018-05-02 David Pagan <dave.pagan@oracle.com>
3873
3874 PR c/30552
3875 * c-decl.c (old_style_parameter_scope): New function.
3876 * c-parser.c (c_parser_postfix_expression): Check for statement
3877 expressions in old-style function parameter list declarations.
3878 * c-parser.h (old_style_parameter_scope): New extern declaration.
3879
b33a0cb3
JJ
38802018-04-25 Jakub Jelinek <jakub@redhat.com>
3881
3882 PR sanitizer/84307
3883 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
3884 it is not TREE_STATIC.
3885 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
3886 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
3887 its COMPOUND_LITERAL_EXPR_DECL.
3888
c5c5822a
JM
38892018-03-21 Joseph Myers <joseph@codesourcery.com>
3890
3891 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
3892 where all functions return the same _FloatN or _FloatNx type,
3893 treat integer types as _Float64 instead of double.
3894
aa1c9429
JJ
38952018-03-21 Jakub Jelinek <jakub@redhat.com>
3896
3897 PR c/84999
3898 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
3899 building vector comparison, diagnose it and return error_mark_node.
3900
9bb45a95
JJ
39012018-03-15 Jakub Jelinek <jakub@redhat.com>
3902
3903 PR c/84853
3904 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
3905 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
3906 INTEGER_TYPE element type.
3907
ada6bad9
DP
39082018-03-13 David Pagan <dave.pagan@oracle.com>
3909
3910 PR c/46921
3911 * c-typeck.c (output_init_element): Ensure field initializer
3912 expression is always evaluated if there are side effects.
3913
849bbdb9
JJ
39142018-03-06 Jakub Jelinek <jakub@redhat.com>
3915
3916 PR c/84721
3917 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
3918 !building_stmt_list_p ().
3919
d74641bd
RS
39202018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3921
3922 PR c/84305
3923 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
3924 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
3925 and include the BIND_EXPR in the list of things that need to be
3926 pre-evaluated.
3927
0444aa9c
NS
39282018-02-09 Nathan Sidwell <nathan@acm.org>
3929
3930 PR c/84293
3931 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
3932 to strict_aliasing_warning.
3933
7c30b12a
PC
39342018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3935
3936 * c-typeck.c (really_start_incremental_init, push_init_level,
3937 set_nonincremental_init, output_init_element, process_init_element):
3938 Use DECL_UNNAMED_BIT_FIELD.
3939
2be4dfcb
MP
39402018-01-31 Marek Polacek <polacek@redhat.com>
3941
3942 PR c/81779
3943 * c-parser.c (c_parser_compound_statement_nostart): Call
3944 expansion_point_location_if_in_system_header.
3945
bb9869d5
DM
39462018-01-17 David Malcolm <dmalcolm@redhat.com>
3947
3948 PR c++/83814
3949 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3950 the C part.
3951
b4923738
JJ
39522018-01-13 Jakub Jelinek <jakub@redhat.com>
3953
3954 PR c/83801
3955 * c-tree.h (decl_constant_value_1): Add a bool argument.
3956 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3957 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3958 (decl_constant_value): Adjust caller.
3959 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3960 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3961 decl_constant_value returns initializer that has BLKmode or
3962 array type.
3963 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3964
928686b1
RS
39652018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3966 Alan Hayward <alan.hayward@arm.com>
3967 David Sherwood <david.sherwood@arm.com>
3968
3969 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3970 TYPE_VECTOR_SUBPARTS.
3971
85ec4feb
JJ
39722018-01-03 Jakub Jelinek <jakub@redhat.com>
3973
3974 Update copyright years.
3975
913884f7
JJ
39762018-01-01 Jakub Jelinek <jakub@redhat.com>
3977
3978 PR c/83595
3979 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3980 c_parser_conditional_expression, c_parser_cast_expression,
3981 c_parser_sizeof_expression, c_parser_alignof_expression,
3982 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3983 c_parser_transaction_expression): Use set_error () method instead
3984 of setting value member to error_mark_node.
3985
c6cfa2bf
MM
39862017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3987
3988 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3989 and _Float<N>X built-in functions.
3990
11d29d63
JJ
39912017-12-22 Jakub Jelinek <jakub@redhat.com>
3992
14ec014e
JJ
3993 PR debug/83550
3994 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3995 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3996 incomplete vars rather than after it.
3997
11d29d63
JJ
3998 PR debug/83547
3999 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
4000 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
4001 and consider empty ones if there are no other stmts. For
4002 -Wunused-value walk all statements before the one only followed by
4003 DEBUG_BEGIN_STMTs.
4004
170a8bd6 40052017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 4006 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
4007
4008 * c-parser.c (c_parser_while_statement): Add unroll parameter and
4009 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
4010 (c_parser_do_statement): Likewise.
4011 (c_parser_for_statement): Likewise.
4012 (c_parser_statement_after_labels): Adjust calls to above.
4013 (c_parse_pragma_ivdep): New static function.
4014 (c_parser_pragma_unroll): Likewise.
4015 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
4016 <PRAGMA_UNROLL>: New case.
4017
01512446
JJ
40182017-12-19 Jakub Jelinek <jakub@redhat.com>
4019
4020 * c-typeck.c (comptypes_internal, function_types_compatible_p,
4021 perform_integral_promotions, digest_init): Replace Yoda conditions
4022 with typical order conditions.
4023 * c-decl.c (check_bitfield_type_and_width): Likewise.
4024
c65e18d3
BE
40252017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4026
4027 * c-typeck.c (c_safe_arg_type_equiv_p,
4028 c_safe_function_type_cast_p): New function.
4029 (build_c_cast): Implement -Wcast-function-type.
4030
b7280579
RB
40312017-12-14 Richard Biener <rguenther@suse.de>
4032
4033 PR c/83415
4034 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
4035 like REALPART_EXPR for the behavior of whether its operand
4036 is an lvalue.
4037
49e6a6c0
MP
40382017-12-12 Marek Polacek <polacek@redhat.com>
4039
4040 PR c/82679
4041 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
4042
ab20d992 40432017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
4044
4045 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
4046 * c-parser.c (add_debug_begin_stmt): New.
4047 (c_parser_declaration_or_fndef): Call it.
4048 (c_parser_compound_statement_nostart): Likewise.
4049 (c_parser_statement_after_labels): Likewise.
4050 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
4051
4b2b493f
JM
40522017-12-07 Joseph Myers <joseph@codesourcery.com>
4053
4054 * c-decl.c (build_compound_literal): Add parameter alignas_align
4055 and set alignment of decl if nonzero.
4056 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
4057 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
4058 qualifier.
4059 (c_parser_struct_declaration): Update syntax comment.
4060 (c_parser_type_name): Add alignas_ok argument and pass it to
4061 c_parser_declspecs.
4062 (c_parser_cast_expression): Pass true to c_parser_type_name and
4063 give error if a cast used an _Alignas specifier.
4064 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
4065 give error if sizeof (type-name) used an _Alignas specifier.
4066 (c_parser_alignof_expression): Pass true to c_parser_type_name and
4067 give error if _Alignof (type-name) used an _Alignas specifier.
4068 (c_parser_postfix_expression_after_paren_type): Check specified
4069 alignment for a compound literal and pass it to
4070 build_compound_literal.
4071 * c-parser.h (c_parser_type_name): Update prototype.
4072 * c-tree.h (build_compound_literal): Update prototype.
4073
5d9ae53d
MS
40742017-12-07 Martin Sebor <msebor@redhat.com>
4075
4076 PR c/81544
4077 * c-decl.c (c_decl_attributes): Look up existing declaration and
4078 pass it to decl_attributes.
4079
c79144f8
DM
40802017-12-06 David Malcolm <dmalcolm@redhat.com>
4081
4082 PR c/83236
4083 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
4084 reserved for use by the implementation.
4085
613bc14f
DM
40862017-12-06 David Malcolm <dmalcolm@redhat.com>
4087
4088 * c-decl.c: Include "c-family/c-spellcheck.h".
4089
05abad4c
ML
40902017-12-05 Martin Liska <mliska@suse.cz>
4091 Jakub Jelinek <jakub@redhat.com>
4092
4093 * c-typeck.c (pointer_diff): Add new argument and instrument
4094 pointer subtraction.
4095 (build_binary_op): Similar for pointer comparison.
4096
cc6534d4
JJ
40972017-12-01 Jakub Jelinek <jakub@redhat.com>
4098
65791f42
JJ
4099 PR c/79153
4100 * c-parser.c: Include tree-iterator.h.
4101 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
4102 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
4103 on it.
4104
cc6534d4
JJ
4105 PR c/83222
4106 * c-tree.h (decl_constant_value_1): Declare.
4107 * c-typeck.c (decl_constant_value_1): New function.
4108 (decl_constant_value): Use it.
4109 * c-fold.c (c_fully_fold_internal): If in_init, use
4110 decl_constant_value_1 instead of decl_constant_value.
4111
5de73c05
JJ
41122017-11-30 Jakub Jelinek <jakub@redhat.com>
4113
4114 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
4115
058f0b9e
JJ
41162017-11-28 Jakub Jelinek <jakub@redhat.com>
4117
4118 PR sanitizer/81275
4119 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
4120 c_switch_covers_all_cases_p returns true.
4121
5e9d6aa4 41222017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 4123 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
4124
4125 * Make-lang.in (c/c-array-notation.o): Remove.
4126 * c-array-notation.c: Delete.
4127 * c-decl.c: Remove cilkplus condition.
4128 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
4129 c_parser_cilk_verify_simd, c_parser_array_notation,
4130 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
4131 c_parser_cilk_simd_fn_vector_attrs,
4132 c_finish_cilk_simd_fn_tokens): Delete.
4133 (c_parser_declaration_or_fndef): Remove cilkplus condition.
4134 (c_parser_direct_declarator_inner): Ditto.
4135 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
4136 (c_parser_attributes, c_parser_compound_statement,
4137 c_parser_statement_after_labels, c_parser_if_statement,
4138 c_parser_switch_statement, c_parser_while_statement,
4139 c_parser_do_statement, c_parser_for_statement,
4140 c_parser_unary_expression, c_parser_postfix_expression,
4141 c_parser_postfix_expression_after_primary,
4142 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
4143 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
4144 support.
4145 * c-typeck.c (build_array_ref, build_function_call_vec,
4146 convert_arguments,
4147 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
4148 c_finish_loop, build_binary_op): Remove cilkplus support.
4149
9e851845
JJ
41502017-11-28 Jakub Jelinek <jakub@redhat.com>
4151
4152 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
4153 of build3.
4154
ab20d992 41552017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
4156
4157 * Make-lang.in (c.install-plugin): Install backend import library.
4158
41521dee
JJ
41592017-11-23 Jakub Jelinek <jakub@redhat.com>
4160
4161 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
4162 pragma_stmt context.
4163
ac9effed
EB
41642017-11-23 Mike Stump <mikestump@comcast.net>
4165 Eric Botcazou <ebotcazou@adacore.com>
4166
4167 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
4168 ANNOTATE_EXPR.
4169 (c_parser_do_statement): Likewise.
4170 (c_parser_for_statement): Likewise.
4171
ce95abc4
DM
41722017-11-22 David Malcolm <dmalcolm@redhat.com>
4173
4174 PR c++/62170
4175 * c-objc-common.c (c_tree_printer): Convert penultimate param from
4176 bool to bool *. Within '%T' handling, if showing an "aka", use
4177 "quoted" param to add appropriate quoting.
4178
974aedcc
MP
41792017-11-22 Marek Polacek <polacek@redhat.com>
4180
4181 PR c++/60336
4182 PR middle-end/67239
4183 PR target/68355
4184 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
4185
d4300cc6
DM
41862017-11-21 David Malcolm <dmalcolm@redhat.com>
4187
4188 PR c/83056
4189 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
4190 earlier failed lookups.
4191
1af4ebf5
MG
41922017-11-21 Marc Glisse <marc.glisse@inria.fr>
4193
4194 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
4195 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
4196
26edace6
DM
41972017-11-20 David Malcolm <dmalcolm@redhat.com>
4198
4199 PR c/81404
4200 * c-decl.c: Include "c-family/known-headers.h".
4201 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
4202 to known-headers.cc.
4203 (class suggest_missing_header): Move to known-header.h.
4204 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
4205 than get_c_name_hint.
4206
b1212255
DM
42072017-11-20 David Malcolm <dmalcolm@redhat.com>
4208
4209 * c-decl.c (get_c_name_hint): New function.
4210 (class suggest_missing_header): New class.
4211 (lookup_name_fuzzy): Call get_c_name_hint and use it to
4212 suggest missing headers to the user.
4213
6c7a259b
DM
42142017-11-20 David Malcolm <dmalcolm@redhat.com>
4215
4216 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4217 Include "c-family/name-hint.h"
4218 (implicit_decl_warning): Convert "hint" from
4219 const char * to name_hint. Pass location to
4220 lookup_name_fuzzy. Suppress any deferred diagnostic if the
4221 warning was not printed.
4222 (undeclared_variable): Likewise for "guessed_id".
4223 (lookup_name_fuzzy): Convert return type from const char *
4224 to name_hint. Add location_t param.
4225 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4226 Include "c-family/name-hint.h"
4227 (c_parser_declaration_or_fndef): Convert "hint" from
4228 const char * to name_hint. Pass location to lookup_name_fuzzy.
4229 (c_parser_parameter_declaration): Likewise.
4230
f9c59f7e
JJ
42312017-11-19 Jakub Jelinek <jakub@redhat.com>
4232
4233 PR c/66618
4234 PR c/69960
4235 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
4236 where needed.
4237 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
4238 handle_omp_array_sections): Likewise.
4239 (digest_init): Don't call decl_constant_value_for_optimization.
4240 * c-tree.h (decl_constant_value_for_optimization): Removed.
4241 * c-fold.c (c_fold_array_ref): New function.
4242 (c_fully_fold_internal): Add LVAL argument, propagate it through
4243 recursive calls. For VAR_P call decl_constant_value and
4244 unshare if not LVAL and either optimizing or IN_INIT. Remove
4245 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
4246 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
4247 (c_fully_fold): Add LVAL argument, pass it through to
4248 c_fully_fold_internal.
4249 (decl_constant_value_for_optimization): Removed.
4250
3ca0dc60
JM
42512017-11-15 Joseph Myers <joseph@codesourcery.com>
4252
4253 PR c/81156
4254 * c-parser.c (check_tgmath_function): New function.
4255 (enum tgmath_parm_kind): New enum.
4256 (c_parser_postfix_expression): Handle __builtin_tgmath.
4257
64a5912c
DM
42582017-10-31 David Malcolm <dmalcolm@redhat.com>
4259
4260 * c-decl.c (implicit_decl_warning): Update for renaming of
4261 pedwarn_at_rich_loc and warning_at_rich_loc.
4262 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
4263 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
4264 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4265 (c_parser_struct_or_union_specifier): Likewise for renaming of
4266 pedwarn_at_rich_loc.
4267 (c_parser_parameter_declaration): Likewise for renaming of
4268 error_at_rich_loc.
4269 * c-typeck.c (build_component_ref): Likewise.
4270 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
4271 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
4272 (set_init_label): Likewise for renaming of error_at_rich_loc.
4273
c1136864
RB
42742017-10-30 Richard Biener <rguenther@suse.de>
4275
4276 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
4277 stmts.
4278
ee5fd23a
MM
42792017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4280
4281 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
4282 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
4283
1a59ccf2
DM
42842017-10-25 David Malcolm <dmalcolm@redhat.com>
4285
4286 PR c/7356
4287 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
4288 semicolons.
4289
bc1a75dd
JJ
42902017-10-25 Jakub Jelinek <jakub@redhat.com>
4291
4292 PR libstdc++/81706
4293 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
4294 newdecl to corresponding __builtin_ if any.
4295
ff1ff960
PC
42962017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
4297
4298 PR c++/82466
4299 * c-decl.c (diagnose_mismatched_decls): Use
4300 OPT_Wbuiltin_declaration_mismatch.
4301
62e1c678
DM
43022017-10-12 David Malcolm <dmalcolm@redhat.com>
4303
4304 * c-parser.c (c_parser_require): Add "type_is_unique" param and
4305 use it to guard calls to maybe_suggest_missing_token_insertion.
4306 (c_parser_parms_list_declarator): Override default value of new
4307 "type_is_unique" param to c_parser_require.
4308 (c_parser_asm_statement): Likewise.
4309 * c-parser.h (c_parser_require): Add "type_is_unique" param,
4310 defaulting to true.
4311
a92f6726
NS
43122017-10-11 Nathan Sidwell <nathan@acm.org>
4313
4314 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
4315
8e6cdc90
RS
43162017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4317
4318 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
4319 operating on trees as wide_ints.
4320 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
4321 (c_tree_equal): Likewise.
4322
8139a48e
DM
43232017-10-04 David Malcolm <dmalcolm@redhat.com>
4324
4325 * c-decl.c (push_parm_decl): Store c_parm's location into the
4326 PARAM_DECL.
4327 (build_c_parm): Add "loc" param and store it within the c_parm.
4328 * c-parser.c (struct c_parser): Add "last_token_location" field.
4329 (c_parser_consume_token): Store location of the token into the
4330 new field.
4331 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
4332 when handling a FUNCTION_DECL, if it doesn't already have them.
4333 (c_parser_parameter_declaration): Generate a location for the
4334 parameter, and pass it to the call to build_c_parm.
4335 * c-tree.h (struct c_parm): Add field "loc".
4336 (build_c_parm): Add location_t param.
4337 * c-typeck.c (get_fndecl_argument_location): New function.
4338 (inform_for_arg): New function.
4339 (convert_for_assignment): Use inform_for_arg when dealing with
4340 ic_argpass.
4341
2a389958
JJ
43422017-09-29 Jakub Jelinek <jakub@redhat.com>
4343
7d386d45
JJ
4344 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
4345 width is non-NULL.
4346 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
4347 don't SET_DECL_C_BIT_FIELD here.
4348
2a389958
JJ
4349 PR c/82340
4350 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
4351 instead of trying to set just TREE_READONLY manually.
4352
ebc6a85e
TV
43532017-09-16 Tom de Vries <tom@codesourcery.com>
4354
4355 PR c/81875
4356 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
4357 cond itself.
4358
bb75facd
JM
43592017-09-15 Joseph Myers <joseph@codesourcery.com>
4360
4361 PR c/82071
4362 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
4363 for C11.
4364 (build_conditional_expr): For C11, generate result with excess
4365 precision when one argument is an integer and the other is of a
4366 type using excess precision.
4367
1d933576
BE
43682017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4369
4370 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
4371
267bbb6f
MP
43722017-09-13 Marek Polacek <polacek@redhat.com>
4373
4374 PR c/82167
4375 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
4376 than expr.original_type.
4377
6836632e
NS
43782017-09-12 Nathan Sidwell <nathan@acm.org>
4379
4380 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4381 resort_sorted_fields): Moved from c-family/c-common.c.
4382 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
4383
e035be33
JM
43842017-09-01 Joseph Myers <joseph@codesourcery.com>
4385
4386 PR c/82071
4387 * c-typeck.c (build_atomic_assign): Handle argument with excess
4388 precision. Ensure any EXCESS_PRECISION_EXPR is present in
4389 argument passed to build_binary_op and convert_for_assignment but
4390 not for call to c_fully_fold.
4391 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
4392 Ensure build_binary_op is called with argument with original
4393 semantic type. Avoid calling c_fully_fold with an
4394 EXCESS_PRECISION_EXPR from build_binary_op.
4395
d2e05fcb
JJ
43962017-09-01 Jakub Jelinek <jakub@redhat.com>
4397
4398 PR c/81887
4399 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
4400
b397965c
RS
44012017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4402 Alan Hayward <alan.hayward@arm.com>
4403 David Sherwood <david.sherwood@arm.com>
4404
4405 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
4406 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
4407 m1 and m2 to the signed equivalent of a fixed-point
4408 SCALAR_TYPE_MODE.
4409
14e18d71
DM
44102017-08-24 David Malcolm <dmalcolm@redhat.com>
4411
4412 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
4413 than CAN_HAVE_LOCATION_P when determining whether to use the
4414 location_t value within "value".
4415
7f204c0f
DM
44162017-08-21 David Malcolm <dmalcolm@redhat.com>
4417
4418 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
4419 rather than peeking the location of the first token.
4420 * c-tree.h (c_expr::get_location): New method.
4421
2f687306
DM
44222017-08-21 David Malcolm <dmalcolm@redhat.com>
4423
4424 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
4425 to check_function_arguments.
4426
3e7b80d7
MP
44272017-08-18 Marek Polacek <polacek@redhat.com>
4428
4429 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
4430 commentary.
4431
00aa1fa2
L
44322017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4433
4434 PR c/53037
4435 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
4436 (check_bitfield_type_and_width): Don't allow bit-field with
4437 warn_if_not_aligned type.
4438
da67acb9
MS
44392017-08-14 Martin Sebor <msebor@redhat.com>
4440
4441 PR c/81117
4442 * c-objc-common.c (c_objc_common_init): Handle 'G'.
4443
bb85aa74
MP
44442017-08-11 Marek Polacek <polacek@redhat.com>
4445
4446 PR c/81795
4447 * c-decl.c (pushtag): Only print inform if the warning was printed.
4448 (grokdeclarator): Likewise.
4449
32129a17
DM
44502017-08-10 David Malcolm <dmalcolm@redhat.com>
4451
4452 * c-parser.c (c_parser_error): Rename to...
4453 (c_parser_error_richloc): ...this, making static, and adding
4454 "richloc" parameter, passing it to the c_parse_error call,
4455 rather than calling c_parser_set_source_position_from_token.
4456 (c_parser_error): Reintroduce, reimplementing in terms of the
4457 above, converting return type from void to bool.
4458 (class token_pair): New class.
4459 (struct matching_paren_traits): New struct.
4460 (matching_parens): New typedef.
4461 (struct matching_brace_traits): New struct.
4462 (matching_braces): New typedef.
4463 (get_matching_symbol): New function.
4464 (c_parser_require): Add param MATCHING_LOCATION, using it to
4465 highlight matching "opening" tokens for missing "closing" tokens.
4466 (c_parser_skip_until_found): Likewise.
4467 (c_parser_static_assert_declaration_no_semi): Convert explicit
4468 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
4469 class matching_parens, so that the pertinent open parenthesis is
4470 highlighted when there are problems locating the close
4471 parenthesis.
4472 (c_parser_struct_or_union_specifier): Likewise.
4473 (c_parser_typeof_specifier): Likewise.
4474 (c_parser_alignas_specifier): Likewise.
4475 (c_parser_simple_asm_expr): Likewise.
4476 (c_parser_braced_init): Likewise, for matching_braces.
4477 (c_parser_paren_condition): Likewise, for matching_parens.
4478 (c_parser_switch_statement): Likewise.
4479 (c_parser_for_statement): Likewise.
4480 (c_parser_asm_statement): Likewise.
4481 (c_parser_asm_operands): Likewise.
4482 (c_parser_cast_expression): Likewise.
4483 (c_parser_sizeof_expression): Likewise.
4484 (c_parser_alignof_expression): Likewise.
4485 (c_parser_generic_selection): Likewise.
4486 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
4487 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
4488 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
4489 In case CPP_OPEN_PAREN, pass loc_open_paren to the
4490 c_parser_skip_until_found call.
4491 (c_parser_objc_class_definition): Use class matching_parens as
4492 above.
4493 (c_parser_objc_method_decl): Likewise.
4494 (c_parser_objc_try_catch_finally_statement): Likewise.
4495 (c_parser_objc_synchronized_statement): Likewise.
4496 (c_parser_objc_at_property_declaration): Likewise.
4497 (c_parser_oacc_wait_list): Likewise.
4498 (c_parser_omp_var_list_parens): Likewise.
4499 (c_parser_omp_clause_collapse): Likewise.
4500 (c_parser_omp_clause_default): Likewise.
4501 (c_parser_omp_clause_if): Likewise.
4502 (c_parser_omp_clause_num_threads): Likewise.
4503 (c_parser_omp_clause_num_tasks): Likewise.
4504 (c_parser_omp_clause_grainsize): Likewise.
4505 (c_parser_omp_clause_priority): Likewise.
4506 (c_parser_omp_clause_hint): Likewise.
4507 (c_parser_omp_clause_defaultmap): Likewise.
4508 (c_parser_oacc_single_int_clause): Likewise.
4509 (c_parser_omp_clause_ordered): Likewise.
4510 (c_parser_omp_clause_reduction): Likewise.
4511 (c_parser_omp_clause_schedule): Likewise.
4512 (c_parser_omp_clause_num_teams): Likewise.
4513 (c_parser_omp_clause_thread_limit): Likewise.
4514 (c_parser_omp_clause_aligned): Likewise.
4515 (c_parser_omp_clause_linear): Likewise.
4516 (c_parser_omp_clause_safelen): Likewise.
4517 (c_parser_omp_clause_simdlen): Likewise.
4518 (c_parser_omp_clause_depend): Likewise.
4519 (c_parser_omp_clause_map): Likewise.
4520 (c_parser_omp_clause_device): Likewise.
4521 (c_parser_omp_clause_dist_schedule): Likewise.
4522 (c_parser_omp_clause_proc_bind): Likewise.
4523 (c_parser_omp_clause_uniform): Likewise.
4524 (c_parser_omp_for_loop): Likewise.
4525 (c_parser_cilk_clause_vectorlength): Likewise.
4526 (c_parser_cilk_clause_linear): Likewise.
4527 (c_parser_transaction_expression): Likewise.
4528 * c-parser.h (c_parser_require): Add param matching_location with
4529 default UNKNOWN_LOCATION.
4530 (c_parser_error): Convert return type from void to bool.
4531 (c_parser_skip_until_found): Add param matching_location with
4532 default UNKNOWN_LOCATION.
4533
30af3a2b
MP
45342017-08-09 Marek Polacek <polacek@redhat.com>
4535
4536 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
4537 * c-tree.h (build_external_ref): Update declaration.
4538 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
4539 (build_external_ref): Change the type of a parameter to bool.
4540 (parser_build_binary_op): Use true/false instead of 1/0.
4541 (pointer_diff): Likewise.
4542 (build_modify_expr): Likewise.
4543 (set_designator): Change the type of a parameter to bool.
4544 (set_init_index): Use true/false instead of 1/0.
4545 (set_init_label): Likewise.
4546 (output_init_element): Change the type of a parameter to bool.
4547 (output_pending_init_elements): Use true/false instead of 1/0.
4548 (process_init_element): Likewise.
4549 (build_binary_op): Change the type of a parameter to bool.
4550
296c53ac
MP
45512017-08-09 Marek Polacek <polacek@redhat.com>
4552
4553 PR c/81233
4554 * c-typeck.c (pedwarn_init): Make the function take a variable list.
4555 Call emit_diagnostic_valist instead of pedwarn.
4556 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
4557 Print the relevant types in diagnostics.
4558
a32c8316
MP
45592017-08-09 Marek Polacek <polacek@redhat.com>
4560
4561 PR c/81417
4562 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 4563 build_conditional_expr.
a32c8316
MP
4564 * c-parser.c (c_parser_conditional_expression): Create locations for
4565 EXP1 and EXP2 from their source ranges. Pass the locations down to
4566 build_conditional_expr.
4567 * c-tree.h (build_conditional_expr): Update declaration.
4568 * c-typeck.c (build_conditional_expr): Add location_t parameters.
4569 For -Wsign-compare, also print the types.
4570
314e6352
ML
45712017-08-08 Martin Liska <mliska@suse.cz>
4572
4573 * c-convert.c: Include header files.
4574 * c-typeck.c: Likewise.
4575
577eec56
ML
45762017-08-07 Martin Liska <mliska@suse.cz>
4577
4578 * c-parser.c (c_parser_attributes): Canonicalize name of an
4579 attribute.
4580
f7b6353a
MP
45812017-08-02 Marek Polacek <polacek@redhat.com>
4582
4583 PR c/81289
4584 * c-parser.c (c_parser_unary_expression): Use set_error.
4585
8a6eab34
MP
4586 PR c/81448
4587 PR c/81306
4588 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
4589 warnings. Avoid walking MACRO_MAP_LOCATIONS.
4590
ab20d992 45912017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
4592 Martin Liska <mliska@suse.cz>
4593
4594 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 4595 statement.
7fef86d3 4596
f34ebeb2
ML
45972017-07-31 Martin Liska <mliska@suse.cz>
4598
4599 PR sanitize/81530
4600 * c-convert.c (convert): Guard condition with flag_sanitize_p
4601 also with current_function_decl non-null equality.
4602 * c-decl.c (grokdeclarator): Likewise.
4603 * c-typeck.c (build_binary_op): Likewise.
4604
8595f67b
MP
46052017-07-25 Marek Polacek <polacek@redhat.com>
4606
4607 * c-decl.c (grokfield): Remove local variable.
4608
d49718d6
MP
46092017-07-25 Marek Polacek <polacek@redhat.com>
4610
4611 PR c/81364
4612 * c-parser.c (c_parser_else_body): Don't warn about multistatement
4613 macro expansion if the body is in { }.
4614 (c_parser_while_statement): Likewise.
4615 (c_parser_for_statement): Likewise.
4616
ff22eb12
NS
46172017-07-18 Nathan Sidwell <nathan@acm.org>
4618
4619 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
4620
eea77d1f
DM
46212017-07-14 David Malcolm <dmalcolm@redhat.com>
4622
4623 * c-decl.c (implicitly_declare): When suggesting a missing
4624 #include, provide a fix-it hint.
4625
b6f43128
DM
46262017-07-06 David Malcolm <dmalcolm@redhat.com>
4627
4628 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
4629 and call that instead.
4630 * c-tree.h (selftest::run_c_tests): New decl.
4631
3e2becc4
MP
46322017-06-26 Marek Polacek <polacek@redhat.com>
4633
4634 PR c/80116
4635 * c-parser.c (c_parser_if_body): Set the location of the
4636 body of the conditional after parsing all the labels. Call
4637 warn_for_multistatement_macros.
4638 (c_parser_else_body): Likewise.
4639 (c_parser_switch_statement): Likewise.
4640 (c_parser_while_statement): Likewise.
4641 (c_parser_for_statement): Likewise.
4642 (c_parser_statement): Add a default argument. Save the location
4643 after labels have been parsed.
4644 (c_parser_c99_block_statement): Likewise.
4645
343ae898
RB
46462017-06-19 Richard Biener <rguenther@suse.de>
4647
4648 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4649 negated _Literals to parse _Literal (int) -1.
4650
45b2222a
ML
46512017-06-13 Martin Liska <mliska@suse.cz>
4652
4653 PR sanitize/78204
4654 * c-convert.c (convert): Use sanitize_flags_p.
4655 * c-decl.c (grokdeclarator): Likewise.
4656 * c-typeck.c (convert_for_assignment): Likewise.
4657 (c_finish_return): Likewise.
4658 (build_binary_op): Likewise.
4659
8ab7005b
JJ
46602017-06-08 Jakub Jelinek <jakub@redhat.com>
4661
4662 PR c/81006
4663 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
4664 to sizetype before size_binop.
4665
363dc72c
JJ
46662017-06-07 Jakub Jelinek <jakub@redhat.com>
4667
4668 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
4669 of TDI_generic.
4670
dc949728
MP
46712017-06-06 Marek Polacek <polacek@redhat.com>
4672
4673 PR c/79983
4674 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
4675 ref.
4676 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
4677
40ffd95f
BE
46782017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4679
4680 * c-parser.c (c_parser_binary_expression): Implement the
4681 -Wsizeof_pointer_div warning.
4682 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
4683 from a parenthesized expression.
4684 (c_parser_expr_list): Use c_last_sizeof_loc.
4685 * c-tree.h (c_last_sizeof_loc): New external.
4686 * c-typeck.c (c_last_sizeof_loc): New variable.
4687 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
4688
9fc5e7a4
MM
46892017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
4690
4691 PR testsuite/80580
4692 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
4693
f012c8ef
DM
46942017-05-30 David Malcolm <dmalcolm@redhat.com>
4695
4696 * c-objc-common.c (c_tree_printer): Gain bool and const char **
4697 parameters.
4698
3cd211af
MS
46992017-05-24 Martin Sebor <msebor@redhat.com>
4700
4701 PR c/80731
4702 * c-fold.c (c_fully_fold_internal): Adjust.
4703 * c-typeck.c (parser_build_unary_op): Adjust.
4704
fd71a9a2
TS
47052017-05-23 Thomas Schwinge <thomas@codesourcery.com>
4706
4707 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
4708 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
4709 "VECTOR_LENGTH".
4710
92fa0f9e
MP
47112017-05-23 Marek Polacek <polacek@redhat.com>
4712
4713 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
4714 quotes.
4715
d11c168a
JJ
47162017-05-22 Jakub Jelinek <jakub@redhat.com>
4717
4718 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
4719 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
4720 it returned invariant. Call tree_invariant_p unconditionally
4721 afterwards to decide whether to return expr or op0.
4722
58aca9d9
NS
47232017-05-22 Nathan Sidwell <nathan@acm.org>
4724
4725 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
4726
7fd549d2
TS
47272017-05-19 Thomas Schwinge <thomas@codesourcery.com>
4728
4729 * c-parser.c (c_parser_omp_clause_default): Handle
4730 "OMP_CLAUSE_DEFAULT_PRESENT".
4731
6ecd2339
BE
47322017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4733
4734 * config-lang.in (gtfiles): Add c-family/c-format.c.
4735
8a57ecff
NS
47362017-05-18 Nathan Sidwell <nathan@acm.org>
4737
4738 * c-decl.c (pushdecl_top_level): Delete unused function.
4739
6574d78e
MP
47402017-05-18 Marek Polacek <polacek@redhat.com>
4741
4742 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
4743 (check_earlier_gotos): Likewise.
4744 (define_label): Likewise.
4745 (pending_xref_error): Likewise.
4746 (smallest_type_quals_location): Likewise.
4747 (grokdeclarator): Likewise.
4748 (grokparms): Likewise.
4749 (identifier_global_value): Likewise.
4750 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
4751 (find_init_member): Likewise.
4752
e3455240
MP
47532017-05-18 Marek Polacek <polacek@redhat.com>
4754
4755 * c-decl.c (start_decl): Use false/true instead of 0/1.
4756 (grokdeclarator): Likewise.
4757 (finish_struct): Likewise.
4758 (start_function): Change the return type to bool. Use false/true
4759 instead of 0/1.
4760 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
4761 * c-tree.h (start_function): Update.
4762 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
4763 (set_designator): Change the return type to bool. Use false/true
4764 instead of 0/1.
4765
3fa8871b
MP
47662017-05-17 Marek Polacek <polacek@redhat.com>
4767
4768 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
4769 * c-typeck.c: Likewise.
4770
142473df
MP
47712017-05-17 Marek Polacek <polacek@redhat.com>
4772
4773 PR sanitizer/80659
4774 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
4775 DECL_IGNORED_P even for non-static compound literals.
4776
1a817418
ML
47772017-05-17 Martin Liska <mliska@suse.cz>
4778
4779 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
4780 use it instead of int type.
4781
b2fa0a8b
MP
47822017-05-17 Marek Polacek <polacek@redhat.com>
4783
4784 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
4785 call c_fully_fold.
4786 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 4787 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
4788 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
4789 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
4790 save_expr.
4791 (c_parser_conditional_expression): Likewise.
4792 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
4793 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
4794 (process_init_element): Likewise.
4795 (build_binary_op): Likewise.
4796 (handle_omp_array_sections_1): Likewise.
4797
1e47f02b
TS
47982017-05-12 Thomas Schwinge <thomas@codesourcery.com>
4799
4800 * c-parser.c (c_parser_omp_clause_num_gangs)
4801 (c_parser_omp_clause_num_workers)
4802 (c_parser_omp_clause_vector_length): Merge functions into...
4803 (c_parser_oacc_single_int_clause): ... this new function. Adjust
4804 all users.
4805
c24e924f
NS
48062017-05-11 Nathan Sidwell <nathan@acm.org>
4807
4808 * gimple-parser.c: Don't #include tree-dump.h.
4809
c587104e
MM
48102017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4811
4812 PR testsuite/80580
4813 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
4814
67ac9a9d
MM
48152017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4816
4817 PR testsuite/80580
4818 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4819 incorrect __MEM syntax.
4820
ac4eb40f
MM
48212017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4822
4823 PR testsuite/80580
4824 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
4825 type of unary '*'.
4826
641da50a
NS
48272017-05-09 Nathan Sidwell <nathan@acm.org>
4828
4829 * c-tree.h (pushdecl): Declare.
4830
56d35585
DM
48312017-05-05 David Malcolm <dmalcolm@redhat.com>
4832
4833 * c-decl.c (warn_defaults_to): Replace report_diagnostic
4834 with diagnostic_report_diagnostic.
4835 * c-errors.c (pedwarn_c99): Likewise.
4836 (pedwarn_c90): Likewise.
4837
815d9cc6
XR
48382017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4839
92a285c1 4840 PR c++/80038
815d9cc6
XR
4841 * c-gimplify.c (c_gimplify_expr): Remove calls to
4842 cilk_gimplifY_call_params_in_spawned_fn.
4843
1c4ea66f
DM
48442017-04-25 David Malcolm <dmalcolm@redhat.com>
4845
4846 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
4847 hint for removing extra semicolon.
4848
666f7903
JJ
48492017-04-21 Jakub Jelinek <jakub@redhat.com>
4850
4851 PR c/80468
4852 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
4853 enabled, set specs->type to integer_type_node.
4854
5764ee3c
JW
48552017-04-03 Jonathan Wakely <jwakely@redhat.com>
4856
4857 * c-array-notation.c: Fix typo in comment.
4858
10fa8dfb
MP
48592017-03-29 Marek Polacek <polacek@redhat.com>
4860
4861 PR c/79730
4862 * c-decl.c (finish_decl): Check VAR_P.
4863
a9e4a1a5
JJ
48642017-03-27 Jakub Jelinek <jakub@redhat.com>
4865
4866 PR middle-end/80162
4867 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
4868 * c-typeck.c (c_mark_addressable): Likewise. Look through
4869 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
4870 to ARRAY_TYPE.
4871 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
4872
ee3ff394
MP
48732017-03-23 Marek Polacek <polacek@redhat.com>
4874
4875 * c-tree.h: Remove a C_RID_YYCODE reference.
4876
4d1b8e70
JJ
48772017-03-21 Jakub Jelinek <jakub@redhat.com>
4878
4879 PR c/80097
4880 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
4881 optional COMPOUND_EXPR with ubsan instrumentation.
4882
31dc71a8
MP
48832017-03-17 Marek Polacek <polacek@redhat.com>
4884
4885 * c-parser.c: Add C11 references.
4886
d579c385
MP
48872017-03-15 Marek Polacek <polacek@redhat.com>
4888
4889 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
4890
85059a38
MP
48912017-03-11 Marek Polacek <polacek@redhat.com>
4892
4893 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
4894
2f6f187a
DM
48952017-03-10 David Malcolm <dmalcolm@redhat.com>
4896
4897 PR translation/79848
4898 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
4899 "%qs".
4900 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
4901
36618428
MP
49022017-03-09 Marek Polacek <polacek@redhat.com>
4903
4904 PR sanitizer/79757
4905 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
4906 parameter declarations with initializers.
4907
01e5af5a
JJ
49082017-03-09 Jakub Jelinek <jakub@redhat.com>
4909
4910 PR c/79969
4911 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
4912 TYPE_STUB_DECL.
4913
a71dbc63
JJ
49142017-03-07 Jakub Jelinek <jakub@redhat.com>
4915
4916 PR c/79834
4917 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
4918 for "may only be used in compound statements" diagnostics, change it
4919 such that the same translatable string is used for all pragmas. For
4920 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
4921 diagnostics.
4922 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
4923 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
4924 "may only be used in compound statements" diagnostics, such that the
4925 same translatable string is used for all pragmas.
4926
1ff4bae6
MP
49272017-03-04 Marek Polacek <polacek@redhat.com>
4928
4929 PR c/79847
4930 * c-decl.c (implicit_decl_warning): Add missing space.
4931
7f5a7d78
MP
49322017-03-03 Marek Polacek <polacek@redhat.com>
4933
4934 PR c/79758
4935 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
4936 current_function_prototype_arg_types is error_mark_node. Fix
4937 formatting. Use TREE_VALUE instead of TREE_TYPE.
4938
883c8f06
JJ
49392017-03-03 Jakub Jelinek <jakub@redhat.com>
4940
79c9b7a8
JJ
4941 PR c/79837
4942 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4943 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4944 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4945 diagnostics.
4946
883c8f06
JJ
4947 PR c/79836
4948 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4949 instead of %<_Generic>.
4950 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4951 (c_parser_omp_target_exit_data): Use %<release%> instead of
4952 %<release>.
4953
324ff1a0
JJ
49542017-02-28 Jakub Jelinek <jakub@redhat.com>
4955
4956 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4957 instead of just cond ? "..." : "...".
4958 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4959 for "enter"/"exit" keyword.
4960 (c_finish_oacc_routine): Don't use %s to supply portions of the
4961 message.
4962
4227c9ad
JJ
49632017-02-24 Jakub Jelinek <jakub@redhat.com>
4964
4965 PR c++/79588
4966 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4967 handle -Wrestrict here.
4968 * c-typeck.c (build_function_call_vec): Adjust
4969 check_function_arguments caller.
4970
5d972e66
RB
49712017-02-23 Richard Biener <rguenther@suse.de>
4972
4973 PR c/79684
4974 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4975 to initialize c_exprs to return.
4976 (c_parser_gimple_binary_expression): Likewise.
4977 (c_parser_gimple_unary_expression): Likewise.
4978 (c_parser_gimple_postfix_expression): Likewise.
4979
61ac5ebe
MP
49802017-02-22 Marek Polacek <polacek@redhat.com>
4981
4982 PR c/79662
4983 * c-typeck.c (convert_arguments): Handle error_mark_node.
4984
41d1b0b1
PK
49852017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4986
4987 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4988 value of c_parser_parse_ssa_name against error_mark_node and emit
4989 error if ssa name is anonymous and written as default definition.
4990
eab1f169
PK
49912017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4992
4993 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4994 FMA_EXPR.
4995
bcac0b4d
JJ
49962017-02-16 Jakub Jelinek <jakub@redhat.com>
4997
4998 PR c++/79512
4999 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
5000 ignore #pragma omp target even when not followed by identifier.
5001
1be33173
PK
50022017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5003
5004 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
5005 (c_parser_gimple_unary_expression): Likewise.
5006
aa326bfb
JJ
50072017-02-13 Jakub Jelinek <jakub@redhat.com>
5008
5009 * c-parser.c (c_parser_oacc_declare): Add missing space in
5010 diagnostics.
5011
8a398bc5
PK
50122017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5013
5014 PR c/79478
5015 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
5016 set_c_expr_source_range when parsing ssa-name.
5017
3dcde5ef 50182017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 5019 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
5020
5021 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
5022 building IL when arguments are error_mark_node.
5023 (c_parser_gimple_unary_expression): Likewise.
5024 (c_parser_gimple_if_stmt): Likewise.
5025 (c_parser_gimple_switch_stmt): Likewise.
5026 (c_parser_gimple_return_stmt): Likewise.
5027 (c_parser_parse_ssa_name): When name lookup fails do not build
5028 an SSA name. Use undeclared rather than not declared in error
5029 reporting.
5030
192b048b
MP
50312017-02-09 Marek Polacek <polacek@redhat.com>
5032
5033 PR c/79428
5034 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
5035 instead of c_parser_skip_until_found.
5036
56f71478
JJ
50372017-02-09 Jakub Jelinek <jakub@redhat.com>
5038
5039 PR c/79431
5040 * c-parser.c (c_parser_omp_declare_target): Don't invoke
5041 symtab_node::get on automatic variables.
5042
02889d23
CLT
50432016-02-09 Nathan Sidwell <nathan@codesourcery.com>
5044 Chung-Lin Tang <cltang@codesourcery.com>
5045
5046 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
5047 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
5048 semantic checking.
5049 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
5050
7af4b20d
RB
50512017-02-07 Richard Biener <rguenther@suse.de>
5052
5053 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
5054 (c_parser_gimple_postfix_expression_after_primary):
5055 Do not use c_build_function_call_vec to avoid folding and promotion.
5056 Simplify.
5057
e5e391d6
MO
50582017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
5059
5060 PR lto/79061
5061 * c-decl.c (pop_scope): Pass main_input_filename to
5062 build_translation_unit_decl.
5063
c2e84327
DM
50642017-01-24 David Malcolm <dmalcolm@redhat.com>
5065
5066 * c-parser.c: Include "read-rtl-function.h" and
5067 "run-rtl-passes.h".
5068 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
5069 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
5070 production. Update for renaming of field "gimple_pass" to
5071 "gimple_or_rtl_pass". If __RTL was seen, call
5072 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
5073 to an auto_timevar, to cope with early exit.
5074 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
5075 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
5076 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
5077 Handle RID_RTL.
5078 (c_parser_parse_rtl_body): New function.
5079 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
5080 (struct c_declspecs): Rename field "gimple_pass" to
5081 "gimple_or_rtl_pass". Add field "rtl_p".
5082 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
5083 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
5084 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
5085 (c_parser_gimple_or_rtl_pass_list): ...this.
5086
2ebd93e1
MP
50872017-01-20 Marek Polacek <polacek@redhat.com>
5088
5089 PR c/64279
5090 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
5091
b1c95bb5
RB
50922017-01-13 Richard Biener <rguenther@suse.de>
5093
5094 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
5095 nops.
5096
25329913
RB
50972017-01-13 Richard Biener <rguenther@suse.de>
5098
5099 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5100 _Literal ( type-name ) number.
5101
6bb4ea5c
RB
51022017-01-12 Richard Biener <rguenther@suse.de>
5103
5104 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5105 __MEM.
5106
6b5b4e9c
JJ
51072017-01-11 Jakub Jelinek <jakub@redhat.com>
5108
5109 PR c++/72813
5110 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
5111 PCH file.
5112
e3252775
RB
51132017-01-11 Richard Biener <rguenther@suse.de>
5114
5115 PR bootstrap/79052
5116 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
5117 returns on parse errors.
5118
a9342885
MP
51192017-01-04 Marek Polacek <polacek@redhat.com>
5120
5121 PR c++/64767
5122 * c-parser.c (c_parser_postfix_expression): Mark zero character
5123 constants by setting original_type in c_expr.
5124 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
5125 with a zero character constant.
5126 (char_type_p): New function.
5127
5dd9a9d0
DM
51282017-01-04 David Malcolm <dmalcolm@redhat.com>
5129
5130 * c-parser.c (c_parser_declaration_or_fndef): Create a
5131 rich_location at init_loc and parse it to start_init.
5132 (last_init_list_comma): New global.
5133 (c_parser_braced_init): Update last_init_list_comma when parsing
5134 commas. Pass it to pop_init_level. Pass location of closing
5135 brace to pop_init_level.
5136 (c_parser_postfix_expression_after_paren_type): Create a
5137 rich_location at type_loc and parse it to start_init.
5138 (c_parser_omp_declare_reduction): Likewise for loc.
5139 * c-tree.h (start_init): Add rich_location * param.
5140 (pop_init_level): Add location_t param.
5141 * c-typeck.c (struct initializer_stack): Add field
5142 "missing_brace_richloc".
5143 (start_init): Add richloc param, use it to initialize
5144 the stack node's missing_brace_richloc.
5145 (last_init_list_comma): New decl.
5146 (finish_implicit_inits): Pass last_init_list_comma to
5147 pop_init_level.
5148 (push_init_level): When finding missing open braces, add fix-it
5149 hints to the richloc.
5150 (pop_init_level): Add "insert_before" param and pass it
5151 when calling pop_init_level. Add fixits about missing
5152 close braces to any richloc. Use the richloc for the
5153 -Wmissing-braces warning.
5154 (set_designator): Pass last_init_list_comma to pop_init_level.
5155 (process_init_element): Likewise.
5156
cbe34bb5
JJ
51572017-01-01 Jakub Jelinek <jakub@redhat.com>
5158
5159 Update copyright years.
5160
d17680f3
JJ
51612016-12-21 Jakub Jelinek <jakub@redhat.com>
5162
0dba7960
JJ
5163 PR bootstrap/78817
5164 * c-typeck.c (build_function_call_vec): If check_function_arguments
5165 returns true, set TREE_NO_WARNING on CALL_EXPR.
5166
d17680f3
JJ
5167 PR c/77767
5168 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
5169 to *expr instead of overwriting it.
5170
aa90531e
RB
51712016-12-20 Richard Biener <rguenther@suse.de>
5172
5173 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
5174 error recovery.
5175 (c_parser_gimple_statement): Only build assigns for non-error
5176 stmts.
5177 (c_parser_gimple_postfix_expression_after): Improve error recovery.
5178
629b3d75
MJ
51792016-12-14 Martin Jambor <mjambor@suse.cz>
5180
5181 * c-parser.c: Include omp-general.h and omp-offload.h instead of
5182 omp-low.h.
5183 (c_finish_oacc_routine): Adjusted call to
5184 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
5185 to use their new names.
5186 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
5187 use its new name.
5188 (c_parser_oacc_update): Likewise.
5189 (c_parser_omp_simd): Likewise.
5190 (c_parser_omp_target_update): Likewise.
5191 * c-typeck.c: Include omp-general.h instead of omp-low.h.
5192 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
5193 name.
5194 (c_finish_omp_cancellation_point): Likewise.
5195 * gimple-parser.c: Do not include omp-low.h
5196
c5af52eb
CP
51972016-12-02 Cesar Philippidis <cesar@codesourcery.com>
5198 James Norris <jnorris@codesourcery.com>
5199
5200 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
5201 EXIT_DATA,WAIT} are not used in compound statements.
5202 (c_parser_oacc_enter_exit_data): Update diagnostics.
5203
48330c93
BE
52042016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5205
5206 PR c++/71973
5207 * c-decl.c (diagnose_mismatched_decls): Use
5208 OPT_Wbuiltin_declaration_mismatch here too.
5209
899ca90e 52102016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
5211 Alan Hayward <alan.hayward@arm.com>
5212 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
5213
5214 * c-decl.c (merge_decls): Use SET_DECL_MODE.
5215 (make_label, finish_struct): Likewise.
5216
1ee62b92 52172016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 5218 Richard Biener <rguenther@suse.de>
22b15758 5219
8e745a17
JJ
5220 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
5221 * config-lang.in (gtfiles): Add c/c-parser.h.
5222 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
5223 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
5224 * c-parser.c (enum c_id_kind, struct c_token,
5225 c_parser_next_token_is, c_parser_next_token_is_not,
5226 c_parser_next_token_is_keyword,
5227 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
5228 Split out to ...
5229 * c-parser.h: ... new header.
5230 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 5231 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
5232 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5233 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5234 c_parser_error, c_parser_require, c_parser_skip_until_found,
5235 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5236 c_parser_type_name): Export.
5237 (c_parser_tokens_buf): New function.
5238 (c_parser_error): Likewise.
5239 (c_parser_set_error): Likewise.
5240 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
5241 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
5242 via c_parser_parse_gimple_body.
8e745a17
JJ
5243 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
5244 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5245 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5246 c_parser_error, c_parser_require, c_parser_skip_until_found,
5247 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5248 c_parser_type_name): Declare.
1ee62b92
PG
5249 (struct c_parser): Declare forward.
5250 (c_parser_tokens_buf): Declare.
8e745a17
JJ
5251 (c_parser_error): Likewise.
5252 (c_parser_set_error): Likewise.
5253 * gimple-parser.c: New file.
5254 * gimple-parser.h: Likewise.
1ee62b92 5255
22b15758
UB
52562016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5257
5258 PR c/35503
5259 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5260 warn_for_restrict.
5261
84ff4775
LCW
52622016-09-11 Le-Chun Wu <lcwu@google.com>
5263 Mark Wielaard <mjw@redhat.com>
5264
5265 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
5266 to the given -Wshadow= variant.
5267
4d0cdd0c
TP
52682016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5269
5270 * c-typeck.c: Include memmodel.h.
5271
1202f33e
JJ
52722016-10-13 Jakub Jelinek <jakub@redhat.com>
5273
5274 PR target/77957
5275 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
5276 instead of lhd_return_null_tree_v.
5277
8a14afd0
BS
52782016-10-07 Bernd Schmidt <bschmidt@redhat.com>
5279
5280 PR c++/69733
5281 * c-decl.c (smallest_type_quals_location): New static function.
5282 (grokdeclarator): Try to find the correct location for an ignored
5283 qualifier.
5284
81fea426
MP
52852016-09-26 Marek Polacek <polacek@redhat.com>
5286
5287 PR c/7652
5288 * c-decl.c (pop_scope): Add gcc_fallthrough.
5289
52902016-09-26 Marek Polacek <polacek@redhat.com>
5291
5292 PR c/7652
5293 * c-parser.c (struct c_token): Add flags field.
5294 (c_lex_one_token): Pass it to c_lex_with_flags.
5295 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
5296 into IFN_FALLTHROUGH.
5297 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
5298 attribute fallthrough after a case label or default label.
5299 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
5300
9a2300e9
MP
53012016-09-24 Marek Polacek <polacek@redhat.com>
5302
5303 PR c/77490
5304 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
5305 have boolean value. Warn about ++/-- on booleans.
5306
7de76362
JJ
53072016-09-23 Jakub Jelinek <jakub@redhat.com>
5308
5309 * c-parser.c (incomplete_record_decls): Remove unnecessary
5310 = vNULL initialization of file scope vec.
5311
5b73d2ab
MP
53122016-09-16 Marek Polacek <polacek@redhat.com>
5313
5314 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
5315
e51fbec3
MP
53162016-09-14 Marek Polacek <polacek@redhat.com>
5317
5318 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
5319 (fix_array_notation_expr): Likewise.
5320 * c-decl.c (finish_decl): Likewise.
5321 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5322 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
5323 (function_to_pointer_conversion): Use false instead of 0.
5324 (convert_lvalue_to_rvalue): Likewise.
5325 (parser_build_unary_op): Likewise.
5326 (build_atomic_assign): Likewise.
5327 (build_unary_op): Change nonconvert parameter type to bool, use
5328 true/false instead of 1/0.
5329 (build_binary_op): Use true instead of 1.
5330
254830ba
DM
53312016-09-13 David Malcolm <dmalcolm@redhat.com>
5332
5333 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
5334 of add_fixit_insert to add_fixit_insert_before.
5335
4c13ba17
MP
53362016-09-13 Marek Polacek <polacek@redhat.com>
5337
5338 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
5339 it.
5340
54dcdb88
BE
53412016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5342
5343 PR c++/77496
5344 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
5345 COMPOUND_EXPR to warn_for_omitted_condop.
5346
e5106e27
DM
53472016-09-07 David Malcolm <dmalcolm@redhat.com>
5348
5349 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
5350 c_get_substring_location for this new langhook.
5351
9dc5773f
JJ
53522016-09-02 Jakub Jelinek <jakub@redhat.com>
5353
5354 PR c/65467
5355 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
5356 flag_openmp.
5357 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
5358 instead of mark_exp_read on low_bound/length expression.
5359 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
5360 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5361 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5362 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
5363 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
5364 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
5365 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
5366 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
5367 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
5368 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
5369 instead of mark_expr_read.
5370 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
5371 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
5372 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
5373 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
5374 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
5375 array section bases outside of depend clause, for depend clause
5376 use convert_lvalue_to_rvalue on the base.
5377 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
5378 linear, aligned, map, to and from clauses.
5379 (c_omp_clause_copy_ctor): New function.
5380
295844f6
MP
53812016-09-01 Marek Polacek <polacek@redhat.com>
5382
5383 PR c/7652
5384 * c-typeck.c (composite_type): Add FALLTHRU comment.
5385
089af25c
DM
53862016-08-31 David Malcolm <dmalcolm@redhat.com>
5387
5388 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
5389 to the insertion fixits for "struct", "union", and "enum".
5390
f9087798
DM
53912016-08-30 David Malcolm <dmalcolm@redhat.com>
5392
5393 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
5394 rather than add_fixit_misspelled_id.
5395 (undeclared_variable): Likewise.
5396 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
5397 now-redundant "here" params from add_fixit_insert method calls.
5398 (c_parser_parameter_declaration): Likewise.
5399 * c-typeck.c (build_component_ref): Remove now-redundant range
5400 param from add_fixit_replace method calls.
5401
ebef225f
MP
54022016-08-25 Marek Polacek <polacek@redhat.com>
5403
5404 * c-typeck.c (parser_build_binary_op): Pass LHS to
5405 warn_logical_not_parentheses.
5406
fe377a48
MP
54072016-08-25 Marek Polacek <polacek@redhat.com>
5408
5409 PR c/77323
5410 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
5411 or _FloatN or _FloatNx is not supported.
5412 (finish_declspecs): Set type to integer_type_node when _FloatN or
5413 _FloatNx is not supported.
5414
c65699ef
JM
54152016-08-19 Joseph Myers <joseph@codesourcery.com>
5416
5417 PR c/32187
5418 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
5419 (struct c_declspecs): Add field floatn_nx_idx.
5420 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
5421 and _FloatNx type specifiers.
5422 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
5423 (c_parser_declspecs, c_parser_attribute_any_word)
5424 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
5425 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
5426 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
5427 narrower than double.
5428
2f1364c2
JJ
54292016-08-12 Jakub Jelinek <jakub@redhat.com>
5430 Martin Liska <mliska@suse.cz>
5431
5432 PR c/67410
5433 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
5434 % to determine val element to change. Assert that
5435 wchar_bytes * charwidth fits into val array.
5436
191816a3
MP
54372016-08-12 Marek Polacek <polacek@redhat.com>
5438
5439 PR c/7652
5440 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
5441 (c_parser_postfix_expression): Likewise.
5442 * c-typeck.c (build_unary_op): Adjust fall through comment.
5443 (c_mark_addressable): Likewise.
5444
b95a64bb
JJ
54452016-08-11 Jakub Jelinek <jakub@redhat.com>
5446
5447 PR c/72816
5448 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
5449 array member through typedef, for orig_qual_indirect == 0 clear
5450 orig_qual_type.
5451
895aa8e1
DM
54522016-08-08 David Malcolm <dmalcolm@redhat.com>
5453
5454 PR c/64955
5455 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
5456 this up to selftest::run_c_tests.
5457 (selftest::run_c_tests): New function.
5458
0b212d8c
TS
54592016-08-04 Thomas Schwinge <thomas@codesourcery.com>
5460
ae9281fc
TS
5461 * c-parser.c (struct oacc_routine_data): Add error_seen and
5462 fndecl_seen members.
5463 (c_finish_oacc_routine): Use these.
5464 (c_parser_declaration_or_fndef): Adjust.
5465 (c_parser_oacc_routine): Likewise. Support more C language
5466 constructs, and improve diagnostics. Move pragma context
5467 checking...
5468 (c_parser_pragma): ... here.
5469
0b212d8c
TS
5470 * c-parser.c (struct oacc_routine_data): New.
5471 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
5472 Simplify code.
5473 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
5474 declare target" attribute.
5475
76e2c821
JB
54762016-08-01 Jan Beulich <jbeulich@suse.com>
5477
5478 * c-fold.c (c_fully_fold_internal): Also emit shift count
5479 warnings for vector types.
5480 * c-typeck.c (build_binary_op): Likewise.
5481
f618a472
MP
54822016-07-29 Marek Polacek <polacek@redhat.com>
5483
5484 PR c/71742
5485 * c-decl.c (finish_struct): Rephrase an error message.
5486
efd0786f
MP
5487 PR c/71853
5488 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
5489 to error node for invalid code.
5490
e00dceaf
MP
5491 PR c/71573
5492 * c-decl.c (implicitly_declare): Return decl early not only for
5493 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
5494
673a107a
JJ
54952016-07-29 Jakub Jelinek <jakub@redhat.com>
5496
5497 PR c/71969
5498 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
5499 on GNU extern inline functions.
5500
a5b5c8b6
MP
55012016-07-29 Marek Polacek <polacek@redhat.com>
5502
5503 PR c/71583
5504 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
5505 check expr.value.
5506
e3fe09c1
UB
55072016-07-22 Uros Bizjak <ubizjak@gmail.com>
5508
5509 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
5510
7c8f7eaa
DM
55112016-07-20 David Malcolm <dmalcolm@redhat.com>
5512
5513 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
5514 spellcheck-tree.h
5515 (best_macro_match): Likewise, converting from a typedef to a
5516 subclass.
5517 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
5518 (lookup_name_fuzzy): Update for change of best_macro_match to a
5519 subclass with a ctor that calls cpp_forall_identifiers.
5520
de6a69ee
DM
55212016-07-20 David Malcolm <dmalcolm@redhat.com>
5522
5523 * c-decl.c (implicit_decl_warning): Update for conversion of
5524 return type of lookup_name_fuzzy to const char *.
5525 (undeclared_variable): Likewise.
5526 (lookup_name_fuzzy): Convert return type from tree to
5527 const char *.
5528 * c-parser.c (c_parser_declaration_or_fndef): Update for
5529 conversion of return type of lookup_name_fuzzy to const char *.
5530 (c_parser_parameter_declaration): Likewise.
5531
b1c9c068
CP
55322016-07-15 Cesar Philippidis <cesar@codesourcery.com>
5533
5534 * c-parser.c (c_parser_oacc_declare): Don't scan for
5535 GOMP_MAP_POINTER.
5536 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
5537 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
5538 zero-length subarrays.
5539
ddbbcb19
JJ
55402016-07-15 Jakub Jelinek <jakub@redhat.com>
5541
5542 PR c/71858
5543 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
5544 instead of FUZZY_LOOKUP_NAME.
5545 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
5546 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
5547
dd36b877
JJ
55482016-07-14 Jakub Jelinek <jakub@redhat.com>
5549
5550 PR c/71858
5551 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
5552
8c681247
TS
55532016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5554
5555 * c-parser.c (c_parser_generic_selection): Make type of variable
5556 auto_vec.
5557 (c_parser_omp_declare_simd): Likewise.
5558
bf4fa671
TS
55592016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5560
5561 * c-decl.c (struct c_struct_parse_info): Change member types
5562 from vec to auto_vec.
5563 (start_struct): Adjust.
5564 (finish_struct): Likewise.
5565
557e8c49
JJ
55662016-07-02 Jakub Jelinek <jakub@redhat.com>
5567
5568 PR c/71719
5569 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
5570
54d19c3b
TS
55712016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5572
5573 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
5574 Move pragma context checking into...
5575 (c_parser_omp_cancellation_point): ... here, and improve
5576 diagnostic messages.
5577 * c-typeck.c (c_finish_omp_cancel)
5578 (c_finish_omp_cancellation_point): Improve diagnostic messages.
5579
152ef731
JJ
55802016-06-29 Jakub Jelinek <jakub@redhat.com>
5581
5582 PR c/71685
5583 * c-typeck.c (c_build_qualified_type): Don't clear
5584 C_TYPE_INCOMPLETE_VARS for the main variant.
5585
55862016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
5587
5588 PR c/71552
5589 * c-typeck.c (output_init_element): Diagnose incompatible types
5590 before non-constant initializers.
5591
e9ac1f86
JJ
55922016-06-28 Jakub Jelinek <jakub@redhat.com>
5593
5594 * Make-lang.in: Don't cat ../stage_current if it does not exist.
5595
277d7ee0
AK
55962016-06-23 Andi Kleen <ak@linux.intel.com>
5597
5598 * Make-lang.in: Add support for autofdo.
5599
1a4f11c8
DM
56002016-06-22 David Malcolm <dmalcolm@redhat.com>
5601
5602 PR c/70339
5603 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
5604 (implicit_decl_warning): When issuing warnings for implicit
5605 declarations, attempt to provide a suggestion via
5606 lookup_name_fuzzy.
5607 (undeclared_variable): Likewise when issuing errors.
5608 (lookup_name_in_scope): Likewise.
5609 (struct edit_distance_traits<cpp_hashnode *>): New struct.
5610 (best_macro_match): New typedef.
5611 (find_closest_macro_cpp_cb): New function.
5612 (lookup_name_fuzzy): New function.
5613 * c-parser.c: Include gcc-rich-location.h.
5614 (c_token_starts_typename): Split out case CPP_KEYWORD into...
5615 (c_keyword_starts_typename): ...this new function.
5616 (c_parser_declaration_or_fndef): When issuing errors about
5617 missing "struct" etc, add a fixit. For other kinds of errors,
5618 attempt to provide a suggestion via lookup_name_fuzzy.
5619 (c_parser_parms_declarator): When looking ahead to detect typos in
5620 type names, also reject CPP_KEYWORD.
5621 (c_parser_parameter_declaration): When issuing errors about
5622 unknown type names, attempt to provide a suggestion via
5623 lookup_name_fuzzy.
5624 * c-tree.h (c_keyword_starts_typename): New prototype.
5625
5a578671
JM
56262016-06-20 Joseph Myers <joseph@codesourcery.com>
5627
5628 PR c/71601
5629 * c-typeck.c (build_conditional_expr): Return error_mark_node if
5630 c_common_type returns error_mark_node.
5631
3f8257db 56322016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
5633
5634 PR c/69507
5635 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
5636 __alignof__ (expression).
5637
6a3f203c
DM
56382016-06-14 David Malcolm <dmalcolm@redhat.com>
5639
5640 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
5641
264757fb
DM
56422016-06-14 David Malcolm <dmalcolm@redhat.com>
5643
5644 * c-typeck.c (build_component_ref): Simplify fixit code by
5645 using gcc_rich_location::add_fixit_misspelled_id.
5646 (set_init_label): Likewise.
5647
f7e4f2e3
DM
56482016-06-13 David Malcolm <dmalcolm@redhat.com>
5649
5650 * c-parser.c (c_parser_initelt): Provide location of name for new
5651 location_t param of set_init_label.
5652 * c-tree.h (set_init_label): Add location_t param.
5653 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
5654 param and use it when issuing error messages about unrecognized
5655 field names. Attempt to provide a fixit hint if appropriate,
5656 otherwise update the error message to provide the type name.
5657
4b1ffdb1
TS
56582016-06-10 Thomas Schwinge <thomas@codesourcery.com>
5659
5660 PR c/71381
5661 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
5662 Loosen checking.
5663
44a845ca
MS
56642016-06-08 Martin Sebor <msebor@redhat.com>
5665 Jakub Jelinek <jakub@redhat.com>
5666
5667 PR c++/70507
5668 PR c/68120
5669 * c-typeck.c (convert_arguments): Don't promote last argument
5670 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5671
92a5f2ba
MP
56722016-06-08 Marek Polacek <polacek@redhat.com>
5673
5674 PR c/71418
5675 * c-decl.c (grokdeclarator): Check TYPE_P.
5676
08203f73
MP
5677 PR c/71426
5678 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
5679 code.
5680
6ffd47b7
DM
56812016-06-07 David Malcolm <dmalcolm@redhat.com>
5682
5683 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
5684 and structure element reference, capture the location of the
5685 element name token and pass it to build_component_ref.
5686 (c_parser_postfix_expression_after_primary): Likewise for
5687 structure element dereference.
5688 (c_parser_omp_variable_list): Likewise for
5689 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
5690 * c-tree.h (build_component_ref): Add location_t param.
5691 * c-typeck.c (build_component_ref): Add location_t param
5692 COMPONENT_LOC. Use it, if available, when issuing hints about
5693 mispelled member names to provide a fixit replacement hint.
5694
1f40cff3
MP
56952016-06-06 Marek Polacek <polacek@redhat.com>
5696
5697 PR c/71362
5698 * c-parser.c (c_parser_direct_declarator): Set location.
5699
5545a907
MP
57002016-06-06 Marek Polacek <polacek@redhat.com>
5701
5702 * c-typeck.c (comptypes_internal): Handle comparisons of
5703 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
5704 TYPE_REF_CAN_ALIAS_ALL.
5705
b605f663
CLT
57062016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
5707
5708 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
5709 arguments as addressable when async clause exists.
5710
00631022
JJ
57112016-05-30 Jakub Jelinek <jakub@redhat.com>
5712
5713 PR c++/71349
5714 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
5715 when combined with target construct.
5716
7211a097
JJ
57172016-05-26 Jakub Jelinek <jakub@redhat.com>
5718
5719 * c-parser.c (c_parser_omp_clause_schedule): Warn if
5720 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
5721
95efe6b6
MP
57222016-05-25 Marek Polacek <polacek@redhat.com>
5723
5724 PR c/71265
5725 * c-decl.c (c_make_fname_decl): Don't check seen_error.
5726
a23faf7a
MP
5727 PR c/71266
5728 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
5729
e46c7770
CP
57302016-05-24 Cesar Philippidis <cesar@codesourcery.com>
5731
5732 * c-parser.c (c_parser_oacc_declare): Add support for
5733 GOMP_MAP_FIRSTPRIVATE_POINTER.
5734 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
5735 argument with enum c_omp_region_type ort.
5736 (handle_omp_array_sections): Likewise. Update call to
5737 handle_omp_array_sections_1.
5738 (c_finish_omp_clauses): Add specific errors and warning messages for
5739 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
5740 call to handle_omp_array_sections.
5741
a04e69c0
TS
57422016-05-24 Thomas Schwinge <thomas@codesourcery.com>
5743
5744 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
5745
f17a223d
RB
57462016-05-24 Richard Biener <rguenther@suse.de>
5747
5748 PR middle-end/70434
5749 PR c/69504
5750 * c-typeck.c (build_array_ref): Do not complain about indexing
5751 non-lvalue vectors. Adjust for function name change.
5752
79063edd
MS
57532016-05-20 Martin Sebor <msebor@redhat.com>
5754
5755 PR c/71115
5756 * c-typeck.c (error_init): Use
5757 expansion_point_location_if_in_system_header.
5758 (warning_init): Same.
5759
8a40fef3
DM
57602016-05-19 David Malcolm <dmalcolm@redhat.com>
5761
5762 PR c/71171
5763 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
5764 in error-handling.
5765 (c_parser_postfix_expression): Likewise.
5766 * c-tree.h (c_expr::set_error): New method.
5767 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
5768 that result's range is initialized.
5769
e9892350
JG
57702016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5771
5772 * c-typeck.c (parser_build_unary_op): Fix formatting.
5773
8fad45f5
MW
57742016-05-16 Matthew Wahab <matthew.wahab@arm.com>
5775
5776 * c-decl.c (grokdeclarator): Remove errmsg and use of
5777 targetm.invalid_return_type.
5778 (grokparms): Remove errmsg and use of
5779 targetm.invalid_parameter_type.
5780
aa4b467b
JM
57812016-05-13 Joseph Myers <joseph@codesourcery.com>
5782
5783 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
5784 function return type.
5785
4f2e1536
MP
57862016-05-12 Marek Polacek <polacek@redhat.com>
5787
5788 PR c/70756
5789 * c-decl.c (build_compound_literal): Pass LOC down to
5790 c_incomplete_type_error.
5791 * c-tree.h (require_complete_type): Adjust declaration.
5792 (c_incomplete_type_error): Likewise.
5793 * c-typeck.c (require_complete_type): Add location parameter, pass it
5794 down to c_incomplete_type_error.
5795 (c_incomplete_type_error): Add location parameter, pass it down to
5796 error_at.
5797 (build_component_ref): Pass location down to c_incomplete_type_error.
5798 (default_conversion): Pass location down to require_complete_type.
5799 (build_array_ref): Likewise.
5800 (build_function_call_vec): Likewise.
5801 (convert_arguments): Likewise.
5802 (build_unary_op): Likewise.
5803 (build_c_cast): Likewise.
5804 (build_modify_expr): Likewise.
5805 (convert_for_assignment): Likewise.
5806 (c_finish_omp_clauses): Likewise.
5807
d6e83a8d
MM
58082016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5809
5810 PR c/43651
5811 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
5812 is enabled.
5813 * c-errors.c (pedwarn_c90): Return true if warned.
5814 * c-tree.h (pedwarn_c90): Change return type to bool.
5815 (enum c_declspec_word): Add new enumerator cdw_atomic.
5816
5c3a10fb
MP
58172016-05-11 Marek Polacek <polacek@redhat.com>
5818
5819 PR c++/71024
5820 * c-decl.c (diagnose_mismatched_decls): Factor out code to
5821 diagnose_mismatched_attributes and call it.
5822
cf68d92c
MP
58232016-05-10 Marek Polacek <polacek@redhat.com>
5824
5825 PR c/70255
5826 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
5827 on a declaration following the definition.
5828
351f85c5
JJ
58292016-05-05 Jakub Jelinek <jakub@redhat.com>
5830
5831 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
5832 parse it through to c_parser_c99_block_statement.
5833 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
5834 caller.
5835
deef7113
MP
58362016-05-04 Marek Polacek <polacek@redhat.com>
5837
5838 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
5839 OPT_Wdangling_else.
5840
de55efd5
MP
58412016-05-04 Marek Polacek <polacek@redhat.com>
5842
5843 PR c/48778
5844 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
5845 for macro expansions.
5846
79ce98bc
MP
58472016-05-03 Marek Polacek <polacek@redhat.com>
5848
5849 PR c/70859
5850 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
5851 check_builtin_function_arguments.
5852
fb2647aa
RB
58532016-05-03 Richard Biener <rguenther@suse.de>
5854
5855 * Make-lang.in (cc1-checksum.c): For stage-final re-use
5856 the checksum from the previous stage.
5857
77886428
CP
58582016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5859
5860 * c-parser.c (c_parser_oacc_all_clauses): Update call to
5861 c_finish_omp_clauses.
5862 (c_parser_omp_all_clauses): Likewise.
5863 (c_parser_oacc_cache): Likewise.
5864 (c_parser_oacc_loop): Likewise.
5865 (omp_split_clauses): Likewise.
5866 (c_parser_omp_declare_target): Likewise.
5867 (c_parser_cilk_all_clauses): Likewise.
5868 (c_parser_cilk_for): Likewise.
5869 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
5870 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
5871
7176a4a0
MP
58722016-05-02 Marek Polacek <polacek@redhat.com>
5873
5874 PR c/70851
5875 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5876 incomplete type.
5877
e7ff0319
CP
58782016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5879
5880 PR middle-end/70626
5881 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
5882 OACC_LOOP_CLAUSE_MASK.
5883 (c_parser_oacc_kernels_parallel): Update call to
5884 c_oacc_split_loop_clauses.
5885
9f405ce1
AM
58862016-04-28 Andrew MacLeod <amacleod@redhat.com>
5887
5888 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
5889 argument to build_modify_expr in two cases.
5890
c1e1f433
BS
58912016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5892
5893 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5894 warn_for_memset instead of warning directly here.
5895
2448a956
MP
58962016-04-26 Marek Polacek <polacek@redhat.com>
5897
5898 PR c/67784
5899 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
5900 out of ...
5901 (c_parser_for_statement): ... here.
5902 (c_parser_if_statement): Use it.
5903 (c_parser_switch_statement): Use it.
5904 (c_parser_while_statement): Use it.
5905
b02a5e26
MP
5906 PR c/70791
5907 * c-decl.c (pushdecl): Pass LOCUS down to warning.
5908
477d4906
IV
59092016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5910
5911 PR c++/69363
5912 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
5913 instead of c_finish_cilk_clauses.
5914 * c-tree.h (c_finish_omp_clauses): Add new default argument.
5915 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
5916 floating-point variables in the linear clause for Cilk Plus.
5917
fe37c7af
MM
59182016-04-18 Michael Matz <matz@suse.de>
5919
5920 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
5921 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
5922
949505a9
MP
59232016-04-15 Marek Polacek <polacek@redhat.com>
5924
5925 PR c/70671
5926 * c-typeck.c (build_unary_op): Pass location down to error and
5927 warning call.
5928
dda1bf61
JJ
59292016-04-15 Jakub Jelinek <jakub@redhat.com>
5930
5931 PR c/70436
5932 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5933 where needed.
5934 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
5935 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
5936 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
5937 Adjust c_parser_pragma callers.
5938 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5939 caller.
5940 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5941 c_parser_statement.
5942 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5943 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5944 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5945 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5946 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5947 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5948 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5949 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5950 down where needed.
5951 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5952 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5953 calls.
5954
99cd9857
MP
59552016-04-13 Marek Polacek <polacek@redhat.com>
5956
5957 PR c/70436
5958 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5959 adjust callers.
5960 (c_parser_statement): Likewise.
5961 (c_parser_c99_block_statement): Likewise.
5962 (c_parser_while_statement): Likewise.
5963 (c_parser_for_statement): Likewise.
5964 (c_parser_if_body): Don't set IF_P here.
5965 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5966 about dangling else here.
5967 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5968 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5969 warn about dangling else here.
5970
f13355da
MP
59712016-04-04 Marek Polacek <polacek@redhat.com>
5972
5973 PR c/70307
5974 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5975
5fde6a45
MP
59762016-03-31 Marek Polacek <polacek@redhat.com>
5977
5978 PR c/70297
5979 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5980
4bbf545b
DM
59812016-03-18 David Malcolm <dmalcolm@redhat.com>
5982
5983 PR c/70281
5984 * c-parser.c (c_parser_postfix_expression): Set the source range
5985 for uses of "__builtin_types_compatible_p".
5986
fcc2b74f
JJ
59872016-03-17 Jakub Jelinek <jakub@redhat.com>
5988
5989 PR c/70280
5990 * c-typeck.c (composite_type): Don't count void_list_node
5991 into len, if the list is terminated by void_list_node, start
5992 with void_list_node instead of NULL for newargs. Stop
5993 at void_list_node.
5994
ab4c578f
MP
59952016-03-16 Marek Polacek <polacek@redhat.com>
5996
5997 PR c/70093
5998 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5999 nested functions returning VM types.
6000
96b3c82d
CP
60012016-03-09 Cesar Philippidis <cesar@codesourcery.com>
6002
6003 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
6004 when calling c_finish_omp_clauses.
6005
29b9828f
BS
60062016-03-04 Bernd Schmidt <bschmidt@redhat.com>
6007
6008 PR c/69824
6009 * c-decl.c (get_parm_info): Don't queue implicit function declarations
6010 for later.
6011
7ff6ca38
MP
60122016-03-04 Marek Polacek <polacek@redhat.com>
6013
6014 PR c/69798
6015 * c-parser.c (c_parser_postfix_expression): Call
6016 c_parser_cast_expression rather than c_parser_postfix_expression.
6017
686e2237
JJ
60182016-03-01 Jakub Jelinek <jakub@redhat.com>
6019
6020 PR c/69796
6021 PR c/69974
6022 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
6023 of incomplete decls to error_mark_node.
6024
0b05329b
MP
60252016-02-24 Marek Polacek <polacek@redhat.com>
6026
6027 PR c/69819
6028 * c-decl.c (finish_decl): Don't update the copy of the type of a
6029 different decl type.
6030
067fbd8b
JJ
60312016-02-23 Jakub Jelinek <jakub@redhat.com>
6032
6033 PR objc/69844
6034 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
6035 in id_kind reclassification.
6036
bf14eba2
JJ
60372016-02-16 Jakub Jelinek <jakub@redhat.com>
6038
6039 PR c/69835
6040 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
6041
ba539195
JN
60422016-02-16 James Norris <jnorris@codesourcery.com>
6043
6044 PR c/64748
6045 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
6046
16595a1f
BS
60472016-02-12 Bernd Schmidt <bschmidt@redhat.com>
6048
f48dfe98
BS
6049 * c-decl.c (build_null_declspecs): Zero the entire struct.
6050
16595a1f
BS
6051 PR c/69522
6052 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
6053 callers changed. If nested_p is true, use it to call
6054 finish_implicit_inits.
6055 * c-tree.h (finish_implicit_inits): Declare.
6056 * c-typeck.c (finish_implicit_inits): New function. Move code
6057 from ...
6058 (push_init_level): ... here.
6059 (set_designator, process_init_element): Call finish_implicit_inits.
6060
66756373
JJ
60612016-02-11 Jakub Jelinek <jakub@redhat.com>
6062
6063 PR c/69768
6064 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
6065 arguments for -Waddress warning.
6066
1066e9b5
JJ
60672016-02-04 Jakub Jelinek <jakub@redhat.com>
6068
6069 PR c/69669
6070 * c-decl.c (finish_enum): When honoring mode attribute,
6071 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
6072
3a5d2ba4
JJ
60732016-01-29 Jakub Jelinek <jakub@redhat.com>
6074
6075 PR debug/69518
6076 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
6077 all type variants, not just TYPE_MAIN_VARIANT.
6078
cbdd8ae0
JJ
60792016-01-27 Jakub Jelinek <jakub@redhat.com>
6080
6081 PR debug/66869
6082 * c-decl.c (c_write_global_declarations_1): Warn with
6083 warn_unused_function if static prototype without definition
6084 is not C_DECL_USED.
6085
fa74a4bc
MP
60862016-01-27 Marek Polacek <polacek@redhat.com>
6087
6088 PR c/68062
6089 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
6090 to unsigned, if needed. Add -Wsign-compare warning.
6091
13f92e8d
JJ
60922016-01-26 Jakub Jelinek <jakub@redhat.com>
6093
6094 PR tree-optimization/69483
6095 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
6096
cd8e73dc 60972016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
6098
6099 PR c/24293
6100 * c-tree.h (incomplete_record_decls): Declare.
6101 * c-parser.c (incomplete_record_decls): Define.
6102 (c_parser_translation_unit): Iterate through incomplete_record_decls and
6103 report error if any decl has zero size.
6104 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
6105 or enum type to incomplete_record_decls.
6106
e6d6ec9e
TV
61072016-01-14 Tom de Vries <tom@codesourcery.com>
6108
6109 PR tree-optimization/68773
6110 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
6111 set force_output.
6112
00083992
MP
61132016-01-14 Marek Polacek <polacek@redhat.com>
6114
6115 PR c/69262
6116 * c-decl.c (grokdeclarator): Provide more information for invalid
6117 array declarations.
6118
7443cf13
DM
61192016-01-06 David Malcolm <dmalcolm@redhat.com>
6120
6121 * c-parser.c (c_parser_unary_expression): For dereferences, build
6122 a combined location before calling build_indirect_ref, so that
6123 error reports cover the full range, manually updating the c_expr
6124 src_range.
6125
6b131d5b
MP
61262016-01-06 Marek Polacek <polacek@redhat.com>
6127
6128 PR sanitizer/69099
6129 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
6130 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
6131 NULL.
6132
818ab71a
JJ
61332016-01-04 Jakub Jelinek <jakub@redhat.com>
6134
6135 Update copyright years.
6136
2fe0a208
MP
61372016-01-04 Marek Polacek <polacek@redhat.com>
6138
6139 PR c/68908
6140 * c-typeck.c (build_atomic_assign): Improve commentary. Add
6141 optimization to use __atomic_fetch_* built-in if possible.
6142
c7b48c8a
TS
61432015-12-23 Thomas Schwinge <thomas@codesourcery.com>
6144
6145 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
6146 into...
6147 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
6148 all users.
6149
fda5652f
MP
61502015-12-22 Marek Polacek <polacek@redhat.com>
6151
6152 PR c/69002
6153 * c-typeck.c (build_component_ref): Warn when acessing elements of
6154 atomic structures or unions.
6155
745e411d
DM
61562015-12-21 David Malcolm <dmalcolm@redhat.com>
6157
6158 * c-typeck.c: Include "gcc-rich-location.h".
6159 (build_binary_op): In the two places that call binary_op_error,
6160 create a gcc_rich_location and populate it with the location of
6161 the binary op and its two operands.
6162
94c40e19
DM
61632015-12-16 David Malcolm <dmalcolm@redhat.com>
6164
6165 * c-parser.c (c_parser_statement_after_labels): When calling
6166 c_finish_return, Use the return expression's location if it has
6167 one, falling back to the location of the first token within it.
6168 * c-typeck.c (c_finish_return): When issuing warnings about
6169 the incorrect presence/absence of a return value, issue a note
6170 showing the declaration of the function.
6171
de67c4c3
DM
61722015-12-16 David Malcolm <dmalcolm@redhat.com>
6173
6174 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
6175 to 4.
6176 (c_parser_peek_nth_token): New function.
6177 (c_parser_peek_conflict_marker): New function.
6178 (c_parser_error): Detect conflict markers and report them as such.
6179
a10704e1
DM
61802015-12-16 David Malcolm <dmalcolm@redhat.com>
6181
6182 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
6183 to preserve range information for the primary expression
6184 in the call to c_parser_postfix_expression_after_primary.
6185
8062bca6
DM
61862015-12-16 David Malcolm <dmalcolm@redhat.com>
6187
6188 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
6189 expression location, falling back on the first token location,
6190 rather than always using the latter.
6191
d06f8b75
MP
61922015-12-16 Marek Polacek <polacek@redhat.com>
6193
6194 PR c/64637
6195 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
6196 available.
6197
2994fb91
MP
61982015-12-15 Marek Polacek <polacek@redhat.com>
6199
6200 PR c/68907
6201 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
6202 artificial decl.
6203
a1b93f8d
DM
62042015-12-08 David Malcolm <dmalcolm@redhat.com>
6205
6206 * c-parser.c (c_parser_alignof_expression): Capture location of
6207 closing parenthesis (if any), or of end of unary expression, and
6208 use it to build a src_range for the expression.
6209
46c6e1e2
DM
62102015-12-08 David Malcolm <dmalcolm@redhat.com>
6211
6212 PR c/68757
6213 * c-parser.c (c_parser_get_builtin_args): Add
6214 "out_close_paren_loc" param, and write back to it.
6215 (c_parser_postfix_expression): Capture the closing
6216 parenthesis location for RID_CHOOSE_EXPR,
6217 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
6218 RID_BUILTIN_SHUFFLE and use it to set the source range
6219 for such expressions; within RID_BUILTIN_COMPLEX set
6220 the underlying location.
6221
66189108
MP
62222015-12-07 Marek Polacek <polacek@redhat.com>
6223
6224 PR c/68668
6225 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
6226 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
6227
f187980b
EB
62282015-12-04 Eric Botcazou <ebotcazou@adacore.com>
6229
6230 * c-tree.h (c_build_va_arg): Adjust prototype.
6231 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
6232 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
6233 parameter, adjust throughout and issue an error if EXPR is a component
6234 with reverse storage order.
6235
4250754e
JM
62362015-12-02 Jason Merrill <jason@redhat.com>
6237
6238 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6239 (c_fully_fold_internal, decl_constant_value_for_optimization):
6240 Move from c-common.c.
6241 * c-tree.h: Declare decl_constant_value_for_optimization.
6242 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
6243
e9e32ee6
JM
62442015-12-02 Joseph Myers <joseph@codesourcery.com>
6245
6246 PR c/68162
6247 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
6248 following link from declarator to next declarator. Track original
6249 qualified type and pass it to c_build_qualified_type.
6250 * c-typeck.c (c_build_qualified_type): Add arguments
6251 orig_qual_type and orig_qual_indirect.
6252
ff7a55bf
TS
62532015-12-02 Thomas Schwinge <thomas@codesourcery.com>
6254
6255 * c-parser.c (c_parser_omp_clause_name)
6256 (c_parser_oacc_all_clauses): Alphabetical sorting.
6257
657e4e47
JJ
62582015-12-02 Jakub Jelinek <jakub@redhat.com>
6259
6260 PR c/68533
6261 * c-decl.c (get_parm_info): Use b->locus instead of input_location
6262 for diagnostics.
6263
37d5ad46
JB
62642015-12-01 Julian Brown <julian@codesourcery.com>
6265 Cesar Philippidis <cesar@codesourcery.com>
6266 James Norris <James_Norris@mentor.com>
6267
6268 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
6269 (c_parser_oacc_clause_use_device): New function.
6270 (c_parser_oacc_all_clauses): Add use_device support.
6271 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
6272 (c_parser_oacc_host_data): New function.
6273 (c_parser_omp_construct): Add host_data support.
6274 * c-tree.h (c_finish_oacc_host_data): Add prototype.
6275 * c-typeck.c (c_finish_oacc_host_data): New function.
6276 (c_finish_omp_clauses): Add use_device support.
6277
a4850ce9
JH
62782015-11-29 Jan Hubicka <hubicka@ucw.cz>
6279
6280 PR c/67106
6281 * c-decl.c: Set TYPE_PACKED in variants.
6282
b58d3df2
ML
62832015-11-27 Martin Liska <mliska@suse.cz>
6284
6285 PR c++/68312
6286 * c-array-notation.c (fix_builtin_array_notation_fn):
6287 Use release_vec_vec instead of vec::release.
6288 (build_array_notation_expr): Likewise.
6289 (fix_conditional_array_notations_1): Likewise.
6290 (fix_array_notation_expr): Likewise.
6291 (fix_array_notation_call_expr): Likewise.
6292
aec17bfe
JJ
62932015-11-27 Jakub Jelinek <jakub@redhat.com>
6294
6295 PR c/63326
6296 * c-parser.c (c_parser_compound_statement_nostart): If
6297 last_label is true, use pragma_stmt instead of pragma_compound
6298 as second c_parser_pragma argument.
6299 (c_parser_omp_ordered, c_parser_omp_target_update,
6300 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
6301 false as second argument to c_parser_skip_to_pragma_eol after
6302 diagnosing standalone directives used in pragma_stmt context.
6303
688c4de0
IV
63042015-11-24 Ilya Verbin <ilya.verbin@intel.com>
6305
6306 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
6307 with "if (ENABLE_OFFLOADING)".
6308
cbd03aee
DM
63092015-11-23 David Malcolm <dmalcolm@redhat.com>
6310
6311 PR objc/68438
6312 * c-parser.c (c_parser_postfix_expression): Set up source ranges
6313 for various Objective-C constructs: Class.name syntax,
6314 @selector(), @protocol(), @encode(), and [] message syntax.
6315
a87a86e1
DM
63162015-11-20 David Malcolm <dmalcolm@redhat.com>
6317
6318 PR 62314
6319 * c-typeck.c (should_suggest_deref_p): New function.
6320 (build_component_ref): Special-case POINTER_TYPE when
6321 generating a "not a structure of union" error message, and
6322 suggest a "->" rather than a ".", providing a fix-it hint.
6323
8ece8dfb
DM
63242015-11-19 David Malcolm <dmalcolm@redhat.com>
6325
6326 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
6327 candidate into a new function, find_closest_identifier.
6328
433068cc
MP
63292015-11-19 Marek Polacek <polacek@redhat.com>
6330
6331 PR c/68412
6332 * c-typeck.c (parser_build_binary_op): Properly handle
6333 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
6334
bef08b71
DM
63352015-11-17 David Malcolm <dmalcolm@redhat.com>
6336
6337 * c-parser.c (set_c_expr_source_range): Bulletproof both
6338 overloaded implementations against NULL expr->value.
6339 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
6340 values.
6341 (c_parser_unary_expression): Likewise when handling addresses of
6342 labels.
6343 (c_parser_postfix_expression): Likewise for statement expressions,
6344 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
6345 __builtin_va_arg, and for __builtin_offset_of.
6346 (c_parser_postfix_expression_after_paren_type): Initialize expr's
6347 src_range using the range of the braced initializer.
6348 (c_parser_transaction_expression): Set src_range for "ret" to a
6349 sane pair of values.
6350
fff77217
KY
63512015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6352
6353 * c-parser.c (c_finish_omp_declare_simd): Look for
6354 "simd" attribute as well. Update error message.
6355
1d899da2
TS
63562015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6357
6358 * c-parser.c (c_parser_omp_declare_target): Adjust.
6359
e4606348
JJ
63602015-11-14 Jakub Jelinek <jakub@redhat.com>
6361
6362 * c-typeck.c (c_finish_omp_clauses): Don't mark
6363 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
6364
3e636daf
MP
63652015-11-14 Marek Polacek <polacek@redhat.com>
6366
6367 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
6368 * c-typeck.c: Likewise.
6369
ebedc9a3
DM
63702015-11-13 David Malcolm <dmalcolm@redhat.com>
6371
6372 * c-decl.c (warn_defaults_to): Pass line_table to
6373 rich_location ctor.
6374 * c-errors.c (pedwarn_c99): Likewise.
6375 (pedwarn_c90): Likewise.
6376 * c-parser.c (set_c_expr_source_range): New functions.
6377 (c_token::get_range): New method.
6378 (c_token::get_finish): New method.
6379 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
6380 based on the range from the start of the LHS to the end of the
6381 RHS.
6382 (c_parser_conditional_expression): Likewise, based on the range
6383 from the start of the cond.value to the end of exp2.value.
6384 (c_parser_binary_expression): Call set_c_expr_source_range on
6385 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
6386 (c_parser_cast_expression): Call set_c_expr_source_range on ret
6387 based on the cast_loc through to the end of the expr.
6388 (c_parser_unary_expression): Likewise, based on the
6389 op_loc through to the end of op.
6390 (c_parser_sizeof_expression) Likewise, based on the start of the
6391 sizeof token through to either the closing paren or the end of
6392 expr.
6393 (c_parser_postfix_expression): Likewise, using the token range,
6394 or from the open paren through to the close paren for
6395 parenthesized expressions.
6396 (c_parser_postfix_expression_after_primary): Likewise, for
6397 various kinds of expression.
6398 * c-tree.h (struct c_expr): Add field "src_range".
6399 (c_expr::get_start): New method.
6400 (c_expr::get_finish): New method.
6401 (set_c_expr_source_range): New decls.
6402 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
6403 on ret for prefix unary ops.
6404 (parser_build_binary_op): Likewise, running from the start of
6405 arg1.value through to the end of arg2.value.
6406
ec8b536f
MP
64072015-11-13 Marek Polacek <polacek@redhat.com>
6408
6409 PR c/68320
6410 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
6411
277fe616
DM
64122015-11-13 David Malcolm <dmalcolm@redhat.com>
6413
6414 * c-typeck.c: Include spellcheck.h.
6415 (lookup_field_fuzzy_find_candidates): New function.
6416 (lookup_field_fuzzy): New function.
6417 (build_component_ref): If the field was not found, try using
6418 lookup_field_fuzzy and potentially offer a suggestion.
6419
6e232ba4
JN
64202015-11-12 James Norris <jnorris@codesourcery.com>
6421 Joseph Myers <joseph@codesourcery.com>
6422
6423 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
6424 (c_parser_omp_clause_name): Handle 'device_resident' clause.
6425 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6426 and PRAGMA_OMP_CLAUSE_LINK.
6427 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6428 and PRAGMA_OACC_CLAUSE_LINK.
6429 (OACC_DECLARE_CLAUSE_MASK): New definition.
6430 (c_parser_oacc_declare): New function.
6431
9be4f715
MP
64322015-11-12 Marek Polacek <polacek@redhat.com>
6433
6434 PR c/67784
6435 * c-parser.c (c_parser_for_statement): Reclassify the token in
6436 a correct scope.
6437
e78bede6
MP
64382015-11-11 Marek Polacek <polacek@redhat.com>
6439
6440 PR c/68107
6441 PR c++/68266
6442 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
6443 checking the size of an array.
6444
69f293c9
AM
64452015-11-11 Andrew MacLeod <amacleod@redhat.com>
6446
6447 * c-array-notation.c: Remove unused header files.
6448 * c-aux-info.c: Likewise.
6449 * c-convert.c: Likewise.
6450 * c-decl.c: Likewise.
6451 * c-errors.c: Likewise.
6452 * c-lang.c: Likewise.
6453 * c-objc-common.c: Likewise.
6454 * c-parser.c: Likewise.
6455 * c-typeck.c: Likewise.
6456 * gccspec.c: Likewise.
6457
3a40d81d
NS
64582015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6459 Cesar Philippidis <cesar@codesourcery.com>
6460 James Norris <jnorris@codesourcery.com>
6461 Julian Brown <julian@codesourcery.com>
6462 Nathan Sidwell <nathan@codesourcery.com>
6463
3a40d81d
NS
6464 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
6465 routine arg.
6466 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
6467 (c_parser_pragma): Parse 'acc routine'.
6468 (OACC_ROUTINE_CLAUSE_MARK): Define.
6469 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
6470
fc402eec
AA
64712015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6472
6473 PR debug/67192
6474 * c-typeck.c (c_finish_loop): For unconditional loops, set the
6475 location of the backward-goto to the start of the loop body.
6476
f6b0b3db
AA
64772015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6478
6479 PR debug/67192
6480 * c-parser.c (c_parser_while_statement): Finish the loop before
6481 parsing ahead for misleading indentation.
6482 (c_parser_for_statement): Likewise.
6483
ee45a32d
EB
64842015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6485
6486 * c-decl.c (finish_struct): If the structure has reverse storage
6487 order, rewrite the type of array fields with scalar component. Call
6488 maybe_apply_pragma_scalar_storage_order on entry.
6489 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
6490 errors on bit-fields and reverse SSO here and not...
6491 (c_mark_addressable): ...here.
6492 (output_init_element): Adjust call to initializer_constant_valid_p.
6493 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
6494
8a645150
DM
64952015-11-06 David Malcolm <dmalcolm@redhat.com>
6496
6497 * c-decl.c (warn_defaults_to): Update for change in signature
6498 of diagnostic_set_info.
6499 * c-errors.c (pedwarn_c99): Likewise.
6500 (pedwarn_c90): Likewise.
6501 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
6502 for textinfo::set_location.
6503
7a5e4956
CP
65042015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6505 Thomas Schwinge <thomas@codesourcery.com>
6506 James Norris <jnorris@codesourcery.com>
6507
6508 * c-parser.c (c_parser_omp_clause_name): Add support for
6509 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
6510 (c_parser_omp_clause_default): Add is_oacc argument. Handle
6511 default(none) in OpenACC.
6512 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
6513 arguments.
6514 (c_parser_oacc_clause_tile): New function.
6515 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
6516 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
6517 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
6518 TILE}.
6519 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
6520 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
6521 FIRSTPRIVATE}.
6522 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
6523 (c_parser_oacc_update): Update the error message for missing clauses.
6524 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
6525 and OMP_CLAUSE_INDEPENDENT.
6526
bfcfbfa0
MP
65272015-11-05 Marek Polacek <polacek@redhat.com>
6528
6529 PR c/68090
6530 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
6531 deal with pre-evaluation on invalid types.
6532
e01d41e5
JJ
65332015-11-05 Jakub Jelinek <jakub@redhat.com>
6534 Ilya Verbin <ilya.verbin@intel.com>
6535
6536 * c-parser.c: Include context.h and gimple-expr.h.
6537 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
6538 monotonic together with nonmonotonic.
6539 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
6540 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
6541 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
6542 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
6543 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
6544 expressions on combined target teams before the target.
6545 (c_parser_omp_declare_target): If decl has "omp declare target" or
6546 "omp declare target link" attribute, and cgraph or varpool node already
6547 exists, then set corresponding flags. Call c_finish_omp_clauses
6548 in the parenthesized extended-list syntax case.
6549 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
6550 declare target.
6551 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
6552 on OMP_CLAUSE_REDUCTION array sections.
6553 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
6554 into the constant offset, or for variable low-bound using
6555 POINTER_PLUS_EXPR. For structure element based array sections use
6556 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
6557 (c_finish_omp_clauses): Drop generic_field_head, structure
6558 elements are now always mapped even as array section bases,
6559 diagnose same var in data sharing and mapping clauses. Diagnose if
6560 linear step on declare simd is neither a constant nor a uniform
6561 parameter. Look through POINTER_PLUS_EXPR for array section
6562 reductions. Diagnose the same var or function appearing multiple
6563 times on the same directive. Fix up wording for the to clause if t
6564 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
6565 modifier on kinds other than dynamic or guided or nonmonotonic
6566 modifier together with ordered clause.
6567
4bf9e5a8
TS
65682015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6569 Chung-Lin Tang <cltang@codesourcery.com>
6570
6571 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
6572
2adfab87
AM
65732015-10-29 Andrew MacLeod <amacleod@redhat.com>
6574
6575 * c-array-notation.c: Reorder #include's and remove duplicates.
6576 * c-aux-info.c: Likewise.
6577 * c-convert.c: Likewise.
6578 * c-decl.c: Likewise.
6579 * c-errors.c: Likewise.
6580 * c-lang.c: Likewise.
6581 * c-objc-common.c: Likewise.
6582 * c-parser.c: Likewise.
6583 * c-typeck.c: Likewise.
6584
e922069e
JW
65852015-10-26 Jim Wilson <jim.wilson@linaro.org>
6586
6587 PR debug/66068
6588 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
6589 after calling build_qualified_type.
6590
765dd391
CP
65912015-10-27 Cesar Philippidis <cesar@codesourcery.com>
6592 Thomas Schwinge <thomas@codesourcery.com>
6593 James Norris <jnorris@codesourcery.com>
6594 Joseph Myers <joseph@codesourcery.com>
6595 Julian Brown <julian@codesourcery.com>
6596 Bernd Schmidt <bschmidt@redhat.com>
6597
6598 * c-parser.c (c_parser_oacc_shape_clause): New.
6599 (c_parser_oacc_simple_clause): New.
6600 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
6601 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
6602
88bae6f4
TS
66032015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6604 James Norris <jnorris@codesourcery.com>
6605 Cesar Philippidis <cesar@codesourcery.com>
6606
6607 PR c/64765
6608 PR c/64880
6609 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
6610 parameters, and handle these. Adjust all users.
6611 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
6612 into...
6613 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
6614 all users.
6615 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
6616 declare functions.
6617 (c_finish_omp_construct): Declare function.
6618 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
6619 Merge functions into...
6620 (c_finish_omp_construct): ... this new function.
6621
a8fc2579
RB
66222015-10-22 Richard Biener <rguenther@suse.de>
6623
6624 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
6625 before folding a MINUS_EXPR.
6626
e9122ef6
MP
66272015-10-21 Marek Polacek <polacek@redhat.com>
6628
6629 PR c/68024
6630 * c-decl.c (start_function): Warn about vararg functions without
6631 a prototype.
6632
9f47c7e5
IE
66332015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
6634
6635 * c-typeck.c (build_conditional_expr): Use boolean vector
6636 type for vector comparison.
6637 (build_vec_cmp): New.
6638 (build_binary_op): Use build_vec_cmp for comparison.
6639
fa60eeb9
MP
66402015-10-20 Marek Polacek <polacek@redhat.com>
6641
6642 * c-parser.c (is_cilkplus_vector_p): Don't define here.
6643
2c7020eb
MP
66442015-10-20 Marek Polacek <polacek@redhat.com>
6645
6646 PR c/67964
6647 * c-parser.c (c_parser_attributes): Break out of the loop if the
6648 token after an attribute isn't a comma.
6649
d9a6bd32
JJ
66502015-10-13 Jakub Jelinek <jakub@redhat.com>
6651 Aldy Hernandez <aldyh@redhat.com>
6652
6653 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
6654 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
6655 (c_parser_omp_variable_list): Handle structure elements for
6656 map, to and from clauses. Handle array sections in reduction
6657 clause. Formatting fixes.
6658 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
6659 if clause modifiers.
6660 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6661 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6662 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
6663 c_parser_omp_clause_is_device_ptr): New functions.
6664 (c_parser_omp_clause_ordered): Parse optional parameter.
6665 (c_parser_omp_clause_reduction): Handle array reductions.
6666 (c_parser_omp_clause_schedule): Parse optional simd modifier.
6667 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
6668 functions.
6669 (c_parser_omp_clause_linear): Parse linear clause modifiers.
6670 (c_parser_omp_clause_depend_sink): New function.
6671 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
6672 (c_parser_omp_clause_map): Parse release/delete map kinds and
6673 optional always modifier.
6674 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
6675 and c_finish_omp_clauses callers.
6676 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
6677 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
6678 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
6679 (OMP_CRITICAL_CLAUSE_MASK): Define.
6680 (c_parser_omp_critical): Parse critical clauses.
6681 (c_parser_omp_for_loop): Handle doacross loops, adjust
6682 c_finish_omp_for and c_finish_omp_clauses callers.
6683 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
6684 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
6685 (OMP_FOR_CLAUSE_MASK): Add linear clause.
6686 (c_parser_omp_for): Disallow ordered clause when combined with
6687 distribute. Disallow linear clause when combined with distribute
6688 and not combined with simd.
6689 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
6690 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
6691 parse clauses and if depend clause is found, don't parse a body.
6692 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
6693 Allow target parallel without for after it.
6694 (OMP_TASK_CLAUSE_MASK): Add priority clause.
6695 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
6696 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
6697 invalid kinds.
6698 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
6699 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
6700 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
6701 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
6702 functions.
6703 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
6704 defaultmap and is_device_ptr clauses.
6705 (c_parser_omp_target): Parse target parallel and target simd. Set
6706 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
6707 and target exit data. Diagnose invalid map kinds.
6708 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
6709 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
6710 construct.
6711 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
6712 &omp_priv.
6713 (OMP_TASKLOOP_CLAUSE_MASK): Define.
6714 (c_parser_omp_taskloop): New function.
6715 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
6716 handle PRAGMA_OMP_TASKLOOP.
6717 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
6718 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
6719 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
6720 Add IS_OMP argument, handle structure element bases, diagnose
6721 bitfields, pass IS_OMP recursively, diagnose known zero length
6722 array sections in depend clauses, handle array sections in reduction
6723 clause, diagnose negative length even for pointers.
6724 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
6725 types, pass IS_OMP down to handle_omp_array_sections_1, handle
6726 array sections in reduction clause, set
6727 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
6728 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
6729 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
6730 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
6731
21ba0cea
MP
67322015-10-06 Marek Polacek <polacek@redhat.com>
6733
6734 * c-parser.c (c_parser_statement_after_labels): Use
6735 protected_set_expr_location.
6736 (c_parser_omp_clause_num_gangs): Likewise.
6737 (c_parser_omp_clause_num_threads): Likewise.
6738 (c_parser_omp_clause_num_workers): Likewise.
6739 (c_parser_omp_clause_vector_length): Likewise.
6740 (c_parser_omp_clause_num_teams): Likewise.
6741 (c_parser_omp_clause_thread_limit): Likewise.
6742 * c-typeck.c (build_c_cast): Likewise.
6743 (c_cast_expr): Likewise.
6744
624d31fe
RS
67452015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6746
6747 * c-typeck.c (c_tree_equal): Use real_equal instead of
6748 REAL_VALUES_EQUAL.
6749
b8fd7909
JM
67502015-10-04 Jason Merrill <jason@redhat.com>
6751
6752 * c-parser.c (c_lex_one_token): Handle @synchronized.
6753 * c-decl.c (match_builtin_function_types): A declaration of a built-in
6754 can change whether the function is transaction_safe.
6755
1c7485af
MP
67562015-10-02 Marek Polacek <polacek@redhat.com>
6757
6758 PR c/67730
6759 * c-typeck.c (convert_for_assignment): Use the expansion point
6760 location throughout.
6761
3e3b8d63
MP
67622015-10-02 Marek Polacek <polacek@redhat.com>
6763
6764 PR c/64249
6765 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
6766 and pass it down to c_parser_if_statement.
6767 (c_parser_else_body): Add CHAIN parameter and pass it down to
6768 c_parser_statement_after_labels.
6769 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
6770 duplicated if-else-if conditions.
6771
aabef2de
MP
67722015-10-01 Marek Polacek <polacek@redhat.com>
6773
6774 * c-typeck.c (convert_for_assignment): Improve commentary.
6775
de8ddd5f
MP
67762015-09-30 Marek Polacek <polacek@redhat.com>
6777
6778 PR c/67730
6779 * c-typeck.c (c_finish_return): Use the expansion point location for
6780 certain "return with value" warnings.
6781
c4914de6
MLI
67822015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6783
6784 * c-parser.c (pragma_lex): Add loc argument.
6785
0e36f5c7
MP
67862015-09-15 Marek Polacek <polacek@redhat.com>
6787
6788 PR c/67580
6789 * c-decl.c (tag_exists_p): New function.
6790 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
6791 struct/union/enum keywords are missing.
6792 * c-tree.h (tag_exists_p): Declare.
6793
2f3bb934
MP
67942015-09-15 Marek Polacek <polacek@redhat.com>
6795
6796 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
6797 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
6798 Return NULL_TREE instead of 0.
6799 (lookup_name): Return NULL_TREE instead of 0.
6800 (lookup_name_in_scope): Likewise.
6801 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
6802 (parser_xref_tag): Use false instead of 0.
6803 (start_struct): Use true instead of 1.
6804 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
6805
aa256c4a
MP
68062015-09-14 Marek Polacek <polacek@redhat.com>
6807
6808 * c-typeck.c (set_nonincremental_init_from_string): Use
6809 HOST_WIDE_INT_M1U when shifting a negative value.
6810
dbb68221
MW
68112015-09-09 Mark Wielaard <mjw@redhat.com>
6812
6813 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
6814 parm against NULL.
6815
a8a098ac
JJ
68162015-09-10 Jakub Jelinek <jakub@redhat.com>
6817
6818 PR c/67502
6819 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
6820 into OMP_FOR_PRE_BODY rather than before the loop.
6821
f4b189d5
JJ
68222015-09-09 Jakub Jelinek <jakub@redhat.com>
6823
0bb99c11
JJ
6824 PR c/67501
6825 * c-parser.c (c_parser_oacc_all_clauses,
6826 c_parser_omp_all_clauses): Remove invalid clause from
6827 list of clauses even if parser->error is set.
6828
fce5e5e3
JJ
6829 PR c/67500
6830 * c-parser.c (c_parser_omp_clause_aligned,
6831 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
6832 test for errors.
6833 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
6834 error_mark_node.
6835
f4b189d5
JJ
6836 PR c/67495
6837 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
6838 instead of c_parser_unary_expression. If the result is !lvalue_p,
6839 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
6840
b2aaf235
MP
68412015-09-04 Marek Polacek <polacek@redhat.com>
6842
6843 PR sanitizer/67279
6844 * c-typeck.c (build_binary_op): Don't instrument static initializers.
6845
1807ffc1
MS
68462015-09-03 Martin Sebor <msebor@redhat.com>
6847
6848 PR c/66516
8b652e65
JJ
6849 * c-typeck.c (convert_arguments, parser_build_unary_op,
6850 build_conditional_expr, c_cast_expr, convert_for_assignment,
6851 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
6852 reject_gcc_builtin.
6853 (c_decl_implicit): Define.
6854
d04ff417
MP
68552015-09-02 Marek Polacek <polacek@redhat.com>
6856
6857 PR c/67432
6858 * c-parser.c (c_parser_enum_specifier): Give a better error for
6859 an empty enum.
6860
a79683d5
TS
68612015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6862
6863 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
6864
191a6b94
MP
68652015-08-12 Marek Polacek <polacek@redhat.com>
6866
6867 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
6868 LOC to it.
6869
420a9d9b
MP
68702015-08-03 Marek Polacek <polacek@redhat.com>
6871
6872 PR c/67088
6873 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
6874 Use it.
6875 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
6876
992118a1
PP
68772015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6878
6879 * c-parser.c (c_parser_if_body): Take token_indent_info
6880 argument. Call warn_for_misleading_indentation even when the
6881 body is a semicolon. Extract token_indent_infos corresponding
6882 to the guard, body and next tokens. Adjust call to
6883 warn_for_misleading_indentation accordingly.
6884 (c_parser_else_body): Likewise.
6885 (c_parser_if_statement): Likewise.
6886 (c_parser_while_statement): Likewise.
6887 (c_parser_for_statement): Likewise.
6888
46308474
LFSM
68892015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
6890 Manuel López-Ibáñez <manu@gcc.gnu.org>
6891
6892 * c-decl.c (get_parm_info): Remove static var. Update warning
6893 message.
6894
05b28fd6
MP
68952015-07-27 Marek Polacek <polacek@redhat.com>
6896
6897 PR c++/66555
6898 PR c/54979
6899 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6900
451b5e48
MP
69012015-07-20 Marek Polacek <polacek@redhat.com>
6902
6903 PR c++/55095
6904 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
6905 (build_binary_op): Warn about left shift overflows.
6906
1916bcb5
AM
69072015-07-09 Andrew MacLeod <amacleod@redhat.com>
6908
6909 * c-array-notation.c: Adjust includes for flags.h changes.
6910 * c-objc-common.c: Likewise.
6911
c7131fb2
AM
69122015-07-07 Andrew MacLeod <amacleod@redhat.com>
6913
6914 * c-array-notation.c: Adjust includes.
6915 * c-aux-info.c: Likewise.
6916 * c-convert.c: Likewise.
6917 * c-decl.c: Likewise.
6918 * c-errors.c: Likewise.
6919 * c-lang.c: Likewise.
6920 * c-objc-common.c: Likewise.
6921 * c-parser.c: Likewise.
6922 * c-typeck.c: Likewise.
6923
da2e71c9
MLI
69242015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6925
6926 PR fortran/66605
6927 * c-decl.c (finish_function): Call do_warn_unused_parameter.
6928
b155cfd9
MP
69292015-06-29 Marek Polacek <polacek@redhat.com>
6930
6931 PR c/66322
6932 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
6933 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6934 about -Wswitch-bool here.
6935 (do_case): Update c_add_case_label call.
6936 (c_finish_case): Update c_do_switch_warnings call.
6937
31521951
MP
69382015-06-27 Marek Polacek <polacek@redhat.com>
6939
6940 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6941
22d03525
MP
69422015-06-26 Marek Polacek <polacek@redhat.com>
6943
6944 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6945 INDIRECT_REF_P.
6946 * c-typeck.c (array_to_pointer_conversion): Likewise.
6947 (build_unary_op): Likewise.
6948 (c_finish_return): Likewise.
6949
f0889939
AM
69502015-06-25 Andrew MacLeod <amacleod@redhat.com>
6951
6952 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6953 * c-parser.c: Likewise.
6954
8d67ee55
RS
69552015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6956
6957 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6958 instead of pointer_hash.
6959 (detect_field_duplicates): Likewise.
6960
0ae9bd27
MP
69612015-06-25 Marek Polacek <polacek@redhat.com>
6962
6963 * c-array-notation.c: Use VAR_P throughout.
6964 * c-decl.c: Likewise.
6965 * c-objc-common.c: Likewise.
6966 * c-parser.c: Likewise.
6967 * c-typeck.c: Likewise.
6968
62f9079a
MP
69692015-06-25 Marek Polacek <polacek@redhat.com>
6970
6971 * c-decl.c: Use is_global_var throughout.
6972 * c-parser.c: Likewise.
6973 * c-typeck.c: Likewise.
6974
abb226c9
AM
69752015-06-17 Andrew MacLeod <amacleod@redhat.com>
6976
6977 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6978 * c-aux-info.c: Likewise.
6979 * c-convert.c: Likewise.
6980 * c-decl.c: Likewise.
6981 * c-errors.c: Likewise.
6982 * c-lang.c: Likewise.
6983 * c-objc-common.c: Likewise.
6984 * c-parser.c: Likewise.
6985 * c-typeck.c: Likewise.
6986
8cbababc
JH
69872015-06-11 Jan Hubicka <hubicka@ucw.cz>
6988
6989 PR middle-end/66325
6990 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6991 variants.
6992
a0349665
PMR
69932015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6994
6995 * c-decl.c (pop_scope): Register the main translation unit
6996 through the new debug hook.
6997
13fdf2e2
AM
69982015-06-08 Andrew MacLeod <amacleod@redhat.com>
6999
7000 * c-array-notation.c : Adjust include files.
7001 * c-aux-info.c : Likewise.
7002 * c-convert.c : Likewise.
7003 * c-decl.c : Likewise.
7004 * c-errors.c : Likewise.
7005 * c-lang.c : Likewise.
7006 * c-lang.h : Likewise.
7007 * c-objc-common.c : Likewise.
7008 * c-parser.c : Likewise.
7009 * c-typeck.c : Likewise.
7010
d7438551
AH
70112015-06-05 Aldy Hernandez <aldyh@redhat.com>
7012
7013 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
7014 immediately clobber it.
7015 (c_write_global_declarations_1): Remove call to
7016 check_global_declaration_1.
7017 (c_write_global_declarations_2): Remove.
7018 (c_write_final_cleanups): Rename from c_write_global_declarations.
7019 Remove call to finalize_compilation_unit.
7020 Remove calls to debugging hooks.
7021 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
7022 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
7023 * c-tree.h: Remove c_write_global_declarations.
7024
ecb9f223
AM
70252015-06-04 Andrew MacLeod <amacleod@redhat.com>
7026
7027 * c-array-notation.c: Adjust includes for restructured coretypes.h.
7028 * c-aux-info.c: Likewise.
7029 * c-convert.c: Likewise.
7030 * c-decl.c: Likewise.
7031 * c-errors.c: Likewise.
7032 * c-lang.c: Likewise.
7033 * c-objc-common.c: Likewise.
7034 * c-parser.c: Likewise.
7035 * c-typeck.c: Likewise.
7036
9482b620
MP
70372015-06-04 Marek Polacek <polacek@redhat.com>
7038
7039 PR c/66341
7040 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
7041 it is a lvalue.
7042
bc51ace3
PK
70432015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7044
7045 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
7046 Warn for empty struct.
7047 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
7048
ea5b45b6
AT
70492015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
7050
7051 * c-decl.c (start_function): Call plugin before parsing.
7052 (finish_function): Call plugin after parsing.
7053
c2d47482
PK
70542015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7055
7056 PR c/49551
7057 * c-decl.c (merge_decls): Merge DECL_COMMON.
7058
a95492ab
JW
70592015-05-22 Jim Wilson <jim.wilson@linaro.org>
7060
7061 * Make-lang.in (check_gcc_pallelize): Define.
7062
fd5c817a
MP
70632015-05-22 Marek Polacek <polacek@redhat.com>
7064
7065 PR c/47043
7066 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
7067 attributes.
7068
c7b70a3c
MP
70692015-05-21 Marek Polacek <polacek@redhat.com>
7070
7071 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
7072 DECL_BUILT_IN.
7073
21b634ae
MP
70742015-05-20 Marek Polacek <polacek@redhat.com>
7075
7076 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7077 * c-typeck.c: Likewise.
7078
296a8c2f
MP
70792015-05-19 Marek Polacek <polacek@redhat.com>
7080
7081 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
7082
41b37d5e
JJ
70832015-05-19 Jakub Jelinek <jakub@redhat.com>
7084
7085 PR middle-end/66199
7086 * c-parser.c (c_parser_omp_for_loop): Don't add
7087 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
7088 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
7089 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
7090 constructs.
7091
fab27f52
MM
70922015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7093
7094 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 7095 swaps.
fab27f52 7096
40de31cf
MLI
70972015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7098
7099 PR fortran/44054
7100 * c-objc-common.c (c_tree_printer): Replace locus pointer with
7101 accessor function.
7102
3aa3c9fc
MP
71032015-05-14 Marek Polacek <polacek@redhat.com>
7104
7105 PR c/66066
7106 PR c/66127
7107 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
7108 rather than with 0.
7109
c3388e62
DM
71102015-05-12 David Malcolm <dmalcolm@redhat.com>
7111
7112 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
7113 to add a call to warn_for_misleading_indentation.
7114 (c_parser_else_body): Likewise, adding param "else_loc".
7115 (c_parser_if_statement): Check for misleading indentation.
7116 (c_parser_while_statement): Likewise.
7117 (c_parser_for_statement): Likewise.
7118
755e528f
MP
71192015-05-08 Marek Polacek <polacek@redhat.com>
7120
7121 PR c/64918
7122 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
7123 (output_init_element): Likewise.
7124
0173bd2a
MP
71252015-05-07 Marek Polacek <polacek@redhat.com>
7126
7127 PR c/65179
7128 * c-typeck.c (build_binary_op): Warn when left shifting a negative
7129 value.
7130
9babc352
MP
71312015-04-30 Marek Polacek <polacek@redhat.com>
7132
7133 * c-typeck.c (set_init_label): Call error_at instead of error and
7134 pass LOC to it.
7135
ac9f18db
MP
7136 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
7137 the type of a decl.
7138
ec3fba51
MP
7139 * c-typeck.c (c_build_va_arg): Clarify the error message.
7140
b811915d
TS
71412015-04-29 Thomas Schwinge <thomas@codesourcery.com>
7142
7143 * c-parser.c (c_parser_oacc_enter_exit_data): Use
7144 OMP_STANDALONE_CLAUSES.
7145
f3075008
MP
71462015-04-28 Marek Polacek <polacek@redhat.com>
7147
7148 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
7149
4e81b788
MP
71502015-04-28 Marek Polacek <polacek@redhat.com>
7151
7152 PR c/65901
7153 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
7154
6c1db78e
MP
71552015-04-25 Marek Polacek <polacek@redhat.com>
7156
7157 PR c/52085
7158 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
7159 attribute.
7160
5c4abbb8
MP
71612015-04-23 Marek Polacek <polacek@redhat.com>
7162
7163 PR c/65345
7164 * c-decl.c (set_labels_context_r): New function.
7165 (store_parm_decls): Call it via walk_tree_without_duplicates.
7166 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
7167 instead of create_tmp_var. Build TARGET_EXPR instead of
7168 COMPOUND_EXPR.
7169 (build_atomic_assign): Use create_tmp_var_raw instead of
7170 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
7171
06aca1d5
IV
71722015-04-20 Ilya Verbin <ilya.verbin@intel.com>
7173
7174 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
7175 (c_parser_omp_target_update): Add missed %> to error_at ().
7176
8fba1830
BRF
71772015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7178
7179 PR target/55143
7180 * c-decl.c (c_default_pointer_mode): Remove definition.
7181 * c-tree.h (c_default_pointer_mode): Remove declaration.
7182
62021f64
TB
71832015-03-27 Tobias Burnus <burnus@net-b.de>
7184
7185 PR c/65586
7186 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
7187 error out.
7188 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
7189 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
7190 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
7191
9b65e171
JJ
71922015-03-19 Jakub Jelinek <jakub@redhat.com>
7193
7194 * c-decl.c (c_decl_attributes): Also add "omp declare target"
7195 attribute for DECL_EXTERNAL VAR_DECLs.
7196
17958621
JJ
71972015-03-11 Jakub Jelinek <jakub@redhat.com>
7198
7199 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
7200 argument.
7201
7ccb1a11
JJ
72022015-03-10 Jakub Jelinek <jakub@redhat.com>
7203
7204 PR c/65120
7205 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
7206 before preparing arguments to warn_logical_not_parentheses.
7207
01177669
JJ
72082015-03-09 Jakub Jelinek <jakub@redhat.com>
7209
7210 PR c/65120
7211 * c-typeck.c (parser_build_binary_op): Don't warn for
7212 !!x == y or !b == y where b is _Bool.
7213
802ac282
MP
72142015-03-09 Marek Polacek <polacek@redhat.com>
7215
7216 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
7217 * c-decl.c (grokdeclarator): Likewise.
7218 * c-typeck.c (build_binary_op): Likewise.
7219
e5165b60
MP
72202015-02-27 Marek Polacek <polacek@redhat.com>
7221
7222 PR c/65228
7223 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
7224
065d214c
MP
72252015-02-14 Marek Polacek <polacek@redhat.com>
7226
7227 PR c/64768
7228 * c-decl.c (grokdeclarator): Set the range of a flexible array member
7229 declared through a typedef name.
7230
e5d9235b
MP
72312015-02-13 Marek Polacek <polacek@redhat.com>
7232
7233 PR c/65050
7234 * c-decl.c (grokdeclarator): Print also the type when giving
7235 the error message about array's incomplete element type.
7236
fa01ffcc
JJ
72372015-02-11 Jakub Jelinek <jakub@redhat.com>
7238
7239 PR c/64824
7240 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
7241 check in the POP macro.
7242
c3e38a03
MP
72432015-02-09 Marek Polacek <polacek@redhat.com>
7244
7245 PR c/64856
7246 * c-typeck.c (process_init_element): Don't always wrap
7247 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
7248 initializing a range of elements.
7249
4886ec8e
JJ
72502015-02-04 Jakub Jelinek <jakub@redhat.com>
7251
7252 PR c/64824
7253 PR c/64868
7254 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
7255
c3e38a03 72562015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
7257
7258 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
7259 processing enum declaration.
7260
7b33f0c8
MP
72612015-01-29 Marek Polacek <polacek@redhat.com>
7262
7263 PR c/64709
7264 * c-typeck.c (pop_init_level): If constructor_elements has
7265 exactly one element with integer_zerop value, set constructor_zeroinit
7266 to 1. Remove braces around warning_init call.
7267
dea63e49
JJ
72682015-01-27 Jakub Jelinek <jakub@redhat.com>
7269
7270 PR c/64766
7271 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
7272 of FUNCTION_DECLs with error_mark_node.
7273
d38f7dce
JJ
72742015-01-26 Jakub Jelinek <jakub@redhat.com>
7275
7276 PR c/64778
7277 * c-typeck.c (convert_arguments): Return -1 if there are
7278 error_args, even if we've diagnosed too many arguments.
7279
cbf5d0e7
RB
72802015-01-21 Richard Biener <rguenther@suse.de>
7281
7282 PR middle-end/64313
7283 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
7284 for builtins the user declared correctly.
7285
41dbbb37
TS
72862015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7287 Bernd Schmidt <bernds@codesourcery.com>
7288 Cesar Philippidis <cesar@codesourcery.com>
7289 James Norris <jnorris@codesourcery.com>
7290 Jakub Jelinek <jakub@redhat.com>
7291 Ilmir Usmanov <i.usmanov@samsung.com>
7292
7293 * c-parser.c: Include "gomp-constants.h".
7294 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
7295 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
7296 Use OMP_CLAUSE_SET_MAP_KIND.
7297 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
7298 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
7299 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
7300 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
7301 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
7302 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
7303 "copyout", "create", "delete", "deviceptr", "gang", "host",
7304 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
7305 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
7306 "present_or_create", "pcreate", "seq", "self", "vector",
7307 "vector_length", "wait", "worker".
7308 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
7309 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
7310 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
7311 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
7312 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
7313 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
7314 (c_parser_oacc_data_clause_deviceptr)
7315 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
7316 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
7317 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
7318 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
7319 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
7320 (c_parser_oacc_parallel, c_parser_oacc_update)
7321 (c_parser_oacc_wait): New functions.
7322 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
7323 (c_finish_oacc_data): New prototypes.
7324 * c-typeck.c: Include "gomp-constants.h".
7325 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
7326 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
7327 OMP_CLAUSE_SET_MAP_KIND.
7328 (c_finish_oacc_parallel, c_finish_oacc_kernels)
7329 (c_finish_oacc_data): New functions.
7330 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
7331 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
7332 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
7333 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
7334 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
7335 GOMP_MAP_FORCE_DEVICEPTR.
7336
adfac8df
JJ
73372015-01-09 Michael Collison <michael.collison@linaro.org>
7338
7339 * c-array-notation.c: Include hash-set.h, machmode.h,
7340 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7341 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7342 * c-aux-info.c: Ditto.
7343 * c-convert.c: Ditto.
7344 * c-decl.c: Ditto.
7345 * c-errors.c: Ditto.
7346 * c-lang.c: Dittoxs.
7347 * c-objc-common.c: Ditto.
7348 * c-parser.c: Ditto.
7349 * c-typeck.c: Include hash-set.h, machmode.h,
7350 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7351 fold-const.h, wide-int.h, inchash.h, real.h and
7352 fixed-value.h due to flattening of tree.h.
7353
2cc901dc
MP
73542015-01-07 Marek Polacek <polacek@redhat.com>
7355
7356 PR c/64417
7357 * c-typeck.c (process_init_element): Disallow initialization of
7358 a flexible array member with a string constant if the structure
7359 is in an array.
7360
5624e564
JJ
73612015-01-05 Jakub Jelinek <jakub@redhat.com>
7362
e5341100
JJ
7363 PR sanitizer/64344
7364 * c-typeck.c (convert_for_assignment, c_finish_return): For
7365 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
7366 types also set in_late_binary_op around convert call.
7367 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
7368 to integral type casts, if not in_late_binary_op, pass c_fully_fold
7369 result on expr as last argument to ubsan_instrument_float_cast,
7370 if in_late_binary_op, don't use c_save_expr but save_expr.
7371
5624e564
JJ
7372 Update copyright years.
7373
5bd012f8
MP
73742015-01-05 Marek Polacek <polacek@redhat.com>
7375
7376 PR c/64423
7377 * c-typeck.c (build_array_ref): Pass loc down to
7378 warn_array_subscript_with_type_char.
7379
3f8257db 73802014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
7381
7382 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 7383 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 7384 element type.
8e745a17 7385 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 7386 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 7387 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 7388 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 7389 to PEDWARN_FOR_QUALIFIERS.
768952be 7390
8f94a8c4
JJ
73912014-12-17 Jakub Jelinek <jakub@redhat.com>
7392
7393 PR sanitizer/64289
7394 * c-convert.c: Include ubsan.h.
7395 (convert): For real -> integral casts and
7396 -fsanitize=float-cast-overflow don't call convert_to_integer, but
7397 instead instrument the float cast directly.
7398
b731b390
JJ
73992014-11-29 Jakub Jelinek <jakub@redhat.com>
7400
7401 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
7402 c_finish_stmt_expr): Remove NULL last argument from
7403 create_tmp_var_raw and create_tmp_var calls.
7404 * c-array-notation.c (fix_builtin_array_notation_fn,
7405 build_array_notation_expr, fix_conditional_array_notations_1,
7406 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
7407
541e35a6
MP
74082014-11-28 Marek Polacek <polacek@redhat.com>
7409
7410 PR c/63862
7411 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
7412 convert the right operand to integer type.
7413
b286be94
MP
74142014-11-25 Marek Polacek <polacek@redhat.com>
7415
7416 PR c/63877
7417 * c-decl.c (start_function): Disable -Wmissing-declarations warning
7418 for inline functions.
7419
aa7da51a
JJ
74202014-11-21 Jakub Jelinek <jakub@redhat.com>
7421
7422 PR target/63764
7423 * c-typeck.c (build_array_ref): Adjust
7424 convert_vector_to_pointer_for_subscript caller. If it returns true,
7425 call non_lvalue_loc on the result.
7426
d876207f
RB
74272014-11-11 Richard Biener <rguenther@suse.de>
7428
7429 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
7430 to true.
7431
e5e44252
AK
74322014-11-10 Andi Kleen <ak@linux.intel.com>
7433
7434 PR c/60804
7435 * c-parser.c (c_parser_statement_after_labels): Call
7436 check_no_cilk.
7437 (c_parser_if_statement): Dito.
7438 (c_parser_switch_statement): Dito.
7439 (c_parser_while_statement): Dito.
7440 (c_parser_do_statement): Dito.
7441 (c_parser_for_statement): Dito.
7442 * c-typeck.c (c_finish_loop): Dito.
7443
13c21655
PC
74442014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7445
7446 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
7447 OPT_Wshift_count_overflow in the warnings.
7448
2d51fcef
MP
74492014-10-30 Marek Polacek <polacek@redhat.com>
7450
7451 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
7452 print the stripped version as well, if they're not the same.
7453
ef4bddc2
RS
74542014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7455
7456 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
7457 machine_mode.
7458
c582198b
AM
74592014-10-28 Andrew MacLeod <amacleod@redhat.com>
7460
7461 * c-decl.c: Adjust include files.
7462 * c-parser.c: Ditto.
7463
ddc8de03
PM
74642014-10-27 Phil Muldoon <pmuldoon@redhat.com>
7465 Tom Tromey <tromey@redhat.com>
7466
7467 * c-tree.h (enum c_oracle_request): New.
7468 (c_binding_oracle_function): New typedef.
7469 (c_binding_oracle, c_pushtag, c_bind): Declare.
7470 * c-decl.c (c_binding_oracle): New global.
7471 (I_SYMBOL_CHECKED): New macro.
7472 (i_symbol_binding): New function.
7473 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
7474 (I_TAG_CHECKED): New macro.
7475 (i_tag_binding): New function.
7476 (I_TAG_BINDING, I_TAG_DECL): Redefine.
7477 (I_LABEL_CHECKED): New macro.
7478 (i_label_binding): New function.
7479 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
7480 (c_print_identifier): Save and restore c_binding_oracle.
7481 (c_pushtag, c_bind): New functions.
7482
60393bbc
AM
74832014-10-27 Andrew MacLeod <amacleod@redhat.com>
7484
7485 * c-typeck.c: Adjust include files.
7486
d723bb7c
MLI
74872014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7488
7489 PR c++/53061
7490 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
7491 initialization here...
7492 (c_initialize_diagnostics): ... but here. Set defaults after
7493 building pretty-printer.
7494
1bc5a451
MP
74952014-10-23 Marek Polacek <polacek@redhat.com>
7496
7497 PR c/63626
7498 * c-decl.c (pop_scope): Don't print warning in external_scope.
7499
4435bb92
MP
75002014-10-19 Marek Polacek <polacek@redhat.com>
7501
7502 PR c/63567
7503 * c-typeck.c (output_init_element): Allow initializing objects with
7504 static storage duration with compound literals even in C99 and add
7505 pedwarn for it.
7506
7278465e
MP
75072014-10-17 Marek Polacek <polacek@redhat.com>
7508
7509 PR c/63567
7510 * c-typeck.c (digest_init): Allow initializing objects with static
7511 storage duration with compound literals even in C99 and add pedwarn
7512 for it.
7513
d9b7be2e
MP
75142014-10-17 Marek Polacek <polacek@redhat.com>
7515
7516 PR c/63543
7517 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
7518 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
7519 error multiple times. Print the type.
7520
f406ae1f
MP
75212014-10-17 Marek Polacek <polacek@redhat.com>
7522
7523 PR c/63549
7524 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
7525 type.
7526
92574c7c
MP
75272014-10-17 Marek Polacek <polacek@redhat.com>
7528
7529 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
7530 (start_function): Use OPT_Wimplicit_int instead of 0.
7531 (store_parm_decls_oldstyle): Likewise.
7532
1bc4a978
MT
75332014-10-17 Alan Modra <amodra@gmail.com>
7534
7535 PR middle-end/61848
7536 * c-decl.c (merge_decls): Don't merge section name or tls model
7537 to newdecl symtab node, instead merge to olddecl. Override
7538 existing olddecl section name. Set tls_model for all thread-local
7539 vars, not just OMP thread-private ones. Remove incorrect comment.
7540
83685514
AM
75412014-10-16 Andrew MacLeod <amacleod@redhat.com>
7542
7543 * c-decl.c: Adjust include files.
7544
78a7c317
DD
75452014-10-14 DJ Delorie <dj@redhat.com>
7546
7547 * c-parser.c (c_parse_init): Add RID entries for each __intN.
7548 (c_token_starts_typename): Check all __intN, not just __int128.
7549 (c_token_starts_declspecs): Likewise.
7550 (c_parser_declspecs): Likewise.
7551 (c_parser_attribute_any_word): Likewise.
7552 (c_parser_objc_selector): Likewise.
7553 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
7554 (struct c_declspecs): Add int_n_idx field to record *which* __intN
7555 is specified.
7556 * c-decl.c (declspecs_add_type): Check for all __intN, not just
7557 __int128.
7558 (finish_declspecs): Likewise.
7559
74d98c1e
AB
75602014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
7561
8e745a17 7562 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 7563 the duplicate code.
8e745a17 7564 (c_parser_statement): Call the new function.
74d98c1e 7565
84937de2
MP
75662014-10-09 Marek Polacek <polacek@redhat.com>
7567
7568 PR c/63480
7569 * c-typeck.c (pop_init_level): Don't warn about initializing
7570 with { }.
7571
0382aaa0
MP
75722014-10-07 Marek Polacek <polacek@redhat.com>
7573
7574 PR c/59717
7575 * c-decl.c (header_for_builtin_fn): New function.
7576 (implicitly_declare): Suggest which header to include.
7577
7a0ca710
MP
75782014-10-07 Marek Polacek <polacek@redhat.com>
7579
7580 * c-convert.c (convert): Use error_operand_p.
7581 * c-typeck.c (require_complete_type): Likewise.
7582 (really_atomic_lvalue): Likewise.
7583 (digest_init): Likewise.
7584 (handle_omp_array_sections_1): Likewise.
7585
6bc8a126
MP
75862014-10-03 Marek Polacek <polacek@redhat.com>
7587
7588 PR c/63453
7589 * c-decl.c (pop_scope): Don't warn about "inline function declared
7590 but never defined" for functions marked with gnu_inline attribute.
7591
d90c0a59
JJ
75922014-09-25 Jakub Jelinek <jakub@redhat.com>
7593
7594 PR c++/63249
7595 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
7596 on low_bound and length.
7597
083e891e
MP
75982014-09-24 Marek Polacek <polacek@redhat.com>
7599
7600 PR c/61405
7601 PR c/53874
7602 * c-parser.c: Don't define CPP_KEYWORD.
7603 (c_parser_switch_statement): Pass original type to c_finish_case.
7604 * c-tree.h (c_finish_case): Update declaration.
7605 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
7606 conditionally to c_do_switch_warnings.
7607
8d95fe25
MP
76082014-09-03 Marek Polacek <polacek@redhat.com>
7609
7610 PR c/62024
7611 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
7612 conversions.
7613
9a771876
JJ
76142014-09-02 Jakub Jelinek <jakub@redhat.com>
7615 Balaji V. Iyer <balaji.v.iyer@intel.com>
7616 Igor Zamyatin <igor.zamyatin@intel.com>
7617
7618 * c-parser.c (c_parser_cilk_for): New function.
7619 (c_parser_cilk_grainsize): Likewise.
7620 (c_get_temp_regvar): Likewise.
7621 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
7622 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
7623 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
7624 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
7625 case.
7626
b7679d96
CG
76272014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
7628
7629 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
7630 with using HOST_WIDE_INT without truncation to 'int'
7631
59ea0364
MP
76322014-08-22 Marek Polacek <polacek@redhat.com>
7633
7634 PR c++/62199
7635 * c-typeck.c (parser_build_binary_op): Adjust call to
7636 warn_logical_not_parentheses.
7637
671a475e
IZ
76382014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
7639
7640 PR other/62008
7641 * c-parser.c (c_parser_array_notation): Check for correct
7642 type of an array added.
7643
04159acf
MP
76442014-08-19 Marek Polacek <polacek@redhat.com>
7645
7646 PR c++/62153
7647 * c-typeck.c (build_binary_op): If either operand of a comparison
7648 is a boolean expression, call maybe_warn_bool_compare.
7649
c77935ee
PP
76502014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
7651
7652 PR c/45584
7653 * c-typeck.c (build_c_cast): Do a conversion even when the
7654 TYPE_MAIN_VARIANTs are the same.
7655
35aff4fb
MP
76562014-08-19 Marek Polacek <polacek@redhat.com>
7657
7658 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
7659 pedwarn_c99 instead of pedwarn.
7660 (grokfield): Likewise.
7661 (warn_defaults_to): New function.
7662 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
7663 Unconditionally call pedwarn_c99 instead of pedwarn.
7664 (start_function): Call warn_defaults_to instead of pedwarn_c99.
7665 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
7666 check flag_isoc11 before.
7667 * c-errors.c (pedwarn_c99): Change the return type to bool.
7668 Handle -Wc99-c11-compat.
7669 * c-parser.c (disable_extension_diagnostics): Handle
7670 warn_c99_c11_compat.
7671 (restore_extension_diagnostics): Likewise.
7672 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
7673 instead of pedwarn, don't check flag_isoc11 before.
7674 (c_parser_declspecs): Likewise.
7675 (c_parser_alignas_specifier): Likewise.
7676 (c_parser_alignof_expression): Likewise.
7677 (c_parser_generic_selection): Likewise.
7678 * c-tree.h (pedwarn_c99): Update declaration.
7679 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
7680 of pedwarn_c99.
7681
177cce46
MP
76822014-08-19 Marek Polacek <polacek@redhat.com>
7683
7684 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
7685 to pedwarn_c90.
7686 * c-errors.c: Include "opts.h".
7687 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
7688 * c-parser.c (disable_extension_diagnostics): Handle negative value
7689 of warn_c90_c99_compat, too.
7690 (restore_extension_diagnostics): Likewise.
7691 (c_parser_compound_statement_nostart): Pass
7692 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
7693
6dc99c33
MP
76942014-08-12 Marek Polacek <polacek@redhat.com>
7695
7696 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
7697 Add pedwarn.
7698 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
7699 Likewise.
7700 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
7701
3f8257db 77022014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
7703
7704 PR c/51849
7705 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
7706 Call pedwarn_c90 instead of pedwarn.
7707 (check_bitfield_type_and_width): Likewise.
7708 (declspecs_add_qual): Likewise.
7709 (declspecs_add_type): Likewise.
7710 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
7711 Adjust to only call pedwarn_c90.
7712 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
7713 pedwarn_c90 instead of pedwarn.
7714 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
7715 * c-parser.c (disable_extension_diagnostics): Handle
7716 warn_c90_c99_compat.
7717 (restore_extension_diagnostics): Likewise.
7718 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
7719 pedwarn_c90 instead of pedwarn.
7720 (c_parser_initelt): Likewise.
7721 (c_parser_postfix_expression): Likewise.
7722 (c_parser_postfix_expression_after_paren_type): Likewise.
7723 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
7724 * c-tree.h: Fix formatting.
7725 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
7726 pedwarn_c90 instead of pedwarn.
7727
9f25a338
TS
77282014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7729
7730 * c-typeck.c: Remove include of pointer-set.h.
7731
044331a8
MP
77322014-08-07 Marek Polacek <polacek@redhat.com>
7733
7734 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
7735
b787e7a2
TS
77362014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7737
7738 * c-typeck.c: Use hash_map instead of pointer_map.
7739
6e2830c3
TS
77402014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7741
7742 * c-decl.c: Use hash_set instead of pointer_set.
7743
a7ee52fb
IZ
77442014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7745
7746 PR middle-end/61455
7747 * c-array-notation.c (expand_array_notations): Handling
7748 of DECL_EXPR added.
7749
b4dfdc11
MG
77502014-07-31 Marc Glisse <marc.glisse@inria.fr>
7751
7752 PR c++/60517
7753 * c-typeck.c (c_finish_return): Return 0 instead of the address of
7754 a local variable.
7755
976d5a22
TT
77562014-07-30 Tom Tromey <tromey@redhat.com>
7757
7758 * c-typeck.c (struct constructor_stack) <designator_depth>: New
7759 field.
7760 (really_start_incremental_init, push_init_level): Initialize
7761 designator_depth.
7762 (pop_init_level): Set global designator_depth.
7763 (process_init_element): Check for designated_init attribute.
7764
30281de2
MP
77652014-07-20 Marek Polacek <polacek@redhat.com>
7766
7767 PR c/61852
7768 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
7769 (implicitly_declare): Pass location to implicit_decl_warning.
7770
b108f48f
JJ
77712014-07-14 Jakub Jelinek <jakub@redhat.com>
7772
7773 PR middle-end/61294
7774 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
7775 If non-NULL, call c_parser_check_literal_zero.
7776 (c_parser_check_literal_zero): New function.
7777 (c_parser_postfix_expression_after_primary): Adjust
7778 c_parser_expr_list caller, handle -Wmemset-transposed-args.
7779
773ec47f
MP
77802014-07-06 Marek Polacek <polacek@redhat.com>
7781
7782 PR c/6940
7783 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
7784 * c-tree.h (C_ARRAY_PARAMETER): Define.
7785 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
7786 function parameter.
7787
22e1cf1c 77882014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 7789 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
7790
7791 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
7792 releasing symbol.
7793
52ec0ea3
MP
77942014-07-01 Marek Polacek <polacek@redhat.com>
7795
7796 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
7797 instead of 0 to WARN_FOR_ASSIGNMENT.
7798
d5c3d343
MP
77992014-07-01 Marek Polacek <polacek@redhat.com>
7800
7801 PR c/58286
7802 * c-typeck.c (convert_for_assignment): Pass
7803 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
7804
6a7253a4
MP
78052014-06-30 Marek Polacek <polacek@redhat.com>
7806
7807 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
7808 has no_sanitize_undefined attribute.
7809
5e88a8f4
IZ
78102014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
7811
7812 PR middle-end/57541
7813 * c-array-notation.c (fix_builtin_array_notation_fn):
7814 Check for 0 arguments in builtin call. Check that bultin argument is
7815 correct.
7816 * c-parser.c (c_parser_array_notation): Check for incorrect initial
7817 index.
7818
9698b078
SH
78192014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
7820
7821 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
7822 qualifiers in __auto_type for atomic types.
7823 (c_parser_typeof_specifier): Discard all type qualifiers in
7824 __typeof__ for atomic types.
7825
6e07c515
MP
78262014-06-25 Marek Polacek <polacek@redhat.com>
7827
7828 PR c/61162
7829 * c-parser.c (c_parser_statement_after_labels): Pass the location of
7830 the return expression to c_finish_return.
7831
da6f124d
JJ
78322014-06-25 Jakub Jelinek <jakub@redhat.com>
7833
7834 * c-typeck.c (c_finish_omp_clauses): Make sure
7835 OMP_CLAUSE_LINEAR_STEP has correct type.
7836
c203e8a7
TS
78372014-06-24 Trevor Saunders <tsaunders@mozilla.com>
7838
7839 * c-decl.c: Adjust.
7840
56ad0e38
JJ
78412014-06-24 Jakub Jelinek <jakub@redhat.com>
7842
7843 * c-parser.c (c_parser_omp_for_loop): For
7844 #pragma omp parallel for simd move lastprivate clause from parallel
7845 to for rather than simd.
7846
47c2554f
MP
78472014-06-23 Marek Polacek <polacek@redhat.com>
7848
7849 * c-typeck.c (parser_build_binary_op): Don't call
7850 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
7851
56363ffd
JH
78522014-06-15 Jan Hubicka <hubicka@ucw.cz>
7853
7854 * c-parser.c (c_parser_omp_threadprivate): Likewise.
7855 * c-decl.c (merge_decls): Likewise.
7856
d7ff7ae5
MP
78572014-06-09 Marek Polacek <polacek@redhat.com>
7858
7859 PR c/36446
7860 * c-typeck.c (error_init): Call inform instead of error_at.
7861 (pedwarn_init): Call inform instead of pedwarn.
7862 (warning_init): Call inform instead of warning_at.
7863
24d047a3
JH
78642014-06-07 Jan Hubicka <hubicka@ucw.cz>
7865
7866 * c-decl.c (merge_decls): Use set_decl_section_name.
7867 (duplicate_decls): Remove node if it exists.
7868
9bac5cbb
G
78692014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
7870
7871 PR c/53119
7872 * c-typeck.c (push_init_level, process_init_element,
7873 pop_init_level): Correct check for zero initialization, move
7874 missing brace warning to respect zero initialization.
7875
8ffcdea8
MP
78762014-06-05 Marek Polacek <polacek@redhat.com>
7877
7878 PR c/56724
7879 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
7880
742938c9
MP
78812014-06-05 Marek Polacek <polacek@redhat.com>
7882
7883 PR c/49706
7884 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 7885 on the left hand side operand of a comparison.
742938c9 7886
6447c55d
MP
78872014-06-05 Marek Polacek <polacek@redhat.com>
7888
7889 PR c/48062
7890 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
7891 Print note only if the warning was printed.
7892
9dc7743c
IZ
78932014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
7894
7895 PR c/58942
7896 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
7897 with a pointer.
7898
fedfecef
MP
78992014-06-03 Marek Polacek <polacek@redhat.com>
7900
7901 PR c/60439
7902 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
7903 c_start_case.
7904 * c-tree.h (c_start_case): Update.
7905 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
7906 switch condition has boolean value.
7907
9b2b7279
AM
79082014-06-02 Andrew MacLeod <amacleod@redhat.com>
7909
7910 * c-decl.c: Include builtins.h.
7911 * c-parser.c: Likewise.
7912
5c1bc275
MP
79132014-05-27 Marek Polacek <polacek@redhat.com>
7914
7915 PR c/56724
7916 * c-typeck.c (convert_arguments): Get location of a parameter. Change
7917 error and warning calls to error_at and warning_at. Pass location of
7918 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
7919 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
7920 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
7921
97563bc8
IZ
79222014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
7923
7924 PR c/61191
7925 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
7926 function parameters.
7927
aede2c10
JH
79282014-05-23 Jan Hubicka <hubicka@ucw.cz>
7929
7930 * c-decl.c (merge_decls): Preserve symtab node pointers.
7931 (duplicate_decls): Free new decl.
7932
edbba2ce
TS
79332014-05-23 Thomas Schwinge <thomas@codesourcery.com>
7934
f3316c6d
TS
7935 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
7936 initialization.
7937
edbba2ce
TS
7938 * c-parser.c (c_parser_omp_target): Return bool values.
7939
68c81f24
TS
79402014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7941
7942 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7943 num_teams_loc variable to num_thread_limit_loc.
7944
632f2871
RS
79452014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7946
7947 * c-array-notation.c (expand_array_notations): Use void_node
7948 instead of void_zero_node.
7949
766090c2
TS
79502014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7951
7952 * c-decl.c (finish_struct): Adjust.
7953 (finish_enum): Likewise.
7954 (bind): Adjust.
7955 (record_inline_static): Likewise.
7956 (push_scope): Likewise.
7957 (make_label): Likewise.
7958 (lookup_label_for_goto): Likewise.
7959 (finish_struct): Likewise.
7960 (finish_enum): Likewise.
7961 (store_parm_decls): Likewise.
7962 (c_push_function_context): Likewise.
7963 * c-lang.h: Remove usage of variable_size gty attribute.
7964 * c-parser.c (c_parse_init): Adjust.
7965 (c_parse_file): Likewise.
7966
2b107f6b
MP
79672014-05-13 Marek Polacek <polacek@redhat.com>
7968
7969 PR c/61162
7970 * c-typeck.c (convert_for_assignment): Pass location to
7971 WARN_FOR_ASSIGNMENT instead of input_location.
7972
d033409e
MP
79732014-05-10 Marek Polacek <polacek@redhat.com>
7974
7975 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7976 maybe_warn_string_init.
7977 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7978 maybe_warn_string_init.
7979 * c-tree.h (maybe_warn_string_init): Update declaration.
7980 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7981 Call pedwarn_init with loc instead of with input_location.
7982 (digest_init): Pass init_loc to maybe_warn_string_init.
7983 (pop_init_level): Call pedwarn_init with loc instead of with
7984 input_location.
7985 (set_init_index): Likewise.
7986 (process_init_element): Likewise.
7987
ea58ef42
MP
79882014-05-09 Marek Polacek <polacek@redhat.com>
7989
7990 PR c/61096
7991 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7992 (c_parser_initelt): Pass location to set_init_label. Pass array index
7993 location to set_init_index.
7994 * c-tree.h (push_init_level): Update declaration.
7995 (pop_init_level): Likewise.
7996 (set_init_index): Likewise.
7997 (set_init_label): Likewise.
7998 * c-typeck.c (error_init): Add location parameter. Call error_at
7999 instead of error.
8000 (digest_init): Pass init_loc to error_init.
8001 (really_start_incremental_init):
8002 (push_init_level): Add location parameter. Pass loc to pop_init_level
8003 and error_init.
8004 (pop_init_level): Likewise.
8005 (set_designator): Add location parameter. Pass loc to pop_init_level,
8006 push_init_level, and error_init.
8007 (set_init_index): Add location parameter. Pass loc to error_init and
8008 set_designator.
8009 (set_init_label): Likewise.
8010 (output_init_element): Pass loc to error_init.
8011 (process_init_element): Pass loc to error_init, pop_init_level,
8012 pedwarn_init, and push_init_level.
8013
661a0813
MP
80142014-05-09 Marek Polacek <polacek@redhat.com>
8015
8016 PR c/50459
8017 * c-parser.c (c_parser_attributes): Parse the arguments as an
8018 expression-list if the attribute takes identifier.
8019
2793eeab
MP
80202014-05-08 Marek Polacek <polacek@redhat.com>
8021
8022 PR c/61053
8023 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
8024 TYPE_ALIGN_UNIT.
8025
f827930a
MP
80262014-05-08 Marek Polacek <polacek@redhat.com>
8027
8028 PR c/61077
8029 * c-decl.c (start_function): Warn for _Atomic-qualified return type
8030 of main.
8031
1d60af08
KZ
80322014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8033 Mike Stump <mikestump@comcast.net>
8034 Richard Sandiford <rdsandiford@googlemail.com>
8035
8036 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
8037 (finish_enum): Use wide-int interfaces.
8038 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
8039 * c-typeck.c (build_c_cast): Likewise.
8040 (set_nonincremental_init_from_string): Likewise.
8041 (c_tree_equal): Likewise.
8042
a0e24419
MP
80432014-05-02 Marek Polacek <polacek@redhat.com>
8044
8045 PR c/25801
8046 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
8047 Return size_one_node when the type is not complete.
8048 (pointer_diff): Remove comment.
8049 (build_unary_op): Improve error messages.
8050
19fc9faa
MP
80512014-05-02 Marek Polacek <polacek@redhat.com>
8052
8053 * c-typeck.c (c_finish_return): Separate warning_at calls.
8054
63bc4e87
MP
80552014-05-02 Marek Polacek <polacek@redhat.com>
8056
8057 * c-tree.h (error_init): Remove declaration.
8058 (pedwarn_init): Likewise.
8059 * c-typeck.c (error_init): Make static and move above.
8060 (pedwarn_init): Likewise.
8061 (warning_init): Move above.
8062 (maybe_warn_string_init): Likewise.
8063
4bd2511b
JL
80642014-05-01 Jeff Law <law@redhat.com>
8065
8066 Revert:
8067
8068 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8069 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
8070 avoid goto.
8071
6a358dcb
MP
80722014-05-02 Marek Polacek <polacek@redhat.com>
8073
8074 PR c/60784
8075 * c-typeck.c (push_init_level): Set constructor_designated to
8076 p->designated for structures.
8077
ae5ebda4
MP
80782014-05-01 Marek Polacek <polacek@redhat.com>
8079
8080 PR c/60915
8081 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
8082 function-definition has an attribute after the declarator.
8083
96b40f8d
MP
80842014-05-01 Marek Polacek <polacek@redhat.com>
8085
8086 PR c/60257
8087 * c-typeck.c (warning_init): Add location_t parameter. Call
8088 warning_at instead of warning.
8089 (push_init_level): Pass input_location to warning_init.
8090 (add_pending_init): Add location_t parameter. Pass loc to
8091 warning_init.
8092 (set_nonincremental_init): Pass input_location to add_pending_init.
8093 (set_nonincremental_init_from_string): Likewise.
8094 (output_init_element): Pass loc to warning_init and to
8095 add_pending_init.
8096
32e00768
MP
80972014-05-01 Marek Polacek <polacek@redhat.com>
8098
8099 PR c/43395
8100 * c-typeck.c (c_finish_return): Distinguish between label and variable
8101 when warning about returning local address.
8102
c9379ce2
MP
81032014-05-01 Marek Polacek <polacek@redhat.com>
8104
8105 PR c/29467
8106 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
8107 in C89 mode.
8108
d00887e8
MP
81092014-05-01 Marek Polacek <polacek@redhat.com>
8110
8111 PR c/43245
8112 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
8113 instead of 0 to WARN_FOR_QUALIFIERS.
8114
5436fa2e
MP
81152014-05-01 Marek Polacek <polacek@redhat.com>
8116
8117 PR c/56989
8118 * c-typeck.c (default_conversion): Use better location for
8119 error call.
8120
f8ed5150
MP
81212014-04-30 Marek Polacek <polacek@redhat.com>
8122
8123 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
8124 also when SANITIZE_FLOAT_DIVIDE is on.
8125
8337d1db
MP
81262014-04-30 Marek Polacek <polacek@redhat.com>
8127
8128 PR c/60139
8129 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
8130 and pedwarn_init. Use loc insted of input_location.
8131
c4bdc42f
MP
81322014-04-30 Marek Polacek <polacek@redhat.com>
8133
8134 PR c/60351
8135 * c-typeck.c (build_binary_op): Use location when warning about
8136 shift count.
8137
45484dcf
MP
81382014-04-25 Marek Polacek <polacek@redhat.com>
8139
8140 PR c/18079
8141 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
8142 always_inline/noinline and hot/cold attributes.
8143
34cf811f
MP
81442014-04-25 Marek Polacek <polacek@redhat.com>
8145
8146 PR c/60114
8147 * c-parser.c (c_parser_initelt): Pass input_location to
8148 process_init_element.
8149 (c_parser_initval): Pass loc to process_init_element.
8150 * c-tree.h (process_init_element): Adjust declaration.
8151 * c-typeck.c (push_init_level): Pass input_location to
8152 process_init_element.
8153 (pop_init_level): Likewise.
8154 (set_designator): Likewise.
8155 (output_init_element): Add location_t parameter. Pass loc to
8156 digest_init.
8157 (output_pending_init_elements): Pass input_location to
8158 output_init_element.
8159 (process_init_element): Add location_t parameter. Pass loc to
8160 output_init_element.
8161
42056eac
JJ
81622014-04-24 Jakub Jelinek <jakub@redhat.com>
8163
8164 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
8165 atomic-clause, allow comma in between atomic-clause and
8166 seq_cst.
8167
e162a134
JJ
81682014-04-22 Jakub Jelinek <jakub@redhat.com>
8169
8170 PR c/59073
8171 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
8172 fails, don't set OM_PARALLEL_COMBINED and return NULL.
8173
2f6babac
IZ
81742014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8175
8176 PR middle-end/60469
8177 * c-array-notation.c (fix_builtin_array_notation_fn): Use
8178 create_tmp_var instead build_decl for creating temps.
8179 (build_array_notation_expr): Likewise.
8180 (fix_conditional_array_notations_1): Likewise.
8181 (fix_array_notation_expr): Likewise.
8182 (fix_array_notation_call_expr): Likewise.
8183
8edbfaa6
JJ
81842014-03-28 Jakub Jelinek <jakub@redhat.com>
8185
8186 PR c++/60689
8187 * c-tree.h (c_build_function_call_vec): New prototype.
8188 * c-typeck.c (build_function_call_vec): Don't call
8189 resolve_overloaded_builtin here.
8190 (c_build_function_call_vec): New wrapper function around
8191 build_function_call_vec. Call resolve_overloaded_builtin here.
8192 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
8193 Call c_build_function_call_vec instead of build_function_call_vec.
8194 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
8195 * c-decl.c (finish_decl): Likewise.
8196
7485aeea
MLI
81972014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8198
8199 PR c/55383
8200 * c-typeck.c: Use correct format string in cast-qual warning
8201
b17a8b07
TS
82022014-03-07 Thomas Schwinge <thomas@codesourcery.com>
8203
8204 * c-decl.c (c_decl_attributes): Use
8205 lang_hooks.types.omp_mappable_type.
8206 * c-typeck.c (c_finish_omp_clauses): Likewise.
8207
3af9c5e9
MP
82082014-03-06 Marek Polacek <polacek@redhat.com>
8209
8210 PR c/60197
8211 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
8212 of checking tree code.
8213
1c9f5f33
PK
82142014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8215
8216 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
8217 (c_parser_parameter_declaration): Likewise.
8218
cc28fc7f
MP
82192014-02-19 Marek Polacek <polacek@redhat.com>
8220
8221 PR c/60195
8222 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
8223 Call mark_exp_read on exp.value.
8224 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
8225 TREE_ADDRESSABLE on old instead of val.
8226 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
8227
b581c05c
PK
82282014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8229
8230 * c-parser.c (c_parser_get_builtin_args): Replace calls to
8231 C_EXPR_APPEND by vec_safe_push.
8232 * c-tree.h (C_EXPR_APPEND): Remove.
8233
81e5eca8
MP
82342014-01-31 Marek Polacek <polacek@redhat.com>
8235
8236 PR c/59963
8237 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
8238 build_function_call_vec.
8239 (build_function_call): Likewise.
8240 (build_atomic_assign): Likewise.
8241 (build_function_call_vec): Add arg_loc parameter. Use it.
8242 (convert_arguments): Likewise.
8243 (convert_for_assignment): Rename rhs_loc to expr_loc.
8244 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
8245 (c_parser_objc_keywordexpr): Likewise.
8246 (c_parser_postfix_expression_after_primary): Call
8247 build_function_call_vec with expr_loc rather than op_loc.
8248 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
8249 build_function_call_vec.
8250 (c_parser_expr_list): Add locations parameter. Fill it with locations
8251 of function arguments.
8252 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
8253
68fca595
MP
82542014-01-30 Marek Polacek <polacek@redhat.com>
8255
8256 PR c/59940
8257 * c-typeck.c (build_function_call_vec): Use loc parameter.
8258 (convert_arguments): Add location parameter. Use it.
8259 (ep_convert_and_check): Likewise.
8260 (build_atomic_assign): Adjust convert_for_assignment call.
8261 (build_modify_expr): Likewise.
8262 (digest_init): Likewise.
8263 (c_finish_return): Likewise.
8264 (build_conditional_expr): Adjust ep_convert_and_check calls.
8265 (convert_for_assignment): Add rhs_loc parameter. Use it.
8266 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
8267 calls.
8268
fa337f3a
RB
82692014-01-30 Richard Biener <rguenther@suse.de>
8270
8271 PR c/59905
8272 * c-typeck.c (build_function_call_vec): Do not replace calls
8273 to a function via an incompatible type with a runtime abort.
8274
b72271b9
BI
82752014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8276
8277 * c-parser.c (c_parser_declaration_or_fndef): Replaced
8278 flag_enable_cilkplus with flag_cilkplus.
8279 (c_parser_direct_declarator_inner): Likewise.
8280 (c_parser_attribute_any_word): Likewise.
8281 (c_parser_attributes): Likewise.
8282 (c_parser_compound_statement): Likewise.
8283 (c_parser_statement_after_labels): Likewise.
8284 (c_parser_if_statement): Likewise.
8285 (c_parser_switch_statement): Likewise.
8286 (c_parser_do_statement): Likewise.
8287 (c_parser_for_statement): Likewise.
8288 (c_parser_unary_expression): Likewise.
8289 (c_parser_postfix_expression): Likewise.
8290 (c_parser_postfix_expression_after_primary): Likewise.
8291 (c_parser_postfix_expression_after_primary): Likewise.
8292 (c_parser_omp_clause_name): Likewise.
8293 (c_finish_omp_declare_simd): Likewise.
8294 (c_parser_cilk_verify_simd): Likewise.
8295 * c-typeck.c (build_array_ref): Likewise.
8296 (build_function_call_vec): Likewise.
8297 (convert_arguments): Likewise.
8298 (build_compound_expr): Likewise.
8299 (c_finish_return): Likewise.
8300 (c_finish_if_stmt): Likewise.
8301 (c_finish_loop): Likewise.
8302 (build_binary_op): Likewise.
8303
393e8e8b
MP
83042014-01-23 Marek Polacek <polacek@redhat.com>
8305
8306 PR c/59846
8307 * c-typeck.c (parser_build_binary_op): Use location instead of
8308 input_location.
8309 (build_binary_op): Pass location to shorten_compare.
8310
f04dda30
MP
83112014-01-23 Marek Polacek <polacek@redhat.com>
8312
8313 PR c/58346
8314 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
8315 an empty aggregate.
8316
789eadcd
MP
83172014-01-23 Marek Polacek <polacek@redhat.com>
8318
8319 PR c/59871
8320 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
8321 of a comma expression.
8322 (emit_side_effect_warnings): Likewise.
8323
40f14e9f
BI
83242014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8325
8326 PR c/59825
8327 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
8328 function to use walk_tree and moved a lot of its functionality to
8329 expand_array_notations.
8330 (expand_array_notations): New function.
8331
74558dd9
BI
83322014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8333
8334 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
8335 attribute an attribute without value.
8336
652fea39
JJ
83372014-01-23 Jakub Jelinek <jakub@redhat.com>
8338
8339 PR middle-end/58809
8340 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
8341 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
8342
f34f1c87
MP
83432014-01-22 Marek Polacek <polacek@redhat.com>
8344
8345 PR c/59891
8346 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
8347 of remove_c_maybe_const_expr on op1 and op2.
8348
241f845a
JJ
83492014-01-15 Jakub Jelinek <jakub@redhat.com>
8350
8351 PR c/58943
8352 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
8353 effects, preevaluate rhs using SAVE_EXPR first.
8354
9a74f20c
BI
83552014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
8356
8357 PR c++/59631
8358 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
8359 statements with if-elseif statements.
8360
96066ce1
MP
83612014-01-06 Marek Polacek <polacek@redhat.com>
8362
8363 PR c/57773
8364 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
8365 defined bit-field types only in ISO C.
8366
23a5b65a
RS
83672014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8368
8369 Update copyright years
8370
f9030485
RS
83712014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8372
8373 * c-array-notation.c: Use the standard form for the copyright notice.
8374
41958c28
BI
83752013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8376
8377 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
8378 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
8379 field in parser is not empty. If not-empty, call the function
8380 c_parser_finish_omp_declare_simd.
8381 (c_parser_cilk_clause_vectorlength): Modified function to be shared
8382 between SIMD-enabled functions and #pragma simd. Added new parameter.
8383 (c_parser_cilk_all_clauses): Modified the usage of the function
8384 c_parser_cilk_clause_vectorlength as mentioned above.
8385 (c_parser_cilk_simd_fn_vector_attrs): New function.
8386 (c_finish_cilk_simd_fn_tokens): Likewise.
8387 (is_cilkplus_vector_p): Likewise.
8388 (c_parser_omp_clause_name): Added checking for "vectorlength,"
8389 "nomask," and "mask" strings in clause name.
8390 (c_parser_omp_all_clauses): Added 3 new case statements:
8391 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
8392 PRAGMA_CILK_CLAUSE_NOMASK.
8393 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
8394 check for vector attribute and if so call the function
8395 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
8396 called the function c_finish_cilk_simd_fn_tokens.
8397 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
8398 parser field is non-empty. If so, parse them as you would parse
8399 the omp declare simd pragma.
8400 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
8401 Added a check when step is a parameter and flag it as error.
8402 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
8403 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
8404 pragma_omp_clause.
8405
cef0fd0e
TS
84062013-12-17 Thomas Schwinge <thomas@codesourcery.com>
8407
8408 * c-parser.c (c_parser_omp_parallel): Fix description.
8409
12893402
BI
84102013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8411
8412 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
8413 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8414 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
8415 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
8416
296674db
JM
84172013-12-04 Joseph Myers <joseph@codesourcery.com>
8418
8419 PR c/52023
8420 * c-parser.c (c_parser_alignas_specifier): Use
8421 c_sizeof_or_alignof_type instead of c_alignof.
8422 (c_parser_alignof_expression): Likewise, with min_alignof
8423 parameter depending on alignof spelling used.
8424
edd28054
MP
84252013-12-04 Marek Polacek <polacek@redhat.com>
8426
8427 PR c/54113
8428 * c-decl.c (start_function): Don't warn for missing prototype for
8429 inline functions.
8430
da0fc454
MP
84312013-12-03 Marek Polacek <polacek@redhat.com>
8432
8433 PR c/59351
8434 * c-decl.c (build_compound_literal): Allow compound literals with
8435 empty initial value.
8436
4c2ecab0
JM
84372013-12-02 Joseph Myers <joseph@codesourcery.com>
8438
8439 PR c/58235
8440 * c-typeck.c (build_modify_expr): Diagnose assignment to
8441 expression with array type.
8442
340baef7
JM
84432013-11-29 Joseph Myers <joseph@codesourcery.com>
8444
8445 PR c/42262
8446 * c-typeck.c (process_init_element): Do not treat a string as
8447 initializing a whole array when used with a designator for an
8448 individual element.
8449
6763b9f7
JM
84502013-11-29 Joseph Myers <joseph@codesourcery.com>
8451
8452 PR c/57574
8453 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
8454 an inline function following a static declaration.
8455
e7bd1de1
JJ
84562013-11-28 Jakub Jelinek <jakub@redhat.com>
8457
8458 PR c/59310
8459 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
8460 to p_name before calling c_parser_omp_teams instead of after.
8461 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
8462 argument. Remove unused p_name variable.
8463
0136f8f0
AH
84642013-11-27 Aldy Hernandez <aldyh@redhat.com>
8465 Jakub Jelinek <jakub@redhat.com>
8466
8467 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
8468 external_scope is NULL.
8469
241b71bb
TV
84702013-11-27 Tom de Vries <tom@codesourcery.com>
8471 Marc Glisse <marc.glisse@inria.fr>
8472
8473 PR c++/59032
8474 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
8475
2fb9a547
AM
84762013-11-22 Andrew MacLeod <amacleod@redhat.com>
8477
8478 * c-typeck.c: Add required include files from gimple.h.
8479
8400e75e
DM
84802013-11-22 David Malcolm <dmalcolm@redhat.com>
8481
8482 * c-decl.c (define_label, shadow_tag_warned)
8483 (check_bitfield_type_and_width, grokdeclarator, grokparms,
8484 store_parm_decls_newstyle, store_parm_decls_oldstyle)
8485 (declspecs_add_type): Remove use of in_system_header macro.
8486 * c-parser.c (c_parser_unary_expression): Likewise.
8487 * c-typeck.c (store_init_value, process_init_element)
8488 (c_start_case): Likewise.
8489
8490 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
8491 macro.
8492
8493 * c-parser.c (c_parser_set_source_position_from_token): Remove
8494 reference to in_system_header from comment.
8495
386b1f1f
RS
84962013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8497
8498 * c-decl.c (grokdeclarator): Update comment to refer to
8499 tree_to_[su]hwi rather than tree_low_cst.
8500
ae7e9ddd
RS
85012013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8502
8503 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
8504 tree_to_uhwi throughout.
8505
9439e9a1
RS
85062013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8507
8508 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
8509 throughout.
8510
9541ffee
RS
85112013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8512
8513 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
8514 throughout.
8515
c02065fc
AH
85162013-11-15 Aldy Hernandez <aldyh@redhat.com>
8517
8518 * c-parser.c (c_parser_cilk_simd): New.
8519 (c_parser_cilk_verify_simd): New.
8520 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
8521 (c_parser_omp_for_loop): Add case for NE_EXPR.
8522 Set c_break_label for CILK_SIMD.
8523 (c_parser_cilk_clause_vectorlength): New.
8524 (c_parser_cilk_clause_linear): New.
8525 (c_parser_cilk_clause_name): New.
8526 (c_parser_cilk_all_clauses): New.
8527 * c-typeck.c (build_unary_op): Pass location argument to
8528 readonly_error.
8529 (build_modify_expr): Same.
8530 (build_asm_expr): Same.
8531 (c_finish_bc_stmt): Error on break/continue in loops.
8532
18f429e2
AM
85332013-11-14 Andrew MacLeod <amacleod@redhat.com>
8534
8535 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
8536
d8a2d370
DN
85372013-11-14 Diego Novillo <dnovillo@google.com>
8538
8539 * c-decl.c: Include print-tree.h.
8540 Include stor-layout.h.
8541 Include varasm.h.
8542 Include attribs.h.
8543 Include stringpool.h.
8544 * c-lang.c: Include fold-const.h.
8545 * c-parser.c: Include stringpool.h.
8546 Include attribs.h.
8547 Include stor-layout.h.
8548 Include varasm.h.
8549 Include trans-mem.h.
8550 * c-typeck.c: Include stor-layout.h.
8551 Include trans-mem.h.
8552 Include varasm.h.
8553 Include stmt.h.
8554
38b7bc7f
JM
85552013-11-13 Joseph Myers <joseph@codesourcery.com>
8556
8557 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
8558 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
8559 __auto_type.
8560 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
8561 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
8562 RID_AUTO_TYPE.
8563 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
8564 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
8565 (c_parser_declarator, c_parser_direct_declarator_inner)
8566 (c_parser_parameter_declaration, c_parser_type_name): All callers
8567 changed.
8568 (c_parser_declaration_or_fndef): Handle declarations with type
8569 determined from the initializer.
8570
45b0be94
AM
85712013-11-12 Andrew MacLeod <amacleod@redhat.com>
8572
18f429e2 8573 * c-typeck.c: Include gimplify.h.
45b0be94 8574
582d9b50
JM
85752013-11-12 Joseph Myers <joseph@codesourcery.com>
8576
8577 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
8578 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
8579 comment.
8580 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
8581 or _Thread_local as appropriate in diagnostics.
8582 (build_null_declspecs): Initialize ret->thread_gnu_p.
8583 (declspecs_add_scspec): Handle either __thread or _Thread_local
8584 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
8585 pedantic. Do not disallow _Thread_local extern and _Thread_local
8586 static.
8587
267bac10
JM
85882013-11-07 Joseph Myers <joseph@codesourcery.com>
8589 Andrew MacLeod <amacleod@redhat.com>
8590
8591 * c-aux-info.c (gen_type): Handle atomic qualifier.
8592 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
8593 qualifiers when compating types.
8594 (shadow_tag_warned): Handle atomic_p in declspecs.
8595 (quals_from_declspecs): Likewise.
8596 (start_decl): Use c_type_promotes_to when promoting argument
8597 types.
8598 (grokdeclarator): Handle _Atomic.
8599 (get_parm_info): Diagnose any qualifier on "void" as only
8600 parameter.
8601 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
8602 comparing types. Use c_type_promotes_to when promoting argument
8603 types.
8604 (finish_function): Use c_type_promotes_to when promoting argument
8605 types.
8606 (build_null_declspecs): Handle atomic_p in declspecs.
8607 (declspecs_add_qual): Handle RID_ATOMIC.
8608 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
8609 (c_token_starts_declspecs): Handle RID_ATOMIC.
8610 (c_parser_declspecs): Handle atomic type specifiers and
8611 qualifiers.
8612 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
8613 from types of expressions with atomic type.
8614 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
8615 (c_parser_attribute_any_word): Handle RID_ATOMIC.
8616 (c_parser_initializer, c_parser_initelt, c_parser_initval)
8617 (c_parser_statement_after_labels, c_parser_switch_statement)
8618 (c_parser_for_statement, c_parser_expr_no_commas)
8619 (c_parser_conditional_expression, c_parser_binary_expression)
8620 (c_parser_cast_expression, c_parser_unary_expression)
8621 (c_parser_postfix_expression)
8622 (c_parser_postfix_expression_after_primary, c_parser_expression):
8623 Use convert_lvalue_to_rvalue.
8624 (c_parser_expression_conv, c_parser_expr_list): Document
8625 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
8626 (c_parser_objc_synchronized_statement): Use
8627 convert_lvalue_to_rvalue.
8628 (c_parser_objc_selector): Handle RID_ATOMIC.
8629 (c_parser_objc_receiver, c_parser_array_notation): Use
8630 convert_lvalue_to_rvalue.
8631 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
8632 _Atomic (type-name).
8633 (struct c_declspecs): Add atomic_p field.
8634 (convert_lvalue_to_rvalue): Declare.
8635 * c-typeck.c (c_type_promotes_to): Promote atomic types to
8636 corresponding atomic types.
8637 (qualify_type): Don't add _Atomic qualifiers from second argument.
8638 (comp_target_types): Do not allow _Atomic mismatches.
8639 (type_lists_compatible_p): Do not remove atomic qualifiers when
8640 comparing types.
8641 (really_atomic_lvalue, convert_lvalue_to_rvalue)
8642 (build_atomic_assign): New functions.
8643 (build_unary_op): Use build_atomic_assign for atomic increment and
8644 decrement.
8645 (build_conditional_expr): Do not treat _Atomic void as a qualified
8646 version of void.
8647 (build_modify_expr): Use build_atomic_assign for atomic LHS.
8648 (find_anonymous_field_with_type, convert_to_anonymous_field)
8649 (convert_for_assignment): Do not remove atomic qualifiers when
8650 comparing types.
8651 (digest_init): Do not accept initialization of arrays of atomic
8652 elements by string constants.
8653 (build_asm_expr): Use convert_lvalue_to_rvalue.
8654 (build_binary_op): Do not treat _Atomic void as a qualified
8655 version of void.
8656
0c249d4b
DD
86572013-11-06 DJ Delorie <dj@redhat.com>
8658
8659 * c-decl.c (locate_old_decl): If a previous conflicting decl is
8660 both explicit and builtin, print the location of the explicit one.
8661
6d7f7e0a
TB
86622013-11-05 Tobias Burnus <burnus@net-b.de>
8663
8664 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
8665 c_parser_omp_distribute, c_parser_omp_teams,
8666 c_parser_omp_target, c_parser_omp_declare): Handle
8667 -fopenmp-simd.
8668
b906f4ca
MP
86692013-11-03 Marek Polacek <polacek@redhat.com>
8670
8671 * c-decl.c (grokdeclarator): Add VLA instrumentation.
8672
ee1d5a02
JJ
86732013-11-01 Jakub Jelinek <jakub@redhat.com>
8674
8675 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
8676 check_dup_generic at the end, unless remove is true.
8677 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
8678 remove = true;.
8679 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
8680
5a9785fb
JJ
86812013-10-31 Jakub Jelinek <jakub@redhat.com>
8682
8683 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
8684 with decl that is not pointer nor array.
8685
939b37da
BI
86862013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8687
8688 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
8689 a spawning function is found.
8690 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
8691 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
8692 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8693 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
8694 case.
8695 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
8696 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
8697 expr.
8698 (c_finish_return): Added a check to reject _Cilk_spawn in return
8699 expression.
8700 (build_cilk_spawn): New function.
8701 (build_cilk_sync): Likewise.
8702 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 8703
d4af74d4
TB
87042013-10-27 Tobias Burnus <burnus@net-b.de>
8705
8706 PR other/33426
8707 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
8708 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
8709 (c_parser_statement_after_labels): Update calls.
8710
d73749df 87112013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8712
8713 PR other/33426
8714 * c-parser.c (c_parser_pragma, c_parser_for_statement):
8715 Handle PRAGMA_IVDEP.
8716 (c_parser_statement_after_labels): Update call.
8717
f28aa681
MP
87182013-10-24 Marek Polacek <polacek@redhat.com>
8719
8720 * c-parser.c (c_parser_struct_declaration): Add a comment.
8721 (c_parser_declarator): Don't allow _Alignas here.
8722
0645c1a2
AM
87232013-10-17 Andrew MacLeod <amacleod@redhat.com>
8724
8725 * c-parser.c: Include omp-low.h.
8726 * c-typeck.c: Likewise.
8727
568a31f2
MP
87282013-10-17 Marek Polacek <polacek@redhat.com>
8729
8730 PR c/58267
8731 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
8732 Document syntax of the array-declarator.
8733 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
8734 are not permitted.
8735 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
8736 (c_parser_struct_declaration): Likewise.
8737 (c_parser_declarator): Likewise.
8738 (c_parser_direct_declarator_inner): Likewise.
8739 (c_parser_parameter_declaration): Likewise.
8740 (c_parser_type_name): Likewise.
8741
acf0174b
JJ
87422013-10-11 Jakub Jelinek <jakub@redhat.com>
8743
8744 * c-lang.h (current_omp_declare_target_attribute): New extern
8745 decl.
8746 * c-parser.c: Include c-lang.h.
8747 (struct c_parser): Change tokens to c_token *.
8748 Add tokens_buf field. Change tokens_avail type to unsigned int.
8749 (c_parser_consume_token): If parser->tokens isn't
8750 &parser->tokens_buf[0], increment parser->tokens.
8751 (c_parser_consume_pragma): Likewise.
8752 (enum pragma_context): Add pragma_struct and pragma_param.
8753 (c_parser_external_declaration): Adjust
8754 c_parser_declaration_or_fndef caller.
8755 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
8756 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
8757 Adjust recursive call.
8758 (c_parser_struct_or_union_specifier): Use pragma_struct instead
8759 of pragma_external.
8760 (c_parser_parameter_declaration): Use pragma_param instead of
8761 pragma_external.
8762 (c_parser_compound_statement_nostart, c_parser_label,
8763 c_parser_for_statement): Adjust
8764 c_parser_declaration_or_fndef callers.
8765 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
8766 it through to c_parser_conditional_expression.
8767 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
8768 pass it through to c_parser_binary_expression. Adjust recursive
8769 call.
8770 (c_parser_binary_expression): Remove prec argument, add
8771 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
8772 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
8773 binop matches it, use build2 instead of parser_build_binary_op.
8774 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
8775 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
8776 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
8777 Handle pragma_struct and pragma_param the same as pragma_external.
8778 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
8779 (c_parser_omp_variable_list): Parse array sections for
8780 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
8781 (c_parser_omp_clause_collapse): Fully fold collapse expression.
8782 (c_parser_omp_clause_reduction): Handle user defined reductions.
8783 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
8784 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
8785 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
8786 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
8787 c_parser_omp_clause_depend, c_parser_omp_clause_map,
8788 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
8789 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
8790 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
8791 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
8792 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
8793 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
8794 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
8795 (c_parser_omp_for_loop): Add CODE argument, pass it through
8796 to c_finish_omp_for. Change last argument to cclauses,
8797 and adjust uses to grab parallel clauses from the array of all
8798 the split clauses. Adjust c_parser_binary_expression,
8799 c_parser_declaration_or_fndef and c_finish_omp_for callers.
8800 (omp_split_clauses): New function.
8801 (c_parser_omp_simd): New function.
8802 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
8803 Allow the function to be called also when parsing combined constructs,
8804 and call c_parser_omp_simd when parsing for simd.
8805 (c_parser_omp_sections_scope): If section-sequence doesn't start with
8806 #pragma omp section, require exactly one structured-block instead of
8807 sequence of statements.
8808 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
8809 Allow the function to be called also when parsing combined constructs.
8810 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
8811 Allow the function to be called also when parsing combined
8812 constructs.
8813 (c_parser_omp_taskgroup, c_parser_omp_cancel,
8814 c_parser_omp_cancellation_point, c_parser_omp_distribute,
8815 c_parser_omp_teams, c_parser_omp_target_data,
8816 c_parser_omp_target_update, c_parser_omp_target,
8817 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
8818 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
8819 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
8820 (c_parser_omp_construct): Add p_name and mask vars. Handle
8821 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
8822 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
8823 and c_parser_omp_sections callers.
8824 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
8825 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
8826 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
8827 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
8828 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
8829 OMP_CLAUSE_DEPEND.
8830 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
8831 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
8832 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
8833 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
8834 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
8835 * c-typeck.c: Include tree-inline.h.
8836 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
8837 handle_omp_array_sections_1, handle_omp_array_sections,
8838 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
8839 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
8840 user defined reductions.
8841 (c_tree_equal): New function.
8842 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
8843 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
8844 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
8845 c_check_omp_declare_reduction_r): New prototypes.
8846 * c-decl.c (current_omp_declare_target_attribute): New variable.
8847 (c_decl_attributes): New function.
8848 (start_decl, start_function): Use it instead of decl_attributes.
8849 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
8850 c_omp_reduction_decl, c_omp_reduction_lookup,
8851 c_check_omp_declare_reduction_r): New functions.
8852
0a6c2227
TT
88532013-09-25 Tom Tromey <tromey@redhat.com>
8854
8855 * Make-lang.in (c/gccspec.o): Remove.
8856 (CFLAGS-c/gccspec.o): New variable.
8857 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
8858 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
8859 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
8860
f3bc55f0
TT
88612013-09-25 Tom Tromey <tromey@redhat.com>
8862
8863 * Make-lang.in (c/gccspec.o): Don't use subshell.
8864
a24d975c
MP
88652013-09-18 Marek Polacek <polacek@redhat.com>
8866
8867 PR sanitize/58443
8868 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
8869 Remove unnecessary check.
8870
ce6923c5
MP
88712013-09-18 Marek Polacek <polacek@redhat.com>
8872
8873 PR sanitizer/58411
8874 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
8875 no_sanitize_undefined attribute.
8876
a1e51df9
KT
88772013-09-13 Kai Tietz <ktietz@redhat.com>
8878
8879 PR target/57848
8880 * c-decl.c (c_builtin_function_ext_scope): Remove
8881 wrong assumption that it is never called on prexisting
8882 symbol.
8883
0af94e6f
JR
88842013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8885
8886 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
8887
20059c8b
GDR
88882013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8889
8890 * c-objc-common.c (c_tree_printer): Tidy.
8891
de5a5fa1
MP
88922013-08-30 Marek Polacek <polacek@redhat.com>
8893
8894 * c-typeck.c (build_binary_op): Add division by zero and shift
8895 instrumentation.
8896
2531a1d9 88972013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 8898 Joseph Myers <joseph@codesourcery.com>
2531a1d9 8899
6e2bcc98 8900 PR c/35649
2531a1d9
JR
8901 * c-typeck.c (c_common_type): Prefer double_type_node over
8902 other REAL_TYPE types with the same precision.
8903 (convert_arguments): Likewise.
8904
025311c4
GDR
89052013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
8906
8907 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
8908 (c_initialize_diagnostics): Call a destructor for the early printer.
8909
da6ca2b5
GDR
89102013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8911
8912 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
8913 printer initialization.
8914
318cda85 89152013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 8916
318cda85
BI
8917 PR c/57490
8918 * c-array-notation.c (fix_conditional_array_notations_1): Added a
8919 check for truth values.
8920 (expand_array_notation_exprs): Added truth values case. Removed an
8921 unwanted else. Added for-loop to walk through subtrees in default
8922 case.
8923
b066401f
GDR
89242013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8925
8926 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
8927
fb48aadc
JM
89282013-07-23 Joseph Myers <joseph@codesourcery.com>
8929
8930 * c-parser.c (struct c_generic_association): Fix typo.
8931
433cc7b0
TT
89322013-07-23 Tom Tromey <tromey@redhat.com>
8933 Joseph Myers <joseph@codesourcery.com>
8934
8935 * c-parser.c (struct c_generic_association): New.
8936 (c_generic_association_d): New typedef.
8937 (c_parser_generic_selection): New function.
8938 (c_parser_postfix_expression): Handle RID_GENERIC.
8939
26d40c3d
JM
89402013-07-13 Jason Merrill <jason@redhat.com>
8941
8942 PR c++/57793
8943 * c-decl.c (finish_struct): Check for too-large class.
8944
ecdbd01a 89452013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8946
8947 PR c/57821
8948 * c-typeck.c (set_init_index): When folding, check for index overflow.
8949
1141ed3f
BI
89502013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8951
8952 * c-parser.c (c_parser_array_notation): Removed rejection of array
8953 notations in an array of function pointers.
8954
713b46fa
BI
89552013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8956
8957 * c-array-notation.c (make_triplet_val_inv): New function.
8958 (create_cmp_incr): Likewise.
8959 (create_array_refs): Likewise.
8960 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8961 Also modularized common parts between functions and called the function.
8962 (build_array_notation_expr): Likewise.
8963 (fix_conditional_array_notations_1): Likewise.
8964 (fix_array_notation_expr): Likewise.
8965 (fix_array_notation_call_expr): Likewise.
8966
92f20202
MP
89672013-06-18 Marek Polacek <polacek@redhat.com>
8968
8969 PR c/57630
8970 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8971
73a23b06
BI
89722013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8973
8974 * c-array-notation.c (build_array_notation_expr): Reject array notation
8975 mismatch between LHS and RHS even inside a call_expr. Also, removed
8976 a couple while statements that were dead code.
8977
00b8517d
BI
89782013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8979
8980 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8981 excessive precision expressions in function parameters. Also removed
8982 couple unwanted while statements.
8983
1509bdda
BI
89842013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8985
8986 * c-array-notation.c (expand_array_notation_exprs): Added
8987 ARRAY_NOTATION_REF case.
ab20d992 8988
d60f1706
BI
89892013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8990
8991 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8992 function to c-family/array-notation-common.c.
8993 (is_cilkplus_reduce_builtin): Likewise.
8994 (find_rank): Likewise.
8995 (extract_array_notation_exprs): Likewise.
8996 (replace_array_notations): Likewise.
8997 (find_inv_trees): Likewise.
8998 (replace_inv_trees): Likewise.
8999 (contains_array_notation_expr): Likewise.
9000 (find_correct_array_notation_type): Likewise.
9001 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
9002 (struct inv_list): Moved this to c-family/array-notation-common.c.
9003 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 9004
6d6efbb3
BI
90052013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
9006
9007 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
9008 reduction functions outside the for-loop. Added a check if the fundecl
9009 is non-NULL. Finally, removed an unwanted if-statement, and made the
9010 body unconditional.
9011
25c22937
BI
90122013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9013
9014 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
9015 condition of the if-statement matches the rank of else-block and then-
9016 block when array notations are used.
9017 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
9018 expression after the entire function body is parsed.
9019 (c_parser_expr_no_commas): Delayed creating array notation expressions
9020 to the end of function parsing.
9021 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
9022 whole if-statement instead of just the condition.
ab20d992 9023 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 9024
edd25645
BI
90252013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9026
9027 PR c/57474
9028 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
9029 array to NULL_TREE if they are unused. Also added a check for the
9030 field to be NULL before its fields are used in future.
ab20d992 9031
065ce7f1
RO
90322013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9033
9034 PR bootstrap/57450
9035 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
9036 (build_array_notation_expr): Likewise.
9037
36536d79
BI
90382013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9039
9040 * c-typeck.c (build_array_ref): Added a check to see if array's
9041 index is greater than one. If true, then emit an error.
9042 (build_function_call_vec): Exclude error reporting and checking
9043 for builtin array-notation functions.
9044 (convert_arguments): Likewise.
9045 (c_finish_return): Added a check for array notations as a return
9046 expression. If true, then emit an error.
9047 (c_finish_loop): Added a check for array notations in a loop
9048 condition. If true then emit an error.
9049 (lvalue_p): Added a ARRAY_NOTATION_REF case.
9050 (build_binary_op): Added a check for array notation expr inside
9051 op1 and op0. If present, we call another function to find correct
9052 type.
9053 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
9054 * c-parser.c (c_parser_compound_statement): Check if array
9055 notation code is used in tree, if so, then transform them into
9056 appropriate C code.
9057 (c_parser_expr_no_commas): Check if array notation is used in LHS
9058 or RHS, if so, then build array notation expression instead of
9059 regular modify.
9060 (c_parser_postfix_expression_after_primary): Added a check for
9061 colon(s) after square braces, if so then handle it like an array
9062 notation. Also, break up array notations in unary op if found.
9063 (c_parser_direct_declarator_inner): Added a check for array
9064 notation.
9065 (c_parser_compound_statement): Added a check for array notation in
9066 a stmt. If one is present, then expand array notation expr.
9067 (c_parser_if_statement): Likewise.
9068 (c_parser_switch_statement): Added a check for array notations in
9069 a switch statement's condition. If true, then output an error.
9070 (c_parser_while_statement): Similarly, but for a while.
9071 (c_parser_do_statement): Similarly, but for a do-while.
9072 (c_parser_for_statement): Similarly, but for a for-loop.
9073 (c_parser_unary_expression): Check if array notation is used in a
9074 pre-increment or pre-decrement expression. If true, then expand
9075 them.
9076 (c_parser_array_notation): New function.
9077 * c-array-notation.c: New file.
9078 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 9079
cd192ccc
MS
90802013-05-23 Mike Stump <mikestump@comcast.net>
9081
9082 * c-typeck.c (convert_for_assignment): Handle references to memory
9083 spaces better.
9084
427b248d
JM
90852013-05-16 Jason Merrill <jason@redhat.com>
9086
9087 * Make-lang.in (cc1$(exeext)): Use link mutex.
9088
44d90fe1
PC
90892013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9090
9091 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
9092 to simply use OPT_Wpointer_arith.
9093 (build_unary_op): Likewise.
9094
4e7d7b3d
JJ
90952013-04-03 Jakub Jelinek <jakub@redhat.com>
9096
9097 PR c/19449
9098 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
9099 argument. If set, or it temporarily for parsing of the first
9100 argument into force_folding_builtin_constant_p.
9101 (c_parser_postfix_expression): Adjust callers.
9102
839b422f
RB
91032013-03-21 Richard Biener <rguenther@suse.de>
9104
9105 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
9106 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
9107
2ee028f1
MP
91082013-02-12 Marek Polacek <polacek@redhat.com>
9109
9110 PR c/44938
9111 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
9112 origtypes to NULL.
9113
8824edff
JJ
91142013-01-24 Jakub Jelinek <jakub@redhat.com>
9115
9116 PR c/56078
9117 * c-typeck.c (set_nonincremental_init_from_string): If
9118 constructor_max_index is NULL, treat it as if tree_int_cst_lt
9119 returned false.
9120 (process_init_element): Likewise.
9121
eadd3d0d
JJ
91222012-12-20 Jakub Jelinek <jakub@redhat.com>
9123
9124 PR c++/55619
9125 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
9126 argument, don't call default_function_array_conversion
9127 nor c_fully_fold here.
9128 (c_parser_asm_statement): Adjust callers.
9129 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
9130 and outputs here, and call default_function_array_conversion
9131 on inputs that don't need to be addressable.
9132
f8a93a2e
JJ
91332012-12-18 Jakub Jelinek <jakub@redhat.com>
9134
9135 PR c/39464
9136 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
9137 warning require that both c_common_unsigned_type as well as
9138 c_common_signed_type is the same for both mvl and mvr types.
9139
9771b263
DN
91402012-11-16 Diego Novillo <dnovillo@google.com>
9141
9142 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
9143
9144 * c-common.c: Use new vec API in vec.h.
9145 * c-common.h: Likewise.
9146 * c-gimplify.c: Likewise.
9147 * c-pragma.c: Likewise.
9148 * c-pretty-print.c: Likewise.
9149 * c-pretty-print.h: Likewise.
9150 * c-semantics.c: Likewise.
9151 * c-decl.c: Likewise.
9152 * c-parser.c: Likewise.
9153 * c-tree.h: Likewise.
9154 * c-typeck.c: Likewise.
9155
880661a4
JW
91562012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9157
9158 PR c++/54930
9159 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
9160
077d1abe
MLI
91612012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9162
9163 PR c/53066
9164 * c-decl.c (warn_if_shadowing): Do not warn if a variable
9165 shadows a function, unless the variable is a function or a
9166 pointer-to-function.
9167
3a785c97
JJ
91682012-10-12 Jakub Jelinek <jakub@redhat.com>
9169
9170 PR c/54381
9171 * c-parser.c (struct c_tree_loc_pair): Removed.
9172 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
9173 add location_t * and tree * arguments, fill in array of 3
9174 sizeof_arg trees and corresponding locs.
9175 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
9176 c_parser_expr_list callers.
9177 (c_parser_postfix_expression_after_primary): Likewise. Pass
9178 array of 3 sizeof_arg trees and locs (corresponding to first
9179 3 arguments) to sizeof_pointer_memaccess_warning.
9180
703c8606
LC
91812012-10-09 Lawrence Crowl <crowl@google.com>
9182
9183 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
9184 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
9185 hash table.
9186
5d9de0d0
PC
91872012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9188
9189 PR c++/54194
9190 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
9191 call.
9192
a212e43f
MG
91932012-10-09 Marc Glisse <marc.glisse@inria.fr>
9194
9195 PR c++/54427
9196 * c-typeck.c: Include c-common.h.
9197 (enum stv_conv): Moved to c-common.h.
9198 (scalar_to_vector): Moved to c-common.c.
9199 (build_binary_op): Adapt to scalar_to_vector's new prototype.
9200 * Make-lang.in: c-typeck.c depends on c-common.h.
9201
3b78de56
AC
92022012-10-04 Arnaud Charlet <charlet@adacore.com>
9203
9204 * c-decl.c (c_write_global_declarations): Fix handling of
9205 -fdump-ada-spec*.
9206
78c60e3d
SS
92072012-09-30 Sharad Singhai <singhai@google.com>
9208
9209 * c-decl.c (c_write_global_declarations): Use a different method
9210 to determine if the dump has ben initialized.
9211
9f33203d
JM
92122012-09-14 Joseph Myers <joseph@codesourcery.com>
9213
9214 PR c/54552
9215 * c-typeck.c (c_cast_expr): When casting to a type requiring
9216 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
9217 c_fully_fold first.
9218
a27d595d
JM
92192012-09-14 Joseph Myers <joseph@codesourcery.com>
9220
9221 PR c/54103
9222 * c-typeck.c (build_unary_op): Pass original argument of
9223 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
9224 any C_MAYBE_CONST_EXPR, if it has integer operands.
9225 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
9226 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
9227 to c_objc_common_truthvalue_conversion, then remove any
9228 C_MAYBE_CONST_EXPR, if they have integer operands. Use
9229 c_objc_common_truthvalue_conversion not
9230 c_common_truthvalue_conversion.
9231 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
9232 call note_integer_operands for arguments with integer operands
9233 that are not integer constants.
9234
9feb29df
JJ
92352012-09-13 Jakub Jelinek <jakub@redhat.com>
9236
9237 PR c/54559
9238 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
9239 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
9240
d409320c
JJ
92412012-08-31 Jakub Jelinek <jakub@redhat.com>
9242
9243 PR c/54428
9244 * c-convert.c (convert): Don't call fold_convert_loc if
9245 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
9246 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
9247 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
9248
6265d07c
JJ
92492012-08-24 Jakub Jelinek <jakub@redhat.com>
9250
9251 PR c/54355
9252 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
9253 for nested and empty_ok arguments in the call to
9254 c_parser_declaration_or_fndef.
9255
1a4049e7
JJ
92562012-08-17 Jakub Jelinek <jakub@redhat.com>
9257
9258 * c-tree.h (c_last_sizeof_arg): Declare.
9259 * c-parser.c (struct c_tree_loc_pair): New type.
9260 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
9261 non-NULL.
9262 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
9263 (c_parser_postfix_expression_after_primary): Likewise. Call
9264 sizeof_pointer_memaccess_warning if needed.
9265 (sizeof_ptr_memacc_comptypes): New function.
9266 * c-typeck.c (c_last_sizeof_arg): New global variable.
9267 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
9268
0229aee9
UB
92692012-07-24 Uros Bizjak <ubizjak@gmail.com>
9270
9271 * c-lang.h (lang_decl): Add variable_size GTY option.
9272
7ee2468b
SB
92732012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9274
9275 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
9276 * Make-lang.in: Fix dependencies.
9277
d4a10d0a
SB
92782012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9279
9280 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
9281 and add language Makefile hooks.
9282 * config-lang.in: New file.
9283 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
9284 add the required "normal" config-lang.in rules.
9285 * c-lang.h: Moved from gcc/ to here.
9286 * c-tree.h: Likewise.
9287 * c-objc-common.c: Likewise.
9288 * c-objc-common.h: Likewise.
9289 * c-typeck.c: Likewise.
9290 * c-convert.c: Likewise.
9291 * c-lang.c: Likewise.
9292 * c-aux-info.c: Likewise.
9293 * c-errors.c: Likewise.
9294 * gccspec.c: Likewise.
9295 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
9296 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
9297\f
68127a8e 9298Copyright (C) 2012-2023 Free Software Foundation, Inc.
d4a10d0a
SB
9299
9300Copying and distribution of this file, with or without modification,
9301are permitted in any medium without royalty provided the copyright
9302notice and this notice are preserved.