]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
RISC-V: Enable vec_int testsuite for RVV VLA vectorization
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
a134b6ce
GA
12023-09-06 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/102989
4 * c-decl.cc (finish_declspecs): Emit pedwarn_c11 on _BitInt.
5 * c-typeck.cc (c_common_type): Emit sorry for common type between
6 _Complex integer and larger _BitInt and return the _Complex integer.
7
82023-09-06 Jakub Jelinek <jakub@redhat.com>
9
10 PR c/102989
11 * c-convert.cc (c_convert): Handle BITINT_TYPE like INTEGER_TYPE.
12 * c-decl.cc (check_bitfield_type_and_width): Allow BITINT_TYPE
13 bit-fields.
14 (finish_struct): Prefer to use BITINT_TYPE for BITINT_TYPE bit-fields
15 if possible.
16 (declspecs_add_type): Formatting fixes. Handle cts_bitint. Adjust
17 for added union in *specs. Handle RID_BITINT.
18 (finish_declspecs): Handle cts_bitint. Adjust for added union
19 in *specs.
20 * c-parser.cc (c_keyword_starts_typename, c_token_starts_declspecs,
21 c_parser_declspecs, c_parser_gnu_attribute_any_word): Handle
22 RID_BITINT.
23 (c_parser_omp_clause_schedule): Handle BITINT_TYPE like INTEGER_TYPE.
24 * c-tree.h (enum c_typespec_keyword): Mention _BitInt in comment.
25 Add cts_bitint enumerator.
26 (struct c_declspecs): Move int_n_idx and floatn_nx_idx into a union
27 and add bitint_prec there as well.
28 * c-typeck.cc (c_common_type, comptypes_internal):
29 Handle BITINT_TYPE.
30 (perform_integral_promotions): Promote BITINT_TYPE bit-fields to
31 their declared type.
32 (build_array_ref, build_unary_op, build_conditional_expr,
33 build_c_cast, convert_for_assignment, digest_init, build_binary_op):
34 Handle BITINT_TYPE.
35 * c-fold.cc (c_fully_fold_internal): Handle BITINT_TYPE like
36 INTEGER_TYPE.
37 * c-aux-info.cc (gen_type): Handle BITINT_TYPE.
38
392023-09-06 Jakub Jelinek <jakub@redhat.com>
40
41 * c-decl.cc (declspecs_add_type): Use pedwarn_c11 rather than pedwarn
42 for _FloatN{,x} diagnostics and append " before C2X" to the diagnostic
43 text.
44
4388bc82
GA
452023-09-05 Tobias Burnus <tobias@codesourcery.com>
46
47 * c-parser.cc (c_parser_omp_clause_allocate): Handle
48 error_mark_node.
49
b8863640
GA
502023-08-25 Sandra Loosemore <sandra@codesourcery.com>
51
52 * c-parser.cc (struct c_parser): Add omp_for_parse_state field.
53 (struct omp_for_parse_data): New.
54 (check_omp_intervening_code): New.
55 (add_structured_block_stmt): New.
56 (c_parser_compound_statement_nostart): Recognize intervening code,
57 nested loops, and other things that need special handling in
58 OpenMP loop constructs.
59 (c_parser_while_statement): Error on loop in intervening code.
60 (c_parser_do_statement): Likewise.
61 (c_parser_for_statement): Likewise.
62 (c_parser_postfix_expression_after_primary): Error on calls to
63 the OpenMP runtime in intervening code.
64 (c_parser_pragma): Error on OpenMP pragmas in intervening code.
65 (c_parser_omp_loop_nest): New.
66 (c_parser_omp_for_loop): Rewrite to use recursive descent, calling
67 c_parser_omp_loop_nest to do the heavy lifting.
68
6d47c9b4
GA
692023-08-24 Richard Sandiford <richard.sandiford@arm.com>
70
71 * c-parser.cc (c_parser_std_attribute): Conditionally allow
72 two colons to be used in place of ::.
73 (c_parser_std_attribute_list): New function, split out from...
74 (c_parser_std_attribute_specifier): ...here. Allow the attribute-list
75 to start with __extension__. When it does, also allow two colons
76 to be used in place of ::.
77
6cd85273
GA
782023-08-22 Tobias Burnus <tobias@codesourcery.com>
79
80 * c-parser.cc (c_parser_omp_clause_defaultmap): Parse
81 'all' as category.
82
1eb2433f
GA
832023-08-17 Jose E. Marchesi <jose.marchesi@oracle.com>
84
85 PR c/106537
86 * c-typeck.cc (build_binary_op): Warning on comparing distinct
87 pointer types only when -Wcompare-distinct-pointer-types.
88
b01e96f8
GA
892023-08-15 Chung-Lin Tang <cltang@codesourcery.com>
90 Thomas Schwinge <thomas@codesourcery.com>
91
92 * c-parser.cc (OACC_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
93
886afed6
GA
942023-08-11 Jakub Jelinek <jakub@redhat.com>
95
96 * c-parser.cc (c_parser_typeof_specifier): Handle
97 __typeof_unqual and __typeof_unqual__ as !is_std.
98
992023-08-11 Martin Uecker <uecker@tugraz.at>
100
101 PR c/84510
102 * c-typeck.cc (build_c_cast): Add warning.
103
87b0749c
GA
1042023-08-05 Martin Uecker <uecker@tugraz.at>
105
106 * c-parser.cc (c_parser_generic_selection): Inhibit evaluation
107 warnings branches that are known not be taken during parsing.
108
5b42ee2c
GA
1092023-08-04 Tamar Christina <tamar.christina@arm.com>
110
111 * c-parser.cc (c_parser_while_statement, c_parser_do_statement,
112 c_parser_for_statement, c_parser_statement_after_labels,
113 c_parse_pragma_novector, c_parser_pragma): Wire through novector and
114 default to false.
115
4297a08e
GA
1162023-08-02 Eric Feng <ef2648@columbia.edu>
117
118 PR analyzer/107646
119 * c-parser.cc: New functions on stashing values for the
120 analyzer.
121
cf58b896
GA
1222023-08-01 Lewis Hyatt <lhyatt@gmail.com>
123
124 * c-parser.cc (pragma_lex_discard_to_eol): New function.
125 (c_init_preprocess): New function.
126
a2f31d79
GA
1272023-07-31 Hamza Mahfooz <someguy@effective-light.com>
128
129 PR c/65213
130 * c-decl.cc (start_decl): Handle
131 -Wmissing-variable-declarations.
132
1332023-07-31 Chung-Lin Tang <cltang@codesourcery.com>
134
135 * c-parser.cc (c_parser_oacc_host_data): Add checking requiring OpenACC
136 host_data construct to have an use_device clause.
137
14bfda60
GA
1382023-06-29 Qing Zhao <qing.zhao@oracle.com>
139
140 PR c/77650
141 * c-decl.cc (finish_struct): Issue warnings for new option.
142
1432023-06-29 Qing Zhao <qing.zhao@oracle.com>
144
145 * c-decl.cc (finish_struct): Set TYPE_INCLUDES_FLEXARRAY for
146 struct/union type.
147
1482023-06-29 Richard Biener <rguenther@suse.de>
149
150 PR c/110454
151 * c-typeck.cc (convert_argument): Sink formal_prec compute
152 to where TYPE_PRECISION is valid to use.
153
1542023-06-29 Eugene Rozenfeld <erozen@microsoft.com>
155
156 * Make-lang.in: Pass correct stage cc1 when processing
157 profile data collected while building target libraries
158
f10a4ce0
GA
1592023-06-16 David Malcolm <dmalcolm@redhat.com>
160
161 PR c/107583
162 * c-parser.cc (c_parser_declspecs): Add hints to "unknown type
163 name" error.
164
9d250bdb
GA
1652023-06-12 Tobias Burnus <tobias@codesourcery.com>
166
167 * c-parser.cc (c_parser_omp_clause_map): Reword error message for
168 clearness especially with 'omp target (enter/exit) data.'
169
4f0d4825
GA
1702023-06-06 Kwok Cheung Yeung <kcy@codesourcery.com>
171 Tobias Burnus <tobias@codesourcery.com>
172
173 * c-parser.cc (c_parser_omp_clause_defaultmap,
174 c_parser_omp_clause_map): Parse 'present'.
175 (c_parser_omp_clause_to, c_parser_omp_clause_from): Remove.
176 (c_parser_omp_clause_from_to): New; parse to/from clauses with
177 optional present modifer.
178 (c_parser_omp_all_clauses): Update call.
179 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
180 c_parser_omp_target_exit_data): Handle new map enum values
181 for 'present' mapping.
182
df2762ac
GA
1832023-05-30 Tobias Burnus <tobias@codesourcery.com>
184
185 PR c/109999
186 * c-parser.cc (c_parser_oacc_all_clauses,
187 c_parser_omp_all_clauses): Improve error wording.
188
03c7c418
GA
1892023-05-23 Martin Uecker <uecker@tugraz.at>
190
191 PR c/109450
192 * c-decl.cc (add_decl_expr): New function.
193 (grokdeclarator): Add decl expr for size expression in
194 types pointed to by parameters declared as arrays.
195
1962023-05-23 Martin Uecker <uecker@tugraz.at>
197
198 PR c/70418
199 PR c/106465
200 PR c/107557
201 PR c/108423
202 * c-decl.cc (start_decl): Make sure size expression are
203 evaluated only in correct context.
204 (grokdeclarator): Size expression in fields may need a bind
205 expression, make sure DECL_EXPR is always created.
206 (grokfield, declspecs_add_type): Pass along size expressions.
207 (finish_struct): Remove unneeded DECL_EXPR.
208 (start_function): Evaluate size expressions for nested functions.
209 * c-parser.cc (c_parser_struct_declarations,
210 c_parser_struct_or_union_specifier): Pass along size expressions.
211 (c_parser_declaration_or_fndef): Evaluate size expression.
212 (c_parser_objc_at_property_declaration,
213 c_parser_objc_class_instance_variables): Adapt.
214 * c-tree.h (grokfield): Adapt declaration.
215
5df01f89
GA
2162023-05-19 Martin Uecker <uecker@tugraz.at>
217
218 * c-decl.cc (set_type_context): Remove.
219 (pop_scope, diagnose_mismatched_decls, pushdecl):
220 Remove dead code.
221 * c-typeck.cc (comptypes_internal): Remove dead code.
222 (same_translation_unit_p): Remove.
223 (tagged_types_tu_compatible_p): Some fixes.
224
2252023-05-19 Joseph Myers <joseph@codesourcery.com>
226
227 * c-decl.cc (diagnose_mismatched_decls): Do not handle
228 thread-local declarations as tentative definitions for C2x.
229 (finish_decl): Do not allow thread-local definition with
230 incomplete type for C2x.
231
b2776076
GA
2322023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
233
234 * c-convert.cc (c_convert): Ditto.
235 * c-decl.cc (merge_decls): Ditto.
236 * c-parser.cc (c_parser_omp_clause_reduction): Ditto.
237 (c_parser_omp_declare_reduction): Ditto.
238 * c-typeck.cc (build_component_ref): Ditto.
239 (convert_argument): Ditto.
240 (pointer_diff): Ditto.
241 (build_unary_op): Ditto.
242 (build_c_cast): Ditto.
243 (build_modify_expr): Ditto.
244 (store_init_value): Ditto.
245 (constexpr_init_fits_real_type): Ditto.
246 (check_constexpr_init): Ditto.
247 (c_finish_return): Ditto.
248 (handle_omp_array_sections_1): Ditto.
249 (c_finish_omp_clauses): Ditto.
250 * gimple-parser.cc (c_finish_gimple_return): Ditto.
251
0d566057
GA
2522023-05-16 Joseph Myers <joseph@codesourcery.com>
253
254 * c-decl.cc (check_for_loop_decls): Use pedwarn_c11 for
255 diagnostics.
256
3427b51b
GA
2572023-05-15 Joseph Myers <joseph@codesourcery.com>
258
259 * c-decl.cc (grokdeclarator): Ignore _Atomic on function return
260 type for C2x.
261
4d68c7f7
GA
2622023-04-30 Andrew Pinski <apinski@marvell.com>
263
264 * c-typeck.cc (process_init_element): Print out array type
265 for excessive elements.
266
2672023-04-30 Andrew Pinski <apinski@marvell.com>
268
269 PR c/107926
270 * c-typeck.cc (process_init_element): Move the check
271 for string cst until after the error message.
272
50205195
GA
2732023-04-28 Eugene Rozenfeld <erozen@microsoft.com>
274
275 * Make-lang.in: Merge perf data collected when compiling cc1 and runtime libraries
276
32a98ccd
GA
2772023-04-27 Jakub Jelinek <jakub@redhat.com>
278
279 PR c/109409
280 * c-parser.cc (c_parser_initializer): Move diagnostics about
281 initialization of variable sized object with non-empty initializer
282 after c_parser_expr_no_commas call and ret.set_error (); after it.
283
2842023-04-27 Jakub Jelinek <jakub@redhat.com>
285
286 PR c/107682
287 PR c/109412
288 * c-typeck.cc (pop_init_level): If constructor_type is FUNCTION_TYPE,
289 reject empty initializer as invalid.
290
4a3dbcbd
GA
2912023-04-26 Richard Biener <rguenther@suse.de>
292
293 * gimple-parser.cc (c_parser_parse_gimple_body): Avoid
294 last_stmt.
295
49cea02d
GA
2962023-04-25 Tobias Burnus <tobias@codesourcery.com>
297
298 * c-parser.cc (c_parser_omp_scan_loop_body): Handle
299 zero exec statements before/after 'omp scan'.
300
ce4e4f37
GA
3012023-04-20 Jakub Jelinek <jakub@redhat.com>
302
303 PR c/107041
304 * c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-mismatch
305 warning on acc_on_device declaration.
306
579cdc1e
GA
3072023-03-28 David Malcolm <dmalcolm@redhat.com>
308
309 PR c/107002
310 * c-typeck.cc (parser_build_binary_op): Update for new param of
311 check_for_xor_used_as_pow.
312
c8065441
GA
3132023-03-10 Jakub Jelinek <jakub@redhat.com>
314
315 PR c/108079
316 * c-decl.cc (pop_scope): Suppress OPT_Wunused_variable warning
317 after diagnosing it.
318
6f9e2f14
GA
3192023-02-28 Jakub Jelinek <jakub@redhat.com>
320
321 PR sanitizer/108894
322 * c-decl.cc (strict_flex_array_level_of): Move to c-common.cc
323 and rename to c_strict_flex_array_level_of.
324 (is_flexible_array_member_p): Adjust caller.
325
0263e9d5
GA
3262023-02-18 Martin Uecker <uecker@tugraz.at>
327
328 PR c/108375
329 * c-decl.cc (decl_jump_unsafe): Use c_type_variably_modified_p.
330 (diagnose_mismatched_decl): Dito.
331 (warn_about_goto): Dito:
332 (c_check_switch_jump_warnings): Dito.
333 (finish_decl): Dito.
334 (finish_struct): Dito.
335 (grokdeclarator): Set C_TYPE_VARIABLY_MODIFIED.
336 (finish_struct): Set C_TYPE_VARIABLY_MODIFIED.
337 * c-objc-common.cc (c_var_mod_p): New function.
338 (c_var_unspec_p): Remove.
339 * c-objc-common.h: Set lang hook.
340 * c-parser.cc (c_parser_declararion_or_fndef): Use c_type_variably_modified_p.
341 (c_parser_typeof_specifier): Dito.
342 (c_parser_has_attribute_expression): Dito.
343 (c_parser_generic_selection): Dito.
344 * c-tree.h: Define C_TYPE_VARIABLY_MODIFIED and define c_var_mode_p.
345 * c-typeck.cc: Remove c_vla_mod_p and use C_TYPE_VARIABLY_MODIFIED.
346
88cc4495
GA
3472023-02-16 Patrick Palka <ppalka@redhat.com>
348
349 * c-parser.h: Mechanically drop static from static inline
350 functions via s/^static inline/inline/g.
351
d7a47ed1
GA
3522023-02-10 Joseph Myers <joseph@codesourcery.com>
353
354 * c-convert.cc (c_convert): Allow conversion of a null pointer
355 constant to nullptr_t.
356 * c-typeck.cc (null_pointer_constant_p): Remove static.
357 (convert_for_assignment): Allow conversion of a null pointer
358 constant to nullptr_t.
359 (digest_init): Handle NULLPTR_TYPE among scalar conversions.
360 * c-tree.h (null_pointer_constant_p): Declare.
361
e92e2c96
GA
3622023-02-09 Tobias Burnus <tobias@codesourcery.com>
363
364 * c-parser.cc (c_parser_omp_allocate): Parse align
365 clause and check for restrictions.
366
f6fc79d0
GA
3672023-02-08 Joseph Myers <joseph@codesourcery.com>
368
369 * c-typeck.cc (check_constexpr_init): Remove argument
370 null_pointer_constant. Only check pointer initializers for being
371 null.
372 (digest_init): Update calls to check_constexpr_init.
373
a37a0cb3
GA
3742023-02-02 Joseph Myers <joseph@codesourcery.com>
375
376 * c-typeck.cc (build_binary_op): Allow comparisons between
377 pointers and nullptr_t values that are not null pointer constants.
378
3792023-02-02 Joseph Myers <joseph@codesourcery.com>
380
381 * c-typeck.cc: Include "realmpfr.h".
382 (constexpr_init_fits_real_type): Do not allow signaling NaN
383 conversions to different types with the same mode. Handle
384 conversions from binary to decimal types.
385 (check_constexpr_init): Do not disallow real initializers for
386 complex types. Do not disallow binary initializers for decimal
387 floating types.
388
317525b0
GA
3892023-01-31 Marek Polacek <polacek@redhat.com>
390
391 PR c++/107593
392 PR c++/108597
393 * c-objc-common.cc (instantiation_dependent_expression_p): New.
394
338eb0f0
GA
3952023-01-27 Joseph Myers <joseph@codesourcery.com>
396
397 * c-parser.cc (c_parser_declaration_or_fndef): Do not allow braces
398 around auto initializer.
399
f457a62e
GA
4002023-01-16 Jakub Jelinek <jakub@redhat.com>
401
402 PR c++/105593
403 * c-parser.cc (c_parser_initializer): Check warning_enabled_at
404 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
405 of warn_init_self.
406
5013c3bb
GA
4072023-01-14 Jakub Jelinek <jakub@redhat.com>
408
409 PR c++/108365
410 * c-typeck.cc (build_binary_op): Use may_shorten_divmod for integral
411 division or modulo.
412
4132023-01-13 Qing Zhao <qing.zhao@oracle.com>
414
415 * c-decl.cc (strict_flex_array_level_of): ... here.
416
81ed98bc
GA
4172023-01-11 Jakub Jelinek <jakub@redhat.com>
418
419 PR c/105972
420 * c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind
421 markers for K&R function parameter declarations of nested functions.
422
84723aca
GA
4232023-01-09 Joseph Myers <joseph@codesourcery.com>
424
425 * c-decl.cc (build_compound_literal): Call record_inline_static.
426
d808db1f
GA
4272023-01-06 Joseph Myers <joseph@codesourcery.com>
428
429 * c-parser.cc (c_parser_postfix_expression): Handle integer
430 generic arguments to functions passed to __builtin_tgmath as
431 _Float32x if any argument has _FloatNx or _Complex _FloatNx type.
432 Do not handle integer arguments to some narrowing functions as
433 _Float64.
434
d2ef2327
GA
4352022-12-19 Jakub Jelinek <jakub@redhat.com>
436
437 PR c/108043
438 * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
439 compound literals with function type.
440
4bc2d9f6
GA
4412022-12-07 Joseph Myers <joseph@codesourcery.com>
442
443 * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
444 auto, constexpr and a type used together.
445
3fe66f7f
GA
4462022-12-06 Qing Zhao <qing.zhao@oracle.com>
447
448 * c-decl.cc (is_flexible_array_member_p): Call new function
449 strict_flex_array_level_of.
450
9a1b4f1d
GA
4512022-11-24 Florian Weimer <fweimer@redhat.com>
452
453 PR c/107805
454 * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
455 from type to specs.
456
add89840
GA
4572022-11-17 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
458
459 * c-decl.cc (start_function): Set the result decl source
460 location to the location of the typespec.
461
4622022-11-17 David Malcolm <dmalcolm@redhat.com>
463
464 PR analyzer/107711
465 * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
466 to cpp_create_reader, rather than ident_hash, so that the new
467 reader gets its own hash table.
468
cdc34229
GA
4692022-11-15 David Malcolm <dmalcolm@redhat.com>
470
471 PR analyzer/106302
472 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
473 (class ana::c_translation_unit): New.
474 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
475
30d77d49
GA
4762022-11-12 Joseph Myers <joseph@codesourcery.com>
477
478 * c-decl.cc (start_underspecified_init)
479 (finish_underspecified_init): Handle name == NULL_TREE for
480 compound literals.
481 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
482 (shadow_tag_warned): Check for constexpr.
483 (start_decl): Add parameter do_push.
484 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
485 (grokdeclarator): Handle constexpr.
486 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
487 (declspecs_add_scspec): Handle constexpr.
488 * c-parser.cc (c_token_starts_compound_literal)
489 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
490 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
491 (c_parser_compound_literal_scspecs)
492 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
493 Update calls to start_init.
494 (c_parser_declaration_or_fndef, c_parser_initializer)
495 (c_parser_initval): Pass true for new argument of
496 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
497 constexpr compound literals.
498 (c_parser_static_assert_declaration_no_semi)
499 (c_parser_enum_specifier, c_parser_struct_declaration)
500 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
501 Call convert_lvalue_to_rvalue on expressions required to be
502 integer constant expressions.
503 (c_parser_omp_declare_reduction): Update call to start_init.
504 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
505 (C_DECL_DECLARED_CONSTEXPR): New macros.
506 (struct c_declspecs): Add constexpr_p.
507 (start_decl, convert_lvalue_to_rvalue, start_init): Update
508 prototypes.
509 * c-typeck.cc (require_constant_value, require_constant_elements):
510 Change to bool.
511 (require_constexpr_value, maybe_get_constexpr_init)
512 (constexpr_init_fits_real_type, check_constexpr_init): New.
513 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
514 maybe_get_constexpr_init.
515 (store_init_value): Update call to digest_init.
516 (digest_init): Add parameters int_const_expr, arith_const_expr and
517 require_constexpr. Check constexpr initializers.
518 (constructor_top_level): Remove.
519 (struct initializer_stack): Remove top_level. Add
520 require_constexpr_value.
521 (start_init): Remove parameter top_level. Add parameters
522 init_require_constant and init_require_constexpr. Save
523 require_constexpr_value on stack.
524 (pop_init_level): Use a null pointer constant for zero initializer
525 of pointer initialized with {}.
526 (output_init_element): Update call to digest_init. Avoid passing
527 null pointer constants of pointer type through digest_init a
528 second time when initializing a constexpr object.
529
d29260ce
GA
5302022-11-03 Joseph Myers <joseph@codesourcery.com>
531
532 * c-decl.cc (in_underspecified_init, start_underspecified_init)
533 (finish_underspecified_init): New.
534 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
535 Give errors inside initializers of underspecified declarations.
536 (grokdeclarator): Handle (erroneous) case of C2X auto on a
537 parameter.
538 (declspecs_add_type): Handle c2x_auto_p case.
539 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
540 C2X mode.
541 (finish_declspecs): Handle c2x_auto_p.
542 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
543 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
544 (struct c_declspecs): Add c2x_auto_p.
545 (start_underspecified_init, finish_underspecified_init): New
546 prototypes.
547 * c-typeck.cc (build_external_ref): Give error for underspecified
548 declaration referenced in its initializer.
549
3055829a
GA
5502022-10-28 Joseph Myers <joseph@codesourcery.com>
551
552 * c-decl.cc (grokdeclarator): Pass
553 arg_info->no_named_args_stdarg_p to build_function_type.
554 (grokparms): Check arg_info->no_named_args_stdarg_p before
555 converting () to (void).
556 (build_arg_info): Initialize no_named_args_stdarg_p.
557 (get_parm_info): Set no_named_args_stdarg_p.
558 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
559 build_function_type.
560 (store_parm_decls): Count (...) functions as prototyped.
561 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
562 parenthesis to start parameter list.
563 (c_parser_parms_list_declarator): Always allow '...' with no
564 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
565 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
566 * c-typeck.cc (composite_type): Handle
567 TYPE_NO_NAMED_ARGS_STDARG_P.
568 (function_types_compatible_p): Compare
569 TYPE_NO_NAMED_ARGS_STDARG_P.
570
5712022-10-28 Jakub Jelinek <jakub@redhat.com>
572
573 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
574 comma before the first clause.
575 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
576 c_parser_omp_flush, c_parser_omp_scan_loop_body,
577 c_parser_omp_ordered, c_finish_omp_declare_variant,
578 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
579 c_parser_omp_requires, c_parser_omp_error,
580 c_parser_omp_assumption_clauses): Likewise.
581
5822022-10-28 Joseph Myers <joseph@codesourcery.com>
583
584 PR c/61469
585 * c-convert.cc (c_convert): Handle enums with underlying boolean
586 type like bool.
587 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
588 enums with enum type specifier, but give errors for storage class
589 specifiers, qualifiers or alignment specifiers in non-definition
590 declarations of such enums.
591 (grokdeclarator): Give error for non-definition use of type
592 specifier with an enum type specifier.
593 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
594 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
595 (xref_tag): Update call to parser_xref_tag.
596 (start_enum): Add argument fixed_underlying_type. Complete enum
597 type with a fixed underlying type given in the definition. Give
598 error for defining without a fixed underlying type in the
599 definition if one was given in a prior declaration. Do not mark
600 enums with fixed underlying type as packed for -fshort-enums.
601 Store the enum type in the_enum.
602 (finish_enum): Do not adjust types of values or check their range
603 for an enum with a fixed underlying type. Set underlying type of
604 enum and variants.
605 (build_enumerator): Check enumeration constants for enum with
606 fixed underlying type against that type and convert to that type.
607 Increment in the underlying integer type, with handling for bool.
608 (c_simulate_enum_decl): Update call to start_enum.
609 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
610 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
611 rather than recomputing an underlying type based on size.
612 * c-parser.cc (c_parser_declspecs)
613 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
614 Set has_enum_type_specifier for type specifiers.
615 (c_parser_enum_specifier): Handle enum type specifiers.
616 (c_parser_struct_or_union_specifier): Update call to
617 parser_xref_tag.
618 (c_parser_omp_atomic): Check for boolean increment or decrement
619 using C_BOOLEAN_TYPE_P.
620 * c-tree.h (C_BOOLEAN_TYPE_P): New.
621 (struct c_typespec): Add has_enum_type_specifier.
622 (struct c_declspecs): Add enum_type_specifier_ref_p.
623 (struct c_enum_contents): Add enum_type.
624 (start_enum, parser_xref_tag): Update prototypes.
625 * c-typeck.cc (composite_type): Allow for enumerated types
626 compatible with bool.
627 (common_type, comptypes_internal, perform_integral_promotions):
628 Use ENUM_UNDERLYING_TYPE.
629 (parser_build_binary_op, build_unary_op, convert_for_assignment)
630 (c_finish_return, c_start_switch, build_binary_op): Check for
631 boolean types using C_BOOLEAN_TYPE_P.
632
4e939ae1
GA
6332022-10-24 Jakub Jelinek <jakub@redhat.com>
634
635 PR c++/107358
636 * c-typeck.cc (build_binary_op): Pass operands before excess precision
637 promotions to scalar_to_vector call.
638
6392022-10-24 Arsen Arsenović <arsen@aarsen.me>
640
641 * c-decl.cc (finish_function): Ignore hosted when deciding
642 whether to implicitly return zero, but check noreturn.
643 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
644 requirements to just MAIN_NAME_P when hosted, or `int main'
645 otherwise.
646
47a6ae56
GA
6472022-10-20 Richard Biener <rguenther@suse.de>
648
649 PR c/107305
650 PR c/107306
651 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
652 the parsed IL and zap the body on error.
653
21de009f
GA
6542022-10-18 Joseph Myers <joseph@codesourcery.com>
655
656 PR c/107164
657 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
658 with previous declaration visible.
659
6602022-10-18 Joseph Myers <joseph@codesourcery.com>
661
662 PR c/36113
663 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
664 convert all to the type of the enumeration. pedwarn if no integer
665 type fits all enumerators and default to
666 widest_integer_literal_type_node in that case. Otherwise pedwarn
667 for type wider than intmax_t.
668 (build_enumerator): pedwarn for enumerators outside the range of
669 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
670 enumerators outside the range of int. On overflow, attempt to
671 find a wider type that can hold the value of the next enumerator.
672 Do not convert value to type determined with
673 c_common_type_for_size.
674
baeec7cc
GA
6752022-10-14 Jakub Jelinek <jakub@redhat.com>
676
677 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
678 double.
679
6802022-10-14 Joseph Myers <joseph@codesourcery.com>
681
682 * c-decl.cc (build_compound_literal): Add parameter scspecs.
683 Handle storage class specifiers.
684 * c-parser.cc (c_token_starts_compound_literal)
685 (c_parser_compound_literal_scspecs): New.
686 (c_parser_postfix_expression_after_paren_type): Add parameter
687 scspecs. Call pedwarn_c11 for use of storage class specifiers.
688 Update call to build_compound_literal.
689 (c_parser_cast_expression, c_parser_sizeof_expression)
690 (c_parser_alignof_expression): Handle storage class specifiers for
691 compound literals. Update calls to
692 c_parser_postfix_expression_after_paren_type.
693 (c_parser_postfix_expression): Update syntax comment.
694 * c-tree.h (build_compound_literal): Update prototype.
695 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
696 register compound literal.
697
9ff6c33e
GA
6982022-10-07 Qing Zhao <qing.zhao@oracle.com>
699
700 * c-decl.cc (flexible_array_member_type_p): New function.
701 (one_element_array_type_p): Likewise.
702 (zero_length_array_type_p): Likewise.
703 (add_flexible_array_elts_to_size): Call new utility
704 routine flexible_array_member_type_p.
705 (is_flexible_array_member_p): New function.
706 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
707
629d04d3
GA
7082022-10-06 Joseph Myers <joseph@codesourcery.com>
709
710 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
711 and not C2x.
712 (c_keyword_starts_typename, c_token_starts_declspecs)
713 (c_parser_declspecs, c_parser_objc_selector): Handle
714 RID_TYPEOF_UNQUAL.
715 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
716 Distinguish typeof for C2x from __typeof__ for all standard
717 versions and typeof before C2x.
718 * c-typeck.cc (build_function_call_vec): Use unqualified version
719 of non-void return type.
720 (build_unary_op): Use unqualified type for increment and
721 decrement.
722
7232022-10-06 Jakub Jelinek <jakub@redhat.com>
724
725 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
726 call for holds clause on assume construct.
727
7282022-10-06 Jakub Jelinek <jakub@redhat.com>
729
730 PR c++/106654
731 * c-parser.cc (handle_assume_attribute): New function.
732 (c_parser_declaration_or_fndef): Handle assume attribute.
733 (c_parser_attribute_arguments): Add assume_attr argument,
734 if true, parse first argument as conditional expression.
735 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
736 c_parser_attribute_arguments callers.
737 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
738 assume attribute.
739
85872a69
GA
7402022-10-04 Jakub Jelinek <jakub@redhat.com>
741
742 * c-lang.h (struct c_omp_declare_target_attr): New type.
743 (current_omp_declare_target_attribute): Change type from
744 int to vec<c_omp_declare_target_attr, va_gc> *.
745 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
746 If last pushed directive was begin declare target, use different
747 wording and simplify format strings for easier translations.
748 (c_parser_omp_clause_device_type): Uncomment
749 check_no_duplicate_clause call.
750 (c_parser_omp_declare_target): Adjust for the
751 current_omp_declare_target_attribute type change, push { -1 }.
752 Use error_at rather than warning_at for declare target with
753 only device_type clauses.
754 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
755 (c_parser_omp_begin): Add begin declare target support.
756 (c_parser_omp_end): Adjust for the
757 current_omp_declare_target_attribute type change, adjust
758 diagnostics wording and simplify format strings for easier
759 translations.
760 * c-decl.cc (current_omp_declare_target_attribute): Change type from
761 int to vec<c_omp_declare_target_attr, va_gc> *.
762 (c_decl_attributes): Adjust for the
763 current_omp_declare_target_attribute type change. If device_type
764 was present on begin declare target, add "omp declare target host"
765 and/or "omp declare target nohost" attributes.
766
bbdcdf5c
GA
7672022-09-29 Joseph Myers <joseph@codesourcery.com>
768
769 * c-decl.cc (handle_std_noreturn_attribute): New function.
770 (std_attribute_table): Add _Noreturn and noreturn.
771
1f16a020
GA
7722022-09-27 Jakub Jelinek <jakub@redhat.com>
773
774 * c-lang.h (current_omp_begin_assumes): Declare.
775 * c-parser.cc: Include bitmap.h.
776 (c_parser_omp_end_declare_target): Rename to ...
777 (c_parser_omp_end): ... this. Handle also end assumes.
778 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
779 c_parser_omp_assumes, c_parser_omp_assume): New functions.
780 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
781 without corresponding #pragma omp end assumes.
782 (c_parser_pragma): Use %s in may only be used at file scope
783 diagnostics to decrease number of translatable messages. Handle
784 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
785 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
786 for it rather than c_parser_omp_end_declare_target.
787 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
788 * c-decl.cc (current_omp_begin_assumes): Define.
789
28a61ecd
GA
7902022-09-24 Jakub Jelinek <jakub@redhat.com>
791
792 PR c/106981
793 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
794 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
795 t2 have different types.
796
279c6715
GA
7972022-09-22 David Malcolm <dmalcolm@redhat.com>
798
799 PR c/106830
800 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
801 (c_parser_cast_expression): Likewise.
802 (c_parser_alignof_expression): Likewise.
803 (c_parser_postfix_expression_after_paren_type): Likewise.
804 (c_parser_postfix_expression_after_primary): Likewise.
805 (c_parser_expression): Likewise.
806 (c_parser_omp_variable_list): Likewise.
807 (c_parser_transaction_expression): Likewise.
808 * c-tree.h (c_expr::set_error): Likewise.
809 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
810 (parser_build_unary_op): Likewise.
811 (parser_build_binary_op): Likewise.
812 (digest_init): Likewise.
813 (pop_init_level): Likewise.
814 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
815
43be56c4
GA
8162022-09-19 Marek Polacek <polacek@redhat.com>
817
818 PR c/106947
819 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
820 notes.
821
d0fc05e8
GA
8222022-09-15 Richard Biener <rguenther@suse.de>
823
824 * c-decl.cc (build_void_list_node): Remove.
825
ff822367
GA
8262022-09-14 Julian Brown <julian@codesourcery.com>
827
828 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
829 on error.
830
fe2a8ce9
GA
8312022-09-07 Joseph Myers <joseph@codesourcery.com>
832
833 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
834 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
835 for C2x spellings of keywords.
836 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
837
25aeb922
GA
8382022-09-06 Jakub Jelinek <jakub@redhat.com>
839
840 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
841 in omp_cur_iteration - 1 has integer_type_node type.
842
83f2f228
GA
8432022-09-03 Jakub Jelinek <jakub@redhat.com>
844
845 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
846 (c_parser_omp_clause_depend_sink): Renamed to ...
847 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
848 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
849 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
850 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
851 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
852 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
853 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
854 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
855 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
856 (c_parser_omp_clause_doacross): New function.
857 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
858 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
859 OMP_CLAUSE_DEPEND_SOURCE.
860 (c_parser_omp_for_loop): Don't diagnose here linear clause together
861 with ordered with argument.
862 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
863 for simd.
864 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
865 (c_parser_omp_ordered): Handle also doacross and adjust for it
866 diagnostic wording.
867 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
868 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
869
c64b0947
GA
8702022-09-02 David Malcolm <dmalcolm@redhat.com>
871
872 PR c/90885
873 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
874 (c_parser_expr_no_commas): Likewise.
875 (c_parser_conditional_expression): Likewise.
876 (c_parser_binary_expression): Clear m_decimal when popping the
877 stack.
878 (c_parser_unary_expression): Clear ret.m_decimal.
879 (c_parser_has_attribute_expression): Likewise for result.
880 (c_parser_predefined_identifier): Likewise for expr.
881 (c_parser_postfix_expression): Likewise for expr.
882 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
883 token.
884 * c-tree.h (c_expr::m_decimal): New bitfield.
885 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
886 (parser_build_binary_op): Call check_for_xor_used_as_pow.
887
bb0a1556
GA
8882022-09-01 Joseph Myers <joseph@codesourcery.com>
889
890 * c-decl.cc (grokparms): Handle () in a function declaration the
891 same as (void) for C2X.
892
542c60c4
GA
8932022-08-31 Joseph Myers <joseph@codesourcery.com>
894
895 * c-parser.cc (c_parser_label): Pass attributes to do_case.
896 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
897 c_add_case_label.
898
16f542d6
GA
8992022-08-26 Jakub Jelinek <jakub@redhat.com>
900
901 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
902
5d4389dc
GA
9032022-08-25 Marek Polacek <polacek@redhat.com>
904
905 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
906 Give a better diagnostic when converting to nullptr_t.
907 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
908 initialization.
909 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
910 (c_parser_postfix_expression): Handle RID_NULLPTR.
911 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
912 nullptr_node.
913 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
914 (build_conditional_expr): Handle the case when the second/third operand
915 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
916 (convert_for_assignment): Handle converting an expression of type
917 nullptr_t to pointer/bool.
918 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
919 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
920
9212022-08-25 Joseph Myers <joseph@codesourcery.com>
922
923 * c-decl.cc (start_decl): Do not diagnose initialization of
924 variable-sized objects here.
925 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
926 callers changed.
927 (c_parser_initializer): Diagnose initialization of variable-sized
928 objects other than with braced initializer.
929 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
930 braces and update diagnostic text. Diagnose initialization of
931 variable-sized objects with nonempty braces.
932 * c-typeck.cc (digest_init): Update diagnostic for initialization
933 of variable-sized objects.
934 (really_start_incremental_init, set_designator)
935 (process_init_element): Update comments.
936 (pop_init_level): Allow scalar empty initializers.
937
0342f034
GA
9382022-08-17 Tobias Burnus <tobias@codesourcery.com>
939 Chung-Lin Tang <cltang@codesourcery.com>
940
941 PR c++/104493
942 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
943 instead of removed langhook.
944 * c-typeck.cc (c_finish_omp_clauses): Likewise.
945
5cd525f0
GA
9462022-08-11 Marek Polacek <polacek@redhat.com>
947
948 PR middle-end/102633
949 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
950 Call suppress_warning.
951 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
952 (c_parser_omp_declare_reduction): Pass omp_priv down to
953 c_parser_initializer.
954
5f17badb
GA
9552022-08-08 Tom Honermann <tom@honermann.net>
956
957 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
958 of CPP_UTF8STRING when char8_t support is enabled.
959 * c-typeck.cc (digest_init): Allow initialization of an array
960 of character type by a string literal with type array of
961 char8_t.
962
32510382
GA
9632022-08-01 David Malcolm <dmalcolm@redhat.com>
964
965 * c-typeck.cc (build_c_cast): Quote names of address spaces in
966 diagnostics.
967 (convert_for_assignment): Add a note to address space mismatch
968 diagnostics, specifying the expected and actual types.
969
b53ebbc5
GA
9702022-07-10 Lewis Hyatt <lhyatt@gmail.com>
971
972 PR preprocessor/97498
973 * c-parser.cc (c_parser_pragma): Set input_location to the
974 location of the pragma, rather than the start of the line.
975
8467574d
GA
9762022-07-04 Tobias Burnus <tobias@codesourcery.com>
977 Chung-Lin Tang <cltang@codesourcery.com>
978 Thomas Schwinge <thomas@codesourcery.com>
979
980 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
981 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
982 OMP_REQUIRES_TARGET_USED.
983 (c_parser_omp_requires): Remove sorry.
984
ed974488
GA
9852022-07-01 Tobias Burnus <tobias@codesourcery.com>
986
987 * c-parser.cc (c_parser_omp_target_enter_data,
988 c_parser_omp_target_exit_data): Accept tofrom
989 map-type modifier but use 'to' / 'from' internally.
990
bc7e9f76
GA
9912022-06-16 David Malcolm <dmalcolm@redhat.com>
992
993 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
994 group the warning with any note.
995 (warn_about_goto): Likewise to group error or warning with note.
996 Bail out if the warning wasn't emitted, to avoid emitting orphan
997 notes.
998 (lookup_label_for_goto): Add auto_diagnostic_group to
999 group the error with the note.
1000 (check_earlier_gotos): Likewise.
1001 (c_check_switch_jump_warnings): Likewise for any error/warning.
1002 Conditionalize emission of the notes.
1003 (diagnose_uninitialized_cst_member): Likewise for warning,
1004 conditionalizing emission of the note.
1005 (grokdeclarator): Add auto_diagnostic_group to group the "array
1006 type has incomplete element type" error with any note.
1007 (parser_xref_tag): Add auto_diagnostic_group to group warnings
1008 with their notes. Conditionalize emission of notes.
1009 (start_struct): Add auto_diagnostic_group to group the
1010 "redefinition of" errors with any note.
1011 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
1012 (check_for_loop_decls): Likewise for pre-C99 error.
1013
445ba599
GA
10142022-06-07 Jakub Jelinek <jakub@redhat.com>
1015
1016 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
1017 style linear clause modifiers. Set
1018 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
1019 old style modifiers are used.
1020 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
1021 with val modifier on simd or for if the old style modifiers are
1022 used.
1023
b168441c
GA
10242022-06-02 David Malcolm <dmalcolm@redhat.com>
1025
1026 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
1027 (c_get_sarif_source_language): New.
1028 * c-tree.h (c_get_sarif_source_language): New decl.
1029
820ead45
GA
10302022-05-31 Jason Merrill <jason@redhat.com>
1031
1032 * Make-lang.in (c.tags): Look at *.cc.
1033
10342022-05-31 Jakub Jelinek <jakub@redhat.com>
1035
1036 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
1037 clauses.
1038
37b3b5da
GA
10392022-05-28 Jakub Jelinek <jakub@redhat.com>
1040
1041 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
1042 seen first, use "%<to%>" or "%<enter%>" depending on
1043 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
1044 "%<to%> or %<enter%>" wording.
1045
d9176e64
GA
10462022-05-27 Jakub Jelinek <jakub@redhat.com>
1047
1048 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
1049 (c_parser_omp_all_clauses): For to clause on declare target, use
1050 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
1051 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
1052 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
1053 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
1054 OMP_CLAUSE_TO_DECLARE.
1055 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
1056 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
1057 name in diagnostics instead of
1058 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
1059
3dff965c
GA
10602022-05-25 Jakub Jelinek <jakub@redhat.com>
1061
1062 PR c/91134
1063 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
1064 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
1065 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
1066 diagnostic and fixit hint if DATUM has pointer type.
1067 * c-parser.cc (c_parser_postfix_expression,
1068 c_parser_omp_variable_list): Adjust build_component_ref callers.
1069 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
1070 Likewise.
1071
768f49a2
GA
10722022-05-24 Jakub Jelinek <jakub@redhat.com>
1073
1074 PR c/105378
1075 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
1076
1cda629f
GA
10772022-05-18 Marek Polacek <polacek@redhat.com>
1078
1079 PR c/105131
1080 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
1081 mismatches.
1082 * c-tree.h (comptypes_check_enum_int): Declare.
1083 * c-typeck.cc (comptypes): No longer static.
1084
3d9439b1
GA
10852022-05-17 Marek Polacek <polacek@redhat.com>
1086
1087 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
1088 its value.
1089
10902022-05-17 Jakub Jelinek <jakub@redhat.com>
1091
1092 * c-parser.cc (c_parser_omp_clause_depend): Parse
1093 inoutset depend-kind.
1094 (c_parser_omp_depobj): Likewise.
1095
702bd11f
GA
10962022-05-16 Martin Liska <mliska@suse.cz>
1097
1098 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
1099
49ace834
GA
11002022-05-12 Jakub Jelinek <jakub@redhat.com>
1101
1102 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
1103 if flag_openmp.
1104 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
1105 in postfix expressions.
1106 (c_parser_omp_variable_list): Handle omp_all_memory in depend
1107 clause.
1108 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
1109 keyword in depend clause as null_pointer_node, diagnose invalid
1110 uses.
1111
bd022ff9
GA
11122022-05-09 Martin Liska <mliska@suse.cz>
1113
1114 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
1115 macros.
1116 (c_parser_binary_expression): Likewise.
1117
a1947c92
GA
11182022-05-07 Marek Polacek <polacek@redhat.com>
1119
1120 PR c++/101833
1121 PR c++/47634
1122 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
1123
405eda0d
GA
11242022-04-08 Jakub Jelinek <jakub@redhat.com>
1125
1126 PR c/105149
1127 * c-typeck.cc (c_build_va_arg): Reject function types.
1128
a2287813
GA
11292022-03-22 Marek Polacek <polacek@redhat.com>
1130
1131 PR c/82283
1132 PR c/84685
1133 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
1134 (start_init): Set it.
1135 (finish_init): Restore constructor_designated.
1136 (push_init_level): Set constructor_designated to the value of
1137 constructor_designated in the upper constructor_stack.
1138
57eeedda
GA
11392022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1140
1141 PR other/65095
1142 * c-typeck.cc (handle_omp_array_sections_1)
1143 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
1144 instead of 'c_omp_map_clause_name'.
1145
8cc4f9cd
GA
11462022-03-09 Joseph Myers <joseph@codesourcery.com>
1147
1148 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
1149 differently from earlier standards for unprototyped function type
1150 compatibility.
1151
11522022-03-09 Jakub Jelinek <jakub@redhat.com>
1153
1154 PR c/104711
1155 * c-fold.cc (c_fully_fold_internal): Don't emit
1156 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
1157 * c-typeck.cc (build_binary_op): Likewise.
1158
e6533e2e
GA
11592022-03-07 Jakub Jelinek <jakub@redhat.com>
1160
1161 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
1162 literal.
1163
4bf3bac1
GA
11642022-02-23 Richard Biener <rguenther@suse.de>
1165
1166 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
1167 SSA names without definition.
1168 (c_parser_gimple_declaration): Handle pointer typed SSA names.
1169
0bdb0498
GA
11702022-02-17 Jakub Jelinek <jakub@redhat.com>
1171
1172 PR c/104532
1173 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
1174 convert_lvalue_to_rvalue and build_indirect_ref instead of
1175 build_simple_mem_ref.
1176
e8d68f0a
GA
11772022-02-11 Richard Biener <rguenther@suse.de>
1178
1179 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
1180 VEC_COND_EXPRs.
1181
a645583d
GA
11822022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1183
1184 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
1185 clause.
1186 (c_parser_omp_variable_list): Handle array sections.
1187 (c_parser_omp_clause_has_device_addr): Added.
1188 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
1189 case.
1190 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
1191 OMP_CLAUSE_MASK.
1192 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
1193 (c_finish_omp_clauses): Handle array sections.
1194
3adf509f
GA
11952022-02-09 Jakub Jelinek <jakub@redhat.com>
1196
1197 PR c/104427
1198 * c-parser.cc (c_parser_postfix_expression)
1199 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
1200 instead of build1_loc to build PAREN_EXPR.
1201 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
1202 * c-fold.cc (c_fully_fold_internal): Likewise.
1203
fc829782
GA
12042022-01-17 Martin Liska <mliska@suse.cz>
1205
1206 * Make-lang.in: Rename .c names to .cc.
1207 * c-convert.cc: Likewise.
1208 * c-decl.cc (struct lang_identifier): Likewise.
1209 (pop_scope): Likewise.
1210 (finish_decl): Likewise.
1211 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
1212 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
1213 * c-parser.h (GCC_C_PARSER_H): Likewise.
1214 * c-tree.h (c_keyword_starts_typename): Likewise.
1215 (finish_declspecs): Likewise.
1216 (c_get_alias_set): Likewise.
1217 (enum c_oracle_request): Likewise.
1218 (tag_exists_p): Likewise.
1219 (set_c_expr_source_range): Likewise.
1220 * c-typeck.cc (c_common_type): Likewise.
1221 (c_finish_omp_clauses): Likewise.
1222 * config-lang.in: Likewise.
1223
12242022-01-17 Martin Liska <mliska@suse.cz>
1225
1226 * c-aux-info.c: Moved to...
1227 * c-aux-info.cc: ...here.
1228 * c-convert.c: Moved to...
1229 * c-convert.cc: ...here.
1230 * c-decl.c: Moved to...
1231 * c-decl.cc: ...here.
1232 * c-errors.c: Moved to...
1233 * c-errors.cc: ...here.
1234 * c-fold.c: Moved to...
1235 * c-fold.cc: ...here.
1236 * c-lang.c: Moved to...
1237 * c-lang.cc: ...here.
1238 * c-objc-common.c: Moved to...
1239 * c-objc-common.cc: ...here.
1240 * c-parser.c: Moved to...
1241 * c-parser.cc: ...here.
1242 * c-typeck.c: Moved to...
1243 * c-typeck.cc: ...here.
1244 * gccspec.c: Moved to...
1245 * gccspec.cc: ...here.
1246 * gimple-parser.c: Moved to...
1247 * gimple-parser.cc: ...here.
1248
12492022-01-17 Andrew Stubbs <ams@codesourcery.com>
1250
1251 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
1252
617db51d
GA
12532022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
1254
1255 PR c++/103705
1256 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
1257 outer node for ARRAY_REFs.
1258
62eb5308
GA
12592022-01-01 Jakub Jelinek <jakub@redhat.com>
1260
1261 PR objc/103639
1262 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
1263 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
1264
2554e2da
GA
12652021-12-17 Marek Polacek <polacek@redhat.com>
1266
1267 PR c/103649
1268 * c-decl.c (c_warn_unused_attributes): Don't warn for
1269 attribute_ignored_p.
1270 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
1271 arguments when the attribute is ignored.
1272
9c6586bc
GA
12732021-12-14 Jakub Jelinek <jakub@redhat.com>
1274
1275 PR c/103587
1276 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
1277 consume the pragma and silently skip to the pragma eol.
1278
c8dcf64b
GA
12792021-12-12 Jonathan Wakely <jwakely@redhat.com>
1280
1281 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
1282 * c-parser.c: Likewise.
1283
4b4839e3
GA
12842021-12-09 Jakub Jelinek <jakub@redhat.com>
1285
1286 PR pch/71934
1287 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
1288 to resort_data.new_value.
1289
641ff219
GA
12902021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1291
1292 * c-parser.c (struct omp_dim): New struct type for use inside
1293 c_parser_omp_variable_list.
1294 (c_parser_omp_variable_list): Allow multiple levels of array and
1295 component accesses in array section base-pointer expression.
1296 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
1297 c_parser_omp_var_list_parens.
1298 (c_parser_omp_clause_from): Likewise.
1299 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
1300 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
1301 POINTER_PLUS_EXPR.
1302 (c_finish_omp_clauses): Extend allowed ranged of expressions
1303 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
1304
13052021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1306
1307 PR middle-end/92120
1308 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
1309 call to c_parser_omp_variable_list to 'true'.
1310 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
1311 array base handling.
1312 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
1313
c177e806
GA
13142021-11-30 Thomas Schwinge <thomas@codesourcery.com>
1315
1316 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
1317 orphan loop" checking.
1318
13192021-11-30 Cesar Philippidis <cesar@codesourcery.com>
1320 Thomas Schwinge <thomas@codesourcery.com>
1321
1322 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
1323 OpenACC gang reductions.
1324
13252021-11-30 Richard Biener <rguenther@suse.de>
1326
1327 * gimple-parser.c (c_parser_gimple_postfix_expression):
1328 avoid unreachable code after break.
1329
87cd82c8
GA
13302021-11-29 Eric Gallager <egallager@gcc.gnu.org>
1331
1332 PR other/103021
1333 * Make-lang.in: Use ETAGS variable in TAGS target.
1334
13352021-11-29 Richard Biener <rguenther@suse.de>
1336
1337 * c-typeck.c (c_tree_equal): Remove unreachable return.
1338 * c-parser.c (get_matching_symbol): Likewise.
1339
e1d43592
GA
13402021-11-23 Jakub Jelinek <jakub@redhat.com>
1341
1342 * c-typeck.c (c_clone_omp_udr): Don't initialize
1343 id.transform_lang_insert_block.
1344
9c077398
GA
13452021-11-19 Martin Sebor <msebor@redhat.com>
1346
1347 PR c++/33925
1348 PR c/102867
1349 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
1350 code resulting from macro expansion.
1351
13522021-11-19 Martin Liska <mliska@suse.cz>
1353
1354 Revert:
1355 2021-11-19 Martin Liska <mliska@suse.cz>
1356
1357 * c-parser.c (add_debug_begin_stmt): Use option directly.
1358
483092d3
GA
13592021-11-18 Matthias Kretz <m.kretz@gsi.de>
1360
1361 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
1362 * c-parser.c (c_parser_postfix_expression): Likewise.
1363
13642021-11-18 Martin Liska <mliska@suse.cz>
1365
1366 * c-parser.c (add_debug_begin_stmt): Use option directly.
1367
280d2838
GA
13682021-11-17 Martin Sebor <msebor@redhat.com>
1369
1370 PR c/101702
1371 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
1372 bounds before deciding if they're constant.
1373
e2b57363
GA
13742021-11-15 Jakub Jelinek <jakub@redhat.com>
1375
1376 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
1377 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
1378
b39265d4
GA
13792021-11-11 Jakub Jelinek <jakub@redhat.com>
1380
1381 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
1382 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
1383 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
1384 OMP_CLAUSE_NUM_TEAMS_EXPR.
1385 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
1386 combined target teams even lower-bound expression.
1387
13882021-11-11 Richard Biener <rguenther@suse.de>
1389
1390 * gimple-parser.c: Shuffle bitmap.h include.
1391
18ae471f
GA
13922021-11-03 Joseph Myers <joseph@codesourcery.com>
1393
1394 PR c/103031
1395 * c-convert.c (c_convert): New function, based on convert.
1396 (convert): Make into wrapper of c_convert.
1397 (convert_init): New function.
1398 * c-typeck.c (enum impl_conv): Add ic_init_const.
1399 (convert_for_assignment): Handle ic_init_const like ic_init. Add
1400 new argument to convert_and_check call.
1401 (digest_init): Pass ic_init_const to convert_for_assignment for
1402 initializers required to be constant.
1403
b4df2dd3
GA
14042021-11-02 Richard Sandiford <richard.sandiford@arm.com>
1405
1406 * c-tree.h (c_simulate_record_decl): Declare.
1407 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
1408 * c-decl.c (c_simulate_record_decl): New function.
1409
c2bd5d8a
GA
14102021-10-22 Eric Gallager <egallager@gcc.gnu.org>
1411
1412 PR other/102663
1413 * Make-lang.in: Add dummy c.install-dvi target.
1414
93d183a5
GA
14152021-10-15 Richard Biener <rguenther@suse.de>
1416
1417 PR c/102763
1418 * gimple-parser.c
1419 (c_parser_gimple_postfix_expression_after_primary): Check
1420 for a pointer do be dereferenced by ->.
1421
5d5885c9
GA
14222021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1423
1424 * c-parser.c (c_finish_omp_declare_variant): Change call from
1425 c_omp_check_context_selector to omp_check_context_selector. Change
1426 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
1427
c9db17b8
GA
14282021-10-09 Jakub Jelinek <jakub@redhat.com>
1429
1430 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
1431 (c_parser_omp_scan_loop_body): Use it.
1432 (c_parser_omp_sections_scope): Likewise.
1433
50e20ee6
GA
14342021-10-07 Richard Biener <rguenther@suse.de>
1435
1436 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
1437
bb6194e0
GA
14382021-10-05 Richard Biener <rguenther@suse.de>
1439
1440 PR c/102605
1441 * gimple-parser.c (c_parser_gimple_postfix_expression):
1442 Accept more address _Literals.
1443
da9c5f78
GA
14442021-10-04 Marek Polacek <polacek@redhat.com>
1445
1446 PR c++/97573
1447 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
1448
9d116bcc
GA
14492021-10-01 Martin Sebor <msebor@redhat.com>
1450
1451 PR c/102103
1452 * c-typeck.c (maybe_warn_for_null_address): New function.
1453 (build_binary_op): Call it.
1454
14552021-10-01 Jakub Jelinek <jakub@redhat.com>
1456 Richard Biener <rguenther@suse.de>
1457
1458 PR sanitizer/102515
1459 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1460 for division even for SANITIZE_SI_OVERFLOW.
1461
14622021-10-01 Jakub Jelinek <jakub@redhat.com>
1463
1464 * c-parser.c (c_parser_omp_clause_order): Set
1465 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
1466
fd133479
GA
14672021-09-28 Andrew Pinski <apinski@marvell.com>
1468
1469 PR c/32122
1470 * c-parser.c (c_parser_statement_after_labels): Pass
1471 the c_expr instead of the tree to c_finish_goto_ptr.
1472 * c-typeck.c (c_finish_goto_ptr): Change the second
1473 argument type to c_expr.
1474 * c-tree.h (c_finish_goto_ptr): Likewise.
1475 Error out if the expression was not of a pointer type.
1476
e4777439
GA
14772021-09-22 Jakub Jelinek <jakub@redhat.com>
1478
1479 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
1480 modifiers.
1481
cf74e7b5
GA
14822021-09-18 Jakub Jelinek <jakub@redhat.com>
1483
1484 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
1485 and reproducible modifiers.
1486 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
1487
14882021-09-18 Jakub Jelinek <jakub@redhat.com>
1489
1490 * c-parser.c (c_parser_omp_clause_default): Handle private and
1491 firstprivate arguments, adjust diagnostics on unknown argument.
1492
0a4cb439
GA
14932021-09-17 Jakub Jelinek <jakub@redhat.com>
1494
1495 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
1496 is true.
1497
a26206ec
GA
14982021-09-10 Jakub Jelinek <jakub@redhat.com>
1499
1500 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
1501 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
1502 don't call build_conditional_expr, instead build a COND_EXPR directly.
1503 (c_parser_binary_expression): Avoid calling parser_build_binary_op
1504 if omp_atomic_lhs even in more cases for >, < or ==.
1505 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
1506 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
1507 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
1508 * c-typeck.c (build_binary_op): For flag_openmp only handle
1509 MIN_EXPR/MAX_EXPR.
1510
b2748138
GA
15112021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1512
1513 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
1514 directive.
1515
e11c6046
GA
15162021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1517
1518 * c-decl.c (enum deprecated_states): Add unavailable state.
1519 (merge_decls): Copy unavailability.
1520 (quals_from_declspecs): Handle unavailable case.
1521 (start_decl): Amend the logic handling suppression of nested
1522 deprecation states to include unavailability.
1523 (smallest_type_quals_location): Amend comment.
1524 (grokdeclarator): Handle the unavailable deprecation state.
1525 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
1526 * c-tree.h (struct c_declspecs): Add unavailable_p.
1527 * c-typeck.c (build_component_ref): Handle unavailability.
1528 (build_external_ref): Likewise.
1529
15302021-09-01 Roger Sayle <roger@nextmovesoftware.com>
1531 Joseph Myers <joseph@codesourcery.com>
1532
1533 PR c/79412
1534 * c-decl.c (duplicate_decls): On significant mismatches, mark the
1535 types of both (non-function) decls as error_mark_node, so that the
1536 middle-end can see the code is malformed.
1537 (free_attr_access_data): Don't process if the type has been set to
1538 error_mark_node.
1539
6d51ee43
GA
15402021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
1541
1542 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
1543 and 'ancestor' in 'target device' clauses.
1544
38b19c5b
GA
15452021-08-23 Jakub Jelinek <jakub@redhat.com>
1546
1547 * c-parser.c (c_parser_omp_clause_num_tasks,
1548 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
1549
5b2876f9
GA
15502021-08-22 Martin Uecker <muecker@gwdg.de>
1551
1552 PR c/98397
1553 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
1554 for pointers to arrays with qualifiers.
1555 (build_conditional_expr): For C23 don't lose qualifiers for pointers
1556 to arrays when the other pointer is a void pointer. Update warnings.
1557 (convert_for_assignment): Update warnings for C2X when converting from
1558 void* with qualifiers to a pointer to array with the same qualifiers.
1559
7c9e1645
GA
15602021-08-20 Jakub Jelinek <jakub@redhat.com>
1561
1562 * c-parser.c (c_parser_omp_error): New function.
1563 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
1564
15652021-08-20 Jakub Jelinek <jakub@redhat.com>
1566
1567 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
1568 comma at the end of list.
1569 (c_parser_omp_requires): Likewise.
1570
b57fba5e
GA
15712021-08-19 Jakub Jelinek <jakub@redhat.com>
1572
1573 * c-parser.c (c_parser_omp_requires): Don't call
1574 c_parser_peek_2nd_token and optionally consume token if current
1575 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
1576
6e529985
GA
15772021-08-18 Jakub Jelinek <jakub@redhat.com>
1578
1579 * c-parser.c (c_parser_omp_nothing): New function.
1580 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
1581
15822021-08-18 Jakub Jelinek <jakub@redhat.com>
1583
1584 * c-parser.c (c_parser_statement_after_labels): Add restart label
1585 near the start of the function. If c_parser_pragma returns false,
1586 goto restart.
1587 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
1588 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
1589 return what c_parser_omp_declare returned. Return true instead of
1590 false after emitting errors that the directive is not allowed in
1591 pragma_stmt context.
1592 (c_parser_omp_ordered): Return true instead of
1593 false after emitting errors that the directive is not allowed in
1594 pragma_stmt context.
1595 (c_parser_omp_target_update): Likewise.
1596 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
1597 Change return type from tree to bool, return false if the
1598 directive should be ignored in pragma_stmt contexts.
1599 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
1600 return their result directly.
1601 (c_parser_omp_cancellation_point): Change return type from void to
1602 bool, return false if the directive should be ignored in pragma_stmt
1603 contexts.
1604 (c_parser_omp_declare): Likewise.
1605
2d14d64b
GA
16062021-08-17 Jakub Jelinek <jakub@redhat.com>
1607
1608 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
1609 (c_parser_omp_scope): New function.
1610 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
1611
72be20e2
GA
16122021-08-12 Jakub Jelinek <jakub@redhat.com>
1613
1614 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
1615 (c_parser_omp_clause_filter): New function.
1616 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
1617 (OMP_MASKED_CLAUSE_MASK): Define.
1618 (c_parser_omp_masked): New function.
1619 (c_parser_omp_parallel): Handle parallel masked.
1620 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
1621 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
1622
16232021-08-12 Martin Uecker <muecker@gwdg.de>
1624
1625 PR c/101838
1626 PR c/29970
1627 * c-typeck.c (c_expr_sizeof_type): Evaluate
1628 size expressions for structs of variable size.
1629
16302021-08-12 Tobias Burnus <tobias@codesourcery.com>
1631
1632 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
1633 'primary' as alias for 'master'.
1634
3ae564ea
GA
16352021-08-10 Martin Uecker <muecker@gwdg.de>
1636
1637 PR c/29970
1638 * c-typeck.c (c_expr_sizeof_expr): Evaluate
1639 size expressions for structs of variable size.
1640
f92f4778
GA
16412021-08-06 Tamar Christina <tamar.christina@arm.com>
1642
1643 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
1644 * c-tree.h (c_simulate_enum_decl): Likewise.
1645
16462021-08-06 Martin Sebor <msebor@redhat.com>
1647
1648 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
1649 vec arguments to by-reference.
1650 (c_finish_omp_declare_simd): Same.
1651 (c_parser_compound_statement_nostart): Same.
1652 (c_parser_for_statement): Same.
1653 (c_parser_objc_methodprotolist): Same.
1654 (c_parser_oacc_routine): Same.
1655 (c_parser_omp_for_loop): Same.
1656 (c_parser_omp_declare_simd): Same.
1657
419c6c68
GA
16582021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1659 Joseph Myers <joseph@codesourcery.com>
1660 Cesar Philippidis <cesar@codesourcery.com>
1661
1662 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
1663 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
1664 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1665 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1666
92d45509
GA
16672021-07-20 Martin Sebor <msebor@redhat.com>
1668
1669 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
1670 by-const-reference.
1671 * c-typeck.c (c_build_function_call_vec): Same.
1672
d97d71a1
GA
16732021-07-15 Martin Sebor <msebor@redhat.com>
1674
1675 PR c/101289
1676 PR c/97548
1677 * c-decl.c (get_parm_array_spec): Strip nops.
1678
6fba0eea
GA
16792021-07-06 Martin Sebor <msebor@redhat.com>
1680
1681 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
1682
7a60a6e8
GA
16832021-07-02 Jakub Jelinek <jakub@redhat.com>
1684
1685 PR c/101297
1686 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
1687 appears before a CPP_NAME.
1688
90708f87
GA
16892021-06-25 Martin Sebor <msebor@redhat.com>
1690
1691 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
1692 warning_suppressed_p, suppress_warning, and copy_no_warning.
1693 (diagnose_mismatched_decls): Same.
1694 (duplicate_decls): Same.
1695 (grokdeclarator): Same.
1696 (finish_function): Same.
1697 (c_write_global_declarations_1): Same.
1698 * c-fold.c (c_fully_fold_internal): Same.
1699 * c-parser.c (c_parser_expr_no_commas): Same.
1700 (c_parser_postfix_expression): Same.
1701 * c-typeck.c (array_to_pointer_conversion): Same.
1702 (function_to_pointer_conversion): Same.
1703 (default_function_array_conversion): Same.
1704 (convert_lvalue_to_rvalue): Same.
1705 (default_conversion): Same.
1706 (build_indirect_ref): Same.
1707 (build_function_call_vec): Same.
1708 (build_atomic_assign): Same.
1709 (build_unary_op): Same.
1710 (c_finish_return): Same.
1711 (emit_side_effect_warnings): Same.
1712 (c_finish_stmt_expr): Same.
1713 (c_omp_clause_copy_ctor): Same.
1714
9aa8327e
GA
17152021-06-24 Jakub Jelinek <jakub@redhat.com>
1716
1717 PR c/101176
1718 * c-parser.c (c_parser_has_attribute_expression): Set source range for
1719 the result.
1720
17212021-06-24 Jakub Jelinek <jakub@redhat.com>
1722
1723 PR c/101171
1724 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
1725 error_mark_node.
1726
17272021-06-24 Jakub Jelinek <jakub@redhat.com>
1728
1729 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
1730 C_ORT_OMP for clauses on target construct.
1731 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
1732 (c_parser_omp_target): For non-combined target add
1733 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
1734 C_ORT_OMP_TARGET to c_finish_omp_clauses.
1735 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
1736 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
1737 never present on C_ORT_*DECLARE_SIMD.
1738 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
1739 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
1740 corresponding map clauses.
1741
2f080224
GA
17422021-06-21 Jakub Jelinek <jakub@redhat.com>
1743
1744 PR inline-asm/100785
1745 * c-typeck.c (c_mark_addressable): Diagnose trying to make
1746 bit-fields addressable.
1747
ede6c356
GA
17482021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1749
1750 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
1751 similar.
1752
8dc48181
GA
17532021-06-14 Tobias Burnus <tobias@codesourcery.com>
1754
1755 PR c/100913
1756 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
1757 var in the error case.
1758
438aac59
GA
17592021-06-07 Eric Botcazou <ebotcazou@adacore.com>
1760
1761 PR c/100920
1762 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
1763 spot built-in functions.
1764
7d6987e9
GA
17652021-06-06 Jakub Jelinek <jakub@redhat.com>
1766
1767 PR c/100902
1768 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
1769 even when target is combined with other constructs.
1770
17712021-06-06 Eric Botcazou <ebotcazou@adacore.com>
1772
1773 PR c/100920
1774 * c-decl.c (finish_struct): Fix thinko in previous change.
1775 * c-typeck.c (convert_for_assignment): Do not warn on pointer
1776 assignment and initialization for storage order purposes if the
1777 RHS is a call to a DECL_IS_MALLOC function.
1778
600f90cb
GA
17792021-06-04 Martin Sebor <msebor@redhat.com>
1780
1781 PR c/100783
1782 * c-objc-common.c (print_type): Handle erroneous types.
1783
440c8a0a
GA
17842021-06-03 Jakub Jelinek <jakub@redhat.com>
1785
1786 PR c++/100859
1787 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
1788 after depend only cases.
1789
ee682192
GA
17902021-05-31 Richard Biener <rguenther@suse.de>
1791
1792 PR c++/88601
1793 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
1794 * c-parser.c (c_parser_postfix_expression): Likewise.
1795
48166757
GA
17962021-05-28 Richard Biener <rguenther@suse.de>
1797
1798 PR c/100803
1799 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
1800 invalid if conditions.
1801
18022021-05-28 Jakub Jelinek <jakub@redhat.com>
1803
1804 PR middle-end/99928
1805 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
1806 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1807 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
1808 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
1809 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
1810 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
1811 if present in map_head, map_field_head or map_firstprivate_head
1812 bitmaps.
1813
18142021-05-28 Tobias Burnus <tobias@codesourcery.com>
1815
1816 * c-parser.c (c_parser_omp_clause_affinity): New.
1817 (c_parser_omp_clause_name, c_parser_omp_variable_list,
1818 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
1819 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
1820 c_finish_omp_clauses): Likewise.
1821
01c59ef2
GA
18222021-05-26 Eric Botcazou <ebotcazou@adacore.com>
1823
1824 PR c/100653
1825 * c-decl.c (finish_struct): Warn for a union containing an aggregate
1826 field with a differing scalar storage order.
1827
2832d51b
GA
18282021-05-21 Jakub Jelinek <jakub@redhat.com>
1829
1830 PR middle-end/99928
1831 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
1832 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
1833 if a decl is mentioned both in map clause and in such firstprivate
1834 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
1835
65f32e5d
GA
18362021-05-19 Jakub Jelinek <jakub@redhat.com>
1837
1838 PR middle-end/99928
1839 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
1840 master when combined with taskloop.
1841 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
1842 parallel master when not combined with taskloop.
1843
a8daf9a1
GA
18442021-05-18 Richard Biener <rguenther@suse.de>
1845
1846 PR c/100522
1847 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
1848 Diagnose calls to non-functions.
1849 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
1850
a7ffc1ef
GA
18512021-05-17 Richard Biener <rguenther@suse.de>
1852
1853 PR c/100625
1854 * gimple-parser.c (c_parser_gimple_label): Avoid building
1855 a GIMPLE label with NULL label decl.
1856
f9af11c7
GA
18572021-05-13 Martin Sebor <msebor@redhat.com>
1858
1859 PR c/100550
1860 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
1861
0ff3a0f2
GA
18622021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1863
1864 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
1865 'close'.
1866
aa891c56
GA
18672021-05-10 Martin Liska <mliska@suse.cz>
1868
1869 * c-aux-info.c (affix_data_type): Use startswith
1870 function instead of strncmp.
1871 * c-typeck.c (build_function_call_vec): Likewise.
1872 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
1873
62d87a32
GA
18742021-05-07 Eric Botcazou <ebotcazou@adacore.com>
1875
1876 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
1877 on the address of a pointer field in a record with reverse SSO.
1878
99e8df7a
GA
18792021-05-04 Tobias Burnus <tobias@codesourcery.com>
1880
1881 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
1882 for || and && reductions.
1883
3c8e539d
GA
18842021-04-29 Joseph Myers <joseph@codesourcery.com>
1885
1886 * c-typeck.c (function_types_compatible_p): For C2X, treat
1887 unprototyped function as compatible with non-variadic prototyped
1888 function even if some argument types are changed by the default
1889 argument promotions.
1890
ee351f7f
GA
18912021-04-15 Martin Sebor <msebor@redhat.com>
1892
1893 PR c/99420
1894 PR c/99972
1895 * c-decl.c (pushdecl): Always propagate type attribute.
1896
18972021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1898
1899 PR c/98852
1900 * c-typeck.c (c_common_type): Do not drop attributes that
1901 affect type identity.
1902
1d54b138
GA
19032021-04-10 Jakub Jelinek <jakub@redhat.com>
1904
1905 PR c/99990
1906 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
1907 error_mark_node.
1908
4493b1c1
GA
19092021-03-25 Jakub Jelinek <jakub@redhat.com>
1910
1911 PR c++/99565
1912 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
1913 to operand_equal_p.
1914
5f256a70
GA
19152021-03-19 Jakub Jelinek <jakub@redhat.com>
1916
1917 PR c/99588
1918 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
1919 with modifycode NOP_EXPR produces and mark the _Atomic var as read
1920 if found.
1921 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
1922 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
1923 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
1924
3c5b6d24
GA
19252021-03-15 Tobias Burnus <tobias@codesourcery.com>
1926
1927 PR c++/99509
1928 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
1929 ensure that the varpool node is marked as offloadable.
1930
ceae9533
GA
19312021-03-05 Tobias Burnus <tobias@codesourcery.com>
1932
1933 PR c/99137
1934 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
1935
4028d01a
GA
19362021-02-24 Martin Sebor <msebor@redhat.com>
1937
1938 PR middle-end/97172
1939 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
1940
bf81237e
GA
19412021-02-18 Jakub Jelinek <jakub@redhat.com>
1942
1943 PR c/99136
1944 * c-typeck.c (c_finish_return): Don't wrap retval into
1945 EXCESS_PRECISION_EXPR in functions that return void.
1946
0c5cdb31
GA
19472021-02-11 Marek Polacek <polacek@redhat.com>
1948
1949 * c-parser.c (c_parser_if_statement): Use vec_free.
1950
a19dd5e6
GA
19512021-02-04 Martin Sebor <msebor@redhat.com>
1952
1953 PR c/97882
1954 * c-decl.c (locate_old_decl): Add type to diagnostic output.
1955 (diagnose_mismatched_decls): Same.
1956 (start_function): Introduce temporaries for better readability.
1957 * c-typeck.c (comptypes_internal): Only consider complete enum
1958 types in comparisons with integers.
1959
f7884fb1
GA
19602021-02-01 Martin Sebor <msebor@redhat.com>
1961
1962 PR middle-end/97172
1963 * c-decl.c (free_attr_access_data): New function.
1964 (c_parse_final_cleanups): Call free_attr_access_data.
1965
59cf67d1
GA
19662021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1967
1968 * c-parser.c (c_parser_omp_clause_detach): New.
1969 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
1970 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
1971 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
1972 clause. Prevent use of detach with mergeable and overriding the
1973 data sharing mode of the event handle.
1974
2f7f0d32
GA
19752021-01-15 Jakub Jelinek <jakub@redhat.com>
1976
1977 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
1978 unqualified element type and then call c_build_qualified_type on the
1979 ARRAY_TYPE.
1980
7d187e4f
GA
19812021-01-07 Richard Biener <rguenther@suse.de>
1982
1983 * gimple-parser.c (c_parser_gimple_compound_statement): Only
1984 reallocate loop array if it is too small.
1985
eefe499f
GA
19862020-12-16 Martin Uecker <muecker@gwdg.de>
1987
1988 PR c/98047
1989 * c-typeck.c (build_modify_expr): Drop qualifiers.
1990
19912020-12-16 Martin Uecker <muecker@gwdg.de>
1992
1993 PR c/98260
1994 * c-parser.c (c_parser_expression): Look into
1995 nop expression when marking expressions as read.
1996
d52945ce
GA
19972020-12-14 Martin Liska <mliska@suse.cz>
1998
1999 PR sanitizer/98204
2000 * c-typeck.c (pointer_diff): Do not emit a top-level
2001 sanitization.
2002 (build_binary_op): Likewise.
2003
ca2bd949
GA
20042020-12-09 Tobias Burnus <tobias@codesourcery.com>
2005
2006 * c-parser.c (c_parser_omp_allocate): New.
2007 (c_parser_omp_construct): Call it.
2008
20092020-12-09 Richard Biener <rguenther@suse.de>
2010
2011 PR c/98200
2012 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
2013 early on error.
2014
bc8a7013
GA
20152020-12-07 Martin Uecker <muecker@gwdg.de>
2016
2017 PR c/97981
2018 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
2019 that drops qualifiers to the end of the function.
2020
d48df6f2
GA
20212020-11-26 Martin Uecker <muecker@gwdg.de>
2022
2023 PR c/65455
2024 PR c/92935
2025 * c-parser.c (c_parser_declaration_or_fndef): Remove
2026 redundant code to drop qualifiers of _Atomic types for __auto_type.
2027 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
2028 types for __typeof__.
2029
1e2c9a27
GA
20302020-11-24 Jakub Jelinek <jakub@redhat.com>
2031
2032 PR c/97958
2033 * c-parser.c (c_parser_binary_expression): For omp atomic binary
2034 expressions, use make_node instead of build2 to avoid checking build2
2035 performs.
2036
8e6198d0
GA
20372020-11-23 Joseph Myers <joseph@codesourcery.com>
2038
2039 PR c/95630
2040 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
2041 for comparisons of complete and incomplete pointers.
2042
7a97e2fc
GA
20432020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2044
2045 * c-aux-info.c (gen_type): Support opaque types.
2046
82e5048e
GA
20472020-11-20 Martin Sebor <msebor@redhat.com>
2048
2049 PR middle-end/97879
2050 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
2051
20522020-11-20 Jakub Jelinek <jakub@redhat.com>
2053
2054 PR other/97911
2055 * Make-lang.in (c.serial): Change from goal to a variable.
2056 (.PHONY): Drop c.serial.
2057
20582020-11-20 Martin Uecker <muecker@gwdg.de>
2059
2060 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
2061
d62586ee
GA
20622020-11-19 Jakub Jelinek <jakub@redhat.com>
2063
2064 PR c/97860
2065 * c-decl.c (get_parm_array_spec): Bail out of nelts is
2066 error_operand_p.
2067
25bb75f8
GA
20682020-11-18 Jakub Jelinek <jakub@redhat.com>
2069
2070 * Make-lang.in (c.serial): New goal.
2071 (.PHONY): Add c.serial c.prev.
2072 (cc1$(exeext)): Call LINK_PROGRESS.
2073
77f67db2
GA
20742020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
2075
2076 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
2077 goto too.
2078 * c-typeck.c (build_asm_expr): Remove an assert checking output
2079 absence for asm goto.
2080
20812020-11-13 Jakub Jelinek <jakub@redhat.com>
2082
2083 * c-typeck.c (c_finish_omp_clauses): Don't clear
2084 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
2085
20862020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2087
2088 PR objc/77404
2089 * c-parser.c (c_parser_objc_class_definition): Pass the
2090 location of the class name to the interface declaration.
2091
bb622641
GA
20922020-11-10 Strager Neds <strager.nds@gmail.com>
2093
2094 * c-decl.c (merge_decls): Use new overload of
2095 set_decl_section_name.
2096
20972020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2098
2099 * c-parser.c (c_parser_omp_target_data): Add use of
2100 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
2101 handled map clause kind.
2102 (c_parser_omp_target_enter_data): Likewise.
2103 (c_parser_omp_target_exit_data): Likewise.
2104 (c_parser_omp_target): Likewise.
2105 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
2106 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
2107 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
2108 same struct field access to co-exist on OpenMP construct.
2109
2da7ee05
GA
21102020-11-07 Martin Uecker <muecker@gwdg.de>
2111
2112 * c-parser.c (c_parser_label): Implement mixing of labels and code.
2113 (c_parser_all_labels): Likewise.
2114
44cab2d8
GA
21152020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2116
2117 * c-parser.c (c_parser_objc_at_property_declaration):
2118 Improve parsing fidelity. Associate better location info
2119 with @property attributes. Clean up the interface to
2120 objc_add_property_declaration ().
2121
21222020-11-06 Nathan Sidwell <nathan@acm.org>
2123
2124 * c-decl.c (diagnose_mismatched_decls): Rename
2125 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2126 (warn_if_shadowing, implicitly_declare, names_builtin_p)
2127 (collect_source_refs): Likewise.
2128 * c-typeck.c (inform_declaration, inform_for_arg)
2129 (convert_for_assignment): Likewise.
2130
21312020-11-06 Tobias Burnus <tobias@codesourcery.com>
2132
2133 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
2134 OpenACC matching.
2135 (c_parser_omp_construct): Update call.
2136
35c125cb
GA
21372020-11-04 Jakub Jelinek <jakub@redhat.com>
2138
2139 PR c++/97670
2140 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
2141 find underlying decl to clear in the aligned_head bitmap.
2142
21432020-11-04 Joseph Myers <joseph@codesourcery.com>
2144
2145 * c-decl.c (handle_nodiscard_attribute): New.
2146 (std_attribute_table): Add nodiscard.
2147 * c-parser.c (c_parser_std_attribute): Expect argument to
2148 nodiscard attribute to be a string. Do not special-case ignoring
2149 nodiscard.
2150 * c-typeck.c (maybe_warn_nodiscard): New.
2151 (build_compound_expr, emit_side_effect_warnings): Call
2152 maybe_warn_nodiscard.
2153 (c_process_expr_stmt, c_finish_stmt_expr): Also call
2154 emit_side_effect_warnings if warn_unused_result.
2155
4f0606fe
GA
21562020-10-29 Asher Gordon <AsDaGo@posteo.net>
2157
2158 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
2159 with XDELETE.
2160 (finish_init): Likewise.
2161 (pop_init_level): Likewise.
2162
e93aae4a
GA
21632020-10-28 Joseph Myers <joseph@codesourcery.com>
2164
2165 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
2166 error_at for omitted parameter name.
2167
21682020-10-28 Jakub Jelinek <jakub@redhat.com>
2169
2170 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
2171 (c_parser_omp_clause_allocate): New function.
2172 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
2173 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2174 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
2175 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
2176 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
2177 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
2178 PRAGMA_OMP_CLAUSE_ALLOCATE.
2179 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
2180
89bb01e7
GA
21812020-10-27 Joseph Myers <joseph@codesourcery.com>
2182
2183 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
2184 standard attributes.
2185
efe71fcc
GA
21862020-10-23 Marek Polacek <polacek@redhat.com>
2187
2188 PR c++/91741
2189 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
2190 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
2191 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
2192 * c-tree.h (char_type_p): Declare.
2193 * c-typeck.c (char_type_p): No longer static.
2194
21952020-10-23 Martin Sebor <msebor@redhat.com>
2196
2197 PR middle-end/97552
2198 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
2199
2fe5b7d1
GA
22002020-09-19 Martin Sebor <msebor@redhat.com>
2201
2202 PR c/50584
2203 * c-decl.c (lookup_last_decl): Define new function.
2204 (c_decl_attributes): Call it.
2205 (start_decl): Add argument and use it.
2206 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
2207 (get_parm_array_spec): Define new function.
2208 (push_parm_decl): Call get_parm_array_spec.
2209 (start_function): Call warn_parm_array_mismatch. Build attribute
2210 access and add it to current function.
2211 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
2212 in forms of array parameters.
2213 * c-tree.h (start_decl): Add argument.
2214
22152020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2216
2217 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
2218 with...
2219 (in_statement): New.
2220 (start_function): Adjust for above change.
2221 (c_push_function_context, c_pop_function_context): Likewise.
2222 * c-lang.h (struct language_function): Likewise.
2223 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
2224 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
2225 New.
2226 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
2227 (c_parser_switch_statement): Adjust break/switch context handling
2228 and calls to renamed functions.
2229 (c_parser_while_statement): Adjust break/switch context handling and
2230 build a WHILE_STMT.
2231 (c_parser_do_statement): Ditto, with DO_STMT respectively.
2232 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
2233 (c_parser_omp_for_loop): Adjust break/switch context handling.
2234 * c-tree.h (c_break_label, c_cont_label): Delete.
2235 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2236 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
2237 (in_statement, switch_statement_break_seen_p): Declare.
2238 (c_start_case, c_finish_case): Renamed to...
2239 (c_start_switch, c_finish_switch).
2240 (c_finish_bc_stmt): Adjust arguments.
2241 * c-typeck.c (build_function_call_vec): Don't try to print
2242 statements with %qE format.
2243 (struct c_switch): Rename switch_expr field to switch_stmt.
2244 Add break_stmt_seen_p field.
2245 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
2246 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
2247 (do_case): Update for changes to struct c_switch.
2248 (c_finish_case): Rename to c_finish_switch. Update for changes to
2249 struct c_switch and change of representation from SWITCH_EXPR to
2250 SWITCH_STMT.
2251 (c_finish_loop): Delete.
2252 (c_finish_bc_stmt): Update to reflect changes to break/continue
2253 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
2254 of a GOTO_EXPR except for objc foreach loops.
2255
e1a4a8a0
GA
22562020-09-01 Jakub Jelinek <jakub@redhat.com>
2257
2258 PR c++/96867
2259 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
2260 only on PARM_DECLs.
2261
8f7ea26a
GA
22622020-08-28 Martin Sebor <msebor@redhat.com>
2263
2264 PR c/96596
2265 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
2266 argument type.
2267
8b394f01
GA
22682020-08-27 Martin Liska <mliska@suse.cz>
2269
2270 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
2271 growth function to true.
2272
db0f6efe
GA
22732020-08-25 Tobias Burnus <tobias@codesourcery.com>
2274
2275 PR c/96678
2276 * c-typeck.c (handle_omp_array_sections_1): Talk about
2277 array function parameter in the error message.
2278
5c265693
GA
22792020-08-18 Jakub Jelinek <jakub@redhat.com>
2280
2281 PR c/96571
2282 * c-parser.c (c_parser_generic_selection): Change match_found from bool
2283 to int, holding index of the match. Call mark_exp_read on the selector
2284 expression and on expressions other than the selected one.
2285
4967ca2f
GA
22862020-08-01 Richard Sandiford <richard.sandiford@arm.com>
2287
2288 PR c/96377
2289 * c-typeck.c (process_init_element): Split test for whether to
2290 recurse into a record, union or array into...
2291 (initialize_elementwise_p): ...this new function. Don't recurse
2292 into a vector type if the initialization value is also a vector.
2293
48cc2e46
GA
22942020-07-31 Richard Biener <rguenther@suse.de>
2295
2296 PR debug/96383
2297 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
2298 Define to c_common_finalize_early_debug.
2299
3ea9abca
GA
23002020-07-22 Tobias Burnus <tobias@codesourcery.com>
2301
2302 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
2303 (c_parser_omp_critical): Permit hint(0) clause without named critical.
2304 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
2305
30430061
GA
23062020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
2307
2308 PR target/95237
2309 * c-decl.c (finish_decl): Call target hook
2310 lower_local_decl_alignment to lower local decl alignment.
2311
3f8ca9cb
GA
23122020-07-09 Julian Brown <julian@codesourcery.com>
2313 Thomas Schwinge <thomas@codesourcery.com>
2314
2315 PR middle-end/95270
2316 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
2317 for standalone attach/detach clauses.
2318
a82c4c4c 23192020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2320
2321 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
2322 set, warn for conversion between pointers that point to incompatible
2323 scalar storage orders.
2324
f60ee68d
GA
23252020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
2326
2327 * c-parser.c (c_parser_statement_after_labels): Pass correct
2328 parameters to c_parser_do_statement.
2329
56638b9b
GA
23302020-06-16 Jakub Jelinek <jakub@redhat.com>
2331
2332 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
2333 c_in_omp_for.
2334 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
2335 premature c_fully_fold. Defer explicit c_fully_fold calls to after
2336 c_finish_omp_for.
2337 * c-tree.h (c_in_omp_for): Declare.
2338 * c-typeck.c (c_in_omp_for): Define.
2339 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
2340 (digest_init): Likewise.
2341 (build_binary_op): Likewise.
2342
23432020-06-16 Jakub Jelinek <jakub@redhat.com>
2344
2345 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
2346 from kind by comma rather than colon.
2347
1a59f3db
GA
23482020-06-05 Mark Wielaard <mark@klomp.org>
2349
2350 * c-decl.c (implicit_decl_warning): When warned and olddecl is
2351 an undeclared builtin, then add a fixit header hint, if found.
2352 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
2353 warning_at about implicit builtin declaration type mismatch.
2354
9a5b7438
GA
23552020-06-03 Mark Wielaard <mark@klomp.org>
2356
2357 * c-parser.c (struct c_parser): Add seen_string_literal
2358 bitfield.
2359 (c_parser_consume_token): Reset seen_string_literal.
2360 (c_parser_error_richloc): Add name_hint if seen_string_literal
2361 and next token is a CPP_NAME and we have a missing header
2362 suggestion for the name.
2363 (c_parser_string_literal): Set seen_string_literal.
2364
23652020-06-03 Mark Wielaard <mark@klomp.org>
2366
2367 * c-parser.c (c_parser_postfix_expression_after_primary): Add
2368 scope with matching_parens after CPP_OPEN_PAREN.
2369
23702020-06-03 Tobias Burnus <tobias@codesourcery.com>
2371
2372 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
2373
53ffb43a
GA
23742020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
2375
2376 * Make-lang.in: Remove extra slash.
2377
8f66f175
ML
23782020-05-19 Martin Liska <mliska@suse.cz>
2379
2380 * c-parser.c: Fix typo.
2381
49ddde69
JJ
23822020-05-14 Jakub Jelinek <jakub@redhat.com>
2383
2384 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
2385
eb72dc66
RB
23862020-05-07 Richard Biener <rguenther@suse.de>
2387
2388 PR middle-end/94703
2389 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
2390 DECL_GIMPLE_REG_P.
2391
bf915591
JJ
23922020-04-30 Jakub Jelinek <jakub@redhat.com>
2393
2394 PR c/94842
2395 * c-decl.c (set_labels_context_r): In addition to context-less
2396 LABEL_DECLs adjust also LABEL_DECLs with context equal to
2397 parent function if any.
2398 (store_parm_decls): Adjust comment.
2399
e1113ffb
JJ
24002020-04-19 Jakub Jelinek <jakub@redhat.com>
2401
2402 PR objc/94637
2403 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
2404 two CPP_COLON tokens.
2405
2e389749
JJ
24062020-04-17 Jakub Jelinek <jakub@redhat.com>
2407
2408 PR other/94629
2409 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
2410 to data.clauses.
2411
2dc9294c
JJ
24122020-04-15 Jakub Jelinek <jakub@redhat.com>
2413
2414 PR c/94593
2415 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
2416 requires directive when not at file scope.
2417
13e41d8b
TB
24182020-04-08 Tobias Burnus <tobias@codesourcery.com>
2419
2420 PR middle-end/94120
2421 * c-decl.c (c_check_in_current_scope): New function.
2422 * c-tree.h (c_check_in_current_scope): Declare it.
2423 * c-parser.c (c_parser_oacc_declare): Add check that variables
2424 are declared in the same scope as the directive. Fix handling
2425 of namespace vars.
2426
4df50a05
JJ
24272020-04-07 Jakub Jelinek <jakub@redhat.com>
2428
2429 PR c++/94512
2430 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
2431 if c_parser_omp_master succeeded.
2432
5db9e893
JJ
24332020-03-23 Jakub Jelinek <jakub@redhat.com>
2434
2435 PR gcov-profile/94029
2436 PR c/94239
2437 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
2438 the function_start_locus location. Don't do that afterwards for the
2439 __GIMPLE body parsing.
2440
9def91e9
JJ
24412020-03-19 Jakub Jelinek <jakub@redhat.com>
2442
2443 PR gcov-profile/94029
2444 * c-tree.h (finish_function): Add location_t argument defaulted to
2445 input_location.
2446 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
2447 set it to the locus of closing } if non-NULL.
2448 (c_parser_compound_statement_nostart): Return locus of closing }.
2449 (c_parser_parse_rtl_body): Likewise.
2450 (c_parser_declaration_or_fndef): Propagate locus of closing } to
2451 finish_function.
2452 * c-decl.c (finish_function): Add end_loc argument, use it instead of
2453 input_location to set function_end_locus.
2454
046c5890
JJ
24552020-03-17 Jakub Jelinek <jakub@redhat.com>
2456
2457 PR c/94172
2458 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
2459 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
2460 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
2461 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
2462 ENUMERAL_TYPEs.
2463 (finish_incomplete_vars): New function, moved from finish_struct. Use
2464 relayout_decl instead of layout_decl.
2465 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
2466 being TYPE_VFIELD. Use finish_incomplete_vars.
2467 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
2468 finish_incomplete_vars.
2469 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2470 also on ENUMERAL_TYPEs.
2471
c015ff8c
JJ
24722020-03-16 Jakub Jelinek <jakub@redhat.com>
2473
2474 PR c/94179
2475 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
2476
f2e9fe5f
MS
24772020-03-13 Martin Sebor <msebor@redhat.com>
2478
2479 PR c/94040
2480 * c-decl.c (builtin_structptr_type_count): New constant.
2481 (match_builtin_function_types): Reject decls that are incompatible
2482 in types pointed to by pointers.
2483 (diagnose_mismatched_decls): Adjust comments.
2484
c9d70946
JM
24852020-03-05 Joseph Myers <joseph@codesourcery.com>
2486
2487 PR c/93577
2488 * c-typeck.c (pop_init_level): Do not diagnose initializers as
2489 empty when initialized type is error_mark_node.
2490 (set_designator, process_init_element): Ignore initializers for
2491 elements of a variable-size type or of error_mark_node.
2492
726e292d
MS
24932020-03-01 Martin Sebor <msebor@redhat.com>
2494
2495 PR middle-end/93926
2496 * c-decl.c (types_close_enough_to_match): New function.
2497 (match_builtin_function_types):
2498 (diagnose_mismatched_decls): Add missing inform call to a warning.
2499
a499c2f8
MS
25002020-03-01 Martin Sebor <msebor@redhat.com>
2501
2502 PR c/93812
2503 * c-typeck.c (build_functype_attribute_variant): New function.
2504 (composite_type): Call it.
2505
9c3da8cc
JJ
25062020-02-25 Jakub Jelinek <jakub@redhat.com>
2507
2508 PR other/93912
2509 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
2510 Rename last argument from probablity to probability.
2511
bacdd5e9
JJ
25122020-02-13 Jakub Jelinek <jakub@redhat.com>
2513
2514 PR c/93576
2515 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
2516 *expr if it has side effects.
2517
f9eb0973
JL
25182020-01-30 Jeff Law <law@redhat.com>
2519
2520 PR c/88660
2521 * c-parser.c (c_parser_switch_statement): Make sure to request
2522 marking the switch expr as used.
2523
ac68e287
JM
25242020-01-22 Joseph Myers <joseph@codesourcery.com>
2525
2526 PR c/93348
2527 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
2528 argument with integer operands.
2529
852f0ae8
KK
25302020-01-16 Kerem Kat <keremkat@gmail.com>
2531
2532 PR c/92833
2533 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
2534 to support 4 available tokens.
2535
e2346a33
JM
25362020-01-15 Joseph Myers <joseph@codesourcery.com>
2537
2538 PR c/93072
2539 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
2540 determine whether to set DECL_CONTEXT.
2541
3d77686d
JM
25422020-01-13 Joseph Myers <joseph@codesourcery.com>
2543
2544 PR c/93241
2545 * c-typeck.c (build_c_cast): Check for expressions with integer
2546 operands that can occur in an unevaluated part of an integer
2547 constant expression and call note_integer_operands as needed.
2548
f74c4b2c
RB
25492019-01-08 Richard Biener <rguenther@suse.de>
2550
2551 PR middle-end/93199
2552 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
2553 permanently.
2554
8d9254fc
JJ
25552020-01-01 Jakub Jelinek <jakub@redhat.com>
2556
2557 Update copyright years.
2558
39292e25
EB
25592019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2560
2561 * c-decl.c (collect_source_ref_cb): Delete.
2562 (for_each_global_decl): Rename into...
2563 (collect_source_refs): ...this. Call collect_source_ref directly.
2564 (c_parse_final_cleanups): Always call collect_source_ref on the main
2565 input filename.
2566
519d7496
JB
25672019-12-19 Julian Brown <julian@codesourcery.com>
2568 Cesar Philippidis <cesar@codesourcery.com>
2569
2570 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
2571 detach clauses.
2572 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
2573 Allow deref (->) in variable lists if true.
2574 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
2575 Pass to c_parser_omp_variable_list.
2576 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
2577 call to c_parser_omp_variable_list.
2578 (c_parser_oacc_all_clauses): Support attach and detach clauses.
2579 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
2580 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
2581 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
2582 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
2583 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
2584 and detach. Support deref.
2585 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
2586 GOMP_MAP_ALWAYS_POINTER for OpenACC.
2587 (c_oacc_check_attachments): New function.
2588 (c_finish_omp_clauses): Check attach/detach arguments for being
2589 pointers using above. Support deref.
2590
a6163563
JB
25912019-12-19 Julian Brown <julian@codesourcery.com>
2592 Maciej W. Rozycki <macro@codesourcery.com>
2593 Tobias Burnus <tobias@codesourcery.com>
2594 Thomas Schwinge <thomas@codesourcery.com>
2595
2596 * c-parser.c (c_parser_omp_clause_name): Support no_create.
2597 (c_parser_oacc_data_clause): Likewise.
2598 (c_parser_oacc_all_clauses): Likewise.
2599 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2600 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
2601 PRAGMA_OACC_CLAUSE_NO_CREATE.
2602 * c-typeck.c (handle_omp_array_sections): Support
2603 GOMP_MAP_NO_ALLOC.
2604
d68f5d45
DM
26052019-12-09 David Malcolm <dmalcolm@redhat.com>
2606
2607 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2608 Replace label_text ctor calls.
2609
4691bf46
JM
26102019-12-04 Joseph Myers <joseph@codesourcery.com>
2611
2612 PR c/36941
2613 PR c/88827
2614 * c-typeck.c (convert_lvalue_to_rvalue): Call
2615 require_complete_type for arguments not of void types.
2616 (build_indirect_ref): Do not diagnose dereferencing pointers to
2617 incomplete types.
2618 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
2619
85d11957
JM
26202019-12-03 Joseph Myers <joseph@codesourcery.com>
2621
2622 PR c/88704
2623 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
2624 old-style parameter definitions.
2625
4569f8b3
SL
26262019-12-01 Sandra Loosemore <sandra@codesourcery.com>
2627
2628 PR target/92499
2629
2630 * c-decl.c (flexible_array_type_p): Move to common code.
2631
65ef05d0
RS
26322019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2633
2634 * c-decl.c (start_decl): Allow initialization of variables whose
2635 size is a POLY_INT_CST.
2636 (finish_decl): Use verify_type_context to check whether the target
2637 allows variables with a particular type to have static or thread-local
2638 storage duration. Don't raise a second error if such variables do
2639 not have a constant size.
2640 (grokdeclarator): Use verify_type_context to check whether the
2641 target allows fields or array elements to have a particular type.
2642 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
2643 the target allows pointer difference for the types involved.
2644 (build_unary_op): Likewise for pointer increment and decrement.
2645
34b43828
JM
26462019-11-29 Joseph Myers <joseph@codesourcery.com>
2647
2648 * c-parser.c (struct c_parser): Add members raw_tokens and
2649 raw_tokens_used.
2650 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
2651 using previously-lexed raw tokens.
2652 (c_parser_peek_nth_token_raw)
2653 (c_parser_check_balanced_raw_token_sequence): New functions.
2654 (c_parser_nth_token_starts_std_attributes): Use
2655 c_parser_check_balanced_raw_token_sequence for Objective-C.
2656
5b8d9367
JM
26572019-11-25 Joseph Myers <joseph@codesourcery.com>
2658
2659 PR c/91985
2660 * c-decl.c (finish_declspecs): Use int instead of decimal
2661 floating-point types if decimal floating-point not supported.
2662
1723e1be
JM
26632019-11-25 Joseph Myers <joseph@codesourcery.com>
2664
2665 * c-tree.h (struct c_declarator): Use a structure for id member.
2666 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
2667 declarators at the start, not when handling individual declarators
2668 later. Use u.id.id instead of u.id.
2669 (grokfield): Use u.id.id instead of u.id.
2670 (build_id_declarator): Set u.id.id and u.id.attrs.
2671 (finish_declspecs): Handle postfix attributes in case of typedef
2672 name or typeof used.
2673 * c-parser.c (c_parser_direct_declarator)
2674 (c_parser_direct_declarator_inner): Place declarator for
2675 attributes inside that for function or array, not outside. Set
2676 u.id.attrs for identifiers.
2677 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
2678 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
2679 instead of u.id.
2680
bdaf8be1
JJ
26812019-11-22 Jakub Jelinek <jakub@redhat.com>
2682
2683 PR c/90677
2684 * c-decl.c (identifier_global_tag): Define.
2685
3e00ba47
RB
26862019-11-20 Richard Biener <rguenther@suse.de>
2687
2688 PR c/92088
2689 * c-decl.c (grokdeclarator): Prevent inlining of nested
2690 function with VLA arguments.
2691
8c5b727a
JM
26922019-11-20 Joseph Myers <joseph@codesourcery.com>
2693
2694 * c-decl.c (c_warn_type_attributes): New function.
2695 (groktypename, grokdeclarator, finish_declspecs): Call
2696 c_warn_type_attributes before applying attributes to types.
2697 * c-tree.h (c_warn_type_attributes): Declare.
2698
192961ff
JM
26992019-11-19 Joseph Myers <joseph@codesourcery.com>
2700
2701 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
2702 standard attributes.
2703 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
2704 pedwarn for unknown standard attributes and return error_mark_node
2705 for them.
2706
20a38017
MM
27072019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
2708
2709 * c-parser.c (c_parser_parse_rtl_body): Always call
2710 run_rtl_passes, even if startwith pass is not provided.
2711
d5fbe5e0
JM
27122019-11-15 Joseph Myers <joseph@codesourcery.com>
2713
2714 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
2715 duplicate standard attributes.
2716
97cc1187
JM
27172019-11-15 Joseph Myers <joseph@codesourcery.com>
2718
2719 * c-decl.c (std_attribute_table): Add maybe_unused.
2720
f8aea5e3
JM
27212019-11-15 Joseph Myers <joseph@codesourcery.com>
2722
2723 * c-decl.c (std_attribute_table): Add fallthrough.
2724 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
2725 attribute at top level.
2726
2cc94aa8
JM
27272019-11-15 Joseph Myers <joseph@codesourcery.com>
2728
2729 * c-decl.c (std_attribute_table): New.
2730 (c_init_decl_processing): Register attributes from
2731 std_attribute_table.
2732 * c-parser.c (c_parser_attribute_arguments): Add arguments
2733 require_string and allow_empty_args. All callers changed.
2734 (c_parser_std_attribute): Set require_string argument for
2735 "deprecated" attribute.
2736
7c5890cc
JM
27372019-11-14 Joseph Myers <joseph@codesourcery.com>
2738
2739 * c-parser.c (c_parser_postfix_expression)
2740 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
2741 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
2742
e8738f4e
RS
27432019-11-14 Richard Sandiford <richard.sandiford@arm.com>
2744
2745 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
2746 of build_same_sized_truth_vector_type.
2747 (build_vec_cmp): Likewise.
2748
b2417b59
JJ
27492019-11-14 Jakub Jelinek <jakub@redhat.com>
2750
bedb7f04
JJ
2751 * c-parser.c (c_parser_omp_context_selector): Don't require score
2752 argument to fit into shwi, just to be INTEGER_CST. Diagnose
2753 negative score.
2754
b2417b59
JJ
2755 * c-parser.c (c_parser_omp_context_selector): Rename
2756 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
2757 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
2758 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
2759 and string literals.
2760
4e03c3a7
JM
27612019-11-14 Joseph Myers <joseph@codesourcery.com>
2762
2763 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
2764 ctsk_tagfirstref_attrs.
2765 (struct c_declspecs): Update description of attrs. Add
2766 postfix_attrs and non_std_attrs_seen_p. Increase size of
2767 typespec_kind bit-field.
2768 (c_warn_unused_attributes): New declaration.
2769 (parser_xref_tag): Update prototype.
2770 * c-decl.c (c_warn_unused_attributes): New function.
2771 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
2772 ctsk_tagref_attrs. Handle attribute declarations.
2773 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
2774 (grokdeclarator): Handle standard attributes.
2775 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
2776 attributes to incomplete type reference.
2777 (xref_tag): Update call to parser_xref_tag.
2778 (declspecs_add_addrspace, declspecs_add_type)
2779 (declspecs_add_scspec, declspecs_add_attrs): Set
2780 non_std_attrs_seen_p.
2781 (finish_declspecs): Apply postfix standard attributes to type.
2782 * c-parser.c (c_token_starts_declspecs)
2783 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
2784 (c_parser_next_tokens_start_declaration): Update comments.
2785 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
2786 parser->tokens[2] to parser->tokens[1].
2787 (c_parser_nth_token_starts_std_attributes)
2788 (c_parser_std_attribute_specifier_sequence): New functions.
2789 (c_parser_declaration_or_fndef): Add arguments have_attrs and
2790 attrs. All callers changed. Handle standard attributes.
2791 (c_parser_parms_declarator, c_parser_parms_list_declarator)
2792 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
2793 All callers changed.
2794 (c_parser_declspecs): Add arguments start_std_attr_ok and
2795 end_std_attr_ok. All callers changed. Handle standard
2796 attributes.
2797 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2798 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
2799 (c_parser_compound_statement_nostart, c_parser_all_labels)
2800 (c_parser_label, c_parser_statement, c_parser_for_statement):
2801 Handle standard attributes.
2802 * c-parser.h (c_parser_declspecs): Update prototype.
2803 * gimple-parser.c (c_parser_gimple_declaration): Update call to
2804 c_parser_declspecs.
2805
0c29cac4
ML
28062019-11-12 Martin Liska <mliska@suse.cz>
2807
2808 * gimple-parser.c: Do not include params.h.
2809
028d4092
ML
28102019-11-12 Martin Liska <mliska@suse.cz>
2811
2812 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
2813 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
2814 macro.
2815
62aee289
MR
28162019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2817 Frederik Harwath <frederik@codesourcery.com>
2818
2819 gcc/c/
2820 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
2821 (c_parser_oacc_kernels_parallel): Rename function to...
2822 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
2823 (c_parser_omp_construct): Update accordingly.
2824
2825
7cec9588
JJ
28262019-11-11 Jakub Jelinek <jakub@redhat.com>
2827
2828 * c-parser.c (c_parser_translation_unit): Diagnose declare target
2829 without corresponding end declare target.
2830
f486280c
RS
28312019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2832
2833 * c-convert.c (convert): Only handle vector conversions if one of
2834 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
2835 allows it.
2836 * c-typeck.c (build_array_ref): Only allow vector indexing if the
2837 vectors satisfy gnu_vector_type_p.
2838 (build_unary_op): Only allow unary operators to be applied to
2839 vectors if they satisfy gnu_vector_type_p.
2840 (digest_init): Only allow by-element initialization of vectors
2841 if they satisfy gnu_vector_type_p.
2842 (really_start_incremental_init): Likewise.
2843 (push_init_level): Likewise.
2844 (pop_init_level): Likewise.
2845 (process_init_element): Likewise.
2846 (build_binary_op): Only allow binary operators to be applied to
2847 vectors if they satisfy gnu_vector_type_p.
2848
017c6491
JM
28492019-11-08 Joseph Myers <joseph@codesourcery.com>
2850
2851 * c-decl.c (grokparms): Convert () in a function definition to
2852 (void) for C2x.
2853 (store_parm_decls_oldstyle): Pedwarn for C2x.
2854 (store_parm_decls): Update comment about () not generating a
2855 prototype.
2856
c01bd174
JM
28572019-11-07 Joseph Myers <joseph@codesourcery.com>
2858
2859 * c-parser.c (c_parser_attribute_arguments): New function.
2860 Factored out of c_parser_gnu_attribute.
2861 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
2862 (c_parser_balanced_token_sequence, c_parser_std_attribute)
2863 (c_parser_std_attribute_specifier): New functions.
2864 (c_parser_transaction_attributes): Use
2865 c_parser_std_attribute_specifier.
2866
471c5330
JM
28672019-11-07 Joseph Myers <joseph@codesourcery.com>
2868
2869 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
2870 lex_joined_string and translate_strings_p.
2871 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
2872 c_lex_with_flags.
2873 (c_parser_string_literal): New function.
2874 (c_parser_static_assert_declaration_no_semi): Use
2875 c_parser_string_literal. Do not set lex_untranslated_string.
2876 (c_parser_asm_string_literal): Use c_parser_string_literal.
2877 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
2878 (c_parser_gnu_attributes): Set and restore translate_strings_p
2879 instead of lex_untranslated_string.
2880 (c_parser_asm_statement): Do not set lex_untranslated_string.
2881 (c_parser_asm_operands): Likewise.
2882 (c_parser_has_attribute_expression): Set and restore
2883 translate_strings_p instead of lex_untranslated_string.
2884 (c_parser_postfix_expression): Use c_parser_string_literal.
2885 (pragma_lex): Likewise.
2886 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
2887 (c_parse_file): Set translate_strings_p.
2888 * gimple-parser.c (c_parser_gimple_postfix_expression)
2889 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
2890 * c-parser.c (c_parser_string_literal): Declare function.
2891
d0c464d2
JJ
28922019-11-02 Jakub Jelinek <jakub@redhat.com>
2893
2894 * c-parser.c (c_finish_omp_declare_variant): Use
2895 omp_get_context_selector instead of c_omp_get_context_selector.
2896
ac2cfa6c
RS
28972019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2898
2899 * c-tree.h (c_simulate_enum_decl): Declare.
2900 * c-decl.c (c_simulate_enum_decl): New function.
2901 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
2902
74078538
RS
29032019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2904
2905 * c-tree.h (c_simulate_builtin_function_decl): Declare.
2906 * c-decl.c (c_simulate_builtin_function_decl): New function.
2907 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
2908 to the above.
2909
ad1539d5
MS
29102019-10-28 Martin Sebor <msebor@redhat.com>
2911
2912 PR c/66970
2913 * c-decl.c (names_builtin_p): Define a new function.
2914
cb73e4e7
RB
29152019-10-28 Richard Biener <rguenther@suse.de>
2916
2917 PR c/92249
2918 * gimple-parser.c (c_parser_parse_gimple_body): Make
2919 current_bb the entry block initially to easier recover
2920 from errors.
2921 (c_parser_gimple_compound_statement): Adjust.
2922
135df52c
JJ
29232019-10-24 Jakub Jelinek <jakub@redhat.com>
2924
2925 * c-parser.c (c_finish_omp_declare_variant): Use
2926 omp_context_selector_matches instead of
2927 c_omp_context_selector_matches.
2928 * c-decl.c (c_decl_attributes): Add "omp declare target block"
2929 attribute in between declare target and end declare target
2930 pragmas.
2931
783bfe5e
JM
29322019-10-15 Joseph Myers <joseph@codesourcery.com>
2933
2934 * c-parser.c (c_parser_attribute_any_word): Rename to
2935 c_parser_gnu_attribute_any_word. All callers changed.
2936 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
2937 callers changed.
2938 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
2939 callers changed.
2940 (c_parser_declaration_or_fndef, c_parser_declspecs)
2941 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2942 (c_parser_struct_declaration, c_parser_declarator)
2943 (c_parser_gnu_attribute, c_parser_compound_statement)
2944 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
2945 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
2946 attribute-related syntax productions.
2947
56898e43
RS
29482019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2949
2950 * c-objc-common.c (useful_aka_type_p): Replace with...
2951 (get_aka_type): ...this new function. Given the original type,
2952 decide which aka type to print (if any). Only look through typedefs
2953 if user_facing_original_type_p.
2954 (print_type): Update accordingly.
2955
b9424661
JJ
29562019-10-14 Jakub Jelinek <jakub@redhat.com>
2957
2958 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
2959 into int NESTED, if it is 2, diagnose missing commas in between
2960 clauses.
2961 (c_parser_omp_context_selector): Pass 2 as last argument to
2962 c_parser_omp_all_clauses.
2963
20de9568
JJ
29642019-10-12 Jakub Jelinek <jakub@redhat.com>
2965
2966 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
2967 For simd properties, put them directly into TREE_VALUE.
2968 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
2969 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
2970 add "omp declare variant base" attribute rather than
2971 "omp declare variant".
2972
fe2bc27c
JM
29732019-10-11 Joseph Myers <joseph@codesourcery.com>
2974
2975 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
2976
94e7f906
JJ
29772019-10-10 Jakub Jelinek <jakub@redhat.com>
2978
2979 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
2980 true, terminate processing on closing paren and don't skip to end of
2981 pragma line.
2982 (c_parser_omp_declare_simd): Handle also declare variant.
2983 (omp_construct_selectors, omp_device_selectors,
2984 omp_implementation_selectors, omp_user_selectors): New variables.
2985 (c_parser_omp_context_selector,
2986 c_parser_omp_context_selector_specification,
2987 c_finish_omp_declare_variant): New functions.
2988 (c_finish_omp_declare_simd): Handle both declare simd and
2989 declare variant.
2990 (c_parser_omp_declare): Handle declare variant.
2991
93313b94
JM
29922019-10-02 Joseph Myers <joseph@codesourcery.com>
2993
2994 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
2995 CPP_COLON tokens.
2996
55879815
RS
29972019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2998
2999 * c-objc-common.c (useful_aka_type_p): New function.
3000 (print_type): Use it to decide whether an aka type is worth printing.
3001
59bc434a
JJ
30022019-09-27 Jakub Jelinek <jakub@redhat.com>
3003
3004 PR c++/88203
3005 * c-parser.c (c_parser_predefined_identifier): New function.
3006 (c_parser_postfix_expression): Use it.
3007 (c_parser_omp_variable_list): Parse predefined identifiers.
3008 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
3009 in shared and firstprivate clauses, even when they are predetermined
3010 shared.
3011
c6447c20
RS
30122019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3013
3014 * c-typeck.c (build_function_call_vec): Take the original function
3015 decl as an optional final parameter. Pass all built-in calls to
3016 check_builtin_function_arguments.
3017
522da4c2
EB
30182019-09-20 Eric Botcazou <ebotcazou@adacore.com>
3019
3020 PR c/91815
3021 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
3022 of identifiers in the external scope only for variables and functions.
3023
68e2c199
PK
30242019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3025
3026 PR c/78736
3027 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
3028
22f8849d
IS
30292019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3030
3031 PR pch/61250
3032 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
3033 after determining that the first token is not
3034 PRAGMA_GCC_PCH_PREPROCESS.
3035
db376f45
EB
30362019-08-22 Eric Botcazou <ebotcazou@adacore.com>
3037
3038 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
3039 FUNCTION_DECL to the right value in the presence of nested declarators.
3040
4d732405
RS
30412019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3042
3043 PR middle-end/91421
3044 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
3045
cb1180d5
RS
30462019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3047
3048 PR middle-end/91421
3049 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
3050 of a built_in_function.
3051 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
3052
77eb117f
JJ
30532019-08-10 Jakub Jelinek <jakub@redhat.com>
3054
3055 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
3056 (c_parser_omp_clause_device_type): New function.
3057 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3058 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3059 (c_parser_omp_declare_target): Handle device_type clauses. Remove
3060 diagnostics for declare target with clauses nested in clause-less
3061 declare target declaration-definition-seq.
3062 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
3063
2c3b8bad
JJ
30642019-08-09 Jakub Jelinek <jakub@redhat.com>
3065
bb522e2e
JJ
3066 * c-parser.c (check_no_duplicate_clause): Simplify using
3067 omp_find_clause.
3068 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
3069 directive name modifiers.
3070 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
3071
2c3b8bad
JJ
3072 PR c/91401
3073 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
3074 check_no_duplicate_clause call. Comment it out, instead emit a
3075 warning for duplicate dist_schedule clauses.
3076
99769e7f
RS
30772019-08-08 Richard Sandiford <richard.sandiford@arm.com>
3078
3079 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
3080
8860d270
JJ
30812019-08-08 Jakub Jelinek <jakub@redhat.com>
3082
3083 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
3084 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
3085 instead of generic_head to track duplicates.
3086
398e3feb
JJ
30872019-08-07 Jakub Jelinek <jakub@redhat.com>
3088
3089 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
3090 (c_parser_omp_clause_use_device_addr): New function.
3091 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3092 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3093 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
3094 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
3095 map or use_device_* clauses.
3096 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
3097 in OpenMP, require pointer type rather than pointer or array type.
3098 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
3099
a28351e7
JJ
31002019-07-31 Jakub Jelinek <jakub@redhat.com>
3101
3102 PR c/91192
3103 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
3104 even if finish is UNKNOWN_LOCATION, just use start as finish in that
3105 case.
3106
6343b6bf
ML
31072019-07-25 Martin Liska <mliska@suse.cz>
3108 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
3109
3110 PR c++/23383
3111 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
3112
cb50701e
ML
31132019-07-25 Martin Liska <mliska@suse.cz>
3114
3115 * c-decl.c (merge_decls): Use new macros
3116 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
3117
62e3e66f
RB
31182019-07-23 Richard Biener <rguenther@suse.de>
3119
3120 PR tree-optimization/83518
3121 * gimple-parser.c (c_parser_parse_gimple_body): When we have
3122 a CFG also rebuild cgraph edges.
3123
554a530f
JJ
31242019-07-20 Jakub Jelinek <jakub@redhat.com>
3125
3126 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
3127 (c_parser_omp_clause_bind): New function.
3128 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
3129 (OMP_LOOP_CLAUSE_MASK): Define.
3130 (c_parser_omp_loop): New function.
3131 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
3132 loop combined with parallel or teams.
3133 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
3134 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
3135
d119bf79
RS
31362019-07-18 Richard Sandiford <richard.sandiford@arm.com>
3137
3138 PR c/53633
3139 * c-decl.c (finish_function): Check targetm.warn_func_return
3140 before issuing a -Wreturn-type warning.
3141
ab20d992 31422019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
3143
3144 * gimple-parser.c (c_parser_gimple_try_stmt): New.
3145 (c_parser_compound_statement): Call it.
3146
1fdd6f04
JJ
31472019-07-12 Jakub Jelinek <jakub@redhat.com>
3148
3149 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
3150 (c_parser_omp_clause_order): New function.
3151 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
3152 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
3153 PRAGMA_OMP_CLAUSE_ORDER.
3154 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
3155
8389386c
RB
31562019-07-10 Richard Biener <rguenther@suse.de>
3157
3158 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
3159 _Literal (int *) &x for address literals.
3160
99b1c316
MS
31612019-07-09 Martin Sebor <msebor@redhat.com>
3162
3163 PR c++/61339
3164 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
3165 to class.
3166 (field_decl_cmp): Same.
3167 * c-parser.c (c_parser_struct_or_union_specifier): Same.
3168 * c-tree.h: Same.
3169 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
3170
6c1dae73
MS
31712019-07-09 Martin Sebor <msebor@redhat.com>
3172
3173 PR c++/61339
3174 * c-decl.c: Change class-key from class to struct and vice versa
3175 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
3176 * gimple-parser.c: Same.
3177
69b5279e
RB
31782019-07-01 Richard Biener <rguenther@suse.de>
3179
3180 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3181 _Literal (char *) &"foo" for address literals pointing to
3182 STRING_CSTs.
3183
ab20d992
JJ
31842019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3185
3186 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
3187 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
3188 C incompatibility if alternate "__intN__" form is used.
3189
1e3d475e
MS
31902019-06-24 Martin Sebor <msebor@redhat.com>
3191
3192 * c-typeck.c (build_binary_op): Hyphenate floating-point.
3193
bf38f7e9
JJ
31942019-06-10 Jakub Jelinek <jakub@redhat.com>
3195
3196 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
3197 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
3198 (c_parser_omp_scan_loop_body): New function.
3199 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
3200 inscan reduction clauses.
3201 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
3202 non-inscan reductions on the same construct, or inscan reductions with
3203 ordered or schedule clauses, or inscan array reductions.
3204
65985d78
MS
32052019-06-05 Martin Sebor <msebor@redhat.com>
3206
3207 PR c/90737
3208 * c-typeck.c (c_finish_return): Only consider functions returning
3209 pointers as candidates for -Wreturn-local-addr.
3210
0ecf545c
MS
32112019-06-05 Martin Sebor <msebor@redhat.com>
3212
3213 * c-decl.c (start_decl): Adjust quoting and hyphenation
3214 in diagnostics.
3215 (finish_decl): Same.
3216 (finish_enum): Same.
3217 (start_function): Same.
3218 (declspecs_add_type): Same.
3219 * c-parser.c (warn_for_abs): Same.
3220 * c-typeck.c (build_binary_op): Same.
3221
e03436e7
TS
32222019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3223
b48f44bf
TS
3224 PR c/89433
3225 * c-parser.c (c_finish_oacc_routine): Rework checking if already
3226 marked with an OpenACC 'routine' directive.
3227
5bf04509
TS
3228 PR c/89433
3229 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
3230 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
3231
e03436e7
TS
3232 PR c/89433
3233 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
3234 clauses from "omp declare target" attribute.
3235
a9c697b8
MS
32362019-05-16 Martin Sebor <msebor@redhat.com>
3237
ab20d992
JJ
3238 * c-decl.c (start_decl): Quote keywords, operators, and
3239 types in diagnostics.
3240 (finish_decl): Same.
3241 * c-parser.c (c_parser_asm_statement): Same.
3242 (c_parser_conditional_expression): Same.
3243 (c_parser_transaction_cancel): Same.
3244 * c-typeck.c (c_common_type): Same.
3245 (build_conditional_expr): Same.
3246 (digest_init): Same.
3247 (process_init_element): Same.
3248 (build_binary_op): Same.
a9c697b8 3249
c4499192
RB
32502019-05-17 Richard Biener <rguenther@suse.de>
3251
3252 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
3253 (c_parser_gimple_unary_expression): Likewise.
3254 (c_parser_gimple_parentized_ternary_expression): New function.
3255
adfe6e4b
RB
32562019-05-16 Richard Biener <rguenther@suse.de>
3257
3258 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
3259 (c_parser_gimple_unary_expression): Likewise.
3260
186dabf2
RB
32612019-05-15 Richard Biener <rguenther@suse.de>
3262
3263 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3264 __BIT_FIELD_REF.
3265
1158c5b4
RB
32662019-05-14 Richard Biener <rguenther@suse.de>
3267
3268 * gimple-parser.c (c_parser_gimple_statement): Remove
3269 questionable auto-promotion to VIEW_CONVERT_EXPR.
3270 (c_parser_gimple_typespec): Split out from __MEM parsing.
3271 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
3272 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
3273 as __VIEW_CONVERT with -gimple.
3274
fd4485aa
ML
32752019-05-09 Martin Liska <mliska@suse.cz>
3276
3277 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
3278 __MAX.
3279 (c_parser_gimple_unary_expression): Parse also binary expression
3280 __MIN and __MAX.
3281 (c_parser_gimple_parentized_binary_expression): New function.
3282
d276406a
ML
32832019-05-09 Martin Liska <mliska@suse.cz>
3284
3285 * gimple-parser.c (struct gimple_parser): Add probability.
3286 for gimple_parser_edge.
3287 (gimple_parser::push_edge): Add new argument probability.
3288 (c_parser_gimple_parse_bb_spec): Parse also probability
3289 if present.
3290 (c_parser_parse_gimple_body): Set edge probability.
3291 (c_parser_gimple_compound_statement): Consume token
3292 before calling c_parser_gimple_goto_stmt.
3293 Parse BB counts.
3294 (c_parser_gimple_statement): Pass new argument.
3295 (c_parser_gimple_goto_stmt): Likewise.
3296 (c_parser_gimple_if_stmt): Likewise.
3297 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
3298 * c-parser.c (c_parser_declaration_or_fndef): Pass
3299 hot_bb_threshold argument.
3300 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
3301 field.
3302 (c_parser_gimple_parse_bb_spec_edge_probability): New.
3303
f179b64e
JJ
33042019-04-26 Jakub Jelinek <jakub@redhat.com>
3305
3306 PR debug/90197
3307 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
3308 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
3309 (c_parser_do_statement): Likewise.
3310 (c_parser_for_statement): Likewise. Formatting fixes.
3311 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
3312 emit DEBUG_BEGIN_STMTs if needed.
3313
e7178413
JJ
33142019-04-19 Jakub Jelinek <jakub@redhat.com>
3315
c280b7ee
JJ
3316 PR c/89888
3317 * c-typeck.c (struct c_switch): Remove outside_range_p member.
3318 (c_start_case): Don't clear it.
3319 (do_case): Adjust c_add_case_label caller.
3320 (c_finish_case): Adjust c_do_switch_warnings caller.
3321
e7178413
JJ
3322 PR c++/90108
3323 * c-decl.c (merge_decls): If remove is main variant and
3324 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
3325 variant that has newdecl as TYPE_NAME if any.
3326
60a2c645
JJ
33272019-04-12 Jakub Jelinek <jakub@redhat.com>
3328
3329 PR c/89933
3330 * c-decl.c (merge_decls): When newdecl's type is its main variant,
3331 don't try to remove it from the variant list, but instead assert
3332 it has no variants.
3333
2a82beaa
RB
33342019-04-01 Richard Biener <rguenther@suse.de>
3335
3336 PR c/71598
3337 * c-tree.h (c_get_alias_set): Declare.
3338 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
3339 * c-objc-common.c (c_get_alias_set): Treat enumeral types
3340 as the underlying integer type.
3341
bec1da64
MS
33422019-03-19 Martin Sebor <msebor@redhat.com>
3343
3344 PR tree-optimization/89688
3345 * c-decl.c (finish_decl): Call braced_lists_to_string for more
3346 kinds of initializers.
3347
855cd9b1
JJ
33482019-03-19 Jakub Jelinek <jakub@redhat.com>
3349
3350 PR c/89734
3351 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
3352 return type even if quals_used is 0. Formatting fixes.
3353
baa09dc5
RB
33542019-03-14 Richard Biener <rguenther@suse.de>
3355
3356 * c-tree.h (enum c_declspec_il): New.
3357 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
3358 enum bitfield.
3359 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
3360 Pass start pass and declspec_il to c_parser_parse_gimple_body.
3361 (c_parser_declspecs): Adjust.
3362 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
3363 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
3364 and bitmap.h.
3365 (struct gimple_parser): New.
3366 (gimple_parser::push_edge): New method.
3367 (c_parser_gimple_parse_bb_spec): New helper.
3368 (c_parser_parse_gimple_body): Get start pass and IL specification.
3369 Initialize SSA and CFG.
3370 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
3371 Build a gimple_parser parsing state and pass it along.
3372 (c_parser_gimple_statement): Change intermittend __PHI internal
3373 function argument for the edge.
3374 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
3375 (c_parser_gimple_goto_stmt): Record edges to build.
3376 (c_parser_gimple_if_stmt): Likewise.
3377 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
3378 (c_parser_gimple_or_rtl_pass_list): Likewise.
3379
a3f9f006
ML
33802019-03-11 Martin Liska <mliska@suse.cz>
3381
3382 * c-decl.c (check_for_loop_decls): Wrap an option name
3383 in a string format message and fix GNU coding style.
3384 * c-parser.c (c_parser_declspecs): Likewise.
3385
1db01ff9
JJ
33862019-03-08 Jakub Jelinek <jakub@redhat.com>
3387
3388 PR tree-optimization/89550
3389 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
3390 returned true.
3391 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
3392 or warning returned true.
3393
66dcb747
JJ
33942019-02-28 Jakub Jelinek <jakub@redhat.com>
3395
3396 PR c/89525
3397 * c-typeck.c (convert_arguments): Call inform_declaration only if
3398 the previous warning_at call returned true.
3399
2263c9f2
TS
34002019-02-22 Thomas Schwinge <thomas@codesourcery.com>
3401
3402 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
3403 parameter. Adjust all users.
3404 (c_parser_oacc_simple_clause): Replace parser with loc formal
3405 parameter. Adjust all users.
3406
ab20d992 34072019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
3408
3409 PR c/87924
3410 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
3411 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
3412
5f88ba10
JJ
34132019-02-15 Jakub Jelinek <jakub@redhat.com>
3414
3415 PR c/89340
3416 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
3417 before c_decl_attributes rather than after it.
3418
cfc30fd1
JJ
34192019-02-06 Jakub Jelinek <jakub@redhat.com>
3420
3421 PR c/89211
3422 * c-parser.c (c_parser_declaration_or_fndef): Don't update
3423 DECL_ARGUMENTS of d if it has been defined already. Use a single if
3424 instead of 3 nested ifs.
3425
fbe83e6b
JM
34262019-02-06 Joseph Myers <joseph@codesourcery.com>
3427
3428 PR c/88584
3429 * c-decl.c (finish_decl): Do not complete array types for arrays
3430 with external linkage not at file scope.
3431
f461f938
RB
34322019-02-05 Richard Biener <rguenther@suse.de>
3433
3434 PR c/88606
3435 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
3436 all type variants when not supported.
3437
fe509359
JJ
34382019-01-30 Jakub Jelinek <jakub@redhat.com>
3439
3440 PR c/89061
3441 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
3442 * c-decl.c (decl_jump_unsafe): Return false for
3443 C_DECL_COMPOUND_LITERAL_P decls.
3444 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
3445
6a335b96
JJ
34462019-01-29 Jakub Jelinek <jakub@redhat.com>
3447
f4b7e754
JJ
3448 PR c/89045
3449 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
3450 scope.
3451
6a335b96
JJ
3452 PR c/86125
3453 * c-decl.c (last_fileptr_type): Remove.
3454 (last_structptr_types): New variable.
3455 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
3456 {old,new}rettype instead of the types themselves. Assert
3457 last_structptr_types array has the same number of elements
3458 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
3459 argument oldtype and newtype. Instead of handling
3460 just fileptr_type_node specially, handle all builtin_structptr_types
3461 pointer nodes. Formatting fix.
3462
d8b5a1a0
MS
34632019-01-24 Martin Sebor <msebor@redhat.com>
3464
3465 PR c/86125
3466 PR c/88886
3467 PR middle-end/86308
3468 * c-decl.c (match_builtin_function_types): Add arguments.
3469 (diagnose_mismatched_decls): Diagnose mismatched declarations
3470 of built-ins more strictly.
3471
e21c4491
JJ
34722019-01-24 Jakub Jelinek <jakub@redhat.com>
3473
3474 PR c++/88976
3475 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
3476 on #pragma omp cancel with different modifiers.
3477
420183d9
L
34782019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3479
3480 PR c/51628
3481 PR c/88664
3482 * c-typeck.c (convert_for_assignment): Upate the
3483 warn_for_address_or_pointer_of_packed_member call.
3484
17ad43dd
TH
34852019-01-16 Tom Honermann <tom@honermann.net>
3486 Jason Merrill <jason@redhat.com>
3487
3488 * c-typeck.c (digest_init): Revised the error message produced for
3489 ill-formed cases of array initialization with a string literal.
3490 (error_init): Make variadic.
3491
5f07d78a
JJ
34922019-01-12 Jakub Jelinek <jakub@redhat.com>
3493
3494 * c-typeck.c (convert_for_assignment): Fix a comment typo.
3495
c4581bbf
JJ
34962019-01-07 Jakub Jelinek <jakub@redhat.com>
3497
3498 PR c/88701
3499 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
3500 if current_function_decl is non-NULL.
3501
65c5b1eb
JM
35022019-01-07 Joseph Myers <joseph@codesourcery.com>
3503
3504 PR c/88720
3505 PR c/88726
3506 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
3507 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
3508 functions declared but never defined only for external scope, not
3509 for other scopes.
3510
d8fcab68
JJ
35112019-01-07 Jakub Jelinek <jakub@redhat.com>
3512
3513 PR c++/85052
3514 * c-parser.c (c_parser_postfix_expression): Parse
3515 __builtin_convertvector.
3516
a5544970
JJ
35172019-01-01 Jakub Jelinek <jakub@redhat.com>
3518
3519 Update copyright years.
3520
da77eace
L
35212018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3522
3523 PR c/51628
3524 * c-typeck.c (convert_for_assignment): Call
3525 warn_for_address_or_pointer_of_packed_member.
3526
1edf8866
SB
35272018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3528
3529 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
3530 a more specific error message (instead of just falling through).
3531
db4fd626
SB
35322018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3533
3534 * c-parser.c (c_parser_asm_statement): Keep track of the location each
3535 asm qualifier is first seen; use that to give nicer "duplicate asm
3536 qualifier" messages. Delete 'quals" variable, instead pass the
3537 "is_volatile_ flag to build_asm_stmt directly.
3538 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
3539 * c-typeck.c (build_asm_stmt): Ditto; adjust.
3540
9c9cfcbb
SB
35412018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3542
3543 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
3544 "done" boolean variable.
3545
a14feb3c
DM
35462018-12-19 David Malcolm <dmalcolm@redhat.com>
3547
3548 PR c++/87504
3549 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
3550 Move from here to gcc-rich-location.h and gcc-rich-location.c.
3551 (build_binary_op): Use struct op_location_t and
3552 class binary_op_rich_location.
3553
6d939173
JJ
35542018-12-11 Jakub Jelinek <jakub@redhat.com>
3555
3556 PR sanitizer/88426
3557 * c-convert.c (convert): Call c_fully_fold before calling
3558 ubsan_instrument_float_cast.
3559
b7055028
SB
35602018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
3561
3562 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
3563 setting "quals".
3564
5b76e75f
SB
35652018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3566
3567 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
3568 after asm. Pass a flag for it to build_asm_expr.
3569 * c-tree.h (build_asm_expr): Update declaration.
3570 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
3571 set ASM_INLINE_P.
3572
30bd42b9
SB
35732018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3574
3575 PR inline-asm/55681
3576 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
3577 combination of volatile and goto, in any order, without repetitions.
3578
9df6c0e4
JB
35792018-12-04 James Norris <jnorris@codesourcery.com>
3580 Cesar Philippidis <cesar@codesourcery.com>
3581 Julian Brown <julian@codesourcery.com>
3582
3583 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
3584 code.
3585
f44697b7
RB
35862018-11-30 Richard Biener <rguenther@suse.de>
3587
3588 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3589 _Literal (type) { ... } as empty aggregate or vector constructor.
3590
550dfbdc
MS
35912018-11-29 Martin Sebor <msebor@redhat.com>
3592
3593 PR c/88091
3594 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
3595 (convert_arguments): Add comments. Pass additional argument to
3596 the function above.
3597
673670da
MS
35982018-11-29 Martin Sebor <msebor@redhat.com>
3599
3600 PR c/88172
3601 PR testsuite/88208
3602 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
3603
db1d09b0
MS
36042018-11-23 Martin Sebor <msebor@redhat.com>
3605
3606 PR testsuite/88098
3607 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
3608 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
3609
98f08eb8
MS
36102018-11-20 Martin Sebor <msebor@redhat.com>
3611
3612 * c-parser.c (c_parser_has_attribute_expression): New function.
3613 (c_parser_attribute): New function.
3614 (c_parser_attributes): Move code into c_parser_attribute.
3615 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
3616
cd5da983
MS
36172018-11-15 Martin Sebor <msebor@redhat.com>
3618
3619 PR c/83656
3620 * c-decl.c (header_for_builtin_fn): Declare.
3621 (diagnose_mismatched_decls): Diagnose declarations of built-in
3622 functions without a prototype.
3623 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
3624 (convert_argument): Same.
3625 (convert_arguments): Factor code out into convert_argument.
3626 Detect mismatches between built-in formal arguments in calls
3627 to built-in without prototype.
3628 (build_conditional_expr): Same.
3629 (type_or_builtin_type): New function.
3630 (convert_for_assignment): Add argument. Conditionally issue
3631 warnings instead of errors for mismatches.
3632
620e594b
DM
36332018-11-13 David Malcolm <dmalcolm@redhat.com>
3634
3635 * c-decl.c: Replace "source_location" with "location_t".
3636 * c-tree.h: Likewise.
3637 * c-typeck.c: Likewise.
3638 * gimple-parser.c: Likewise.
3639
3179ebae
JJ
36402018-11-09 Jakub Jelinek <jakub@redhat.com>
3641
81a227c6
JJ
3642 * c-parser.c (c_parser_omp_clause_final): Use
3643 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
3644 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
3645 parsing instead of c_parser_paren_condition.
3646 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
3647 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
3648 c_fully_fold instead of c_parser_condition.
3649 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
3650 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
3651 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
3652 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
3653 c_parser_expr_no_commas instead of c_parser_expression.
3654
98c91c56
JJ
3655 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
3656 reduction clause with inscan modifier.
3657
3179ebae
JJ
3658 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
3659 clauses other than atomic_default_mem_order.
3660
28567c40
JJ
36612018-11-08 Jakub Jelinek <jakub@redhat.com>
3662
3663 * c-parser.c: Include memmode.h.
3664 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
3665 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
3666 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
3667 task_reduction clauses.
3668 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
3669 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
3670 section, or lvalue assignment expression.
3671 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
3672 (c_parser_omp_clause_lastprivate): Parse optional
3673 conditional: modifier.
3674 (c_parser_omp_clause_hint): Require constant integer expression rather
3675 than just integer expression.
3676 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
3677 clause.
3678 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
3679 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
3680 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
3681 functions.
3682 (c_parser_omp_clause_depend): Parse iterator modifier and handle
3683 iterators. Parse mutexinoutset and depobj kinds.
3684 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
3685 callers.
3686 (c_parser_omp_all_clauses): Likewise. Handle
3687 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
3688 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3689 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
3690 default memory order from requires directive if any. Adjust
3691 c_finish_omp_atomic caller.
3692 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
3693 (c_parser_omp_flush): Parse flush with memory-order-clause.
3694 (c_parser_omp_for_loop): Allow NE_EXPR even in
3695 OpenMP loops, adjust c_finish_omp_for caller.
3696 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
3697 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
3698 Allow to be called while parsing combined parallel master.
3699 Parse combined master taskloop{, simd}.
3700 (c_parser_omp_parallel): Parse combined
3701 parallel master{, taskloop{, simd}} constructs.
3702 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
3703 (OMP_TASKGROUP_CLAUSE_MASK): Define.
3704 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
3705 (OMP_TASKWAIT_CLAUSE_MASK): Define.
3706 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
3707 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
3708 around teams body. Use SET_EXPR_LOCATION.
3709 (c_parser_omp_target_data): Allow target data
3710 with only use_device_ptr clauses.
3711 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
3712 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
3713 (c_parser_omp_requires): New function.
3714 (c_finish_taskloop_clauses): New function.
3715 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
3716 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
3717 declaration. Disallow in_reduction clause when combined with parallel
3718 master.
3719 (c_parser_omp_construct): Adjust c_parser_omp_master and
3720 c_parser_omp_taskgroup callers.
3721 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
3722 other than cancel.
3723 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
3724 like OMP_CLAUSE_REDUCTION.
3725 (handle_omp_array_sections): Likewise. Call save_expr on array
3726 reductions before calling build_index_type. Handle depend clauses
3727 with iterators.
3728 (struct c_find_omp_var_s): New type.
3729 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
3730 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
3731 with static, runtime or auto schedule kinds. Call save_expr for whole
3732 array reduction sizes. Diagnose reductions with zero sized elements
3733 or variable length structures. Diagnose nogroup clause used with
3734 reduction clause(s). Handle depend clause with
3735 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
3736 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
3737 some different type for other kinds. Use build_unary_op with
3738 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
3739 Handle depend clauses with iterators. Remove no longer needed special
3740 case that predetermined const qualified vars may be specified in
3741 firstprivate clause. Complain if const qualified vars are mentioned
3742 in data-sharing clauses other than firstprivate or shared. Use
3743 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
3744 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
3745 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
3746 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
3747
7e2de6df
DM
37482018-10-29 David Malcolm <dmalcolm@redhat.com>
3749
3750 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
3751 logic for change to name_hint::operator bool.
3752 (undeclared_variable): Likewise.
3753 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3754 (c_parser_parameter_declaration): Likewise.
3755
9f936c86
JM
37562018-10-17 Joseph Myers <joseph@codesourcery.com>
3757
3758 * c-errors.c (pedwarn_c11): New function.
3759 * c-parser.c (disable_extension_diagnostics): Save
3760 warn_c11_c2x_compat and set it to 0.
3761 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
3762 (c_parser_static_assert_declaration_no_semi): Handle
3763 _Static_assert without string constant.
3764 * c-tree.h (pedwarn_c11): New prototype.
3765
033eb567
DM
37662018-10-17 David Malcolm <dmalcolm@redhat.com>
3767
3768 * Make-lang.in (selftest-c): New.
3769 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3770 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
3771 from gcc/Makefile.in.
3772
0edf3afe
RB
37732018-10-02 Richard Biener <rguenther@suse.de>
3774
3775 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
3776
8313a764
JM
37772018-09-26 Joseph Myers <joseph@codesourcery.com>
3778
3779 PR c/87390
3780 * c-typeck.c (build_binary_op): Use excess precision for
3781 comparisons of integers and floating-point for C11 and later.
3782
ce6f0888
MJ
37832018-09-26 Martin Jambor <mjambor@suse.cz>
3784
3785 PR c/87347
3786 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 3787 comment.
ce6f0888 3788
9c4a4b3c
DM
37892018-09-17 David Malcolm <dmalcolm@redhat.com>
3790
3791 * c-objc-common.c (range_label_for_type_mismatch::get_text):
3792 Update for new param.
3793 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
3794 Likewise.
3795
80c6d1f4
MJ
37962018-09-17 Martin Jambor <mjambor@suse.cz>
3797
3798 PR c/63886
3799 * c-parser.c: (warn_for_abs): New function.
3800 (c_parser_postfix_expression_after_primary): Call it.
3801
4a426e36
BE
38022018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3803
3804 * c-typeck.c (digest_init): Shorten overlength strings.
3805
6d900107
BE
38062018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3807
3808 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
3809
b5764229
BE
38102018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3811
3812 * c-decl.c (finish_decl): Call braced_list_to_string here ...
3813 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
3814
22eea6b2
AM
38152018-08-30 Alexander Monakov <amonakov@ispras.ru>
3816
3817 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
3818 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
3819
85204e23
DM
38202018-08-27 David Malcolm <dmalcolm@redhat.com>
3821
3822 PR 87091
3823 * c-decl.c (implicitly_declare): Update call to
3824 maybe_add_include_fixit to suggest overriding the location, as it
3825 is for a note.
3826 * c-objc-common.c (c_tree_printer): Update for conversion of
3827 show_caret_p to a tri-state.
3828
3d78e008
ML
38292018-08-27 Martin Liska <mliska@suse.cz>
3830
3831 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
3832 fndecl_built_in_p and remove check for FUNCTION_DECL if
3833 possible.
3d78e008
ML
3834 (diagnose_mismatched_decls): Likewise.
3835 (merge_decls): Likewise.
3836 (warn_if_shadowing): Likewise.
3837 (pushdecl): Likewise.
3838 (implicitly_declare): Likewise.
3839 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3840 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
3841 * c-typeck.c (build_function_call_vec): Likewise.
3842 (convert_arguments): Likewise.
3843
097f82ec
DM
38442018-08-20 David Malcolm <dmalcolm@redhat.com>
3845
3846 PR other/84889
3847 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
3848 (diagnose_mismatched_decls): Likewise, in various places.
3849 (warn_if_shadowing): Likewise.
3850 (implicit_decl_warning): Likewise.
3851 (implicitly_declare): Likewise.
3852 (undeclared_variable): Likewise.
3853 (declare_label): Likewise.
3854 (grokdeclarator): Likewise.
3855 (start_function): Likewise.
3856 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3857 (c_parser_parameter_declaration): Likewise.
3858 (c_parser_binary_expression): Likewise.
3859 * c-typeck.c (c_expr_sizeof_expr): Likewise.
3860 (parser_build_binary_op): Likewise.
3861 (build_unary_op): Likewise.
3862 (error_init): Likewise.
3863 (pedwarn_init): Likewise.
3864 (warning_init): Likewise.
3865 (convert_for_assignment): Likewise.
3866
96e6ae57
DM
38672018-08-15 David Malcolm <dmalcolm@redhat.com>
3868
3869 * c-objc-common.c: Include "gcc-rich-location.h".
3870 (c_tree_printer): Move implemenation of '%T' to...
3871 (print_type): ...this new function.
3872 (range_label_for_type_mismatch::get_text): New function.
3873 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
3874 range for the various ic_argpass cases.
3875 (class maybe_range_label_for_tree_type_mismatch): New class.
3876 (build_binary_op): Use it when calling binary_op_error.
3877
0cd020ae 38782018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 3879
0cd020ae
PK
3880 * c-decl.c (start_decl): Do not warn if variables is named as main
3881 and is a local variable.
3882
72733314
IS
38832018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3884
3885 PR c/19315
3886 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
3887 objects of unknown size.
3888
23aa9f7c
MS
38892018-08-13 Martin Sebor <msebor@redhat.com>
3890
3891 PR tree-optimization/71625
3892 * c-parser.c (c_parser_declaration_or_fndef): Call
3893 braced_list_to_string.
3894
e5e7e50d
BH
38952018-08-03 Bogdan Harjoc <harjoc@gmail.com>
3896
3897 PR c/86690
3898 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
3899 errors.
3900
8a45b051
MS
39012018-08-01 Martin Sebor <msebor@redhat.com>
3902
3903 PR tree-optimization/86650
3904 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
3905 and TREE_BLOCK (t) from within percent_K_format to this callsite.
3906
5922dcb5
JJ
39072018-08-01 Jakub Jelinek <jakub@redhat.com>
3908
3909 PR c/85704
3910 * c-typeck.c (init_field_decl_cmp): New function.
3911 (output_pending_init_elements): Use it for field comparisons
3912 instead of pure bit_position comparisons.
3913
9b452033
JJ
39142018-07-12 Jakub Jelinek <jakub@redhat.com>
3915
3916 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
3917 type here, instead add "omp declare target implicit" attribute.
3918 (finish_decl): Diagnose vars without mappable type here.
3919
ab20d992
JJ
39202018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3921 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3922 Cesar Philippidis <cesar@codesourcery.com>
3923
3924 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
3925 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
3926 to their non-present_or_* counterparts. Make 'self' an alias to
3927 PRAGMA_OACC_CLAUSE_HOST.
3928 (c_parser_oacc_data_clause): Update GOMP mappings for
3929 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
3930 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
3931 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
3932 Remove support for present_or_* clauses.
3933 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3934 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
3935 (OACC_DECLARE_CLAUSE_MASK): Likewise.
3936 (OACC_DATA_CLAUSE_MASK): Likewise.
3937 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3938 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
3939 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
3940 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
3941 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
3942
e197e64e
KV
39432018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3944
3945 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
3946 * gimple-parser.c (c_parser_gimple_statement): Likewise.
3947 (c_parser_gimple_unary_expression): Likewise.
3948
487f2f61
JJ
39492018-06-15 Jakub Jelinek <jakub@redhat.com>
3950
3951 PR c/86093
3952 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
3953 before doing POINTER_DIFF_EXPR.
3954
e4d44a37
MP
39552018-06-07 Marek Polacek <polacek@redhat.com>
3956
3957 PR c/85318
3958 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
3959 for loop initial declarations.
3960
b67b9225
DP
39612018-05-30 David Pagan <dave.pagan@oracle.com>
3962
3963 PR c/55976
3964 * c-decl.c (grokdeclarator): Update check for return type warnings.
3965 (start_function): Likewise.
3966 (finish_function): Likewise.
3967 * c-typeck.c (c_finish_return): Update check for return type warnings.
3968 Pass OPT_Wreturn_type to pedwarn when appropriate.
3969
c566cc9f
RS
39702018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
3971
3972 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
3973 __FMA_EXPR handlng.
3974
e4f81565
RS
39752018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3976
3977 * gimple-parser.c: Include internal-fn.h.
3978 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
3979 (c_parser_gimple_call_internal): New function.
3980 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
3981 Fix typos in comment.
3982
79e7b1fe
JJ
39832018-05-10 Jakub Jelinek <jakub@redhat.com>
3984
3985 PR c++/85662
3986 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
3987 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
3988 fold_convert_loc.
3989 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
3990 fold_offsetof_1, pass argtype as TYPE to it and drop the
3991 fold_convert_loc.
3992
f7584c81
DP
39932018-05-02 David Pagan <dave.pagan@oracle.com>
3994
3995 PR c/30552
3996 * c-decl.c (old_style_parameter_scope): New function.
3997 * c-parser.c (c_parser_postfix_expression): Check for statement
3998 expressions in old-style function parameter list declarations.
3999 * c-parser.h (old_style_parameter_scope): New extern declaration.
4000
b33a0cb3
JJ
40012018-04-25 Jakub Jelinek <jakub@redhat.com>
4002
4003 PR sanitizer/84307
4004 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
4005 it is not TREE_STATIC.
4006 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
4007 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
4008 its COMPOUND_LITERAL_EXPR_DECL.
4009
c5c5822a
JM
40102018-03-21 Joseph Myers <joseph@codesourcery.com>
4011
4012 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
4013 where all functions return the same _FloatN or _FloatNx type,
4014 treat integer types as _Float64 instead of double.
4015
aa1c9429
JJ
40162018-03-21 Jakub Jelinek <jakub@redhat.com>
4017
4018 PR c/84999
4019 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
4020 building vector comparison, diagnose it and return error_mark_node.
4021
9bb45a95
JJ
40222018-03-15 Jakub Jelinek <jakub@redhat.com>
4023
4024 PR c/84853
4025 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
4026 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
4027 INTEGER_TYPE element type.
4028
ada6bad9
DP
40292018-03-13 David Pagan <dave.pagan@oracle.com>
4030
4031 PR c/46921
4032 * c-typeck.c (output_init_element): Ensure field initializer
4033 expression is always evaluated if there are side effects.
4034
849bbdb9
JJ
40352018-03-06 Jakub Jelinek <jakub@redhat.com>
4036
4037 PR c/84721
4038 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
4039 !building_stmt_list_p ().
4040
d74641bd
RS
40412018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
4042
4043 PR c/84305
4044 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
4045 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
4046 and include the BIND_EXPR in the list of things that need to be
4047 pre-evaluated.
4048
0444aa9c
NS
40492018-02-09 Nathan Sidwell <nathan@acm.org>
4050
4051 PR c/84293
4052 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
4053 to strict_aliasing_warning.
4054
7c30b12a
PC
40552018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4056
4057 * c-typeck.c (really_start_incremental_init, push_init_level,
4058 set_nonincremental_init, output_init_element, process_init_element):
4059 Use DECL_UNNAMED_BIT_FIELD.
4060
2be4dfcb
MP
40612018-01-31 Marek Polacek <polacek@redhat.com>
4062
4063 PR c/81779
4064 * c-parser.c (c_parser_compound_statement_nostart): Call
4065 expansion_point_location_if_in_system_header.
4066
bb9869d5
DM
40672018-01-17 David Malcolm <dmalcolm@redhat.com>
4068
4069 PR c++/83814
4070 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
4071 the C part.
4072
b4923738
JJ
40732018-01-13 Jakub Jelinek <jakub@redhat.com>
4074
4075 PR c/83801
4076 * c-tree.h (decl_constant_value_1): Add a bool argument.
4077 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
4078 returning a CONSTRUCTOR if it is true. Use error_operand_p.
4079 (decl_constant_value): Adjust caller.
4080 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
4081 decl_constant_value_1 as IN_INIT. Otherwise, punt if
4082 decl_constant_value returns initializer that has BLKmode or
4083 array type.
4084 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
4085
928686b1
RS
40862018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4087 Alan Hayward <alan.hayward@arm.com>
4088 David Sherwood <david.sherwood@arm.com>
4089
4090 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
4091 TYPE_VECTOR_SUBPARTS.
4092
85ec4feb
JJ
40932018-01-03 Jakub Jelinek <jakub@redhat.com>
4094
4095 Update copyright years.
4096
913884f7
JJ
40972018-01-01 Jakub Jelinek <jakub@redhat.com>
4098
4099 PR c/83595
4100 * c-parser.c (c_parser_braced_init, c_parser_initelt,
4101 c_parser_conditional_expression, c_parser_cast_expression,
4102 c_parser_sizeof_expression, c_parser_alignof_expression,
4103 c_parser_postfix_expression, c_parser_omp_declare_reduction,
4104 c_parser_transaction_expression): Use set_error () method instead
4105 of setting value member to error_mark_node.
4106
c6cfa2bf
MM
41072017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
4108
4109 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
4110 and _Float<N>X built-in functions.
4111
11d29d63
JJ
41122017-12-22 Jakub Jelinek <jakub@redhat.com>
4113
14ec014e
JJ
4114 PR debug/83550
4115 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
4116 TYPE_STUB_DECL and call rest_of_type_compilation before processing
4117 incomplete vars rather than after it.
4118
11d29d63
JJ
4119 PR debug/83547
4120 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
4121 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
4122 and consider empty ones if there are no other stmts. For
4123 -Wunused-value walk all statements before the one only followed by
4124 DEBUG_BEGIN_STMTs.
4125
170a8bd6 41262017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 4127 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
4128
4129 * c-parser.c (c_parser_while_statement): Add unroll parameter and
4130 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
4131 (c_parser_do_statement): Likewise.
4132 (c_parser_for_statement): Likewise.
4133 (c_parser_statement_after_labels): Adjust calls to above.
4134 (c_parse_pragma_ivdep): New static function.
4135 (c_parser_pragma_unroll): Likewise.
4136 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
4137 <PRAGMA_UNROLL>: New case.
4138
01512446
JJ
41392017-12-19 Jakub Jelinek <jakub@redhat.com>
4140
4141 * c-typeck.c (comptypes_internal, function_types_compatible_p,
4142 perform_integral_promotions, digest_init): Replace Yoda conditions
4143 with typical order conditions.
4144 * c-decl.c (check_bitfield_type_and_width): Likewise.
4145
c65e18d3
BE
41462017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4147
4148 * c-typeck.c (c_safe_arg_type_equiv_p,
4149 c_safe_function_type_cast_p): New function.
4150 (build_c_cast): Implement -Wcast-function-type.
4151
b7280579
RB
41522017-12-14 Richard Biener <rguenther@suse.de>
4153
4154 PR c/83415
4155 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
4156 like REALPART_EXPR for the behavior of whether its operand
4157 is an lvalue.
4158
49e6a6c0
MP
41592017-12-12 Marek Polacek <polacek@redhat.com>
4160
4161 PR c/82679
4162 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
4163
ab20d992 41642017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
4165
4166 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
4167 * c-parser.c (add_debug_begin_stmt): New.
4168 (c_parser_declaration_or_fndef): Call it.
4169 (c_parser_compound_statement_nostart): Likewise.
4170 (c_parser_statement_after_labels): Likewise.
4171 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
4172
4b2b493f
JM
41732017-12-07 Joseph Myers <joseph@codesourcery.com>
4174
4175 * c-decl.c (build_compound_literal): Add parameter alignas_align
4176 and set alignment of decl if nonzero.
4177 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
4178 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
4179 qualifier.
4180 (c_parser_struct_declaration): Update syntax comment.
4181 (c_parser_type_name): Add alignas_ok argument and pass it to
4182 c_parser_declspecs.
4183 (c_parser_cast_expression): Pass true to c_parser_type_name and
4184 give error if a cast used an _Alignas specifier.
4185 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
4186 give error if sizeof (type-name) used an _Alignas specifier.
4187 (c_parser_alignof_expression): Pass true to c_parser_type_name and
4188 give error if _Alignof (type-name) used an _Alignas specifier.
4189 (c_parser_postfix_expression_after_paren_type): Check specified
4190 alignment for a compound literal and pass it to
4191 build_compound_literal.
4192 * c-parser.h (c_parser_type_name): Update prototype.
4193 * c-tree.h (build_compound_literal): Update prototype.
4194
5d9ae53d
MS
41952017-12-07 Martin Sebor <msebor@redhat.com>
4196
4197 PR c/81544
4198 * c-decl.c (c_decl_attributes): Look up existing declaration and
4199 pass it to decl_attributes.
4200
c79144f8
DM
42012017-12-06 David Malcolm <dmalcolm@redhat.com>
4202
4203 PR c/83236
4204 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
4205 reserved for use by the implementation.
4206
613bc14f
DM
42072017-12-06 David Malcolm <dmalcolm@redhat.com>
4208
4209 * c-decl.c: Include "c-family/c-spellcheck.h".
4210
05abad4c
ML
42112017-12-05 Martin Liska <mliska@suse.cz>
4212 Jakub Jelinek <jakub@redhat.com>
4213
4214 * c-typeck.c (pointer_diff): Add new argument and instrument
4215 pointer subtraction.
4216 (build_binary_op): Similar for pointer comparison.
4217
cc6534d4
JJ
42182017-12-01 Jakub Jelinek <jakub@redhat.com>
4219
65791f42
JJ
4220 PR c/79153
4221 * c-parser.c: Include tree-iterator.h.
4222 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
4223 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
4224 on it.
4225
cc6534d4
JJ
4226 PR c/83222
4227 * c-tree.h (decl_constant_value_1): Declare.
4228 * c-typeck.c (decl_constant_value_1): New function.
4229 (decl_constant_value): Use it.
4230 * c-fold.c (c_fully_fold_internal): If in_init, use
4231 decl_constant_value_1 instead of decl_constant_value.
4232
5de73c05
JJ
42332017-11-30 Jakub Jelinek <jakub@redhat.com>
4234
4235 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
4236
058f0b9e
JJ
42372017-11-28 Jakub Jelinek <jakub@redhat.com>
4238
4239 PR sanitizer/81275
4240 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
4241 c_switch_covers_all_cases_p returns true.
4242
5e9d6aa4 42432017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 4244 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
4245
4246 * Make-lang.in (c/c-array-notation.o): Remove.
4247 * c-array-notation.c: Delete.
4248 * c-decl.c: Remove cilkplus condition.
4249 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
4250 c_parser_cilk_verify_simd, c_parser_array_notation,
4251 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
4252 c_parser_cilk_simd_fn_vector_attrs,
4253 c_finish_cilk_simd_fn_tokens): Delete.
4254 (c_parser_declaration_or_fndef): Remove cilkplus condition.
4255 (c_parser_direct_declarator_inner): Ditto.
4256 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
4257 (c_parser_attributes, c_parser_compound_statement,
4258 c_parser_statement_after_labels, c_parser_if_statement,
4259 c_parser_switch_statement, c_parser_while_statement,
4260 c_parser_do_statement, c_parser_for_statement,
4261 c_parser_unary_expression, c_parser_postfix_expression,
4262 c_parser_postfix_expression_after_primary,
4263 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
4264 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
4265 support.
4266 * c-typeck.c (build_array_ref, build_function_call_vec,
4267 convert_arguments,
4268 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
4269 c_finish_loop, build_binary_op): Remove cilkplus support.
4270
9e851845
JJ
42712017-11-28 Jakub Jelinek <jakub@redhat.com>
4272
4273 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
4274 of build3.
4275
ab20d992 42762017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
4277
4278 * Make-lang.in (c.install-plugin): Install backend import library.
4279
41521dee
JJ
42802017-11-23 Jakub Jelinek <jakub@redhat.com>
4281
4282 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
4283 pragma_stmt context.
4284
ac9effed
EB
42852017-11-23 Mike Stump <mikestump@comcast.net>
4286 Eric Botcazou <ebotcazou@adacore.com>
4287
4288 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
4289 ANNOTATE_EXPR.
4290 (c_parser_do_statement): Likewise.
4291 (c_parser_for_statement): Likewise.
4292
ce95abc4
DM
42932017-11-22 David Malcolm <dmalcolm@redhat.com>
4294
4295 PR c++/62170
4296 * c-objc-common.c (c_tree_printer): Convert penultimate param from
4297 bool to bool *. Within '%T' handling, if showing an "aka", use
4298 "quoted" param to add appropriate quoting.
4299
974aedcc
MP
43002017-11-22 Marek Polacek <polacek@redhat.com>
4301
4302 PR c++/60336
4303 PR middle-end/67239
4304 PR target/68355
4305 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
4306
d4300cc6
DM
43072017-11-21 David Malcolm <dmalcolm@redhat.com>
4308
4309 PR c/83056
4310 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
4311 earlier failed lookups.
4312
1af4ebf5
MG
43132017-11-21 Marc Glisse <marc.glisse@inria.fr>
4314
4315 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
4316 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
4317
26edace6
DM
43182017-11-20 David Malcolm <dmalcolm@redhat.com>
4319
4320 PR c/81404
4321 * c-decl.c: Include "c-family/known-headers.h".
4322 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
4323 to known-headers.cc.
4324 (class suggest_missing_header): Move to known-header.h.
4325 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
4326 than get_c_name_hint.
4327
b1212255
DM
43282017-11-20 David Malcolm <dmalcolm@redhat.com>
4329
4330 * c-decl.c (get_c_name_hint): New function.
4331 (class suggest_missing_header): New class.
4332 (lookup_name_fuzzy): Call get_c_name_hint and use it to
4333 suggest missing headers to the user.
4334
6c7a259b
DM
43352017-11-20 David Malcolm <dmalcolm@redhat.com>
4336
4337 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4338 Include "c-family/name-hint.h"
4339 (implicit_decl_warning): Convert "hint" from
4340 const char * to name_hint. Pass location to
4341 lookup_name_fuzzy. Suppress any deferred diagnostic if the
4342 warning was not printed.
4343 (undeclared_variable): Likewise for "guessed_id".
4344 (lookup_name_fuzzy): Convert return type from const char *
4345 to name_hint. Add location_t param.
4346 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4347 Include "c-family/name-hint.h"
4348 (c_parser_declaration_or_fndef): Convert "hint" from
4349 const char * to name_hint. Pass location to lookup_name_fuzzy.
4350 (c_parser_parameter_declaration): Likewise.
4351
f9c59f7e
JJ
43522017-11-19 Jakub Jelinek <jakub@redhat.com>
4353
4354 PR c/66618
4355 PR c/69960
4356 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
4357 where needed.
4358 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
4359 handle_omp_array_sections): Likewise.
4360 (digest_init): Don't call decl_constant_value_for_optimization.
4361 * c-tree.h (decl_constant_value_for_optimization): Removed.
4362 * c-fold.c (c_fold_array_ref): New function.
4363 (c_fully_fold_internal): Add LVAL argument, propagate it through
4364 recursive calls. For VAR_P call decl_constant_value and
4365 unshare if not LVAL and either optimizing or IN_INIT. Remove
4366 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
4367 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
4368 (c_fully_fold): Add LVAL argument, pass it through to
4369 c_fully_fold_internal.
4370 (decl_constant_value_for_optimization): Removed.
4371
3ca0dc60
JM
43722017-11-15 Joseph Myers <joseph@codesourcery.com>
4373
4374 PR c/81156
4375 * c-parser.c (check_tgmath_function): New function.
4376 (enum tgmath_parm_kind): New enum.
4377 (c_parser_postfix_expression): Handle __builtin_tgmath.
4378
64a5912c
DM
43792017-10-31 David Malcolm <dmalcolm@redhat.com>
4380
4381 * c-decl.c (implicit_decl_warning): Update for renaming of
4382 pedwarn_at_rich_loc and warning_at_rich_loc.
4383 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
4384 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
4385 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4386 (c_parser_struct_or_union_specifier): Likewise for renaming of
4387 pedwarn_at_rich_loc.
4388 (c_parser_parameter_declaration): Likewise for renaming of
4389 error_at_rich_loc.
4390 * c-typeck.c (build_component_ref): Likewise.
4391 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
4392 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
4393 (set_init_label): Likewise for renaming of error_at_rich_loc.
4394
c1136864
RB
43952017-10-30 Richard Biener <rguenther@suse.de>
4396
4397 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
4398 stmts.
4399
ee5fd23a
MM
44002017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4401
4402 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
4403 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
4404
1a59ccf2
DM
44052017-10-25 David Malcolm <dmalcolm@redhat.com>
4406
4407 PR c/7356
4408 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
4409 semicolons.
4410
bc1a75dd
JJ
44112017-10-25 Jakub Jelinek <jakub@redhat.com>
4412
4413 PR libstdc++/81706
4414 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
4415 newdecl to corresponding __builtin_ if any.
4416
ff1ff960
PC
44172017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
4418
4419 PR c++/82466
4420 * c-decl.c (diagnose_mismatched_decls): Use
4421 OPT_Wbuiltin_declaration_mismatch.
4422
62e1c678
DM
44232017-10-12 David Malcolm <dmalcolm@redhat.com>
4424
4425 * c-parser.c (c_parser_require): Add "type_is_unique" param and
4426 use it to guard calls to maybe_suggest_missing_token_insertion.
4427 (c_parser_parms_list_declarator): Override default value of new
4428 "type_is_unique" param to c_parser_require.
4429 (c_parser_asm_statement): Likewise.
4430 * c-parser.h (c_parser_require): Add "type_is_unique" param,
4431 defaulting to true.
4432
a92f6726
NS
44332017-10-11 Nathan Sidwell <nathan@acm.org>
4434
4435 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
4436
8e6cdc90
RS
44372017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4438
4439 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
4440 operating on trees as wide_ints.
4441 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
4442 (c_tree_equal): Likewise.
4443
8139a48e
DM
44442017-10-04 David Malcolm <dmalcolm@redhat.com>
4445
4446 * c-decl.c (push_parm_decl): Store c_parm's location into the
4447 PARAM_DECL.
4448 (build_c_parm): Add "loc" param and store it within the c_parm.
4449 * c-parser.c (struct c_parser): Add "last_token_location" field.
4450 (c_parser_consume_token): Store location of the token into the
4451 new field.
4452 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
4453 when handling a FUNCTION_DECL, if it doesn't already have them.
4454 (c_parser_parameter_declaration): Generate a location for the
4455 parameter, and pass it to the call to build_c_parm.
4456 * c-tree.h (struct c_parm): Add field "loc".
4457 (build_c_parm): Add location_t param.
4458 * c-typeck.c (get_fndecl_argument_location): New function.
4459 (inform_for_arg): New function.
4460 (convert_for_assignment): Use inform_for_arg when dealing with
4461 ic_argpass.
4462
2a389958
JJ
44632017-09-29 Jakub Jelinek <jakub@redhat.com>
4464
7d386d45
JJ
4465 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
4466 width is non-NULL.
4467 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
4468 don't SET_DECL_C_BIT_FIELD here.
4469
2a389958
JJ
4470 PR c/82340
4471 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
4472 instead of trying to set just TREE_READONLY manually.
4473
ebc6a85e
TV
44742017-09-16 Tom de Vries <tom@codesourcery.com>
4475
4476 PR c/81875
4477 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
4478 cond itself.
4479
bb75facd
JM
44802017-09-15 Joseph Myers <joseph@codesourcery.com>
4481
4482 PR c/82071
4483 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
4484 for C11.
4485 (build_conditional_expr): For C11, generate result with excess
4486 precision when one argument is an integer and the other is of a
4487 type using excess precision.
4488
1d933576
BE
44892017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4490
4491 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
4492
267bbb6f
MP
44932017-09-13 Marek Polacek <polacek@redhat.com>
4494
4495 PR c/82167
4496 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
4497 than expr.original_type.
4498
6836632e
NS
44992017-09-12 Nathan Sidwell <nathan@acm.org>
4500
4501 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4502 resort_sorted_fields): Moved from c-family/c-common.c.
4503 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
4504
e035be33
JM
45052017-09-01 Joseph Myers <joseph@codesourcery.com>
4506
4507 PR c/82071
4508 * c-typeck.c (build_atomic_assign): Handle argument with excess
4509 precision. Ensure any EXCESS_PRECISION_EXPR is present in
4510 argument passed to build_binary_op and convert_for_assignment but
4511 not for call to c_fully_fold.
4512 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
4513 Ensure build_binary_op is called with argument with original
4514 semantic type. Avoid calling c_fully_fold with an
4515 EXCESS_PRECISION_EXPR from build_binary_op.
4516
d2e05fcb
JJ
45172017-09-01 Jakub Jelinek <jakub@redhat.com>
4518
4519 PR c/81887
4520 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
4521
b397965c
RS
45222017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4523 Alan Hayward <alan.hayward@arm.com>
4524 David Sherwood <david.sherwood@arm.com>
4525
4526 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
4527 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
4528 m1 and m2 to the signed equivalent of a fixed-point
4529 SCALAR_TYPE_MODE.
4530
14e18d71
DM
45312017-08-24 David Malcolm <dmalcolm@redhat.com>
4532
4533 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
4534 than CAN_HAVE_LOCATION_P when determining whether to use the
4535 location_t value within "value".
4536
7f204c0f
DM
45372017-08-21 David Malcolm <dmalcolm@redhat.com>
4538
4539 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
4540 rather than peeking the location of the first token.
4541 * c-tree.h (c_expr::get_location): New method.
4542
2f687306
DM
45432017-08-21 David Malcolm <dmalcolm@redhat.com>
4544
4545 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
4546 to check_function_arguments.
4547
3e7b80d7
MP
45482017-08-18 Marek Polacek <polacek@redhat.com>
4549
4550 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
4551 commentary.
4552
00aa1fa2
L
45532017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4554
4555 PR c/53037
4556 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
4557 (check_bitfield_type_and_width): Don't allow bit-field with
4558 warn_if_not_aligned type.
4559
da67acb9
MS
45602017-08-14 Martin Sebor <msebor@redhat.com>
4561
4562 PR c/81117
4563 * c-objc-common.c (c_objc_common_init): Handle 'G'.
4564
bb85aa74
MP
45652017-08-11 Marek Polacek <polacek@redhat.com>
4566
4567 PR c/81795
4568 * c-decl.c (pushtag): Only print inform if the warning was printed.
4569 (grokdeclarator): Likewise.
4570
32129a17
DM
45712017-08-10 David Malcolm <dmalcolm@redhat.com>
4572
4573 * c-parser.c (c_parser_error): Rename to...
4574 (c_parser_error_richloc): ...this, making static, and adding
4575 "richloc" parameter, passing it to the c_parse_error call,
4576 rather than calling c_parser_set_source_position_from_token.
4577 (c_parser_error): Reintroduce, reimplementing in terms of the
4578 above, converting return type from void to bool.
4579 (class token_pair): New class.
4580 (struct matching_paren_traits): New struct.
4581 (matching_parens): New typedef.
4582 (struct matching_brace_traits): New struct.
4583 (matching_braces): New typedef.
4584 (get_matching_symbol): New function.
4585 (c_parser_require): Add param MATCHING_LOCATION, using it to
4586 highlight matching "opening" tokens for missing "closing" tokens.
4587 (c_parser_skip_until_found): Likewise.
4588 (c_parser_static_assert_declaration_no_semi): Convert explicit
4589 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
4590 class matching_parens, so that the pertinent open parenthesis is
4591 highlighted when there are problems locating the close
4592 parenthesis.
4593 (c_parser_struct_or_union_specifier): Likewise.
4594 (c_parser_typeof_specifier): Likewise.
4595 (c_parser_alignas_specifier): Likewise.
4596 (c_parser_simple_asm_expr): Likewise.
4597 (c_parser_braced_init): Likewise, for matching_braces.
4598 (c_parser_paren_condition): Likewise, for matching_parens.
4599 (c_parser_switch_statement): Likewise.
4600 (c_parser_for_statement): Likewise.
4601 (c_parser_asm_statement): Likewise.
4602 (c_parser_asm_operands): Likewise.
4603 (c_parser_cast_expression): Likewise.
4604 (c_parser_sizeof_expression): Likewise.
4605 (c_parser_alignof_expression): Likewise.
4606 (c_parser_generic_selection): Likewise.
4607 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
4608 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
4609 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
4610 In case CPP_OPEN_PAREN, pass loc_open_paren to the
4611 c_parser_skip_until_found call.
4612 (c_parser_objc_class_definition): Use class matching_parens as
4613 above.
4614 (c_parser_objc_method_decl): Likewise.
4615 (c_parser_objc_try_catch_finally_statement): Likewise.
4616 (c_parser_objc_synchronized_statement): Likewise.
4617 (c_parser_objc_at_property_declaration): Likewise.
4618 (c_parser_oacc_wait_list): Likewise.
4619 (c_parser_omp_var_list_parens): Likewise.
4620 (c_parser_omp_clause_collapse): Likewise.
4621 (c_parser_omp_clause_default): Likewise.
4622 (c_parser_omp_clause_if): Likewise.
4623 (c_parser_omp_clause_num_threads): Likewise.
4624 (c_parser_omp_clause_num_tasks): Likewise.
4625 (c_parser_omp_clause_grainsize): Likewise.
4626 (c_parser_omp_clause_priority): Likewise.
4627 (c_parser_omp_clause_hint): Likewise.
4628 (c_parser_omp_clause_defaultmap): Likewise.
4629 (c_parser_oacc_single_int_clause): Likewise.
4630 (c_parser_omp_clause_ordered): Likewise.
4631 (c_parser_omp_clause_reduction): Likewise.
4632 (c_parser_omp_clause_schedule): Likewise.
4633 (c_parser_omp_clause_num_teams): Likewise.
4634 (c_parser_omp_clause_thread_limit): Likewise.
4635 (c_parser_omp_clause_aligned): Likewise.
4636 (c_parser_omp_clause_linear): Likewise.
4637 (c_parser_omp_clause_safelen): Likewise.
4638 (c_parser_omp_clause_simdlen): Likewise.
4639 (c_parser_omp_clause_depend): Likewise.
4640 (c_parser_omp_clause_map): Likewise.
4641 (c_parser_omp_clause_device): Likewise.
4642 (c_parser_omp_clause_dist_schedule): Likewise.
4643 (c_parser_omp_clause_proc_bind): Likewise.
4644 (c_parser_omp_clause_uniform): Likewise.
4645 (c_parser_omp_for_loop): Likewise.
4646 (c_parser_cilk_clause_vectorlength): Likewise.
4647 (c_parser_cilk_clause_linear): Likewise.
4648 (c_parser_transaction_expression): Likewise.
4649 * c-parser.h (c_parser_require): Add param matching_location with
4650 default UNKNOWN_LOCATION.
4651 (c_parser_error): Convert return type from void to bool.
4652 (c_parser_skip_until_found): Add param matching_location with
4653 default UNKNOWN_LOCATION.
4654
30af3a2b
MP
46552017-08-09 Marek Polacek <polacek@redhat.com>
4656
4657 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
4658 * c-tree.h (build_external_ref): Update declaration.
4659 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
4660 (build_external_ref): Change the type of a parameter to bool.
4661 (parser_build_binary_op): Use true/false instead of 1/0.
4662 (pointer_diff): Likewise.
4663 (build_modify_expr): Likewise.
4664 (set_designator): Change the type of a parameter to bool.
4665 (set_init_index): Use true/false instead of 1/0.
4666 (set_init_label): Likewise.
4667 (output_init_element): Change the type of a parameter to bool.
4668 (output_pending_init_elements): Use true/false instead of 1/0.
4669 (process_init_element): Likewise.
4670 (build_binary_op): Change the type of a parameter to bool.
4671
296c53ac
MP
46722017-08-09 Marek Polacek <polacek@redhat.com>
4673
4674 PR c/81233
4675 * c-typeck.c (pedwarn_init): Make the function take a variable list.
4676 Call emit_diagnostic_valist instead of pedwarn.
4677 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
4678 Print the relevant types in diagnostics.
4679
a32c8316
MP
46802017-08-09 Marek Polacek <polacek@redhat.com>
4681
4682 PR c/81417
4683 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 4684 build_conditional_expr.
a32c8316
MP
4685 * c-parser.c (c_parser_conditional_expression): Create locations for
4686 EXP1 and EXP2 from their source ranges. Pass the locations down to
4687 build_conditional_expr.
4688 * c-tree.h (build_conditional_expr): Update declaration.
4689 * c-typeck.c (build_conditional_expr): Add location_t parameters.
4690 For -Wsign-compare, also print the types.
4691
314e6352
ML
46922017-08-08 Martin Liska <mliska@suse.cz>
4693
4694 * c-convert.c: Include header files.
4695 * c-typeck.c: Likewise.
4696
577eec56
ML
46972017-08-07 Martin Liska <mliska@suse.cz>
4698
4699 * c-parser.c (c_parser_attributes): Canonicalize name of an
4700 attribute.
4701
f7b6353a
MP
47022017-08-02 Marek Polacek <polacek@redhat.com>
4703
4704 PR c/81289
4705 * c-parser.c (c_parser_unary_expression): Use set_error.
4706
8a6eab34
MP
4707 PR c/81448
4708 PR c/81306
4709 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
4710 warnings. Avoid walking MACRO_MAP_LOCATIONS.
4711
ab20d992 47122017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
4713 Martin Liska <mliska@suse.cz>
4714
4715 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 4716 statement.
7fef86d3 4717
f34ebeb2
ML
47182017-07-31 Martin Liska <mliska@suse.cz>
4719
4720 PR sanitize/81530
4721 * c-convert.c (convert): Guard condition with flag_sanitize_p
4722 also with current_function_decl non-null equality.
4723 * c-decl.c (grokdeclarator): Likewise.
4724 * c-typeck.c (build_binary_op): Likewise.
4725
8595f67b
MP
47262017-07-25 Marek Polacek <polacek@redhat.com>
4727
4728 * c-decl.c (grokfield): Remove local variable.
4729
d49718d6
MP
47302017-07-25 Marek Polacek <polacek@redhat.com>
4731
4732 PR c/81364
4733 * c-parser.c (c_parser_else_body): Don't warn about multistatement
4734 macro expansion if the body is in { }.
4735 (c_parser_while_statement): Likewise.
4736 (c_parser_for_statement): Likewise.
4737
ff22eb12
NS
47382017-07-18 Nathan Sidwell <nathan@acm.org>
4739
4740 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
4741
eea77d1f
DM
47422017-07-14 David Malcolm <dmalcolm@redhat.com>
4743
4744 * c-decl.c (implicitly_declare): When suggesting a missing
4745 #include, provide a fix-it hint.
4746
b6f43128
DM
47472017-07-06 David Malcolm <dmalcolm@redhat.com>
4748
4749 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
4750 and call that instead.
4751 * c-tree.h (selftest::run_c_tests): New decl.
4752
3e2becc4
MP
47532017-06-26 Marek Polacek <polacek@redhat.com>
4754
4755 PR c/80116
4756 * c-parser.c (c_parser_if_body): Set the location of the
4757 body of the conditional after parsing all the labels. Call
4758 warn_for_multistatement_macros.
4759 (c_parser_else_body): Likewise.
4760 (c_parser_switch_statement): Likewise.
4761 (c_parser_while_statement): Likewise.
4762 (c_parser_for_statement): Likewise.
4763 (c_parser_statement): Add a default argument. Save the location
4764 after labels have been parsed.
4765 (c_parser_c99_block_statement): Likewise.
4766
343ae898
RB
47672017-06-19 Richard Biener <rguenther@suse.de>
4768
4769 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4770 negated _Literals to parse _Literal (int) -1.
4771
45b2222a
ML
47722017-06-13 Martin Liska <mliska@suse.cz>
4773
4774 PR sanitize/78204
4775 * c-convert.c (convert): Use sanitize_flags_p.
4776 * c-decl.c (grokdeclarator): Likewise.
4777 * c-typeck.c (convert_for_assignment): Likewise.
4778 (c_finish_return): Likewise.
4779 (build_binary_op): Likewise.
4780
8ab7005b
JJ
47812017-06-08 Jakub Jelinek <jakub@redhat.com>
4782
4783 PR c/81006
4784 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
4785 to sizetype before size_binop.
4786
363dc72c
JJ
47872017-06-07 Jakub Jelinek <jakub@redhat.com>
4788
4789 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
4790 of TDI_generic.
4791
dc949728
MP
47922017-06-06 Marek Polacek <polacek@redhat.com>
4793
4794 PR c/79983
4795 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
4796 ref.
4797 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
4798
40ffd95f
BE
47992017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4800
4801 * c-parser.c (c_parser_binary_expression): Implement the
4802 -Wsizeof_pointer_div warning.
4803 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
4804 from a parenthesized expression.
4805 (c_parser_expr_list): Use c_last_sizeof_loc.
4806 * c-tree.h (c_last_sizeof_loc): New external.
4807 * c-typeck.c (c_last_sizeof_loc): New variable.
4808 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
4809
9fc5e7a4
MM
48102017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
4811
4812 PR testsuite/80580
4813 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
4814
f012c8ef
DM
48152017-05-30 David Malcolm <dmalcolm@redhat.com>
4816
4817 * c-objc-common.c (c_tree_printer): Gain bool and const char **
4818 parameters.
4819
3cd211af
MS
48202017-05-24 Martin Sebor <msebor@redhat.com>
4821
4822 PR c/80731
4823 * c-fold.c (c_fully_fold_internal): Adjust.
4824 * c-typeck.c (parser_build_unary_op): Adjust.
4825
fd71a9a2
TS
48262017-05-23 Thomas Schwinge <thomas@codesourcery.com>
4827
4828 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
4829 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
4830 "VECTOR_LENGTH".
4831
92fa0f9e
MP
48322017-05-23 Marek Polacek <polacek@redhat.com>
4833
4834 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
4835 quotes.
4836
d11c168a
JJ
48372017-05-22 Jakub Jelinek <jakub@redhat.com>
4838
4839 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
4840 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
4841 it returned invariant. Call tree_invariant_p unconditionally
4842 afterwards to decide whether to return expr or op0.
4843
58aca9d9
NS
48442017-05-22 Nathan Sidwell <nathan@acm.org>
4845
4846 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
4847
7fd549d2
TS
48482017-05-19 Thomas Schwinge <thomas@codesourcery.com>
4849
4850 * c-parser.c (c_parser_omp_clause_default): Handle
4851 "OMP_CLAUSE_DEFAULT_PRESENT".
4852
6ecd2339
BE
48532017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4854
4855 * config-lang.in (gtfiles): Add c-family/c-format.c.
4856
8a57ecff
NS
48572017-05-18 Nathan Sidwell <nathan@acm.org>
4858
4859 * c-decl.c (pushdecl_top_level): Delete unused function.
4860
6574d78e
MP
48612017-05-18 Marek Polacek <polacek@redhat.com>
4862
4863 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
4864 (check_earlier_gotos): Likewise.
4865 (define_label): Likewise.
4866 (pending_xref_error): Likewise.
4867 (smallest_type_quals_location): Likewise.
4868 (grokdeclarator): Likewise.
4869 (grokparms): Likewise.
4870 (identifier_global_value): Likewise.
4871 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
4872 (find_init_member): Likewise.
4873
e3455240
MP
48742017-05-18 Marek Polacek <polacek@redhat.com>
4875
4876 * c-decl.c (start_decl): Use false/true instead of 0/1.
4877 (grokdeclarator): Likewise.
4878 (finish_struct): Likewise.
4879 (start_function): Change the return type to bool. Use false/true
4880 instead of 0/1.
4881 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
4882 * c-tree.h (start_function): Update.
4883 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
4884 (set_designator): Change the return type to bool. Use false/true
4885 instead of 0/1.
4886
3fa8871b
MP
48872017-05-17 Marek Polacek <polacek@redhat.com>
4888
4889 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
4890 * c-typeck.c: Likewise.
4891
142473df
MP
48922017-05-17 Marek Polacek <polacek@redhat.com>
4893
4894 PR sanitizer/80659
4895 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
4896 DECL_IGNORED_P even for non-static compound literals.
4897
1a817418
ML
48982017-05-17 Martin Liska <mliska@suse.cz>
4899
4900 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
4901 use it instead of int type.
4902
b2fa0a8b
MP
49032017-05-17 Marek Polacek <polacek@redhat.com>
4904
4905 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
4906 call c_fully_fold.
4907 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 4908 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
4909 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
4910 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
4911 save_expr.
4912 (c_parser_conditional_expression): Likewise.
4913 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
4914 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
4915 (process_init_element): Likewise.
4916 (build_binary_op): Likewise.
4917 (handle_omp_array_sections_1): Likewise.
4918
1e47f02b
TS
49192017-05-12 Thomas Schwinge <thomas@codesourcery.com>
4920
4921 * c-parser.c (c_parser_omp_clause_num_gangs)
4922 (c_parser_omp_clause_num_workers)
4923 (c_parser_omp_clause_vector_length): Merge functions into...
4924 (c_parser_oacc_single_int_clause): ... this new function. Adjust
4925 all users.
4926
c24e924f
NS
49272017-05-11 Nathan Sidwell <nathan@acm.org>
4928
4929 * gimple-parser.c: Don't #include tree-dump.h.
4930
c587104e
MM
49312017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4932
4933 PR testsuite/80580
4934 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
4935
67ac9a9d
MM
49362017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4937
4938 PR testsuite/80580
4939 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4940 incorrect __MEM syntax.
4941
ac4eb40f
MM
49422017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4943
4944 PR testsuite/80580
4945 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
4946 type of unary '*'.
4947
641da50a
NS
49482017-05-09 Nathan Sidwell <nathan@acm.org>
4949
4950 * c-tree.h (pushdecl): Declare.
4951
56d35585
DM
49522017-05-05 David Malcolm <dmalcolm@redhat.com>
4953
4954 * c-decl.c (warn_defaults_to): Replace report_diagnostic
4955 with diagnostic_report_diagnostic.
4956 * c-errors.c (pedwarn_c99): Likewise.
4957 (pedwarn_c90): Likewise.
4958
815d9cc6
XR
49592017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4960
92a285c1 4961 PR c++/80038
815d9cc6
XR
4962 * c-gimplify.c (c_gimplify_expr): Remove calls to
4963 cilk_gimplifY_call_params_in_spawned_fn.
4964
1c4ea66f
DM
49652017-04-25 David Malcolm <dmalcolm@redhat.com>
4966
4967 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
4968 hint for removing extra semicolon.
4969
666f7903
JJ
49702017-04-21 Jakub Jelinek <jakub@redhat.com>
4971
4972 PR c/80468
4973 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
4974 enabled, set specs->type to integer_type_node.
4975
5764ee3c
JW
49762017-04-03 Jonathan Wakely <jwakely@redhat.com>
4977
4978 * c-array-notation.c: Fix typo in comment.
4979
10fa8dfb
MP
49802017-03-29 Marek Polacek <polacek@redhat.com>
4981
4982 PR c/79730
4983 * c-decl.c (finish_decl): Check VAR_P.
4984
a9e4a1a5
JJ
49852017-03-27 Jakub Jelinek <jakub@redhat.com>
4986
4987 PR middle-end/80162
4988 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
4989 * c-typeck.c (c_mark_addressable): Likewise. Look through
4990 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
4991 to ARRAY_TYPE.
4992 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
4993
ee3ff394
MP
49942017-03-23 Marek Polacek <polacek@redhat.com>
4995
4996 * c-tree.h: Remove a C_RID_YYCODE reference.
4997
4d1b8e70
JJ
49982017-03-21 Jakub Jelinek <jakub@redhat.com>
4999
5000 PR c/80097
5001 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
5002 optional COMPOUND_EXPR with ubsan instrumentation.
5003
31dc71a8
MP
50042017-03-17 Marek Polacek <polacek@redhat.com>
5005
5006 * c-parser.c: Add C11 references.
5007
d579c385
MP
50082017-03-15 Marek Polacek <polacek@redhat.com>
5009
5010 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
5011
85059a38
MP
50122017-03-11 Marek Polacek <polacek@redhat.com>
5013
5014 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
5015
2f6f187a
DM
50162017-03-10 David Malcolm <dmalcolm@redhat.com>
5017
5018 PR translation/79848
5019 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
5020 "%qs".
5021 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
5022
36618428
MP
50232017-03-09 Marek Polacek <polacek@redhat.com>
5024
5025 PR sanitizer/79757
5026 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
5027 parameter declarations with initializers.
5028
01e5af5a
JJ
50292017-03-09 Jakub Jelinek <jakub@redhat.com>
5030
5031 PR c/79969
5032 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
5033 TYPE_STUB_DECL.
5034
a71dbc63
JJ
50352017-03-07 Jakub Jelinek <jakub@redhat.com>
5036
5037 PR c/79834
5038 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
5039 for "may only be used in compound statements" diagnostics, change it
5040 such that the same translatable string is used for all pragmas. For
5041 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
5042 diagnostics.
5043 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
5044 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
5045 "may only be used in compound statements" diagnostics, such that the
5046 same translatable string is used for all pragmas.
5047
1ff4bae6
MP
50482017-03-04 Marek Polacek <polacek@redhat.com>
5049
5050 PR c/79847
5051 * c-decl.c (implicit_decl_warning): Add missing space.
5052
7f5a7d78
MP
50532017-03-03 Marek Polacek <polacek@redhat.com>
5054
5055 PR c/79758
5056 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
5057 current_function_prototype_arg_types is error_mark_node. Fix
5058 formatting. Use TREE_VALUE instead of TREE_TYPE.
5059
883c8f06
JJ
50602017-03-03 Jakub Jelinek <jakub@redhat.com>
5061
79c9b7a8
JJ
5062 PR c/79837
5063 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
5064 %<min%> or %<max%> in the diagnostics, instead mention identifier.
5065 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
5066 diagnostics.
5067
883c8f06
JJ
5068 PR c/79836
5069 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
5070 instead of %<_Generic>.
5071 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
5072 (c_parser_omp_target_exit_data): Use %<release%> instead of
5073 %<release>.
5074
324ff1a0
JJ
50752017-02-28 Jakub Jelinek <jakub@redhat.com>
5076
5077 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
5078 instead of just cond ? "..." : "...".
5079 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
5080 for "enter"/"exit" keyword.
5081 (c_finish_oacc_routine): Don't use %s to supply portions of the
5082 message.
5083
4227c9ad
JJ
50842017-02-24 Jakub Jelinek <jakub@redhat.com>
5085
5086 PR c++/79588
5087 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
5088 handle -Wrestrict here.
5089 * c-typeck.c (build_function_call_vec): Adjust
5090 check_function_arguments caller.
5091
5d972e66
RB
50922017-02-23 Richard Biener <rguenther@suse.de>
5093
5094 PR c/79684
5095 * gimple-parser.c (c_parser_gimple_statement): Use set_error
5096 to initialize c_exprs to return.
5097 (c_parser_gimple_binary_expression): Likewise.
5098 (c_parser_gimple_unary_expression): Likewise.
5099 (c_parser_gimple_postfix_expression): Likewise.
5100
61ac5ebe
MP
51012017-02-22 Marek Polacek <polacek@redhat.com>
5102
5103 PR c/79662
5104 * c-typeck.c (convert_arguments): Handle error_mark_node.
5105
41d1b0b1
PK
51062017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5107
5108 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
5109 value of c_parser_parse_ssa_name against error_mark_node and emit
5110 error if ssa name is anonymous and written as default definition.
5111
eab1f169
PK
51122017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5113
5114 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5115 FMA_EXPR.
5116
bcac0b4d
JJ
51172017-02-16 Jakub Jelinek <jakub@redhat.com>
5118
5119 PR c++/79512
5120 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
5121 ignore #pragma omp target even when not followed by identifier.
5122
1be33173
PK
51232017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5124
5125 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
5126 (c_parser_gimple_unary_expression): Likewise.
5127
aa326bfb
JJ
51282017-02-13 Jakub Jelinek <jakub@redhat.com>
5129
5130 * c-parser.c (c_parser_oacc_declare): Add missing space in
5131 diagnostics.
5132
8a398bc5
PK
51332017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5134
5135 PR c/79478
5136 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
5137 set_c_expr_source_range when parsing ssa-name.
5138
3dcde5ef 51392017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 5140 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
5141
5142 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
5143 building IL when arguments are error_mark_node.
5144 (c_parser_gimple_unary_expression): Likewise.
5145 (c_parser_gimple_if_stmt): Likewise.
5146 (c_parser_gimple_switch_stmt): Likewise.
5147 (c_parser_gimple_return_stmt): Likewise.
5148 (c_parser_parse_ssa_name): When name lookup fails do not build
5149 an SSA name. Use undeclared rather than not declared in error
5150 reporting.
5151
192b048b
MP
51522017-02-09 Marek Polacek <polacek@redhat.com>
5153
5154 PR c/79428
5155 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
5156 instead of c_parser_skip_until_found.
5157
56f71478
JJ
51582017-02-09 Jakub Jelinek <jakub@redhat.com>
5159
5160 PR c/79431
5161 * c-parser.c (c_parser_omp_declare_target): Don't invoke
5162 symtab_node::get on automatic variables.
5163
02889d23
CLT
51642016-02-09 Nathan Sidwell <nathan@codesourcery.com>
5165 Chung-Lin Tang <cltang@codesourcery.com>
5166
5167 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
5168 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
5169 semantic checking.
5170 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
5171
7af4b20d
RB
51722017-02-07 Richard Biener <rguenther@suse.de>
5173
5174 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
5175 (c_parser_gimple_postfix_expression_after_primary):
5176 Do not use c_build_function_call_vec to avoid folding and promotion.
5177 Simplify.
5178
e5e391d6
MO
51792017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
5180
5181 PR lto/79061
5182 * c-decl.c (pop_scope): Pass main_input_filename to
5183 build_translation_unit_decl.
5184
c2e84327
DM
51852017-01-24 David Malcolm <dmalcolm@redhat.com>
5186
5187 * c-parser.c: Include "read-rtl-function.h" and
5188 "run-rtl-passes.h".
5189 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
5190 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
5191 production. Update for renaming of field "gimple_pass" to
5192 "gimple_or_rtl_pass". If __RTL was seen, call
5193 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
5194 to an auto_timevar, to cope with early exit.
5195 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
5196 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
5197 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
5198 Handle RID_RTL.
5199 (c_parser_parse_rtl_body): New function.
5200 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
5201 (struct c_declspecs): Rename field "gimple_pass" to
5202 "gimple_or_rtl_pass". Add field "rtl_p".
5203 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
5204 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
5205 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
5206 (c_parser_gimple_or_rtl_pass_list): ...this.
5207
2ebd93e1
MP
52082017-01-20 Marek Polacek <polacek@redhat.com>
5209
5210 PR c/64279
5211 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
5212
b1c95bb5
RB
52132017-01-13 Richard Biener <rguenther@suse.de>
5214
5215 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
5216 nops.
5217
25329913
RB
52182017-01-13 Richard Biener <rguenther@suse.de>
5219
5220 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5221 _Literal ( type-name ) number.
5222
6bb4ea5c
RB
52232017-01-12 Richard Biener <rguenther@suse.de>
5224
5225 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5226 __MEM.
5227
6b5b4e9c
JJ
52282017-01-11 Jakub Jelinek <jakub@redhat.com>
5229
5230 PR c++/72813
5231 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
5232 PCH file.
5233
e3252775
RB
52342017-01-11 Richard Biener <rguenther@suse.de>
5235
5236 PR bootstrap/79052
5237 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
5238 returns on parse errors.
5239
a9342885
MP
52402017-01-04 Marek Polacek <polacek@redhat.com>
5241
5242 PR c++/64767
5243 * c-parser.c (c_parser_postfix_expression): Mark zero character
5244 constants by setting original_type in c_expr.
5245 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
5246 with a zero character constant.
5247 (char_type_p): New function.
5248
5dd9a9d0
DM
52492017-01-04 David Malcolm <dmalcolm@redhat.com>
5250
5251 * c-parser.c (c_parser_declaration_or_fndef): Create a
5252 rich_location at init_loc and parse it to start_init.
5253 (last_init_list_comma): New global.
5254 (c_parser_braced_init): Update last_init_list_comma when parsing
5255 commas. Pass it to pop_init_level. Pass location of closing
5256 brace to pop_init_level.
5257 (c_parser_postfix_expression_after_paren_type): Create a
5258 rich_location at type_loc and parse it to start_init.
5259 (c_parser_omp_declare_reduction): Likewise for loc.
5260 * c-tree.h (start_init): Add rich_location * param.
5261 (pop_init_level): Add location_t param.
5262 * c-typeck.c (struct initializer_stack): Add field
5263 "missing_brace_richloc".
5264 (start_init): Add richloc param, use it to initialize
5265 the stack node's missing_brace_richloc.
5266 (last_init_list_comma): New decl.
5267 (finish_implicit_inits): Pass last_init_list_comma to
5268 pop_init_level.
5269 (push_init_level): When finding missing open braces, add fix-it
5270 hints to the richloc.
5271 (pop_init_level): Add "insert_before" param and pass it
5272 when calling pop_init_level. Add fixits about missing
5273 close braces to any richloc. Use the richloc for the
5274 -Wmissing-braces warning.
5275 (set_designator): Pass last_init_list_comma to pop_init_level.
5276 (process_init_element): Likewise.
5277
cbe34bb5
JJ
52782017-01-01 Jakub Jelinek <jakub@redhat.com>
5279
5280 Update copyright years.
5281
d17680f3
JJ
52822016-12-21 Jakub Jelinek <jakub@redhat.com>
5283
0dba7960
JJ
5284 PR bootstrap/78817
5285 * c-typeck.c (build_function_call_vec): If check_function_arguments
5286 returns true, set TREE_NO_WARNING on CALL_EXPR.
5287
d17680f3
JJ
5288 PR c/77767
5289 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
5290 to *expr instead of overwriting it.
5291
aa90531e
RB
52922016-12-20 Richard Biener <rguenther@suse.de>
5293
5294 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
5295 error recovery.
5296 (c_parser_gimple_statement): Only build assigns for non-error
5297 stmts.
5298 (c_parser_gimple_postfix_expression_after): Improve error recovery.
5299
629b3d75
MJ
53002016-12-14 Martin Jambor <mjambor@suse.cz>
5301
5302 * c-parser.c: Include omp-general.h and omp-offload.h instead of
5303 omp-low.h.
5304 (c_finish_oacc_routine): Adjusted call to
5305 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
5306 to use their new names.
5307 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
5308 use its new name.
5309 (c_parser_oacc_update): Likewise.
5310 (c_parser_omp_simd): Likewise.
5311 (c_parser_omp_target_update): Likewise.
5312 * c-typeck.c: Include omp-general.h instead of omp-low.h.
5313 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
5314 name.
5315 (c_finish_omp_cancellation_point): Likewise.
5316 * gimple-parser.c: Do not include omp-low.h
5317
c5af52eb
CP
53182016-12-02 Cesar Philippidis <cesar@codesourcery.com>
5319 James Norris <jnorris@codesourcery.com>
5320
5321 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
5322 EXIT_DATA,WAIT} are not used in compound statements.
5323 (c_parser_oacc_enter_exit_data): Update diagnostics.
5324
48330c93
BE
53252016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5326
5327 PR c++/71973
5328 * c-decl.c (diagnose_mismatched_decls): Use
5329 OPT_Wbuiltin_declaration_mismatch here too.
5330
899ca90e 53312016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
5332 Alan Hayward <alan.hayward@arm.com>
5333 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
5334
5335 * c-decl.c (merge_decls): Use SET_DECL_MODE.
5336 (make_label, finish_struct): Likewise.
5337
1ee62b92 53382016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 5339 Richard Biener <rguenther@suse.de>
22b15758 5340
8e745a17
JJ
5341 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
5342 * config-lang.in (gtfiles): Add c/c-parser.h.
5343 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
5344 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
5345 * c-parser.c (enum c_id_kind, struct c_token,
5346 c_parser_next_token_is, c_parser_next_token_is_not,
5347 c_parser_next_token_is_keyword,
5348 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
5349 Split out to ...
5350 * c-parser.h: ... new header.
5351 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 5352 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
5353 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5354 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5355 c_parser_error, c_parser_require, c_parser_skip_until_found,
5356 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5357 c_parser_type_name): Export.
5358 (c_parser_tokens_buf): New function.
5359 (c_parser_error): Likewise.
5360 (c_parser_set_error): Likewise.
5361 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
5362 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
5363 via c_parser_parse_gimple_body.
8e745a17
JJ
5364 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
5365 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5366 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5367 c_parser_error, c_parser_require, c_parser_skip_until_found,
5368 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5369 c_parser_type_name): Declare.
1ee62b92
PG
5370 (struct c_parser): Declare forward.
5371 (c_parser_tokens_buf): Declare.
8e745a17
JJ
5372 (c_parser_error): Likewise.
5373 (c_parser_set_error): Likewise.
5374 * gimple-parser.c: New file.
5375 * gimple-parser.h: Likewise.
1ee62b92 5376
22b15758
UB
53772016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5378
5379 PR c/35503
5380 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5381 warn_for_restrict.
5382
84ff4775
LCW
53832016-09-11 Le-Chun Wu <lcwu@google.com>
5384 Mark Wielaard <mjw@redhat.com>
5385
5386 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
5387 to the given -Wshadow= variant.
5388
4d0cdd0c
TP
53892016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5390
5391 * c-typeck.c: Include memmodel.h.
5392
1202f33e
JJ
53932016-10-13 Jakub Jelinek <jakub@redhat.com>
5394
5395 PR target/77957
5396 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
5397 instead of lhd_return_null_tree_v.
5398
8a14afd0
BS
53992016-10-07 Bernd Schmidt <bschmidt@redhat.com>
5400
5401 PR c++/69733
5402 * c-decl.c (smallest_type_quals_location): New static function.
5403 (grokdeclarator): Try to find the correct location for an ignored
5404 qualifier.
5405
81fea426
MP
54062016-09-26 Marek Polacek <polacek@redhat.com>
5407
5408 PR c/7652
5409 * c-decl.c (pop_scope): Add gcc_fallthrough.
5410
54112016-09-26 Marek Polacek <polacek@redhat.com>
5412
5413 PR c/7652
5414 * c-parser.c (struct c_token): Add flags field.
5415 (c_lex_one_token): Pass it to c_lex_with_flags.
5416 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
5417 into IFN_FALLTHROUGH.
5418 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
5419 attribute fallthrough after a case label or default label.
5420 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
5421
9a2300e9
MP
54222016-09-24 Marek Polacek <polacek@redhat.com>
5423
5424 PR c/77490
5425 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
5426 have boolean value. Warn about ++/-- on booleans.
5427
7de76362
JJ
54282016-09-23 Jakub Jelinek <jakub@redhat.com>
5429
5430 * c-parser.c (incomplete_record_decls): Remove unnecessary
5431 = vNULL initialization of file scope vec.
5432
5b73d2ab
MP
54332016-09-16 Marek Polacek <polacek@redhat.com>
5434
5435 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
5436
e51fbec3
MP
54372016-09-14 Marek Polacek <polacek@redhat.com>
5438
5439 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
5440 (fix_array_notation_expr): Likewise.
5441 * c-decl.c (finish_decl): Likewise.
5442 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5443 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
5444 (function_to_pointer_conversion): Use false instead of 0.
5445 (convert_lvalue_to_rvalue): Likewise.
5446 (parser_build_unary_op): Likewise.
5447 (build_atomic_assign): Likewise.
5448 (build_unary_op): Change nonconvert parameter type to bool, use
5449 true/false instead of 1/0.
5450 (build_binary_op): Use true instead of 1.
5451
254830ba
DM
54522016-09-13 David Malcolm <dmalcolm@redhat.com>
5453
5454 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
5455 of add_fixit_insert to add_fixit_insert_before.
5456
4c13ba17
MP
54572016-09-13 Marek Polacek <polacek@redhat.com>
5458
5459 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
5460 it.
5461
54dcdb88
BE
54622016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5463
5464 PR c++/77496
5465 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
5466 COMPOUND_EXPR to warn_for_omitted_condop.
5467
e5106e27
DM
54682016-09-07 David Malcolm <dmalcolm@redhat.com>
5469
5470 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
5471 c_get_substring_location for this new langhook.
5472
9dc5773f
JJ
54732016-09-02 Jakub Jelinek <jakub@redhat.com>
5474
5475 PR c/65467
5476 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
5477 flag_openmp.
5478 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
5479 instead of mark_exp_read on low_bound/length expression.
5480 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
5481 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5482 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5483 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
5484 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
5485 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
5486 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
5487 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
5488 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
5489 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
5490 instead of mark_expr_read.
5491 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
5492 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
5493 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
5494 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
5495 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
5496 array section bases outside of depend clause, for depend clause
5497 use convert_lvalue_to_rvalue on the base.
5498 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
5499 linear, aligned, map, to and from clauses.
5500 (c_omp_clause_copy_ctor): New function.
5501
295844f6
MP
55022016-09-01 Marek Polacek <polacek@redhat.com>
5503
5504 PR c/7652
5505 * c-typeck.c (composite_type): Add FALLTHRU comment.
5506
089af25c
DM
55072016-08-31 David Malcolm <dmalcolm@redhat.com>
5508
5509 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
5510 to the insertion fixits for "struct", "union", and "enum".
5511
f9087798
DM
55122016-08-30 David Malcolm <dmalcolm@redhat.com>
5513
5514 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
5515 rather than add_fixit_misspelled_id.
5516 (undeclared_variable): Likewise.
5517 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
5518 now-redundant "here" params from add_fixit_insert method calls.
5519 (c_parser_parameter_declaration): Likewise.
5520 * c-typeck.c (build_component_ref): Remove now-redundant range
5521 param from add_fixit_replace method calls.
5522
ebef225f
MP
55232016-08-25 Marek Polacek <polacek@redhat.com>
5524
5525 * c-typeck.c (parser_build_binary_op): Pass LHS to
5526 warn_logical_not_parentheses.
5527
fe377a48
MP
55282016-08-25 Marek Polacek <polacek@redhat.com>
5529
5530 PR c/77323
5531 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
5532 or _FloatN or _FloatNx is not supported.
5533 (finish_declspecs): Set type to integer_type_node when _FloatN or
5534 _FloatNx is not supported.
5535
c65699ef
JM
55362016-08-19 Joseph Myers <joseph@codesourcery.com>
5537
5538 PR c/32187
5539 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
5540 (struct c_declspecs): Add field floatn_nx_idx.
5541 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
5542 and _FloatNx type specifiers.
5543 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
5544 (c_parser_declspecs, c_parser_attribute_any_word)
5545 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
5546 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
5547 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
5548 narrower than double.
5549
2f1364c2
JJ
55502016-08-12 Jakub Jelinek <jakub@redhat.com>
5551 Martin Liska <mliska@suse.cz>
5552
5553 PR c/67410
5554 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
5555 % to determine val element to change. Assert that
5556 wchar_bytes * charwidth fits into val array.
5557
191816a3
MP
55582016-08-12 Marek Polacek <polacek@redhat.com>
5559
5560 PR c/7652
5561 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
5562 (c_parser_postfix_expression): Likewise.
5563 * c-typeck.c (build_unary_op): Adjust fall through comment.
5564 (c_mark_addressable): Likewise.
5565
b95a64bb
JJ
55662016-08-11 Jakub Jelinek <jakub@redhat.com>
5567
5568 PR c/72816
5569 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
5570 array member through typedef, for orig_qual_indirect == 0 clear
5571 orig_qual_type.
5572
895aa8e1
DM
55732016-08-08 David Malcolm <dmalcolm@redhat.com>
5574
5575 PR c/64955
5576 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
5577 this up to selftest::run_c_tests.
5578 (selftest::run_c_tests): New function.
5579
0b212d8c
TS
55802016-08-04 Thomas Schwinge <thomas@codesourcery.com>
5581
ae9281fc
TS
5582 * c-parser.c (struct oacc_routine_data): Add error_seen and
5583 fndecl_seen members.
5584 (c_finish_oacc_routine): Use these.
5585 (c_parser_declaration_or_fndef): Adjust.
5586 (c_parser_oacc_routine): Likewise. Support more C language
5587 constructs, and improve diagnostics. Move pragma context
5588 checking...
5589 (c_parser_pragma): ... here.
5590
0b212d8c
TS
5591 * c-parser.c (struct oacc_routine_data): New.
5592 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
5593 Simplify code.
5594 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
5595 declare target" attribute.
5596
76e2c821
JB
55972016-08-01 Jan Beulich <jbeulich@suse.com>
5598
5599 * c-fold.c (c_fully_fold_internal): Also emit shift count
5600 warnings for vector types.
5601 * c-typeck.c (build_binary_op): Likewise.
5602
f618a472
MP
56032016-07-29 Marek Polacek <polacek@redhat.com>
5604
5605 PR c/71742
5606 * c-decl.c (finish_struct): Rephrase an error message.
5607
efd0786f
MP
5608 PR c/71853
5609 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
5610 to error node for invalid code.
5611
e00dceaf
MP
5612 PR c/71573
5613 * c-decl.c (implicitly_declare): Return decl early not only for
5614 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
5615
673a107a
JJ
56162016-07-29 Jakub Jelinek <jakub@redhat.com>
5617
5618 PR c/71969
5619 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
5620 on GNU extern inline functions.
5621
a5b5c8b6
MP
56222016-07-29 Marek Polacek <polacek@redhat.com>
5623
5624 PR c/71583
5625 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
5626 check expr.value.
5627
e3fe09c1
UB
56282016-07-22 Uros Bizjak <ubizjak@gmail.com>
5629
5630 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
5631
7c8f7eaa
DM
56322016-07-20 David Malcolm <dmalcolm@redhat.com>
5633
5634 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
5635 spellcheck-tree.h
5636 (best_macro_match): Likewise, converting from a typedef to a
5637 subclass.
5638 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
5639 (lookup_name_fuzzy): Update for change of best_macro_match to a
5640 subclass with a ctor that calls cpp_forall_identifiers.
5641
de6a69ee
DM
56422016-07-20 David Malcolm <dmalcolm@redhat.com>
5643
5644 * c-decl.c (implicit_decl_warning): Update for conversion of
5645 return type of lookup_name_fuzzy to const char *.
5646 (undeclared_variable): Likewise.
5647 (lookup_name_fuzzy): Convert return type from tree to
5648 const char *.
5649 * c-parser.c (c_parser_declaration_or_fndef): Update for
5650 conversion of return type of lookup_name_fuzzy to const char *.
5651 (c_parser_parameter_declaration): Likewise.
5652
b1c9c068
CP
56532016-07-15 Cesar Philippidis <cesar@codesourcery.com>
5654
5655 * c-parser.c (c_parser_oacc_declare): Don't scan for
5656 GOMP_MAP_POINTER.
5657 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
5658 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
5659 zero-length subarrays.
5660
ddbbcb19
JJ
56612016-07-15 Jakub Jelinek <jakub@redhat.com>
5662
5663 PR c/71858
5664 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
5665 instead of FUZZY_LOOKUP_NAME.
5666 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
5667 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
5668
dd36b877
JJ
56692016-07-14 Jakub Jelinek <jakub@redhat.com>
5670
5671 PR c/71858
5672 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
5673
8c681247
TS
56742016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5675
5676 * c-parser.c (c_parser_generic_selection): Make type of variable
5677 auto_vec.
5678 (c_parser_omp_declare_simd): Likewise.
5679
bf4fa671
TS
56802016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5681
5682 * c-decl.c (struct c_struct_parse_info): Change member types
5683 from vec to auto_vec.
5684 (start_struct): Adjust.
5685 (finish_struct): Likewise.
5686
557e8c49
JJ
56872016-07-02 Jakub Jelinek <jakub@redhat.com>
5688
5689 PR c/71719
5690 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
5691
54d19c3b
TS
56922016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5693
5694 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
5695 Move pragma context checking into...
5696 (c_parser_omp_cancellation_point): ... here, and improve
5697 diagnostic messages.
5698 * c-typeck.c (c_finish_omp_cancel)
5699 (c_finish_omp_cancellation_point): Improve diagnostic messages.
5700
152ef731
JJ
57012016-06-29 Jakub Jelinek <jakub@redhat.com>
5702
5703 PR c/71685
5704 * c-typeck.c (c_build_qualified_type): Don't clear
5705 C_TYPE_INCOMPLETE_VARS for the main variant.
5706
57072016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
5708
5709 PR c/71552
5710 * c-typeck.c (output_init_element): Diagnose incompatible types
5711 before non-constant initializers.
5712
e9ac1f86
JJ
57132016-06-28 Jakub Jelinek <jakub@redhat.com>
5714
5715 * Make-lang.in: Don't cat ../stage_current if it does not exist.
5716
277d7ee0
AK
57172016-06-23 Andi Kleen <ak@linux.intel.com>
5718
5719 * Make-lang.in: Add support for autofdo.
5720
1a4f11c8
DM
57212016-06-22 David Malcolm <dmalcolm@redhat.com>
5722
5723 PR c/70339
5724 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
5725 (implicit_decl_warning): When issuing warnings for implicit
5726 declarations, attempt to provide a suggestion via
5727 lookup_name_fuzzy.
5728 (undeclared_variable): Likewise when issuing errors.
5729 (lookup_name_in_scope): Likewise.
5730 (struct edit_distance_traits<cpp_hashnode *>): New struct.
5731 (best_macro_match): New typedef.
5732 (find_closest_macro_cpp_cb): New function.
5733 (lookup_name_fuzzy): New function.
5734 * c-parser.c: Include gcc-rich-location.h.
5735 (c_token_starts_typename): Split out case CPP_KEYWORD into...
5736 (c_keyword_starts_typename): ...this new function.
5737 (c_parser_declaration_or_fndef): When issuing errors about
5738 missing "struct" etc, add a fixit. For other kinds of errors,
5739 attempt to provide a suggestion via lookup_name_fuzzy.
5740 (c_parser_parms_declarator): When looking ahead to detect typos in
5741 type names, also reject CPP_KEYWORD.
5742 (c_parser_parameter_declaration): When issuing errors about
5743 unknown type names, attempt to provide a suggestion via
5744 lookup_name_fuzzy.
5745 * c-tree.h (c_keyword_starts_typename): New prototype.
5746
5a578671
JM
57472016-06-20 Joseph Myers <joseph@codesourcery.com>
5748
5749 PR c/71601
5750 * c-typeck.c (build_conditional_expr): Return error_mark_node if
5751 c_common_type returns error_mark_node.
5752
3f8257db 57532016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
5754
5755 PR c/69507
5756 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
5757 __alignof__ (expression).
5758
6a3f203c
DM
57592016-06-14 David Malcolm <dmalcolm@redhat.com>
5760
5761 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
5762
264757fb
DM
57632016-06-14 David Malcolm <dmalcolm@redhat.com>
5764
5765 * c-typeck.c (build_component_ref): Simplify fixit code by
5766 using gcc_rich_location::add_fixit_misspelled_id.
5767 (set_init_label): Likewise.
5768
f7e4f2e3
DM
57692016-06-13 David Malcolm <dmalcolm@redhat.com>
5770
5771 * c-parser.c (c_parser_initelt): Provide location of name for new
5772 location_t param of set_init_label.
5773 * c-tree.h (set_init_label): Add location_t param.
5774 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
5775 param and use it when issuing error messages about unrecognized
5776 field names. Attempt to provide a fixit hint if appropriate,
5777 otherwise update the error message to provide the type name.
5778
4b1ffdb1
TS
57792016-06-10 Thomas Schwinge <thomas@codesourcery.com>
5780
5781 PR c/71381
5782 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
5783 Loosen checking.
5784
44a845ca
MS
57852016-06-08 Martin Sebor <msebor@redhat.com>
5786 Jakub Jelinek <jakub@redhat.com>
5787
5788 PR c++/70507
5789 PR c/68120
5790 * c-typeck.c (convert_arguments): Don't promote last argument
5791 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5792
92a5f2ba
MP
57932016-06-08 Marek Polacek <polacek@redhat.com>
5794
5795 PR c/71418
5796 * c-decl.c (grokdeclarator): Check TYPE_P.
5797
08203f73
MP
5798 PR c/71426
5799 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
5800 code.
5801
6ffd47b7
DM
58022016-06-07 David Malcolm <dmalcolm@redhat.com>
5803
5804 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
5805 and structure element reference, capture the location of the
5806 element name token and pass it to build_component_ref.
5807 (c_parser_postfix_expression_after_primary): Likewise for
5808 structure element dereference.
5809 (c_parser_omp_variable_list): Likewise for
5810 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
5811 * c-tree.h (build_component_ref): Add location_t param.
5812 * c-typeck.c (build_component_ref): Add location_t param
5813 COMPONENT_LOC. Use it, if available, when issuing hints about
5814 mispelled member names to provide a fixit replacement hint.
5815
1f40cff3
MP
58162016-06-06 Marek Polacek <polacek@redhat.com>
5817
5818 PR c/71362
5819 * c-parser.c (c_parser_direct_declarator): Set location.
5820
5545a907
MP
58212016-06-06 Marek Polacek <polacek@redhat.com>
5822
5823 * c-typeck.c (comptypes_internal): Handle comparisons of
5824 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
5825 TYPE_REF_CAN_ALIAS_ALL.
5826
b605f663
CLT
58272016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
5828
5829 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
5830 arguments as addressable when async clause exists.
5831
00631022
JJ
58322016-05-30 Jakub Jelinek <jakub@redhat.com>
5833
5834 PR c++/71349
5835 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
5836 when combined with target construct.
5837
7211a097
JJ
58382016-05-26 Jakub Jelinek <jakub@redhat.com>
5839
5840 * c-parser.c (c_parser_omp_clause_schedule): Warn if
5841 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
5842
95efe6b6
MP
58432016-05-25 Marek Polacek <polacek@redhat.com>
5844
5845 PR c/71265
5846 * c-decl.c (c_make_fname_decl): Don't check seen_error.
5847
a23faf7a
MP
5848 PR c/71266
5849 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
5850
e46c7770
CP
58512016-05-24 Cesar Philippidis <cesar@codesourcery.com>
5852
5853 * c-parser.c (c_parser_oacc_declare): Add support for
5854 GOMP_MAP_FIRSTPRIVATE_POINTER.
5855 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
5856 argument with enum c_omp_region_type ort.
5857 (handle_omp_array_sections): Likewise. Update call to
5858 handle_omp_array_sections_1.
5859 (c_finish_omp_clauses): Add specific errors and warning messages for
5860 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
5861 call to handle_omp_array_sections.
5862
a04e69c0
TS
58632016-05-24 Thomas Schwinge <thomas@codesourcery.com>
5864
5865 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
5866
f17a223d
RB
58672016-05-24 Richard Biener <rguenther@suse.de>
5868
5869 PR middle-end/70434
5870 PR c/69504
5871 * c-typeck.c (build_array_ref): Do not complain about indexing
5872 non-lvalue vectors. Adjust for function name change.
5873
79063edd
MS
58742016-05-20 Martin Sebor <msebor@redhat.com>
5875
5876 PR c/71115
5877 * c-typeck.c (error_init): Use
5878 expansion_point_location_if_in_system_header.
5879 (warning_init): Same.
5880
8a40fef3
DM
58812016-05-19 David Malcolm <dmalcolm@redhat.com>
5882
5883 PR c/71171
5884 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
5885 in error-handling.
5886 (c_parser_postfix_expression): Likewise.
5887 * c-tree.h (c_expr::set_error): New method.
5888 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
5889 that result's range is initialized.
5890
e9892350
JG
58912016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5892
5893 * c-typeck.c (parser_build_unary_op): Fix formatting.
5894
8fad45f5
MW
58952016-05-16 Matthew Wahab <matthew.wahab@arm.com>
5896
5897 * c-decl.c (grokdeclarator): Remove errmsg and use of
5898 targetm.invalid_return_type.
5899 (grokparms): Remove errmsg and use of
5900 targetm.invalid_parameter_type.
5901
aa4b467b
JM
59022016-05-13 Joseph Myers <joseph@codesourcery.com>
5903
5904 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
5905 function return type.
5906
4f2e1536
MP
59072016-05-12 Marek Polacek <polacek@redhat.com>
5908
5909 PR c/70756
5910 * c-decl.c (build_compound_literal): Pass LOC down to
5911 c_incomplete_type_error.
5912 * c-tree.h (require_complete_type): Adjust declaration.
5913 (c_incomplete_type_error): Likewise.
5914 * c-typeck.c (require_complete_type): Add location parameter, pass it
5915 down to c_incomplete_type_error.
5916 (c_incomplete_type_error): Add location parameter, pass it down to
5917 error_at.
5918 (build_component_ref): Pass location down to c_incomplete_type_error.
5919 (default_conversion): Pass location down to require_complete_type.
5920 (build_array_ref): Likewise.
5921 (build_function_call_vec): Likewise.
5922 (convert_arguments): Likewise.
5923 (build_unary_op): Likewise.
5924 (build_c_cast): Likewise.
5925 (build_modify_expr): Likewise.
5926 (convert_for_assignment): Likewise.
5927 (c_finish_omp_clauses): Likewise.
5928
d6e83a8d
MM
59292016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5930
5931 PR c/43651
5932 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
5933 is enabled.
5934 * c-errors.c (pedwarn_c90): Return true if warned.
5935 * c-tree.h (pedwarn_c90): Change return type to bool.
5936 (enum c_declspec_word): Add new enumerator cdw_atomic.
5937
5c3a10fb
MP
59382016-05-11 Marek Polacek <polacek@redhat.com>
5939
5940 PR c++/71024
5941 * c-decl.c (diagnose_mismatched_decls): Factor out code to
5942 diagnose_mismatched_attributes and call it.
5943
cf68d92c
MP
59442016-05-10 Marek Polacek <polacek@redhat.com>
5945
5946 PR c/70255
5947 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
5948 on a declaration following the definition.
5949
351f85c5
JJ
59502016-05-05 Jakub Jelinek <jakub@redhat.com>
5951
5952 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
5953 parse it through to c_parser_c99_block_statement.
5954 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
5955 caller.
5956
deef7113
MP
59572016-05-04 Marek Polacek <polacek@redhat.com>
5958
5959 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
5960 OPT_Wdangling_else.
5961
de55efd5
MP
59622016-05-04 Marek Polacek <polacek@redhat.com>
5963
5964 PR c/48778
5965 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
5966 for macro expansions.
5967
79ce98bc
MP
59682016-05-03 Marek Polacek <polacek@redhat.com>
5969
5970 PR c/70859
5971 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
5972 check_builtin_function_arguments.
5973
fb2647aa
RB
59742016-05-03 Richard Biener <rguenther@suse.de>
5975
5976 * Make-lang.in (cc1-checksum.c): For stage-final re-use
5977 the checksum from the previous stage.
5978
77886428
CP
59792016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5980
5981 * c-parser.c (c_parser_oacc_all_clauses): Update call to
5982 c_finish_omp_clauses.
5983 (c_parser_omp_all_clauses): Likewise.
5984 (c_parser_oacc_cache): Likewise.
5985 (c_parser_oacc_loop): Likewise.
5986 (omp_split_clauses): Likewise.
5987 (c_parser_omp_declare_target): Likewise.
5988 (c_parser_cilk_all_clauses): Likewise.
5989 (c_parser_cilk_for): Likewise.
5990 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
5991 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
5992
7176a4a0
MP
59932016-05-02 Marek Polacek <polacek@redhat.com>
5994
5995 PR c/70851
5996 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5997 incomplete type.
5998
e7ff0319
CP
59992016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6000
6001 PR middle-end/70626
6002 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
6003 OACC_LOOP_CLAUSE_MASK.
6004 (c_parser_oacc_kernels_parallel): Update call to
6005 c_oacc_split_loop_clauses.
6006
9f405ce1
AM
60072016-04-28 Andrew MacLeod <amacleod@redhat.com>
6008
6009 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
6010 argument to build_modify_expr in two cases.
6011
c1e1f433
BS
60122016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6013
6014 * c-parser.c (c_parser_postfix_expression_after_primary): Call
6015 warn_for_memset instead of warning directly here.
6016
2448a956
MP
60172016-04-26 Marek Polacek <polacek@redhat.com>
6018
6019 PR c/67784
6020 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
6021 out of ...
6022 (c_parser_for_statement): ... here.
6023 (c_parser_if_statement): Use it.
6024 (c_parser_switch_statement): Use it.
6025 (c_parser_while_statement): Use it.
6026
b02a5e26
MP
6027 PR c/70791
6028 * c-decl.c (pushdecl): Pass LOCUS down to warning.
6029
477d4906
IV
60302016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6031
6032 PR c++/69363
6033 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
6034 instead of c_finish_cilk_clauses.
6035 * c-tree.h (c_finish_omp_clauses): Add new default argument.
6036 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
6037 floating-point variables in the linear clause for Cilk Plus.
6038
fe37c7af
MM
60392016-04-18 Michael Matz <matz@suse.de>
6040
6041 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
6042 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
6043
949505a9
MP
60442016-04-15 Marek Polacek <polacek@redhat.com>
6045
6046 PR c/70671
6047 * c-typeck.c (build_unary_op): Pass location down to error and
6048 warning call.
6049
dda1bf61
JJ
60502016-04-15 Jakub Jelinek <jakub@redhat.com>
6051
6052 PR c/70436
6053 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
6054 where needed.
6055 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
6056 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
6057 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
6058 Adjust c_parser_pragma callers.
6059 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
6060 caller.
6061 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
6062 c_parser_statement.
6063 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
6064 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
6065 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
6066 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
6067 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
6068 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
6069 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
6070 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
6071 down where needed.
6072 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
6073 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
6074 calls.
6075
99cd9857
MP
60762016-04-13 Marek Polacek <polacek@redhat.com>
6077
6078 PR c/70436
6079 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
6080 adjust callers.
6081 (c_parser_statement): Likewise.
6082 (c_parser_c99_block_statement): Likewise.
6083 (c_parser_while_statement): Likewise.
6084 (c_parser_for_statement): Likewise.
6085 (c_parser_if_body): Don't set IF_P here.
6086 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
6087 about dangling else here.
6088 * c-tree.h (c_finish_if_stmt): Adjust declaration.
6089 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
6090 warn about dangling else here.
6091
f13355da
MP
60922016-04-04 Marek Polacek <polacek@redhat.com>
6093
6094 PR c/70307
6095 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
6096
5fde6a45
MP
60972016-03-31 Marek Polacek <polacek@redhat.com>
6098
6099 PR c/70297
6100 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
6101
4bbf545b
DM
61022016-03-18 David Malcolm <dmalcolm@redhat.com>
6103
6104 PR c/70281
6105 * c-parser.c (c_parser_postfix_expression): Set the source range
6106 for uses of "__builtin_types_compatible_p".
6107
fcc2b74f
JJ
61082016-03-17 Jakub Jelinek <jakub@redhat.com>
6109
6110 PR c/70280
6111 * c-typeck.c (composite_type): Don't count void_list_node
6112 into len, if the list is terminated by void_list_node, start
6113 with void_list_node instead of NULL for newargs. Stop
6114 at void_list_node.
6115
ab4c578f
MP
61162016-03-16 Marek Polacek <polacek@redhat.com>
6117
6118 PR c/70093
6119 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
6120 nested functions returning VM types.
6121
96b3c82d
CP
61222016-03-09 Cesar Philippidis <cesar@codesourcery.com>
6123
6124 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
6125 when calling c_finish_omp_clauses.
6126
29b9828f
BS
61272016-03-04 Bernd Schmidt <bschmidt@redhat.com>
6128
6129 PR c/69824
6130 * c-decl.c (get_parm_info): Don't queue implicit function declarations
6131 for later.
6132
7ff6ca38
MP
61332016-03-04 Marek Polacek <polacek@redhat.com>
6134
6135 PR c/69798
6136 * c-parser.c (c_parser_postfix_expression): Call
6137 c_parser_cast_expression rather than c_parser_postfix_expression.
6138
686e2237
JJ
61392016-03-01 Jakub Jelinek <jakub@redhat.com>
6140
6141 PR c/69796
6142 PR c/69974
6143 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
6144 of incomplete decls to error_mark_node.
6145
0b05329b
MP
61462016-02-24 Marek Polacek <polacek@redhat.com>
6147
6148 PR c/69819
6149 * c-decl.c (finish_decl): Don't update the copy of the type of a
6150 different decl type.
6151
067fbd8b
JJ
61522016-02-23 Jakub Jelinek <jakub@redhat.com>
6153
6154 PR objc/69844
6155 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
6156 in id_kind reclassification.
6157
bf14eba2
JJ
61582016-02-16 Jakub Jelinek <jakub@redhat.com>
6159
6160 PR c/69835
6161 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
6162
ba539195
JN
61632016-02-16 James Norris <jnorris@codesourcery.com>
6164
6165 PR c/64748
6166 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
6167
16595a1f
BS
61682016-02-12 Bernd Schmidt <bschmidt@redhat.com>
6169
f48dfe98
BS
6170 * c-decl.c (build_null_declspecs): Zero the entire struct.
6171
16595a1f
BS
6172 PR c/69522
6173 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
6174 callers changed. If nested_p is true, use it to call
6175 finish_implicit_inits.
6176 * c-tree.h (finish_implicit_inits): Declare.
6177 * c-typeck.c (finish_implicit_inits): New function. Move code
6178 from ...
6179 (push_init_level): ... here.
6180 (set_designator, process_init_element): Call finish_implicit_inits.
6181
66756373
JJ
61822016-02-11 Jakub Jelinek <jakub@redhat.com>
6183
6184 PR c/69768
6185 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
6186 arguments for -Waddress warning.
6187
1066e9b5
JJ
61882016-02-04 Jakub Jelinek <jakub@redhat.com>
6189
6190 PR c/69669
6191 * c-decl.c (finish_enum): When honoring mode attribute,
6192 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
6193
3a5d2ba4
JJ
61942016-01-29 Jakub Jelinek <jakub@redhat.com>
6195
6196 PR debug/69518
6197 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
6198 all type variants, not just TYPE_MAIN_VARIANT.
6199
cbdd8ae0
JJ
62002016-01-27 Jakub Jelinek <jakub@redhat.com>
6201
6202 PR debug/66869
6203 * c-decl.c (c_write_global_declarations_1): Warn with
6204 warn_unused_function if static prototype without definition
6205 is not C_DECL_USED.
6206
fa74a4bc
MP
62072016-01-27 Marek Polacek <polacek@redhat.com>
6208
6209 PR c/68062
6210 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
6211 to unsigned, if needed. Add -Wsign-compare warning.
6212
13f92e8d
JJ
62132016-01-26 Jakub Jelinek <jakub@redhat.com>
6214
6215 PR tree-optimization/69483
6216 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
6217
cd8e73dc 62182016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
6219
6220 PR c/24293
6221 * c-tree.h (incomplete_record_decls): Declare.
6222 * c-parser.c (incomplete_record_decls): Define.
6223 (c_parser_translation_unit): Iterate through incomplete_record_decls and
6224 report error if any decl has zero size.
6225 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
6226 or enum type to incomplete_record_decls.
6227
e6d6ec9e
TV
62282016-01-14 Tom de Vries <tom@codesourcery.com>
6229
6230 PR tree-optimization/68773
6231 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
6232 set force_output.
6233
00083992
MP
62342016-01-14 Marek Polacek <polacek@redhat.com>
6235
6236 PR c/69262
6237 * c-decl.c (grokdeclarator): Provide more information for invalid
6238 array declarations.
6239
7443cf13
DM
62402016-01-06 David Malcolm <dmalcolm@redhat.com>
6241
6242 * c-parser.c (c_parser_unary_expression): For dereferences, build
6243 a combined location before calling build_indirect_ref, so that
6244 error reports cover the full range, manually updating the c_expr
6245 src_range.
6246
6b131d5b
MP
62472016-01-06 Marek Polacek <polacek@redhat.com>
6248
6249 PR sanitizer/69099
6250 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
6251 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
6252 NULL.
6253
818ab71a
JJ
62542016-01-04 Jakub Jelinek <jakub@redhat.com>
6255
6256 Update copyright years.
6257
2fe0a208
MP
62582016-01-04 Marek Polacek <polacek@redhat.com>
6259
6260 PR c/68908
6261 * c-typeck.c (build_atomic_assign): Improve commentary. Add
6262 optimization to use __atomic_fetch_* built-in if possible.
6263
c7b48c8a
TS
62642015-12-23 Thomas Schwinge <thomas@codesourcery.com>
6265
6266 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
6267 into...
6268 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
6269 all users.
6270
fda5652f
MP
62712015-12-22 Marek Polacek <polacek@redhat.com>
6272
6273 PR c/69002
6274 * c-typeck.c (build_component_ref): Warn when acessing elements of
6275 atomic structures or unions.
6276
745e411d
DM
62772015-12-21 David Malcolm <dmalcolm@redhat.com>
6278
6279 * c-typeck.c: Include "gcc-rich-location.h".
6280 (build_binary_op): In the two places that call binary_op_error,
6281 create a gcc_rich_location and populate it with the location of
6282 the binary op and its two operands.
6283
94c40e19
DM
62842015-12-16 David Malcolm <dmalcolm@redhat.com>
6285
6286 * c-parser.c (c_parser_statement_after_labels): When calling
6287 c_finish_return, Use the return expression's location if it has
6288 one, falling back to the location of the first token within it.
6289 * c-typeck.c (c_finish_return): When issuing warnings about
6290 the incorrect presence/absence of a return value, issue a note
6291 showing the declaration of the function.
6292
de67c4c3
DM
62932015-12-16 David Malcolm <dmalcolm@redhat.com>
6294
6295 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
6296 to 4.
6297 (c_parser_peek_nth_token): New function.
6298 (c_parser_peek_conflict_marker): New function.
6299 (c_parser_error): Detect conflict markers and report them as such.
6300
a10704e1
DM
63012015-12-16 David Malcolm <dmalcolm@redhat.com>
6302
6303 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
6304 to preserve range information for the primary expression
6305 in the call to c_parser_postfix_expression_after_primary.
6306
8062bca6
DM
63072015-12-16 David Malcolm <dmalcolm@redhat.com>
6308
6309 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
6310 expression location, falling back on the first token location,
6311 rather than always using the latter.
6312
d06f8b75
MP
63132015-12-16 Marek Polacek <polacek@redhat.com>
6314
6315 PR c/64637
6316 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
6317 available.
6318
2994fb91
MP
63192015-12-15 Marek Polacek <polacek@redhat.com>
6320
6321 PR c/68907
6322 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
6323 artificial decl.
6324
a1b93f8d
DM
63252015-12-08 David Malcolm <dmalcolm@redhat.com>
6326
6327 * c-parser.c (c_parser_alignof_expression): Capture location of
6328 closing parenthesis (if any), or of end of unary expression, and
6329 use it to build a src_range for the expression.
6330
46c6e1e2
DM
63312015-12-08 David Malcolm <dmalcolm@redhat.com>
6332
6333 PR c/68757
6334 * c-parser.c (c_parser_get_builtin_args): Add
6335 "out_close_paren_loc" param, and write back to it.
6336 (c_parser_postfix_expression): Capture the closing
6337 parenthesis location for RID_CHOOSE_EXPR,
6338 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
6339 RID_BUILTIN_SHUFFLE and use it to set the source range
6340 for such expressions; within RID_BUILTIN_COMPLEX set
6341 the underlying location.
6342
66189108
MP
63432015-12-07 Marek Polacek <polacek@redhat.com>
6344
6345 PR c/68668
6346 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
6347 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
6348
f187980b
EB
63492015-12-04 Eric Botcazou <ebotcazou@adacore.com>
6350
6351 * c-tree.h (c_build_va_arg): Adjust prototype.
6352 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
6353 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
6354 parameter, adjust throughout and issue an error if EXPR is a component
6355 with reverse storage order.
6356
4250754e
JM
63572015-12-02 Jason Merrill <jason@redhat.com>
6358
6359 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6360 (c_fully_fold_internal, decl_constant_value_for_optimization):
6361 Move from c-common.c.
6362 * c-tree.h: Declare decl_constant_value_for_optimization.
6363 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
6364
e9e32ee6
JM
63652015-12-02 Joseph Myers <joseph@codesourcery.com>
6366
6367 PR c/68162
6368 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
6369 following link from declarator to next declarator. Track original
6370 qualified type and pass it to c_build_qualified_type.
6371 * c-typeck.c (c_build_qualified_type): Add arguments
6372 orig_qual_type and orig_qual_indirect.
6373
ff7a55bf
TS
63742015-12-02 Thomas Schwinge <thomas@codesourcery.com>
6375
6376 * c-parser.c (c_parser_omp_clause_name)
6377 (c_parser_oacc_all_clauses): Alphabetical sorting.
6378
657e4e47
JJ
63792015-12-02 Jakub Jelinek <jakub@redhat.com>
6380
6381 PR c/68533
6382 * c-decl.c (get_parm_info): Use b->locus instead of input_location
6383 for diagnostics.
6384
37d5ad46
JB
63852015-12-01 Julian Brown <julian@codesourcery.com>
6386 Cesar Philippidis <cesar@codesourcery.com>
6387 James Norris <James_Norris@mentor.com>
6388
6389 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
6390 (c_parser_oacc_clause_use_device): New function.
6391 (c_parser_oacc_all_clauses): Add use_device support.
6392 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
6393 (c_parser_oacc_host_data): New function.
6394 (c_parser_omp_construct): Add host_data support.
6395 * c-tree.h (c_finish_oacc_host_data): Add prototype.
6396 * c-typeck.c (c_finish_oacc_host_data): New function.
6397 (c_finish_omp_clauses): Add use_device support.
6398
a4850ce9
JH
63992015-11-29 Jan Hubicka <hubicka@ucw.cz>
6400
6401 PR c/67106
6402 * c-decl.c: Set TYPE_PACKED in variants.
6403
b58d3df2
ML
64042015-11-27 Martin Liska <mliska@suse.cz>
6405
6406 PR c++/68312
6407 * c-array-notation.c (fix_builtin_array_notation_fn):
6408 Use release_vec_vec instead of vec::release.
6409 (build_array_notation_expr): Likewise.
6410 (fix_conditional_array_notations_1): Likewise.
6411 (fix_array_notation_expr): Likewise.
6412 (fix_array_notation_call_expr): Likewise.
6413
aec17bfe
JJ
64142015-11-27 Jakub Jelinek <jakub@redhat.com>
6415
6416 PR c/63326
6417 * c-parser.c (c_parser_compound_statement_nostart): If
6418 last_label is true, use pragma_stmt instead of pragma_compound
6419 as second c_parser_pragma argument.
6420 (c_parser_omp_ordered, c_parser_omp_target_update,
6421 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
6422 false as second argument to c_parser_skip_to_pragma_eol after
6423 diagnosing standalone directives used in pragma_stmt context.
6424
688c4de0
IV
64252015-11-24 Ilya Verbin <ilya.verbin@intel.com>
6426
6427 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
6428 with "if (ENABLE_OFFLOADING)".
6429
cbd03aee
DM
64302015-11-23 David Malcolm <dmalcolm@redhat.com>
6431
6432 PR objc/68438
6433 * c-parser.c (c_parser_postfix_expression): Set up source ranges
6434 for various Objective-C constructs: Class.name syntax,
6435 @selector(), @protocol(), @encode(), and [] message syntax.
6436
a87a86e1
DM
64372015-11-20 David Malcolm <dmalcolm@redhat.com>
6438
6439 PR 62314
6440 * c-typeck.c (should_suggest_deref_p): New function.
6441 (build_component_ref): Special-case POINTER_TYPE when
6442 generating a "not a structure of union" error message, and
6443 suggest a "->" rather than a ".", providing a fix-it hint.
6444
8ece8dfb
DM
64452015-11-19 David Malcolm <dmalcolm@redhat.com>
6446
6447 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
6448 candidate into a new function, find_closest_identifier.
6449
433068cc
MP
64502015-11-19 Marek Polacek <polacek@redhat.com>
6451
6452 PR c/68412
6453 * c-typeck.c (parser_build_binary_op): Properly handle
6454 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
6455
bef08b71
DM
64562015-11-17 David Malcolm <dmalcolm@redhat.com>
6457
6458 * c-parser.c (set_c_expr_source_range): Bulletproof both
6459 overloaded implementations against NULL expr->value.
6460 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
6461 values.
6462 (c_parser_unary_expression): Likewise when handling addresses of
6463 labels.
6464 (c_parser_postfix_expression): Likewise for statement expressions,
6465 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
6466 __builtin_va_arg, and for __builtin_offset_of.
6467 (c_parser_postfix_expression_after_paren_type): Initialize expr's
6468 src_range using the range of the braced initializer.
6469 (c_parser_transaction_expression): Set src_range for "ret" to a
6470 sane pair of values.
6471
fff77217
KY
64722015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6473
6474 * c-parser.c (c_finish_omp_declare_simd): Look for
6475 "simd" attribute as well. Update error message.
6476
1d899da2
TS
64772015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6478
6479 * c-parser.c (c_parser_omp_declare_target): Adjust.
6480
e4606348
JJ
64812015-11-14 Jakub Jelinek <jakub@redhat.com>
6482
6483 * c-typeck.c (c_finish_omp_clauses): Don't mark
6484 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
6485
3e636daf
MP
64862015-11-14 Marek Polacek <polacek@redhat.com>
6487
6488 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
6489 * c-typeck.c: Likewise.
6490
ebedc9a3
DM
64912015-11-13 David Malcolm <dmalcolm@redhat.com>
6492
6493 * c-decl.c (warn_defaults_to): Pass line_table to
6494 rich_location ctor.
6495 * c-errors.c (pedwarn_c99): Likewise.
6496 (pedwarn_c90): Likewise.
6497 * c-parser.c (set_c_expr_source_range): New functions.
6498 (c_token::get_range): New method.
6499 (c_token::get_finish): New method.
6500 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
6501 based on the range from the start of the LHS to the end of the
6502 RHS.
6503 (c_parser_conditional_expression): Likewise, based on the range
6504 from the start of the cond.value to the end of exp2.value.
6505 (c_parser_binary_expression): Call set_c_expr_source_range on
6506 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
6507 (c_parser_cast_expression): Call set_c_expr_source_range on ret
6508 based on the cast_loc through to the end of the expr.
6509 (c_parser_unary_expression): Likewise, based on the
6510 op_loc through to the end of op.
6511 (c_parser_sizeof_expression) Likewise, based on the start of the
6512 sizeof token through to either the closing paren or the end of
6513 expr.
6514 (c_parser_postfix_expression): Likewise, using the token range,
6515 or from the open paren through to the close paren for
6516 parenthesized expressions.
6517 (c_parser_postfix_expression_after_primary): Likewise, for
6518 various kinds of expression.
6519 * c-tree.h (struct c_expr): Add field "src_range".
6520 (c_expr::get_start): New method.
6521 (c_expr::get_finish): New method.
6522 (set_c_expr_source_range): New decls.
6523 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
6524 on ret for prefix unary ops.
6525 (parser_build_binary_op): Likewise, running from the start of
6526 arg1.value through to the end of arg2.value.
6527
ec8b536f
MP
65282015-11-13 Marek Polacek <polacek@redhat.com>
6529
6530 PR c/68320
6531 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
6532
277fe616
DM
65332015-11-13 David Malcolm <dmalcolm@redhat.com>
6534
6535 * c-typeck.c: Include spellcheck.h.
6536 (lookup_field_fuzzy_find_candidates): New function.
6537 (lookup_field_fuzzy): New function.
6538 (build_component_ref): If the field was not found, try using
6539 lookup_field_fuzzy and potentially offer a suggestion.
6540
6e232ba4
JN
65412015-11-12 James Norris <jnorris@codesourcery.com>
6542 Joseph Myers <joseph@codesourcery.com>
6543
6544 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
6545 (c_parser_omp_clause_name): Handle 'device_resident' clause.
6546 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6547 and PRAGMA_OMP_CLAUSE_LINK.
6548 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6549 and PRAGMA_OACC_CLAUSE_LINK.
6550 (OACC_DECLARE_CLAUSE_MASK): New definition.
6551 (c_parser_oacc_declare): New function.
6552
9be4f715
MP
65532015-11-12 Marek Polacek <polacek@redhat.com>
6554
6555 PR c/67784
6556 * c-parser.c (c_parser_for_statement): Reclassify the token in
6557 a correct scope.
6558
e78bede6
MP
65592015-11-11 Marek Polacek <polacek@redhat.com>
6560
6561 PR c/68107
6562 PR c++/68266
6563 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
6564 checking the size of an array.
6565
69f293c9
AM
65662015-11-11 Andrew MacLeod <amacleod@redhat.com>
6567
6568 * c-array-notation.c: Remove unused header files.
6569 * c-aux-info.c: Likewise.
6570 * c-convert.c: Likewise.
6571 * c-decl.c: Likewise.
6572 * c-errors.c: Likewise.
6573 * c-lang.c: Likewise.
6574 * c-objc-common.c: Likewise.
6575 * c-parser.c: Likewise.
6576 * c-typeck.c: Likewise.
6577 * gccspec.c: Likewise.
6578
3a40d81d
NS
65792015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6580 Cesar Philippidis <cesar@codesourcery.com>
6581 James Norris <jnorris@codesourcery.com>
6582 Julian Brown <julian@codesourcery.com>
6583 Nathan Sidwell <nathan@codesourcery.com>
6584
3a40d81d
NS
6585 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
6586 routine arg.
6587 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
6588 (c_parser_pragma): Parse 'acc routine'.
6589 (OACC_ROUTINE_CLAUSE_MARK): Define.
6590 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
6591
fc402eec
AA
65922015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6593
6594 PR debug/67192
6595 * c-typeck.c (c_finish_loop): For unconditional loops, set the
6596 location of the backward-goto to the start of the loop body.
6597
f6b0b3db
AA
65982015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6599
6600 PR debug/67192
6601 * c-parser.c (c_parser_while_statement): Finish the loop before
6602 parsing ahead for misleading indentation.
6603 (c_parser_for_statement): Likewise.
6604
ee45a32d
EB
66052015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6606
6607 * c-decl.c (finish_struct): If the structure has reverse storage
6608 order, rewrite the type of array fields with scalar component. Call
6609 maybe_apply_pragma_scalar_storage_order on entry.
6610 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
6611 errors on bit-fields and reverse SSO here and not...
6612 (c_mark_addressable): ...here.
6613 (output_init_element): Adjust call to initializer_constant_valid_p.
6614 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
6615
8a645150
DM
66162015-11-06 David Malcolm <dmalcolm@redhat.com>
6617
6618 * c-decl.c (warn_defaults_to): Update for change in signature
6619 of diagnostic_set_info.
6620 * c-errors.c (pedwarn_c99): Likewise.
6621 (pedwarn_c90): Likewise.
6622 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
6623 for textinfo::set_location.
6624
7a5e4956
CP
66252015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6626 Thomas Schwinge <thomas@codesourcery.com>
6627 James Norris <jnorris@codesourcery.com>
6628
6629 * c-parser.c (c_parser_omp_clause_name): Add support for
6630 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
6631 (c_parser_omp_clause_default): Add is_oacc argument. Handle
6632 default(none) in OpenACC.
6633 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
6634 arguments.
6635 (c_parser_oacc_clause_tile): New function.
6636 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
6637 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
6638 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
6639 TILE}.
6640 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
6641 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
6642 FIRSTPRIVATE}.
6643 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
6644 (c_parser_oacc_update): Update the error message for missing clauses.
6645 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
6646 and OMP_CLAUSE_INDEPENDENT.
6647
bfcfbfa0
MP
66482015-11-05 Marek Polacek <polacek@redhat.com>
6649
6650 PR c/68090
6651 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
6652 deal with pre-evaluation on invalid types.
6653
e01d41e5
JJ
66542015-11-05 Jakub Jelinek <jakub@redhat.com>
6655 Ilya Verbin <ilya.verbin@intel.com>
6656
6657 * c-parser.c: Include context.h and gimple-expr.h.
6658 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
6659 monotonic together with nonmonotonic.
6660 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
6661 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
6662 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
6663 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
6664 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
6665 expressions on combined target teams before the target.
6666 (c_parser_omp_declare_target): If decl has "omp declare target" or
6667 "omp declare target link" attribute, and cgraph or varpool node already
6668 exists, then set corresponding flags. Call c_finish_omp_clauses
6669 in the parenthesized extended-list syntax case.
6670 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
6671 declare target.
6672 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
6673 on OMP_CLAUSE_REDUCTION array sections.
6674 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
6675 into the constant offset, or for variable low-bound using
6676 POINTER_PLUS_EXPR. For structure element based array sections use
6677 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
6678 (c_finish_omp_clauses): Drop generic_field_head, structure
6679 elements are now always mapped even as array section bases,
6680 diagnose same var in data sharing and mapping clauses. Diagnose if
6681 linear step on declare simd is neither a constant nor a uniform
6682 parameter. Look through POINTER_PLUS_EXPR for array section
6683 reductions. Diagnose the same var or function appearing multiple
6684 times on the same directive. Fix up wording for the to clause if t
6685 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
6686 modifier on kinds other than dynamic or guided or nonmonotonic
6687 modifier together with ordered clause.
6688
4bf9e5a8
TS
66892015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6690 Chung-Lin Tang <cltang@codesourcery.com>
6691
6692 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
6693
2adfab87
AM
66942015-10-29 Andrew MacLeod <amacleod@redhat.com>
6695
6696 * c-array-notation.c: Reorder #include's and remove duplicates.
6697 * c-aux-info.c: Likewise.
6698 * c-convert.c: Likewise.
6699 * c-decl.c: Likewise.
6700 * c-errors.c: Likewise.
6701 * c-lang.c: Likewise.
6702 * c-objc-common.c: Likewise.
6703 * c-parser.c: Likewise.
6704 * c-typeck.c: Likewise.
6705
e922069e
JW
67062015-10-26 Jim Wilson <jim.wilson@linaro.org>
6707
6708 PR debug/66068
6709 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
6710 after calling build_qualified_type.
6711
765dd391
CP
67122015-10-27 Cesar Philippidis <cesar@codesourcery.com>
6713 Thomas Schwinge <thomas@codesourcery.com>
6714 James Norris <jnorris@codesourcery.com>
6715 Joseph Myers <joseph@codesourcery.com>
6716 Julian Brown <julian@codesourcery.com>
6717 Bernd Schmidt <bschmidt@redhat.com>
6718
6719 * c-parser.c (c_parser_oacc_shape_clause): New.
6720 (c_parser_oacc_simple_clause): New.
6721 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
6722 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
6723
88bae6f4
TS
67242015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6725 James Norris <jnorris@codesourcery.com>
6726 Cesar Philippidis <cesar@codesourcery.com>
6727
6728 PR c/64765
6729 PR c/64880
6730 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
6731 parameters, and handle these. Adjust all users.
6732 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
6733 into...
6734 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
6735 all users.
6736 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
6737 declare functions.
6738 (c_finish_omp_construct): Declare function.
6739 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
6740 Merge functions into...
6741 (c_finish_omp_construct): ... this new function.
6742
a8fc2579
RB
67432015-10-22 Richard Biener <rguenther@suse.de>
6744
6745 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
6746 before folding a MINUS_EXPR.
6747
e9122ef6
MP
67482015-10-21 Marek Polacek <polacek@redhat.com>
6749
6750 PR c/68024
6751 * c-decl.c (start_function): Warn about vararg functions without
6752 a prototype.
6753
9f47c7e5
IE
67542015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
6755
6756 * c-typeck.c (build_conditional_expr): Use boolean vector
6757 type for vector comparison.
6758 (build_vec_cmp): New.
6759 (build_binary_op): Use build_vec_cmp for comparison.
6760
fa60eeb9
MP
67612015-10-20 Marek Polacek <polacek@redhat.com>
6762
6763 * c-parser.c (is_cilkplus_vector_p): Don't define here.
6764
2c7020eb
MP
67652015-10-20 Marek Polacek <polacek@redhat.com>
6766
6767 PR c/67964
6768 * c-parser.c (c_parser_attributes): Break out of the loop if the
6769 token after an attribute isn't a comma.
6770
d9a6bd32
JJ
67712015-10-13 Jakub Jelinek <jakub@redhat.com>
6772 Aldy Hernandez <aldyh@redhat.com>
6773
6774 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
6775 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
6776 (c_parser_omp_variable_list): Handle structure elements for
6777 map, to and from clauses. Handle array sections in reduction
6778 clause. Formatting fixes.
6779 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
6780 if clause modifiers.
6781 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
6782 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
6783 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
6784 c_parser_omp_clause_is_device_ptr): New functions.
6785 (c_parser_omp_clause_ordered): Parse optional parameter.
6786 (c_parser_omp_clause_reduction): Handle array reductions.
6787 (c_parser_omp_clause_schedule): Parse optional simd modifier.
6788 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
6789 functions.
6790 (c_parser_omp_clause_linear): Parse linear clause modifiers.
6791 (c_parser_omp_clause_depend_sink): New function.
6792 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
6793 (c_parser_omp_clause_map): Parse release/delete map kinds and
6794 optional always modifier.
6795 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
6796 and c_finish_omp_clauses callers.
6797 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
6798 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
6799 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
6800 (OMP_CRITICAL_CLAUSE_MASK): Define.
6801 (c_parser_omp_critical): Parse critical clauses.
6802 (c_parser_omp_for_loop): Handle doacross loops, adjust
6803 c_finish_omp_for and c_finish_omp_clauses callers.
6804 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
6805 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
6806 (OMP_FOR_CLAUSE_MASK): Add linear clause.
6807 (c_parser_omp_for): Disallow ordered clause when combined with
6808 distribute. Disallow linear clause when combined with distribute
6809 and not combined with simd.
6810 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
6811 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
6812 parse clauses and if depend clause is found, don't parse a body.
6813 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
6814 Allow target parallel without for after it.
6815 (OMP_TASK_CLAUSE_MASK): Add priority clause.
6816 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
6817 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
6818 invalid kinds.
6819 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
6820 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
6821 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
6822 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
6823 functions.
6824 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
6825 defaultmap and is_device_ptr clauses.
6826 (c_parser_omp_target): Parse target parallel and target simd. Set
6827 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
6828 and target exit data. Diagnose invalid map kinds.
6829 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
6830 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
6831 construct.
6832 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
6833 &omp_priv.
6834 (OMP_TASKLOOP_CLAUSE_MASK): Define.
6835 (c_parser_omp_taskloop): New function.
6836 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
6837 handle PRAGMA_OMP_TASKLOOP.
6838 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
6839 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
6840 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
6841 Add IS_OMP argument, handle structure element bases, diagnose
6842 bitfields, pass IS_OMP recursively, diagnose known zero length
6843 array sections in depend clauses, handle array sections in reduction
6844 clause, diagnose negative length even for pointers.
6845 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
6846 types, pass IS_OMP down to handle_omp_array_sections_1, handle
6847 array sections in reduction clause, set
6848 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
6849 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
6850 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
6851 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
6852
21ba0cea
MP
68532015-10-06 Marek Polacek <polacek@redhat.com>
6854
6855 * c-parser.c (c_parser_statement_after_labels): Use
6856 protected_set_expr_location.
6857 (c_parser_omp_clause_num_gangs): Likewise.
6858 (c_parser_omp_clause_num_threads): Likewise.
6859 (c_parser_omp_clause_num_workers): Likewise.
6860 (c_parser_omp_clause_vector_length): Likewise.
6861 (c_parser_omp_clause_num_teams): Likewise.
6862 (c_parser_omp_clause_thread_limit): Likewise.
6863 * c-typeck.c (build_c_cast): Likewise.
6864 (c_cast_expr): Likewise.
6865
624d31fe
RS
68662015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6867
6868 * c-typeck.c (c_tree_equal): Use real_equal instead of
6869 REAL_VALUES_EQUAL.
6870
b8fd7909
JM
68712015-10-04 Jason Merrill <jason@redhat.com>
6872
6873 * c-parser.c (c_lex_one_token): Handle @synchronized.
6874 * c-decl.c (match_builtin_function_types): A declaration of a built-in
6875 can change whether the function is transaction_safe.
6876
1c7485af
MP
68772015-10-02 Marek Polacek <polacek@redhat.com>
6878
6879 PR c/67730
6880 * c-typeck.c (convert_for_assignment): Use the expansion point
6881 location throughout.
6882
3e3b8d63
MP
68832015-10-02 Marek Polacek <polacek@redhat.com>
6884
6885 PR c/64249
6886 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
6887 and pass it down to c_parser_if_statement.
6888 (c_parser_else_body): Add CHAIN parameter and pass it down to
6889 c_parser_statement_after_labels.
6890 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
6891 duplicated if-else-if conditions.
6892
aabef2de
MP
68932015-10-01 Marek Polacek <polacek@redhat.com>
6894
6895 * c-typeck.c (convert_for_assignment): Improve commentary.
6896
de8ddd5f
MP
68972015-09-30 Marek Polacek <polacek@redhat.com>
6898
6899 PR c/67730
6900 * c-typeck.c (c_finish_return): Use the expansion point location for
6901 certain "return with value" warnings.
6902
c4914de6
MLI
69032015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6904
6905 * c-parser.c (pragma_lex): Add loc argument.
6906
0e36f5c7
MP
69072015-09-15 Marek Polacek <polacek@redhat.com>
6908
6909 PR c/67580
6910 * c-decl.c (tag_exists_p): New function.
6911 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
6912 struct/union/enum keywords are missing.
6913 * c-tree.h (tag_exists_p): Declare.
6914
2f3bb934
MP
69152015-09-15 Marek Polacek <polacek@redhat.com>
6916
6917 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
6918 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
6919 Return NULL_TREE instead of 0.
6920 (lookup_name): Return NULL_TREE instead of 0.
6921 (lookup_name_in_scope): Likewise.
6922 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
6923 (parser_xref_tag): Use false instead of 0.
6924 (start_struct): Use true instead of 1.
6925 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
6926
aa256c4a
MP
69272015-09-14 Marek Polacek <polacek@redhat.com>
6928
6929 * c-typeck.c (set_nonincremental_init_from_string): Use
6930 HOST_WIDE_INT_M1U when shifting a negative value.
6931
dbb68221
MW
69322015-09-09 Mark Wielaard <mjw@redhat.com>
6933
6934 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
6935 parm against NULL.
6936
a8a098ac
JJ
69372015-09-10 Jakub Jelinek <jakub@redhat.com>
6938
6939 PR c/67502
6940 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
6941 into OMP_FOR_PRE_BODY rather than before the loop.
6942
f4b189d5
JJ
69432015-09-09 Jakub Jelinek <jakub@redhat.com>
6944
0bb99c11
JJ
6945 PR c/67501
6946 * c-parser.c (c_parser_oacc_all_clauses,
6947 c_parser_omp_all_clauses): Remove invalid clause from
6948 list of clauses even if parser->error is set.
6949
fce5e5e3
JJ
6950 PR c/67500
6951 * c-parser.c (c_parser_omp_clause_aligned,
6952 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
6953 test for errors.
6954 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
6955 error_mark_node.
6956
f4b189d5
JJ
6957 PR c/67495
6958 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
6959 instead of c_parser_unary_expression. If the result is !lvalue_p,
6960 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
6961
b2aaf235
MP
69622015-09-04 Marek Polacek <polacek@redhat.com>
6963
6964 PR sanitizer/67279
6965 * c-typeck.c (build_binary_op): Don't instrument static initializers.
6966
1807ffc1
MS
69672015-09-03 Martin Sebor <msebor@redhat.com>
6968
6969 PR c/66516
8b652e65
JJ
6970 * c-typeck.c (convert_arguments, parser_build_unary_op,
6971 build_conditional_expr, c_cast_expr, convert_for_assignment,
6972 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
6973 reject_gcc_builtin.
6974 (c_decl_implicit): Define.
6975
d04ff417
MP
69762015-09-02 Marek Polacek <polacek@redhat.com>
6977
6978 PR c/67432
6979 * c-parser.c (c_parser_enum_specifier): Give a better error for
6980 an empty enum.
6981
a79683d5
TS
69822015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6983
6984 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
6985
191a6b94
MP
69862015-08-12 Marek Polacek <polacek@redhat.com>
6987
6988 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
6989 LOC to it.
6990
420a9d9b
MP
69912015-08-03 Marek Polacek <polacek@redhat.com>
6992
6993 PR c/67088
6994 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
6995 Use it.
6996 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
6997
992118a1
PP
69982015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6999
7000 * c-parser.c (c_parser_if_body): Take token_indent_info
7001 argument. Call warn_for_misleading_indentation even when the
7002 body is a semicolon. Extract token_indent_infos corresponding
7003 to the guard, body and next tokens. Adjust call to
7004 warn_for_misleading_indentation accordingly.
7005 (c_parser_else_body): Likewise.
7006 (c_parser_if_statement): Likewise.
7007 (c_parser_while_statement): Likewise.
7008 (c_parser_for_statement): Likewise.
7009
46308474
LFSM
70102015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
7011 Manuel López-Ibáñez <manu@gcc.gnu.org>
7012
7013 * c-decl.c (get_parm_info): Remove static var. Update warning
7014 message.
7015
05b28fd6
MP
70162015-07-27 Marek Polacek <polacek@redhat.com>
7017
7018 PR c++/66555
7019 PR c/54979
7020 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
7021
451b5e48
MP
70222015-07-20 Marek Polacek <polacek@redhat.com>
7023
7024 PR c++/55095
7025 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
7026 (build_binary_op): Warn about left shift overflows.
7027
1916bcb5
AM
70282015-07-09 Andrew MacLeod <amacleod@redhat.com>
7029
7030 * c-array-notation.c: Adjust includes for flags.h changes.
7031 * c-objc-common.c: Likewise.
7032
c7131fb2
AM
70332015-07-07 Andrew MacLeod <amacleod@redhat.com>
7034
7035 * c-array-notation.c: Adjust includes.
7036 * c-aux-info.c: Likewise.
7037 * c-convert.c: Likewise.
7038 * c-decl.c: Likewise.
7039 * c-errors.c: Likewise.
7040 * c-lang.c: Likewise.
7041 * c-objc-common.c: Likewise.
7042 * c-parser.c: Likewise.
7043 * c-typeck.c: Likewise.
7044
da2e71c9
MLI
70452015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7046
7047 PR fortran/66605
7048 * c-decl.c (finish_function): Call do_warn_unused_parameter.
7049
b155cfd9
MP
70502015-06-29 Marek Polacek <polacek@redhat.com>
7051
7052 PR c/66322
7053 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
7054 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
7055 about -Wswitch-bool here.
7056 (do_case): Update c_add_case_label call.
7057 (c_finish_case): Update c_do_switch_warnings call.
7058
31521951
MP
70592015-06-27 Marek Polacek <polacek@redhat.com>
7060
7061 * c-typeck.c: Use VECTOR_TYPE_P throughout.
7062
22d03525
MP
70632015-06-26 Marek Polacek <polacek@redhat.com>
7064
7065 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7066 INDIRECT_REF_P.
7067 * c-typeck.c (array_to_pointer_conversion): Likewise.
7068 (build_unary_op): Likewise.
7069 (c_finish_return): Likewise.
7070
f0889939
AM
70712015-06-25 Andrew MacLeod <amacleod@redhat.com>
7072
7073 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
7074 * c-parser.c: Likewise.
7075
8d67ee55
RS
70762015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7077
7078 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
7079 instead of pointer_hash.
7080 (detect_field_duplicates): Likewise.
7081
0ae9bd27
MP
70822015-06-25 Marek Polacek <polacek@redhat.com>
7083
7084 * c-array-notation.c: Use VAR_P throughout.
7085 * c-decl.c: Likewise.
7086 * c-objc-common.c: Likewise.
7087 * c-parser.c: Likewise.
7088 * c-typeck.c: Likewise.
7089
62f9079a
MP
70902015-06-25 Marek Polacek <polacek@redhat.com>
7091
7092 * c-decl.c: Use is_global_var throughout.
7093 * c-parser.c: Likewise.
7094 * c-typeck.c: Likewise.
7095
abb226c9
AM
70962015-06-17 Andrew MacLeod <amacleod@redhat.com>
7097
7098 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
7099 * c-aux-info.c: Likewise.
7100 * c-convert.c: Likewise.
7101 * c-decl.c: Likewise.
7102 * c-errors.c: Likewise.
7103 * c-lang.c: Likewise.
7104 * c-objc-common.c: Likewise.
7105 * c-parser.c: Likewise.
7106 * c-typeck.c: Likewise.
7107
8cbababc
JH
71082015-06-11 Jan Hubicka <hubicka@ucw.cz>
7109
7110 PR middle-end/66325
7111 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
7112 variants.
7113
a0349665
PMR
71142015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
7115
7116 * c-decl.c (pop_scope): Register the main translation unit
7117 through the new debug hook.
7118
13fdf2e2
AM
71192015-06-08 Andrew MacLeod <amacleod@redhat.com>
7120
7121 * c-array-notation.c : Adjust include files.
7122 * c-aux-info.c : Likewise.
7123 * c-convert.c : Likewise.
7124 * c-decl.c : Likewise.
7125 * c-errors.c : Likewise.
7126 * c-lang.c : Likewise.
7127 * c-lang.h : Likewise.
7128 * c-objc-common.c : Likewise.
7129 * c-parser.c : Likewise.
7130 * c-typeck.c : Likewise.
7131
d7438551
AH
71322015-06-05 Aldy Hernandez <aldyh@redhat.com>
7133
7134 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
7135 immediately clobber it.
7136 (c_write_global_declarations_1): Remove call to
7137 check_global_declaration_1.
7138 (c_write_global_declarations_2): Remove.
7139 (c_write_final_cleanups): Rename from c_write_global_declarations.
7140 Remove call to finalize_compilation_unit.
7141 Remove calls to debugging hooks.
7142 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
7143 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
7144 * c-tree.h: Remove c_write_global_declarations.
7145
ecb9f223
AM
71462015-06-04 Andrew MacLeod <amacleod@redhat.com>
7147
7148 * c-array-notation.c: Adjust includes for restructured coretypes.h.
7149 * c-aux-info.c: Likewise.
7150 * c-convert.c: Likewise.
7151 * c-decl.c: Likewise.
7152 * c-errors.c: Likewise.
7153 * c-lang.c: Likewise.
7154 * c-objc-common.c: Likewise.
7155 * c-parser.c: Likewise.
7156 * c-typeck.c: Likewise.
7157
9482b620
MP
71582015-06-04 Marek Polacek <polacek@redhat.com>
7159
7160 PR c/66341
7161 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
7162 it is a lvalue.
7163
bc51ace3
PK
71642015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7165
7166 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
7167 Warn for empty struct.
7168 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
7169
ea5b45b6
AT
71702015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
7171
7172 * c-decl.c (start_function): Call plugin before parsing.
7173 (finish_function): Call plugin after parsing.
7174
c2d47482
PK
71752015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7176
7177 PR c/49551
7178 * c-decl.c (merge_decls): Merge DECL_COMMON.
7179
a95492ab
JW
71802015-05-22 Jim Wilson <jim.wilson@linaro.org>
7181
7182 * Make-lang.in (check_gcc_pallelize): Define.
7183
fd5c817a
MP
71842015-05-22 Marek Polacek <polacek@redhat.com>
7185
7186 PR c/47043
7187 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
7188 attributes.
7189
c7b70a3c
MP
71902015-05-21 Marek Polacek <polacek@redhat.com>
7191
7192 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
7193 DECL_BUILT_IN.
7194
21b634ae
MP
71952015-05-20 Marek Polacek <polacek@redhat.com>
7196
7197 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7198 * c-typeck.c: Likewise.
7199
296a8c2f
MP
72002015-05-19 Marek Polacek <polacek@redhat.com>
7201
7202 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
7203
41b37d5e
JJ
72042015-05-19 Jakub Jelinek <jakub@redhat.com>
7205
7206 PR middle-end/66199
7207 * c-parser.c (c_parser_omp_for_loop): Don't add
7208 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
7209 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
7210 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
7211 constructs.
7212
fab27f52
MM
72132015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7214
7215 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 7216 swaps.
fab27f52 7217
40de31cf
MLI
72182015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7219
7220 PR fortran/44054
7221 * c-objc-common.c (c_tree_printer): Replace locus pointer with
7222 accessor function.
7223
3aa3c9fc
MP
72242015-05-14 Marek Polacek <polacek@redhat.com>
7225
7226 PR c/66066
7227 PR c/66127
7228 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
7229 rather than with 0.
7230
c3388e62
DM
72312015-05-12 David Malcolm <dmalcolm@redhat.com>
7232
7233 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
7234 to add a call to warn_for_misleading_indentation.
7235 (c_parser_else_body): Likewise, adding param "else_loc".
7236 (c_parser_if_statement): Check for misleading indentation.
7237 (c_parser_while_statement): Likewise.
7238 (c_parser_for_statement): Likewise.
7239
755e528f
MP
72402015-05-08 Marek Polacek <polacek@redhat.com>
7241
7242 PR c/64918
7243 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
7244 (output_init_element): Likewise.
7245
0173bd2a
MP
72462015-05-07 Marek Polacek <polacek@redhat.com>
7247
7248 PR c/65179
7249 * c-typeck.c (build_binary_op): Warn when left shifting a negative
7250 value.
7251
9babc352
MP
72522015-04-30 Marek Polacek <polacek@redhat.com>
7253
7254 * c-typeck.c (set_init_label): Call error_at instead of error and
7255 pass LOC to it.
7256
ac9f18db
MP
7257 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
7258 the type of a decl.
7259
ec3fba51
MP
7260 * c-typeck.c (c_build_va_arg): Clarify the error message.
7261
b811915d
TS
72622015-04-29 Thomas Schwinge <thomas@codesourcery.com>
7263
7264 * c-parser.c (c_parser_oacc_enter_exit_data): Use
7265 OMP_STANDALONE_CLAUSES.
7266
f3075008
MP
72672015-04-28 Marek Polacek <polacek@redhat.com>
7268
7269 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
7270
4e81b788
MP
72712015-04-28 Marek Polacek <polacek@redhat.com>
7272
7273 PR c/65901
7274 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
7275
6c1db78e
MP
72762015-04-25 Marek Polacek <polacek@redhat.com>
7277
7278 PR c/52085
7279 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
7280 attribute.
7281
5c4abbb8
MP
72822015-04-23 Marek Polacek <polacek@redhat.com>
7283
7284 PR c/65345
7285 * c-decl.c (set_labels_context_r): New function.
7286 (store_parm_decls): Call it via walk_tree_without_duplicates.
7287 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
7288 instead of create_tmp_var. Build TARGET_EXPR instead of
7289 COMPOUND_EXPR.
7290 (build_atomic_assign): Use create_tmp_var_raw instead of
7291 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
7292
06aca1d5
IV
72932015-04-20 Ilya Verbin <ilya.verbin@intel.com>
7294
7295 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
7296 (c_parser_omp_target_update): Add missed %> to error_at ().
7297
8fba1830
BRF
72982015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7299
7300 PR target/55143
7301 * c-decl.c (c_default_pointer_mode): Remove definition.
7302 * c-tree.h (c_default_pointer_mode): Remove declaration.
7303
62021f64
TB
73042015-03-27 Tobias Burnus <burnus@net-b.de>
7305
7306 PR c/65586
7307 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
7308 error out.
7309 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
7310 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
7311 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
7312
9b65e171
JJ
73132015-03-19 Jakub Jelinek <jakub@redhat.com>
7314
7315 * c-decl.c (c_decl_attributes): Also add "omp declare target"
7316 attribute for DECL_EXTERNAL VAR_DECLs.
7317
17958621
JJ
73182015-03-11 Jakub Jelinek <jakub@redhat.com>
7319
7320 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
7321 argument.
7322
7ccb1a11
JJ
73232015-03-10 Jakub Jelinek <jakub@redhat.com>
7324
7325 PR c/65120
7326 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
7327 before preparing arguments to warn_logical_not_parentheses.
7328
01177669
JJ
73292015-03-09 Jakub Jelinek <jakub@redhat.com>
7330
7331 PR c/65120
7332 * c-typeck.c (parser_build_binary_op): Don't warn for
7333 !!x == y or !b == y where b is _Bool.
7334
802ac282
MP
73352015-03-09 Marek Polacek <polacek@redhat.com>
7336
7337 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
7338 * c-decl.c (grokdeclarator): Likewise.
7339 * c-typeck.c (build_binary_op): Likewise.
7340
e5165b60
MP
73412015-02-27 Marek Polacek <polacek@redhat.com>
7342
7343 PR c/65228
7344 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
7345
065d214c
MP
73462015-02-14 Marek Polacek <polacek@redhat.com>
7347
7348 PR c/64768
7349 * c-decl.c (grokdeclarator): Set the range of a flexible array member
7350 declared through a typedef name.
7351
e5d9235b
MP
73522015-02-13 Marek Polacek <polacek@redhat.com>
7353
7354 PR c/65050
7355 * c-decl.c (grokdeclarator): Print also the type when giving
7356 the error message about array's incomplete element type.
7357
fa01ffcc
JJ
73582015-02-11 Jakub Jelinek <jakub@redhat.com>
7359
7360 PR c/64824
7361 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
7362 check in the POP macro.
7363
c3e38a03
MP
73642015-02-09 Marek Polacek <polacek@redhat.com>
7365
7366 PR c/64856
7367 * c-typeck.c (process_init_element): Don't always wrap
7368 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
7369 initializing a range of elements.
7370
4886ec8e
JJ
73712015-02-04 Jakub Jelinek <jakub@redhat.com>
7372
7373 PR c/64824
7374 PR c/64868
7375 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
7376
c3e38a03 73772015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
7378
7379 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
7380 processing enum declaration.
7381
7b33f0c8
MP
73822015-01-29 Marek Polacek <polacek@redhat.com>
7383
7384 PR c/64709
7385 * c-typeck.c (pop_init_level): If constructor_elements has
7386 exactly one element with integer_zerop value, set constructor_zeroinit
7387 to 1. Remove braces around warning_init call.
7388
dea63e49
JJ
73892015-01-27 Jakub Jelinek <jakub@redhat.com>
7390
7391 PR c/64766
7392 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
7393 of FUNCTION_DECLs with error_mark_node.
7394
d38f7dce
JJ
73952015-01-26 Jakub Jelinek <jakub@redhat.com>
7396
7397 PR c/64778
7398 * c-typeck.c (convert_arguments): Return -1 if there are
7399 error_args, even if we've diagnosed too many arguments.
7400
cbf5d0e7
RB
74012015-01-21 Richard Biener <rguenther@suse.de>
7402
7403 PR middle-end/64313
7404 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
7405 for builtins the user declared correctly.
7406
41dbbb37
TS
74072015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7408 Bernd Schmidt <bernds@codesourcery.com>
7409 Cesar Philippidis <cesar@codesourcery.com>
7410 James Norris <jnorris@codesourcery.com>
7411 Jakub Jelinek <jakub@redhat.com>
7412 Ilmir Usmanov <i.usmanov@samsung.com>
7413
7414 * c-parser.c: Include "gomp-constants.h".
7415 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
7416 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
7417 Use OMP_CLAUSE_SET_MAP_KIND.
7418 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
7419 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
7420 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
7421 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
7422 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
7423 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
7424 "copyout", "create", "delete", "deviceptr", "gang", "host",
7425 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
7426 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
7427 "present_or_create", "pcreate", "seq", "self", "vector",
7428 "vector_length", "wait", "worker".
7429 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
7430 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
7431 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
7432 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
7433 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
7434 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
7435 (c_parser_oacc_data_clause_deviceptr)
7436 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
7437 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
7438 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
7439 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
7440 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
7441 (c_parser_oacc_parallel, c_parser_oacc_update)
7442 (c_parser_oacc_wait): New functions.
7443 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
7444 (c_finish_oacc_data): New prototypes.
7445 * c-typeck.c: Include "gomp-constants.h".
7446 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
7447 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
7448 OMP_CLAUSE_SET_MAP_KIND.
7449 (c_finish_oacc_parallel, c_finish_oacc_kernels)
7450 (c_finish_oacc_data): New functions.
7451 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
7452 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
7453 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
7454 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
7455 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
7456 GOMP_MAP_FORCE_DEVICEPTR.
7457
adfac8df
JJ
74582015-01-09 Michael Collison <michael.collison@linaro.org>
7459
7460 * c-array-notation.c: Include hash-set.h, machmode.h,
7461 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7462 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7463 * c-aux-info.c: Ditto.
7464 * c-convert.c: Ditto.
7465 * c-decl.c: Ditto.
7466 * c-errors.c: Ditto.
7467 * c-lang.c: Dittoxs.
7468 * c-objc-common.c: Ditto.
7469 * c-parser.c: Ditto.
7470 * c-typeck.c: Include hash-set.h, machmode.h,
7471 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7472 fold-const.h, wide-int.h, inchash.h, real.h and
7473 fixed-value.h due to flattening of tree.h.
7474
2cc901dc
MP
74752015-01-07 Marek Polacek <polacek@redhat.com>
7476
7477 PR c/64417
7478 * c-typeck.c (process_init_element): Disallow initialization of
7479 a flexible array member with a string constant if the structure
7480 is in an array.
7481
5624e564
JJ
74822015-01-05 Jakub Jelinek <jakub@redhat.com>
7483
e5341100
JJ
7484 PR sanitizer/64344
7485 * c-typeck.c (convert_for_assignment, c_finish_return): For
7486 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
7487 types also set in_late_binary_op around convert call.
7488 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
7489 to integral type casts, if not in_late_binary_op, pass c_fully_fold
7490 result on expr as last argument to ubsan_instrument_float_cast,
7491 if in_late_binary_op, don't use c_save_expr but save_expr.
7492
5624e564
JJ
7493 Update copyright years.
7494
5bd012f8
MP
74952015-01-05 Marek Polacek <polacek@redhat.com>
7496
7497 PR c/64423
7498 * c-typeck.c (build_array_ref): Pass loc down to
7499 warn_array_subscript_with_type_char.
7500
3f8257db 75012014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
7502
7503 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 7504 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 7505 element type.
8e745a17 7506 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 7507 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 7508 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 7509 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 7510 to PEDWARN_FOR_QUALIFIERS.
768952be 7511
8f94a8c4
JJ
75122014-12-17 Jakub Jelinek <jakub@redhat.com>
7513
7514 PR sanitizer/64289
7515 * c-convert.c: Include ubsan.h.
7516 (convert): For real -> integral casts and
7517 -fsanitize=float-cast-overflow don't call convert_to_integer, but
7518 instead instrument the float cast directly.
7519
b731b390
JJ
75202014-11-29 Jakub Jelinek <jakub@redhat.com>
7521
7522 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
7523 c_finish_stmt_expr): Remove NULL last argument from
7524 create_tmp_var_raw and create_tmp_var calls.
7525 * c-array-notation.c (fix_builtin_array_notation_fn,
7526 build_array_notation_expr, fix_conditional_array_notations_1,
7527 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
7528
541e35a6
MP
75292014-11-28 Marek Polacek <polacek@redhat.com>
7530
7531 PR c/63862
7532 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
7533 convert the right operand to integer type.
7534
b286be94
MP
75352014-11-25 Marek Polacek <polacek@redhat.com>
7536
7537 PR c/63877
7538 * c-decl.c (start_function): Disable -Wmissing-declarations warning
7539 for inline functions.
7540
aa7da51a
JJ
75412014-11-21 Jakub Jelinek <jakub@redhat.com>
7542
7543 PR target/63764
7544 * c-typeck.c (build_array_ref): Adjust
7545 convert_vector_to_pointer_for_subscript caller. If it returns true,
7546 call non_lvalue_loc on the result.
7547
d876207f
RB
75482014-11-11 Richard Biener <rguenther@suse.de>
7549
7550 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
7551 to true.
7552
e5e44252
AK
75532014-11-10 Andi Kleen <ak@linux.intel.com>
7554
7555 PR c/60804
7556 * c-parser.c (c_parser_statement_after_labels): Call
7557 check_no_cilk.
7558 (c_parser_if_statement): Dito.
7559 (c_parser_switch_statement): Dito.
7560 (c_parser_while_statement): Dito.
7561 (c_parser_do_statement): Dito.
7562 (c_parser_for_statement): Dito.
7563 * c-typeck.c (c_finish_loop): Dito.
7564
13c21655
PC
75652014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7566
7567 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
7568 OPT_Wshift_count_overflow in the warnings.
7569
2d51fcef
MP
75702014-10-30 Marek Polacek <polacek@redhat.com>
7571
7572 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
7573 print the stripped version as well, if they're not the same.
7574
ef4bddc2
RS
75752014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7576
7577 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
7578 machine_mode.
7579
c582198b
AM
75802014-10-28 Andrew MacLeod <amacleod@redhat.com>
7581
7582 * c-decl.c: Adjust include files.
7583 * c-parser.c: Ditto.
7584
ddc8de03
PM
75852014-10-27 Phil Muldoon <pmuldoon@redhat.com>
7586 Tom Tromey <tromey@redhat.com>
7587
7588 * c-tree.h (enum c_oracle_request): New.
7589 (c_binding_oracle_function): New typedef.
7590 (c_binding_oracle, c_pushtag, c_bind): Declare.
7591 * c-decl.c (c_binding_oracle): New global.
7592 (I_SYMBOL_CHECKED): New macro.
7593 (i_symbol_binding): New function.
7594 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
7595 (I_TAG_CHECKED): New macro.
7596 (i_tag_binding): New function.
7597 (I_TAG_BINDING, I_TAG_DECL): Redefine.
7598 (I_LABEL_CHECKED): New macro.
7599 (i_label_binding): New function.
7600 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
7601 (c_print_identifier): Save and restore c_binding_oracle.
7602 (c_pushtag, c_bind): New functions.
7603
60393bbc
AM
76042014-10-27 Andrew MacLeod <amacleod@redhat.com>
7605
7606 * c-typeck.c: Adjust include files.
7607
d723bb7c
MLI
76082014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7609
7610 PR c++/53061
7611 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
7612 initialization here...
7613 (c_initialize_diagnostics): ... but here. Set defaults after
7614 building pretty-printer.
7615
1bc5a451
MP
76162014-10-23 Marek Polacek <polacek@redhat.com>
7617
7618 PR c/63626
7619 * c-decl.c (pop_scope): Don't print warning in external_scope.
7620
4435bb92
MP
76212014-10-19 Marek Polacek <polacek@redhat.com>
7622
7623 PR c/63567
7624 * c-typeck.c (output_init_element): Allow initializing objects with
7625 static storage duration with compound literals even in C99 and add
7626 pedwarn for it.
7627
7278465e
MP
76282014-10-17 Marek Polacek <polacek@redhat.com>
7629
7630 PR c/63567
7631 * c-typeck.c (digest_init): Allow initializing objects with static
7632 storage duration with compound literals even in C99 and add pedwarn
7633 for it.
7634
d9b7be2e
MP
76352014-10-17 Marek Polacek <polacek@redhat.com>
7636
7637 PR c/63543
7638 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
7639 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
7640 error multiple times. Print the type.
7641
f406ae1f
MP
76422014-10-17 Marek Polacek <polacek@redhat.com>
7643
7644 PR c/63549
7645 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
7646 type.
7647
92574c7c
MP
76482014-10-17 Marek Polacek <polacek@redhat.com>
7649
7650 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
7651 (start_function): Use OPT_Wimplicit_int instead of 0.
7652 (store_parm_decls_oldstyle): Likewise.
7653
1bc4a978
MT
76542014-10-17 Alan Modra <amodra@gmail.com>
7655
7656 PR middle-end/61848
7657 * c-decl.c (merge_decls): Don't merge section name or tls model
7658 to newdecl symtab node, instead merge to olddecl. Override
7659 existing olddecl section name. Set tls_model for all thread-local
7660 vars, not just OMP thread-private ones. Remove incorrect comment.
7661
83685514
AM
76622014-10-16 Andrew MacLeod <amacleod@redhat.com>
7663
7664 * c-decl.c: Adjust include files.
7665
78a7c317
DD
76662014-10-14 DJ Delorie <dj@redhat.com>
7667
7668 * c-parser.c (c_parse_init): Add RID entries for each __intN.
7669 (c_token_starts_typename): Check all __intN, not just __int128.
7670 (c_token_starts_declspecs): Likewise.
7671 (c_parser_declspecs): Likewise.
7672 (c_parser_attribute_any_word): Likewise.
7673 (c_parser_objc_selector): Likewise.
7674 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
7675 (struct c_declspecs): Add int_n_idx field to record *which* __intN
7676 is specified.
7677 * c-decl.c (declspecs_add_type): Check for all __intN, not just
7678 __int128.
7679 (finish_declspecs): Likewise.
7680
74d98c1e
AB
76812014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
7682
8e745a17 7683 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 7684 the duplicate code.
8e745a17 7685 (c_parser_statement): Call the new function.
74d98c1e 7686
84937de2
MP
76872014-10-09 Marek Polacek <polacek@redhat.com>
7688
7689 PR c/63480
7690 * c-typeck.c (pop_init_level): Don't warn about initializing
7691 with { }.
7692
0382aaa0
MP
76932014-10-07 Marek Polacek <polacek@redhat.com>
7694
7695 PR c/59717
7696 * c-decl.c (header_for_builtin_fn): New function.
7697 (implicitly_declare): Suggest which header to include.
7698
7a0ca710
MP
76992014-10-07 Marek Polacek <polacek@redhat.com>
7700
7701 * c-convert.c (convert): Use error_operand_p.
7702 * c-typeck.c (require_complete_type): Likewise.
7703 (really_atomic_lvalue): Likewise.
7704 (digest_init): Likewise.
7705 (handle_omp_array_sections_1): Likewise.
7706
6bc8a126
MP
77072014-10-03 Marek Polacek <polacek@redhat.com>
7708
7709 PR c/63453
7710 * c-decl.c (pop_scope): Don't warn about "inline function declared
7711 but never defined" for functions marked with gnu_inline attribute.
7712
d90c0a59
JJ
77132014-09-25 Jakub Jelinek <jakub@redhat.com>
7714
7715 PR c++/63249
7716 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
7717 on low_bound and length.
7718
083e891e
MP
77192014-09-24 Marek Polacek <polacek@redhat.com>
7720
7721 PR c/61405
7722 PR c/53874
7723 * c-parser.c: Don't define CPP_KEYWORD.
7724 (c_parser_switch_statement): Pass original type to c_finish_case.
7725 * c-tree.h (c_finish_case): Update declaration.
7726 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
7727 conditionally to c_do_switch_warnings.
7728
8d95fe25
MP
77292014-09-03 Marek Polacek <polacek@redhat.com>
7730
7731 PR c/62024
7732 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
7733 conversions.
7734
9a771876
JJ
77352014-09-02 Jakub Jelinek <jakub@redhat.com>
7736 Balaji V. Iyer <balaji.v.iyer@intel.com>
7737 Igor Zamyatin <igor.zamyatin@intel.com>
7738
7739 * c-parser.c (c_parser_cilk_for): New function.
7740 (c_parser_cilk_grainsize): Likewise.
7741 (c_get_temp_regvar): Likewise.
7742 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
7743 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
7744 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
7745 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
7746 case.
7747
b7679d96
CG
77482014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
7749
7750 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
7751 with using HOST_WIDE_INT without truncation to 'int'
7752
59ea0364
MP
77532014-08-22 Marek Polacek <polacek@redhat.com>
7754
7755 PR c++/62199
7756 * c-typeck.c (parser_build_binary_op): Adjust call to
7757 warn_logical_not_parentheses.
7758
671a475e
IZ
77592014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
7760
7761 PR other/62008
7762 * c-parser.c (c_parser_array_notation): Check for correct
7763 type of an array added.
7764
04159acf
MP
77652014-08-19 Marek Polacek <polacek@redhat.com>
7766
7767 PR c++/62153
7768 * c-typeck.c (build_binary_op): If either operand of a comparison
7769 is a boolean expression, call maybe_warn_bool_compare.
7770
c77935ee
PP
77712014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
7772
7773 PR c/45584
7774 * c-typeck.c (build_c_cast): Do a conversion even when the
7775 TYPE_MAIN_VARIANTs are the same.
7776
35aff4fb
MP
77772014-08-19 Marek Polacek <polacek@redhat.com>
7778
7779 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
7780 pedwarn_c99 instead of pedwarn.
7781 (grokfield): Likewise.
7782 (warn_defaults_to): New function.
7783 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
7784 Unconditionally call pedwarn_c99 instead of pedwarn.
7785 (start_function): Call warn_defaults_to instead of pedwarn_c99.
7786 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
7787 check flag_isoc11 before.
7788 * c-errors.c (pedwarn_c99): Change the return type to bool.
7789 Handle -Wc99-c11-compat.
7790 * c-parser.c (disable_extension_diagnostics): Handle
7791 warn_c99_c11_compat.
7792 (restore_extension_diagnostics): Likewise.
7793 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
7794 instead of pedwarn, don't check flag_isoc11 before.
7795 (c_parser_declspecs): Likewise.
7796 (c_parser_alignas_specifier): Likewise.
7797 (c_parser_alignof_expression): Likewise.
7798 (c_parser_generic_selection): Likewise.
7799 * c-tree.h (pedwarn_c99): Update declaration.
7800 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
7801 of pedwarn_c99.
7802
177cce46
MP
78032014-08-19 Marek Polacek <polacek@redhat.com>
7804
7805 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
7806 to pedwarn_c90.
7807 * c-errors.c: Include "opts.h".
7808 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
7809 * c-parser.c (disable_extension_diagnostics): Handle negative value
7810 of warn_c90_c99_compat, too.
7811 (restore_extension_diagnostics): Likewise.
7812 (c_parser_compound_statement_nostart): Pass
7813 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
7814
6dc99c33
MP
78152014-08-12 Marek Polacek <polacek@redhat.com>
7816
7817 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
7818 Add pedwarn.
7819 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
7820 Likewise.
7821 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
7822
3f8257db 78232014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
7824
7825 PR c/51849
7826 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
7827 Call pedwarn_c90 instead of pedwarn.
7828 (check_bitfield_type_and_width): Likewise.
7829 (declspecs_add_qual): Likewise.
7830 (declspecs_add_type): Likewise.
7831 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
7832 Adjust to only call pedwarn_c90.
7833 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
7834 pedwarn_c90 instead of pedwarn.
7835 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
7836 * c-parser.c (disable_extension_diagnostics): Handle
7837 warn_c90_c99_compat.
7838 (restore_extension_diagnostics): Likewise.
7839 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
7840 pedwarn_c90 instead of pedwarn.
7841 (c_parser_initelt): Likewise.
7842 (c_parser_postfix_expression): Likewise.
7843 (c_parser_postfix_expression_after_paren_type): Likewise.
7844 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
7845 * c-tree.h: Fix formatting.
7846 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
7847 pedwarn_c90 instead of pedwarn.
7848
9f25a338
TS
78492014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7850
7851 * c-typeck.c: Remove include of pointer-set.h.
7852
044331a8
MP
78532014-08-07 Marek Polacek <polacek@redhat.com>
7854
7855 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
7856
b787e7a2
TS
78572014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7858
7859 * c-typeck.c: Use hash_map instead of pointer_map.
7860
6e2830c3
TS
78612014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7862
7863 * c-decl.c: Use hash_set instead of pointer_set.
7864
a7ee52fb
IZ
78652014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7866
7867 PR middle-end/61455
7868 * c-array-notation.c (expand_array_notations): Handling
7869 of DECL_EXPR added.
7870
b4dfdc11
MG
78712014-07-31 Marc Glisse <marc.glisse@inria.fr>
7872
7873 PR c++/60517
7874 * c-typeck.c (c_finish_return): Return 0 instead of the address of
7875 a local variable.
7876
976d5a22
TT
78772014-07-30 Tom Tromey <tromey@redhat.com>
7878
7879 * c-typeck.c (struct constructor_stack) <designator_depth>: New
7880 field.
7881 (really_start_incremental_init, push_init_level): Initialize
7882 designator_depth.
7883 (pop_init_level): Set global designator_depth.
7884 (process_init_element): Check for designated_init attribute.
7885
30281de2
MP
78862014-07-20 Marek Polacek <polacek@redhat.com>
7887
7888 PR c/61852
7889 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
7890 (implicitly_declare): Pass location to implicit_decl_warning.
7891
b108f48f
JJ
78922014-07-14 Jakub Jelinek <jakub@redhat.com>
7893
7894 PR middle-end/61294
7895 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
7896 If non-NULL, call c_parser_check_literal_zero.
7897 (c_parser_check_literal_zero): New function.
7898 (c_parser_postfix_expression_after_primary): Adjust
7899 c_parser_expr_list caller, handle -Wmemset-transposed-args.
7900
773ec47f
MP
79012014-07-06 Marek Polacek <polacek@redhat.com>
7902
7903 PR c/6940
7904 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
7905 * c-tree.h (C_ARRAY_PARAMETER): Define.
7906 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
7907 function parameter.
7908
22e1cf1c 79092014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 7910 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
7911
7912 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
7913 releasing symbol.
7914
52ec0ea3
MP
79152014-07-01 Marek Polacek <polacek@redhat.com>
7916
7917 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
7918 instead of 0 to WARN_FOR_ASSIGNMENT.
7919
d5c3d343
MP
79202014-07-01 Marek Polacek <polacek@redhat.com>
7921
7922 PR c/58286
7923 * c-typeck.c (convert_for_assignment): Pass
7924 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
7925
6a7253a4
MP
79262014-06-30 Marek Polacek <polacek@redhat.com>
7927
7928 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
7929 has no_sanitize_undefined attribute.
7930
5e88a8f4
IZ
79312014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
7932
7933 PR middle-end/57541
7934 * c-array-notation.c (fix_builtin_array_notation_fn):
7935 Check for 0 arguments in builtin call. Check that bultin argument is
7936 correct.
7937 * c-parser.c (c_parser_array_notation): Check for incorrect initial
7938 index.
7939
9698b078
SH
79402014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
7941
7942 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
7943 qualifiers in __auto_type for atomic types.
7944 (c_parser_typeof_specifier): Discard all type qualifiers in
7945 __typeof__ for atomic types.
7946
6e07c515
MP
79472014-06-25 Marek Polacek <polacek@redhat.com>
7948
7949 PR c/61162
7950 * c-parser.c (c_parser_statement_after_labels): Pass the location of
7951 the return expression to c_finish_return.
7952
da6f124d
JJ
79532014-06-25 Jakub Jelinek <jakub@redhat.com>
7954
7955 * c-typeck.c (c_finish_omp_clauses): Make sure
7956 OMP_CLAUSE_LINEAR_STEP has correct type.
7957
c203e8a7
TS
79582014-06-24 Trevor Saunders <tsaunders@mozilla.com>
7959
7960 * c-decl.c: Adjust.
7961
56ad0e38
JJ
79622014-06-24 Jakub Jelinek <jakub@redhat.com>
7963
7964 * c-parser.c (c_parser_omp_for_loop): For
7965 #pragma omp parallel for simd move lastprivate clause from parallel
7966 to for rather than simd.
7967
47c2554f
MP
79682014-06-23 Marek Polacek <polacek@redhat.com>
7969
7970 * c-typeck.c (parser_build_binary_op): Don't call
7971 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
7972
56363ffd
JH
79732014-06-15 Jan Hubicka <hubicka@ucw.cz>
7974
7975 * c-parser.c (c_parser_omp_threadprivate): Likewise.
7976 * c-decl.c (merge_decls): Likewise.
7977
d7ff7ae5
MP
79782014-06-09 Marek Polacek <polacek@redhat.com>
7979
7980 PR c/36446
7981 * c-typeck.c (error_init): Call inform instead of error_at.
7982 (pedwarn_init): Call inform instead of pedwarn.
7983 (warning_init): Call inform instead of warning_at.
7984
24d047a3
JH
79852014-06-07 Jan Hubicka <hubicka@ucw.cz>
7986
7987 * c-decl.c (merge_decls): Use set_decl_section_name.
7988 (duplicate_decls): Remove node if it exists.
7989
9bac5cbb
G
79902014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
7991
7992 PR c/53119
7993 * c-typeck.c (push_init_level, process_init_element,
7994 pop_init_level): Correct check for zero initialization, move
7995 missing brace warning to respect zero initialization.
7996
8ffcdea8
MP
79972014-06-05 Marek Polacek <polacek@redhat.com>
7998
7999 PR c/56724
8000 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
8001
742938c9
MP
80022014-06-05 Marek Polacek <polacek@redhat.com>
8003
8004 PR c/49706
8005 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 8006 on the left hand side operand of a comparison.
742938c9 8007
6447c55d
MP
80082014-06-05 Marek Polacek <polacek@redhat.com>
8009
8010 PR c/48062
8011 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
8012 Print note only if the warning was printed.
8013
9dc7743c
IZ
80142014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
8015
8016 PR c/58942
8017 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
8018 with a pointer.
8019
fedfecef
MP
80202014-06-03 Marek Polacek <polacek@redhat.com>
8021
8022 PR c/60439
8023 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
8024 c_start_case.
8025 * c-tree.h (c_start_case): Update.
8026 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
8027 switch condition has boolean value.
8028
9b2b7279
AM
80292014-06-02 Andrew MacLeod <amacleod@redhat.com>
8030
8031 * c-decl.c: Include builtins.h.
8032 * c-parser.c: Likewise.
8033
5c1bc275
MP
80342014-05-27 Marek Polacek <polacek@redhat.com>
8035
8036 PR c/56724
8037 * c-typeck.c (convert_arguments): Get location of a parameter. Change
8038 error and warning calls to error_at and warning_at. Pass location of
8039 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
8040 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
8041 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
8042
97563bc8
IZ
80432014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
8044
8045 PR c/61191
8046 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
8047 function parameters.
8048
aede2c10
JH
80492014-05-23 Jan Hubicka <hubicka@ucw.cz>
8050
8051 * c-decl.c (merge_decls): Preserve symtab node pointers.
8052 (duplicate_decls): Free new decl.
8053
edbba2ce
TS
80542014-05-23 Thomas Schwinge <thomas@codesourcery.com>
8055
f3316c6d
TS
8056 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
8057 initialization.
8058
edbba2ce
TS
8059 * c-parser.c (c_parser_omp_target): Return bool values.
8060
68c81f24
TS
80612014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8062
8063 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
8064 num_teams_loc variable to num_thread_limit_loc.
8065
632f2871
RS
80662014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8067
8068 * c-array-notation.c (expand_array_notations): Use void_node
8069 instead of void_zero_node.
8070
766090c2
TS
80712014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8072
8073 * c-decl.c (finish_struct): Adjust.
8074 (finish_enum): Likewise.
8075 (bind): Adjust.
8076 (record_inline_static): Likewise.
8077 (push_scope): Likewise.
8078 (make_label): Likewise.
8079 (lookup_label_for_goto): Likewise.
8080 (finish_struct): Likewise.
8081 (finish_enum): Likewise.
8082 (store_parm_decls): Likewise.
8083 (c_push_function_context): Likewise.
8084 * c-lang.h: Remove usage of variable_size gty attribute.
8085 * c-parser.c (c_parse_init): Adjust.
8086 (c_parse_file): Likewise.
8087
2b107f6b
MP
80882014-05-13 Marek Polacek <polacek@redhat.com>
8089
8090 PR c/61162
8091 * c-typeck.c (convert_for_assignment): Pass location to
8092 WARN_FOR_ASSIGNMENT instead of input_location.
8093
d033409e
MP
80942014-05-10 Marek Polacek <polacek@redhat.com>
8095
8096 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
8097 maybe_warn_string_init.
8098 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
8099 maybe_warn_string_init.
8100 * c-tree.h (maybe_warn_string_init): Update declaration.
8101 * c-typeck.c (maybe_warn_string_init): Add location parameter.
8102 Call pedwarn_init with loc instead of with input_location.
8103 (digest_init): Pass init_loc to maybe_warn_string_init.
8104 (pop_init_level): Call pedwarn_init with loc instead of with
8105 input_location.
8106 (set_init_index): Likewise.
8107 (process_init_element): Likewise.
8108
ea58ef42
MP
81092014-05-09 Marek Polacek <polacek@redhat.com>
8110
8111 PR c/61096
8112 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
8113 (c_parser_initelt): Pass location to set_init_label. Pass array index
8114 location to set_init_index.
8115 * c-tree.h (push_init_level): Update declaration.
8116 (pop_init_level): Likewise.
8117 (set_init_index): Likewise.
8118 (set_init_label): Likewise.
8119 * c-typeck.c (error_init): Add location parameter. Call error_at
8120 instead of error.
8121 (digest_init): Pass init_loc to error_init.
8122 (really_start_incremental_init):
8123 (push_init_level): Add location parameter. Pass loc to pop_init_level
8124 and error_init.
8125 (pop_init_level): Likewise.
8126 (set_designator): Add location parameter. Pass loc to pop_init_level,
8127 push_init_level, and error_init.
8128 (set_init_index): Add location parameter. Pass loc to error_init and
8129 set_designator.
8130 (set_init_label): Likewise.
8131 (output_init_element): Pass loc to error_init.
8132 (process_init_element): Pass loc to error_init, pop_init_level,
8133 pedwarn_init, and push_init_level.
8134
661a0813
MP
81352014-05-09 Marek Polacek <polacek@redhat.com>
8136
8137 PR c/50459
8138 * c-parser.c (c_parser_attributes): Parse the arguments as an
8139 expression-list if the attribute takes identifier.
8140
2793eeab
MP
81412014-05-08 Marek Polacek <polacek@redhat.com>
8142
8143 PR c/61053
8144 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
8145 TYPE_ALIGN_UNIT.
8146
f827930a
MP
81472014-05-08 Marek Polacek <polacek@redhat.com>
8148
8149 PR c/61077
8150 * c-decl.c (start_function): Warn for _Atomic-qualified return type
8151 of main.
8152
1d60af08
KZ
81532014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8154 Mike Stump <mikestump@comcast.net>
8155 Richard Sandiford <rdsandiford@googlemail.com>
8156
8157 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
8158 (finish_enum): Use wide-int interfaces.
8159 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
8160 * c-typeck.c (build_c_cast): Likewise.
8161 (set_nonincremental_init_from_string): Likewise.
8162 (c_tree_equal): Likewise.
8163
a0e24419
MP
81642014-05-02 Marek Polacek <polacek@redhat.com>
8165
8166 PR c/25801
8167 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
8168 Return size_one_node when the type is not complete.
8169 (pointer_diff): Remove comment.
8170 (build_unary_op): Improve error messages.
8171
19fc9faa
MP
81722014-05-02 Marek Polacek <polacek@redhat.com>
8173
8174 * c-typeck.c (c_finish_return): Separate warning_at calls.
8175
63bc4e87
MP
81762014-05-02 Marek Polacek <polacek@redhat.com>
8177
8178 * c-tree.h (error_init): Remove declaration.
8179 (pedwarn_init): Likewise.
8180 * c-typeck.c (error_init): Make static and move above.
8181 (pedwarn_init): Likewise.
8182 (warning_init): Move above.
8183 (maybe_warn_string_init): Likewise.
8184
4bd2511b
JL
81852014-05-01 Jeff Law <law@redhat.com>
8186
8187 Revert:
8188
8189 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8190 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
8191 avoid goto.
8192
6a358dcb
MP
81932014-05-02 Marek Polacek <polacek@redhat.com>
8194
8195 PR c/60784
8196 * c-typeck.c (push_init_level): Set constructor_designated to
8197 p->designated for structures.
8198
ae5ebda4
MP
81992014-05-01 Marek Polacek <polacek@redhat.com>
8200
8201 PR c/60915
8202 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
8203 function-definition has an attribute after the declarator.
8204
96b40f8d
MP
82052014-05-01 Marek Polacek <polacek@redhat.com>
8206
8207 PR c/60257
8208 * c-typeck.c (warning_init): Add location_t parameter. Call
8209 warning_at instead of warning.
8210 (push_init_level): Pass input_location to warning_init.
8211 (add_pending_init): Add location_t parameter. Pass loc to
8212 warning_init.
8213 (set_nonincremental_init): Pass input_location to add_pending_init.
8214 (set_nonincremental_init_from_string): Likewise.
8215 (output_init_element): Pass loc to warning_init and to
8216 add_pending_init.
8217
32e00768
MP
82182014-05-01 Marek Polacek <polacek@redhat.com>
8219
8220 PR c/43395
8221 * c-typeck.c (c_finish_return): Distinguish between label and variable
8222 when warning about returning local address.
8223
c9379ce2
MP
82242014-05-01 Marek Polacek <polacek@redhat.com>
8225
8226 PR c/29467
8227 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
8228 in C89 mode.
8229
d00887e8
MP
82302014-05-01 Marek Polacek <polacek@redhat.com>
8231
8232 PR c/43245
8233 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
8234 instead of 0 to WARN_FOR_QUALIFIERS.
8235
5436fa2e
MP
82362014-05-01 Marek Polacek <polacek@redhat.com>
8237
8238 PR c/56989
8239 * c-typeck.c (default_conversion): Use better location for
8240 error call.
8241
f8ed5150
MP
82422014-04-30 Marek Polacek <polacek@redhat.com>
8243
8244 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
8245 also when SANITIZE_FLOAT_DIVIDE is on.
8246
8337d1db
MP
82472014-04-30 Marek Polacek <polacek@redhat.com>
8248
8249 PR c/60139
8250 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
8251 and pedwarn_init. Use loc insted of input_location.
8252
c4bdc42f
MP
82532014-04-30 Marek Polacek <polacek@redhat.com>
8254
8255 PR c/60351
8256 * c-typeck.c (build_binary_op): Use location when warning about
8257 shift count.
8258
45484dcf
MP
82592014-04-25 Marek Polacek <polacek@redhat.com>
8260
8261 PR c/18079
8262 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
8263 always_inline/noinline and hot/cold attributes.
8264
34cf811f
MP
82652014-04-25 Marek Polacek <polacek@redhat.com>
8266
8267 PR c/60114
8268 * c-parser.c (c_parser_initelt): Pass input_location to
8269 process_init_element.
8270 (c_parser_initval): Pass loc to process_init_element.
8271 * c-tree.h (process_init_element): Adjust declaration.
8272 * c-typeck.c (push_init_level): Pass input_location to
8273 process_init_element.
8274 (pop_init_level): Likewise.
8275 (set_designator): Likewise.
8276 (output_init_element): Add location_t parameter. Pass loc to
8277 digest_init.
8278 (output_pending_init_elements): Pass input_location to
8279 output_init_element.
8280 (process_init_element): Add location_t parameter. Pass loc to
8281 output_init_element.
8282
42056eac
JJ
82832014-04-24 Jakub Jelinek <jakub@redhat.com>
8284
8285 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
8286 atomic-clause, allow comma in between atomic-clause and
8287 seq_cst.
8288
e162a134
JJ
82892014-04-22 Jakub Jelinek <jakub@redhat.com>
8290
8291 PR c/59073
8292 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
8293 fails, don't set OM_PARALLEL_COMBINED and return NULL.
8294
2f6babac
IZ
82952014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8296
8297 PR middle-end/60469
8298 * c-array-notation.c (fix_builtin_array_notation_fn): Use
8299 create_tmp_var instead build_decl for creating temps.
8300 (build_array_notation_expr): Likewise.
8301 (fix_conditional_array_notations_1): Likewise.
8302 (fix_array_notation_expr): Likewise.
8303 (fix_array_notation_call_expr): Likewise.
8304
8edbfaa6
JJ
83052014-03-28 Jakub Jelinek <jakub@redhat.com>
8306
8307 PR c++/60689
8308 * c-tree.h (c_build_function_call_vec): New prototype.
8309 * c-typeck.c (build_function_call_vec): Don't call
8310 resolve_overloaded_builtin here.
8311 (c_build_function_call_vec): New wrapper function around
8312 build_function_call_vec. Call resolve_overloaded_builtin here.
8313 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
8314 Call c_build_function_call_vec instead of build_function_call_vec.
8315 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
8316 * c-decl.c (finish_decl): Likewise.
8317
7485aeea
MLI
83182014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8319
8320 PR c/55383
8321 * c-typeck.c: Use correct format string in cast-qual warning
8322
b17a8b07
TS
83232014-03-07 Thomas Schwinge <thomas@codesourcery.com>
8324
8325 * c-decl.c (c_decl_attributes): Use
8326 lang_hooks.types.omp_mappable_type.
8327 * c-typeck.c (c_finish_omp_clauses): Likewise.
8328
3af9c5e9
MP
83292014-03-06 Marek Polacek <polacek@redhat.com>
8330
8331 PR c/60197
8332 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
8333 of checking tree code.
8334
1c9f5f33
PK
83352014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8336
8337 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
8338 (c_parser_parameter_declaration): Likewise.
8339
cc28fc7f
MP
83402014-02-19 Marek Polacek <polacek@redhat.com>
8341
8342 PR c/60195
8343 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
8344 Call mark_exp_read on exp.value.
8345 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
8346 TREE_ADDRESSABLE on old instead of val.
8347 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
8348
b581c05c
PK
83492014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8350
8351 * c-parser.c (c_parser_get_builtin_args): Replace calls to
8352 C_EXPR_APPEND by vec_safe_push.
8353 * c-tree.h (C_EXPR_APPEND): Remove.
8354
81e5eca8
MP
83552014-01-31 Marek Polacek <polacek@redhat.com>
8356
8357 PR c/59963
8358 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
8359 build_function_call_vec.
8360 (build_function_call): Likewise.
8361 (build_atomic_assign): Likewise.
8362 (build_function_call_vec): Add arg_loc parameter. Use it.
8363 (convert_arguments): Likewise.
8364 (convert_for_assignment): Rename rhs_loc to expr_loc.
8365 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
8366 (c_parser_objc_keywordexpr): Likewise.
8367 (c_parser_postfix_expression_after_primary): Call
8368 build_function_call_vec with expr_loc rather than op_loc.
8369 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
8370 build_function_call_vec.
8371 (c_parser_expr_list): Add locations parameter. Fill it with locations
8372 of function arguments.
8373 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
8374
68fca595
MP
83752014-01-30 Marek Polacek <polacek@redhat.com>
8376
8377 PR c/59940
8378 * c-typeck.c (build_function_call_vec): Use loc parameter.
8379 (convert_arguments): Add location parameter. Use it.
8380 (ep_convert_and_check): Likewise.
8381 (build_atomic_assign): Adjust convert_for_assignment call.
8382 (build_modify_expr): Likewise.
8383 (digest_init): Likewise.
8384 (c_finish_return): Likewise.
8385 (build_conditional_expr): Adjust ep_convert_and_check calls.
8386 (convert_for_assignment): Add rhs_loc parameter. Use it.
8387 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
8388 calls.
8389
fa337f3a
RB
83902014-01-30 Richard Biener <rguenther@suse.de>
8391
8392 PR c/59905
8393 * c-typeck.c (build_function_call_vec): Do not replace calls
8394 to a function via an incompatible type with a runtime abort.
8395
b72271b9
BI
83962014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8397
8398 * c-parser.c (c_parser_declaration_or_fndef): Replaced
8399 flag_enable_cilkplus with flag_cilkplus.
8400 (c_parser_direct_declarator_inner): Likewise.
8401 (c_parser_attribute_any_word): Likewise.
8402 (c_parser_attributes): Likewise.
8403 (c_parser_compound_statement): Likewise.
8404 (c_parser_statement_after_labels): Likewise.
8405 (c_parser_if_statement): Likewise.
8406 (c_parser_switch_statement): Likewise.
8407 (c_parser_do_statement): Likewise.
8408 (c_parser_for_statement): Likewise.
8409 (c_parser_unary_expression): Likewise.
8410 (c_parser_postfix_expression): Likewise.
8411 (c_parser_postfix_expression_after_primary): Likewise.
8412 (c_parser_postfix_expression_after_primary): Likewise.
8413 (c_parser_omp_clause_name): Likewise.
8414 (c_finish_omp_declare_simd): Likewise.
8415 (c_parser_cilk_verify_simd): Likewise.
8416 * c-typeck.c (build_array_ref): Likewise.
8417 (build_function_call_vec): Likewise.
8418 (convert_arguments): Likewise.
8419 (build_compound_expr): Likewise.
8420 (c_finish_return): Likewise.
8421 (c_finish_if_stmt): Likewise.
8422 (c_finish_loop): Likewise.
8423 (build_binary_op): Likewise.
8424
393e8e8b
MP
84252014-01-23 Marek Polacek <polacek@redhat.com>
8426
8427 PR c/59846
8428 * c-typeck.c (parser_build_binary_op): Use location instead of
8429 input_location.
8430 (build_binary_op): Pass location to shorten_compare.
8431
f04dda30
MP
84322014-01-23 Marek Polacek <polacek@redhat.com>
8433
8434 PR c/58346
8435 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
8436 an empty aggregate.
8437
789eadcd
MP
84382014-01-23 Marek Polacek <polacek@redhat.com>
8439
8440 PR c/59871
8441 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
8442 of a comma expression.
8443 (emit_side_effect_warnings): Likewise.
8444
40f14e9f
BI
84452014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8446
8447 PR c/59825
8448 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
8449 function to use walk_tree and moved a lot of its functionality to
8450 expand_array_notations.
8451 (expand_array_notations): New function.
8452
74558dd9
BI
84532014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8454
8455 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
8456 attribute an attribute without value.
8457
652fea39
JJ
84582014-01-23 Jakub Jelinek <jakub@redhat.com>
8459
8460 PR middle-end/58809
8461 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
8462 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
8463
f34f1c87
MP
84642014-01-22 Marek Polacek <polacek@redhat.com>
8465
8466 PR c/59891
8467 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
8468 of remove_c_maybe_const_expr on op1 and op2.
8469
241f845a
JJ
84702014-01-15 Jakub Jelinek <jakub@redhat.com>
8471
8472 PR c/58943
8473 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
8474 effects, preevaluate rhs using SAVE_EXPR first.
8475
9a74f20c
BI
84762014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
8477
8478 PR c++/59631
8479 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
8480 statements with if-elseif statements.
8481
96066ce1
MP
84822014-01-06 Marek Polacek <polacek@redhat.com>
8483
8484 PR c/57773
8485 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
8486 defined bit-field types only in ISO C.
8487
23a5b65a
RS
84882014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8489
8490 Update copyright years
8491
f9030485
RS
84922014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8493
8494 * c-array-notation.c: Use the standard form for the copyright notice.
8495
41958c28
BI
84962013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8497
8498 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
8499 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
8500 field in parser is not empty. If not-empty, call the function
8501 c_parser_finish_omp_declare_simd.
8502 (c_parser_cilk_clause_vectorlength): Modified function to be shared
8503 between SIMD-enabled functions and #pragma simd. Added new parameter.
8504 (c_parser_cilk_all_clauses): Modified the usage of the function
8505 c_parser_cilk_clause_vectorlength as mentioned above.
8506 (c_parser_cilk_simd_fn_vector_attrs): New function.
8507 (c_finish_cilk_simd_fn_tokens): Likewise.
8508 (is_cilkplus_vector_p): Likewise.
8509 (c_parser_omp_clause_name): Added checking for "vectorlength,"
8510 "nomask," and "mask" strings in clause name.
8511 (c_parser_omp_all_clauses): Added 3 new case statements:
8512 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
8513 PRAGMA_CILK_CLAUSE_NOMASK.
8514 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
8515 check for vector attribute and if so call the function
8516 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
8517 called the function c_finish_cilk_simd_fn_tokens.
8518 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
8519 parser field is non-empty. If so, parse them as you would parse
8520 the omp declare simd pragma.
8521 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
8522 Added a check when step is a parameter and flag it as error.
8523 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
8524 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
8525 pragma_omp_clause.
8526
cef0fd0e
TS
85272013-12-17 Thomas Schwinge <thomas@codesourcery.com>
8528
8529 * c-parser.c (c_parser_omp_parallel): Fix description.
8530
12893402
BI
85312013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8532
8533 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
8534 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8535 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
8536 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
8537
296674db
JM
85382013-12-04 Joseph Myers <joseph@codesourcery.com>
8539
8540 PR c/52023
8541 * c-parser.c (c_parser_alignas_specifier): Use
8542 c_sizeof_or_alignof_type instead of c_alignof.
8543 (c_parser_alignof_expression): Likewise, with min_alignof
8544 parameter depending on alignof spelling used.
8545
edd28054
MP
85462013-12-04 Marek Polacek <polacek@redhat.com>
8547
8548 PR c/54113
8549 * c-decl.c (start_function): Don't warn for missing prototype for
8550 inline functions.
8551
da0fc454
MP
85522013-12-03 Marek Polacek <polacek@redhat.com>
8553
8554 PR c/59351
8555 * c-decl.c (build_compound_literal): Allow compound literals with
8556 empty initial value.
8557
4c2ecab0
JM
85582013-12-02 Joseph Myers <joseph@codesourcery.com>
8559
8560 PR c/58235
8561 * c-typeck.c (build_modify_expr): Diagnose assignment to
8562 expression with array type.
8563
340baef7
JM
85642013-11-29 Joseph Myers <joseph@codesourcery.com>
8565
8566 PR c/42262
8567 * c-typeck.c (process_init_element): Do not treat a string as
8568 initializing a whole array when used with a designator for an
8569 individual element.
8570
6763b9f7
JM
85712013-11-29 Joseph Myers <joseph@codesourcery.com>
8572
8573 PR c/57574
8574 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
8575 an inline function following a static declaration.
8576
e7bd1de1
JJ
85772013-11-28 Jakub Jelinek <jakub@redhat.com>
8578
8579 PR c/59310
8580 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
8581 to p_name before calling c_parser_omp_teams instead of after.
8582 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
8583 argument. Remove unused p_name variable.
8584
0136f8f0
AH
85852013-11-27 Aldy Hernandez <aldyh@redhat.com>
8586 Jakub Jelinek <jakub@redhat.com>
8587
8588 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
8589 external_scope is NULL.
8590
241b71bb
TV
85912013-11-27 Tom de Vries <tom@codesourcery.com>
8592 Marc Glisse <marc.glisse@inria.fr>
8593
8594 PR c++/59032
8595 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
8596
2fb9a547
AM
85972013-11-22 Andrew MacLeod <amacleod@redhat.com>
8598
8599 * c-typeck.c: Add required include files from gimple.h.
8600
8400e75e
DM
86012013-11-22 David Malcolm <dmalcolm@redhat.com>
8602
8603 * c-decl.c (define_label, shadow_tag_warned)
8604 (check_bitfield_type_and_width, grokdeclarator, grokparms,
8605 store_parm_decls_newstyle, store_parm_decls_oldstyle)
8606 (declspecs_add_type): Remove use of in_system_header macro.
8607 * c-parser.c (c_parser_unary_expression): Likewise.
8608 * c-typeck.c (store_init_value, process_init_element)
8609 (c_start_case): Likewise.
8610
8611 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
8612 macro.
8613
8614 * c-parser.c (c_parser_set_source_position_from_token): Remove
8615 reference to in_system_header from comment.
8616
386b1f1f
RS
86172013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8618
8619 * c-decl.c (grokdeclarator): Update comment to refer to
8620 tree_to_[su]hwi rather than tree_low_cst.
8621
ae7e9ddd
RS
86222013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8623
8624 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
8625 tree_to_uhwi throughout.
8626
9439e9a1
RS
86272013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8628
8629 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
8630 throughout.
8631
9541ffee
RS
86322013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8633
8634 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
8635 throughout.
8636
c02065fc
AH
86372013-11-15 Aldy Hernandez <aldyh@redhat.com>
8638
8639 * c-parser.c (c_parser_cilk_simd): New.
8640 (c_parser_cilk_verify_simd): New.
8641 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
8642 (c_parser_omp_for_loop): Add case for NE_EXPR.
8643 Set c_break_label for CILK_SIMD.
8644 (c_parser_cilk_clause_vectorlength): New.
8645 (c_parser_cilk_clause_linear): New.
8646 (c_parser_cilk_clause_name): New.
8647 (c_parser_cilk_all_clauses): New.
8648 * c-typeck.c (build_unary_op): Pass location argument to
8649 readonly_error.
8650 (build_modify_expr): Same.
8651 (build_asm_expr): Same.
8652 (c_finish_bc_stmt): Error on break/continue in loops.
8653
18f429e2
AM
86542013-11-14 Andrew MacLeod <amacleod@redhat.com>
8655
8656 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
8657
d8a2d370
DN
86582013-11-14 Diego Novillo <dnovillo@google.com>
8659
8660 * c-decl.c: Include print-tree.h.
8661 Include stor-layout.h.
8662 Include varasm.h.
8663 Include attribs.h.
8664 Include stringpool.h.
8665 * c-lang.c: Include fold-const.h.
8666 * c-parser.c: Include stringpool.h.
8667 Include attribs.h.
8668 Include stor-layout.h.
8669 Include varasm.h.
8670 Include trans-mem.h.
8671 * c-typeck.c: Include stor-layout.h.
8672 Include trans-mem.h.
8673 Include varasm.h.
8674 Include stmt.h.
8675
38b7bc7f
JM
86762013-11-13 Joseph Myers <joseph@codesourcery.com>
8677
8678 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
8679 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
8680 __auto_type.
8681 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
8682 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
8683 RID_AUTO_TYPE.
8684 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
8685 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
8686 (c_parser_declarator, c_parser_direct_declarator_inner)
8687 (c_parser_parameter_declaration, c_parser_type_name): All callers
8688 changed.
8689 (c_parser_declaration_or_fndef): Handle declarations with type
8690 determined from the initializer.
8691
45b0be94
AM
86922013-11-12 Andrew MacLeod <amacleod@redhat.com>
8693
18f429e2 8694 * c-typeck.c: Include gimplify.h.
45b0be94 8695
582d9b50
JM
86962013-11-12 Joseph Myers <joseph@codesourcery.com>
8697
8698 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
8699 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
8700 comment.
8701 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
8702 or _Thread_local as appropriate in diagnostics.
8703 (build_null_declspecs): Initialize ret->thread_gnu_p.
8704 (declspecs_add_scspec): Handle either __thread or _Thread_local
8705 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
8706 pedantic. Do not disallow _Thread_local extern and _Thread_local
8707 static.
8708
267bac10
JM
87092013-11-07 Joseph Myers <joseph@codesourcery.com>
8710 Andrew MacLeod <amacleod@redhat.com>
8711
8712 * c-aux-info.c (gen_type): Handle atomic qualifier.
8713 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
8714 qualifiers when compating types.
8715 (shadow_tag_warned): Handle atomic_p in declspecs.
8716 (quals_from_declspecs): Likewise.
8717 (start_decl): Use c_type_promotes_to when promoting argument
8718 types.
8719 (grokdeclarator): Handle _Atomic.
8720 (get_parm_info): Diagnose any qualifier on "void" as only
8721 parameter.
8722 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
8723 comparing types. Use c_type_promotes_to when promoting argument
8724 types.
8725 (finish_function): Use c_type_promotes_to when promoting argument
8726 types.
8727 (build_null_declspecs): Handle atomic_p in declspecs.
8728 (declspecs_add_qual): Handle RID_ATOMIC.
8729 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
8730 (c_token_starts_declspecs): Handle RID_ATOMIC.
8731 (c_parser_declspecs): Handle atomic type specifiers and
8732 qualifiers.
8733 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
8734 from types of expressions with atomic type.
8735 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
8736 (c_parser_attribute_any_word): Handle RID_ATOMIC.
8737 (c_parser_initializer, c_parser_initelt, c_parser_initval)
8738 (c_parser_statement_after_labels, c_parser_switch_statement)
8739 (c_parser_for_statement, c_parser_expr_no_commas)
8740 (c_parser_conditional_expression, c_parser_binary_expression)
8741 (c_parser_cast_expression, c_parser_unary_expression)
8742 (c_parser_postfix_expression)
8743 (c_parser_postfix_expression_after_primary, c_parser_expression):
8744 Use convert_lvalue_to_rvalue.
8745 (c_parser_expression_conv, c_parser_expr_list): Document
8746 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
8747 (c_parser_objc_synchronized_statement): Use
8748 convert_lvalue_to_rvalue.
8749 (c_parser_objc_selector): Handle RID_ATOMIC.
8750 (c_parser_objc_receiver, c_parser_array_notation): Use
8751 convert_lvalue_to_rvalue.
8752 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
8753 _Atomic (type-name).
8754 (struct c_declspecs): Add atomic_p field.
8755 (convert_lvalue_to_rvalue): Declare.
8756 * c-typeck.c (c_type_promotes_to): Promote atomic types to
8757 corresponding atomic types.
8758 (qualify_type): Don't add _Atomic qualifiers from second argument.
8759 (comp_target_types): Do not allow _Atomic mismatches.
8760 (type_lists_compatible_p): Do not remove atomic qualifiers when
8761 comparing types.
8762 (really_atomic_lvalue, convert_lvalue_to_rvalue)
8763 (build_atomic_assign): New functions.
8764 (build_unary_op): Use build_atomic_assign for atomic increment and
8765 decrement.
8766 (build_conditional_expr): Do not treat _Atomic void as a qualified
8767 version of void.
8768 (build_modify_expr): Use build_atomic_assign for atomic LHS.
8769 (find_anonymous_field_with_type, convert_to_anonymous_field)
8770 (convert_for_assignment): Do not remove atomic qualifiers when
8771 comparing types.
8772 (digest_init): Do not accept initialization of arrays of atomic
8773 elements by string constants.
8774 (build_asm_expr): Use convert_lvalue_to_rvalue.
8775 (build_binary_op): Do not treat _Atomic void as a qualified
8776 version of void.
8777
0c249d4b
DD
87782013-11-06 DJ Delorie <dj@redhat.com>
8779
8780 * c-decl.c (locate_old_decl): If a previous conflicting decl is
8781 both explicit and builtin, print the location of the explicit one.
8782
6d7f7e0a
TB
87832013-11-05 Tobias Burnus <burnus@net-b.de>
8784
8785 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
8786 c_parser_omp_distribute, c_parser_omp_teams,
8787 c_parser_omp_target, c_parser_omp_declare): Handle
8788 -fopenmp-simd.
8789
b906f4ca
MP
87902013-11-03 Marek Polacek <polacek@redhat.com>
8791
8792 * c-decl.c (grokdeclarator): Add VLA instrumentation.
8793
ee1d5a02
JJ
87942013-11-01 Jakub Jelinek <jakub@redhat.com>
8795
8796 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
8797 check_dup_generic at the end, unless remove is true.
8798 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
8799 remove = true;.
8800 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
8801
5a9785fb
JJ
88022013-10-31 Jakub Jelinek <jakub@redhat.com>
8803
8804 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
8805 with decl that is not pointer nor array.
8806
939b37da
BI
88072013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8808
8809 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
8810 a spawning function is found.
8811 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
8812 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
8813 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8814 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
8815 case.
8816 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
8817 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
8818 expr.
8819 (c_finish_return): Added a check to reject _Cilk_spawn in return
8820 expression.
8821 (build_cilk_spawn): New function.
8822 (build_cilk_sync): Likewise.
8823 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 8824
d4af74d4
TB
88252013-10-27 Tobias Burnus <burnus@net-b.de>
8826
8827 PR other/33426
8828 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
8829 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
8830 (c_parser_statement_after_labels): Update calls.
8831
d73749df 88322013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8833
8834 PR other/33426
8835 * c-parser.c (c_parser_pragma, c_parser_for_statement):
8836 Handle PRAGMA_IVDEP.
8837 (c_parser_statement_after_labels): Update call.
8838
f28aa681
MP
88392013-10-24 Marek Polacek <polacek@redhat.com>
8840
8841 * c-parser.c (c_parser_struct_declaration): Add a comment.
8842 (c_parser_declarator): Don't allow _Alignas here.
8843
0645c1a2
AM
88442013-10-17 Andrew MacLeod <amacleod@redhat.com>
8845
8846 * c-parser.c: Include omp-low.h.
8847 * c-typeck.c: Likewise.
8848
568a31f2
MP
88492013-10-17 Marek Polacek <polacek@redhat.com>
8850
8851 PR c/58267
8852 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
8853 Document syntax of the array-declarator.
8854 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
8855 are not permitted.
8856 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
8857 (c_parser_struct_declaration): Likewise.
8858 (c_parser_declarator): Likewise.
8859 (c_parser_direct_declarator_inner): Likewise.
8860 (c_parser_parameter_declaration): Likewise.
8861 (c_parser_type_name): Likewise.
8862
acf0174b
JJ
88632013-10-11 Jakub Jelinek <jakub@redhat.com>
8864
8865 * c-lang.h (current_omp_declare_target_attribute): New extern
8866 decl.
8867 * c-parser.c: Include c-lang.h.
8868 (struct c_parser): Change tokens to c_token *.
8869 Add tokens_buf field. Change tokens_avail type to unsigned int.
8870 (c_parser_consume_token): If parser->tokens isn't
8871 &parser->tokens_buf[0], increment parser->tokens.
8872 (c_parser_consume_pragma): Likewise.
8873 (enum pragma_context): Add pragma_struct and pragma_param.
8874 (c_parser_external_declaration): Adjust
8875 c_parser_declaration_or_fndef caller.
8876 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
8877 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
8878 Adjust recursive call.
8879 (c_parser_struct_or_union_specifier): Use pragma_struct instead
8880 of pragma_external.
8881 (c_parser_parameter_declaration): Use pragma_param instead of
8882 pragma_external.
8883 (c_parser_compound_statement_nostart, c_parser_label,
8884 c_parser_for_statement): Adjust
8885 c_parser_declaration_or_fndef callers.
8886 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
8887 it through to c_parser_conditional_expression.
8888 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
8889 pass it through to c_parser_binary_expression. Adjust recursive
8890 call.
8891 (c_parser_binary_expression): Remove prec argument, add
8892 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
8893 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
8894 binop matches it, use build2 instead of parser_build_binary_op.
8895 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
8896 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
8897 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
8898 Handle pragma_struct and pragma_param the same as pragma_external.
8899 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
8900 (c_parser_omp_variable_list): Parse array sections for
8901 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
8902 (c_parser_omp_clause_collapse): Fully fold collapse expression.
8903 (c_parser_omp_clause_reduction): Handle user defined reductions.
8904 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
8905 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
8906 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
8907 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
8908 c_parser_omp_clause_depend, c_parser_omp_clause_map,
8909 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
8910 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
8911 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
8912 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
8913 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
8914 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
8915 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
8916 (c_parser_omp_for_loop): Add CODE argument, pass it through
8917 to c_finish_omp_for. Change last argument to cclauses,
8918 and adjust uses to grab parallel clauses from the array of all
8919 the split clauses. Adjust c_parser_binary_expression,
8920 c_parser_declaration_or_fndef and c_finish_omp_for callers.
8921 (omp_split_clauses): New function.
8922 (c_parser_omp_simd): New function.
8923 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
8924 Allow the function to be called also when parsing combined constructs,
8925 and call c_parser_omp_simd when parsing for simd.
8926 (c_parser_omp_sections_scope): If section-sequence doesn't start with
8927 #pragma omp section, require exactly one structured-block instead of
8928 sequence of statements.
8929 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
8930 Allow the function to be called also when parsing combined constructs.
8931 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
8932 Allow the function to be called also when parsing combined
8933 constructs.
8934 (c_parser_omp_taskgroup, c_parser_omp_cancel,
8935 c_parser_omp_cancellation_point, c_parser_omp_distribute,
8936 c_parser_omp_teams, c_parser_omp_target_data,
8937 c_parser_omp_target_update, c_parser_omp_target,
8938 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
8939 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
8940 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
8941 (c_parser_omp_construct): Add p_name and mask vars. Handle
8942 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
8943 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
8944 and c_parser_omp_sections callers.
8945 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
8946 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
8947 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
8948 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
8949 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
8950 OMP_CLAUSE_DEPEND.
8951 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
8952 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
8953 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
8954 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
8955 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
8956 * c-typeck.c: Include tree-inline.h.
8957 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
8958 handle_omp_array_sections_1, handle_omp_array_sections,
8959 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
8960 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
8961 user defined reductions.
8962 (c_tree_equal): New function.
8963 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
8964 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
8965 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
8966 c_check_omp_declare_reduction_r): New prototypes.
8967 * c-decl.c (current_omp_declare_target_attribute): New variable.
8968 (c_decl_attributes): New function.
8969 (start_decl, start_function): Use it instead of decl_attributes.
8970 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
8971 c_omp_reduction_decl, c_omp_reduction_lookup,
8972 c_check_omp_declare_reduction_r): New functions.
8973
0a6c2227
TT
89742013-09-25 Tom Tromey <tromey@redhat.com>
8975
8976 * Make-lang.in (c/gccspec.o): Remove.
8977 (CFLAGS-c/gccspec.o): New variable.
8978 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
8979 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
8980 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
8981
f3bc55f0
TT
89822013-09-25 Tom Tromey <tromey@redhat.com>
8983
8984 * Make-lang.in (c/gccspec.o): Don't use subshell.
8985
a24d975c
MP
89862013-09-18 Marek Polacek <polacek@redhat.com>
8987
8988 PR sanitize/58443
8989 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
8990 Remove unnecessary check.
8991
ce6923c5
MP
89922013-09-18 Marek Polacek <polacek@redhat.com>
8993
8994 PR sanitizer/58411
8995 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
8996 no_sanitize_undefined attribute.
8997
a1e51df9
KT
89982013-09-13 Kai Tietz <ktietz@redhat.com>
8999
9000 PR target/57848
9001 * c-decl.c (c_builtin_function_ext_scope): Remove
9002 wrong assumption that it is never called on prexisting
9003 symbol.
9004
0af94e6f
JR
90052013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9006
9007 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
9008
20059c8b
GDR
90092013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9010
9011 * c-objc-common.c (c_tree_printer): Tidy.
9012
de5a5fa1
MP
90132013-08-30 Marek Polacek <polacek@redhat.com>
9014
9015 * c-typeck.c (build_binary_op): Add division by zero and shift
9016 instrumentation.
9017
2531a1d9 90182013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 9019 Joseph Myers <joseph@codesourcery.com>
2531a1d9 9020
6e2bcc98 9021 PR c/35649
2531a1d9
JR
9022 * c-typeck.c (c_common_type): Prefer double_type_node over
9023 other REAL_TYPE types with the same precision.
9024 (convert_arguments): Likewise.
9025
025311c4
GDR
90262013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
9027
9028 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
9029 (c_initialize_diagnostics): Call a destructor for the early printer.
9030
da6ca2b5
GDR
90312013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9032
9033 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
9034 printer initialization.
9035
318cda85 90362013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 9037
318cda85
BI
9038 PR c/57490
9039 * c-array-notation.c (fix_conditional_array_notations_1): Added a
9040 check for truth values.
9041 (expand_array_notation_exprs): Added truth values case. Removed an
9042 unwanted else. Added for-loop to walk through subtrees in default
9043 case.
9044
b066401f
GDR
90452013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9046
9047 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
9048
fb48aadc
JM
90492013-07-23 Joseph Myers <joseph@codesourcery.com>
9050
9051 * c-parser.c (struct c_generic_association): Fix typo.
9052
433cc7b0
TT
90532013-07-23 Tom Tromey <tromey@redhat.com>
9054 Joseph Myers <joseph@codesourcery.com>
9055
9056 * c-parser.c (struct c_generic_association): New.
9057 (c_generic_association_d): New typedef.
9058 (c_parser_generic_selection): New function.
9059 (c_parser_postfix_expression): Handle RID_GENERIC.
9060
26d40c3d
JM
90612013-07-13 Jason Merrill <jason@redhat.com>
9062
9063 PR c++/57793
9064 * c-decl.c (finish_struct): Check for too-large class.
9065
ecdbd01a 90662013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
9067
9068 PR c/57821
9069 * c-typeck.c (set_init_index): When folding, check for index overflow.
9070
1141ed3f
BI
90712013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9072
9073 * c-parser.c (c_parser_array_notation): Removed rejection of array
9074 notations in an array of function pointers.
9075
713b46fa
BI
90762013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9077
9078 * c-array-notation.c (make_triplet_val_inv): New function.
9079 (create_cmp_incr): Likewise.
9080 (create_array_refs): Likewise.
9081 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
9082 Also modularized common parts between functions and called the function.
9083 (build_array_notation_expr): Likewise.
9084 (fix_conditional_array_notations_1): Likewise.
9085 (fix_array_notation_expr): Likewise.
9086 (fix_array_notation_call_expr): Likewise.
9087
92f20202
MP
90882013-06-18 Marek Polacek <polacek@redhat.com>
9089
9090 PR c/57630
9091 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
9092
73a23b06
BI
90932013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
9094
9095 * c-array-notation.c (build_array_notation_expr): Reject array notation
9096 mismatch between LHS and RHS even inside a call_expr. Also, removed
9097 a couple while statements that were dead code.
9098
00b8517d
BI
90992013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
9100
9101 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
9102 excessive precision expressions in function parameters. Also removed
9103 couple unwanted while statements.
9104
1509bdda
BI
91052013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9106
9107 * c-array-notation.c (expand_array_notation_exprs): Added
9108 ARRAY_NOTATION_REF case.
ab20d992 9109
d60f1706
BI
91102013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9111
9112 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
9113 function to c-family/array-notation-common.c.
9114 (is_cilkplus_reduce_builtin): Likewise.
9115 (find_rank): Likewise.
9116 (extract_array_notation_exprs): Likewise.
9117 (replace_array_notations): Likewise.
9118 (find_inv_trees): Likewise.
9119 (replace_inv_trees): Likewise.
9120 (contains_array_notation_expr): Likewise.
9121 (find_correct_array_notation_type): Likewise.
9122 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
9123 (struct inv_list): Moved this to c-family/array-notation-common.c.
9124 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 9125
6d6efbb3
BI
91262013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
9127
9128 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
9129 reduction functions outside the for-loop. Added a check if the fundecl
9130 is non-NULL. Finally, removed an unwanted if-statement, and made the
9131 body unconditional.
9132
25c22937
BI
91332013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9134
9135 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
9136 condition of the if-statement matches the rank of else-block and then-
9137 block when array notations are used.
9138 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
9139 expression after the entire function body is parsed.
9140 (c_parser_expr_no_commas): Delayed creating array notation expressions
9141 to the end of function parsing.
9142 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
9143 whole if-statement instead of just the condition.
ab20d992 9144 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 9145
edd25645
BI
91462013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9147
9148 PR c/57474
9149 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
9150 array to NULL_TREE if they are unused. Also added a check for the
9151 field to be NULL before its fields are used in future.
ab20d992 9152
065ce7f1
RO
91532013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9154
9155 PR bootstrap/57450
9156 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
9157 (build_array_notation_expr): Likewise.
9158
36536d79
BI
91592013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9160
9161 * c-typeck.c (build_array_ref): Added a check to see if array's
9162 index is greater than one. If true, then emit an error.
9163 (build_function_call_vec): Exclude error reporting and checking
9164 for builtin array-notation functions.
9165 (convert_arguments): Likewise.
9166 (c_finish_return): Added a check for array notations as a return
9167 expression. If true, then emit an error.
9168 (c_finish_loop): Added a check for array notations in a loop
9169 condition. If true then emit an error.
9170 (lvalue_p): Added a ARRAY_NOTATION_REF case.
9171 (build_binary_op): Added a check for array notation expr inside
9172 op1 and op0. If present, we call another function to find correct
9173 type.
9174 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
9175 * c-parser.c (c_parser_compound_statement): Check if array
9176 notation code is used in tree, if so, then transform them into
9177 appropriate C code.
9178 (c_parser_expr_no_commas): Check if array notation is used in LHS
9179 or RHS, if so, then build array notation expression instead of
9180 regular modify.
9181 (c_parser_postfix_expression_after_primary): Added a check for
9182 colon(s) after square braces, if so then handle it like an array
9183 notation. Also, break up array notations in unary op if found.
9184 (c_parser_direct_declarator_inner): Added a check for array
9185 notation.
9186 (c_parser_compound_statement): Added a check for array notation in
9187 a stmt. If one is present, then expand array notation expr.
9188 (c_parser_if_statement): Likewise.
9189 (c_parser_switch_statement): Added a check for array notations in
9190 a switch statement's condition. If true, then output an error.
9191 (c_parser_while_statement): Similarly, but for a while.
9192 (c_parser_do_statement): Similarly, but for a do-while.
9193 (c_parser_for_statement): Similarly, but for a for-loop.
9194 (c_parser_unary_expression): Check if array notation is used in a
9195 pre-increment or pre-decrement expression. If true, then expand
9196 them.
9197 (c_parser_array_notation): New function.
9198 * c-array-notation.c: New file.
9199 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 9200
cd192ccc
MS
92012013-05-23 Mike Stump <mikestump@comcast.net>
9202
9203 * c-typeck.c (convert_for_assignment): Handle references to memory
9204 spaces better.
9205
427b248d
JM
92062013-05-16 Jason Merrill <jason@redhat.com>
9207
9208 * Make-lang.in (cc1$(exeext)): Use link mutex.
9209
44d90fe1
PC
92102013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9211
9212 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
9213 to simply use OPT_Wpointer_arith.
9214 (build_unary_op): Likewise.
9215
4e7d7b3d
JJ
92162013-04-03 Jakub Jelinek <jakub@redhat.com>
9217
9218 PR c/19449
9219 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
9220 argument. If set, or it temporarily for parsing of the first
9221 argument into force_folding_builtin_constant_p.
9222 (c_parser_postfix_expression): Adjust callers.
9223
839b422f
RB
92242013-03-21 Richard Biener <rguenther@suse.de>
9225
9226 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
9227 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
9228
2ee028f1
MP
92292013-02-12 Marek Polacek <polacek@redhat.com>
9230
9231 PR c/44938
9232 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
9233 origtypes to NULL.
9234
8824edff
JJ
92352013-01-24 Jakub Jelinek <jakub@redhat.com>
9236
9237 PR c/56078
9238 * c-typeck.c (set_nonincremental_init_from_string): If
9239 constructor_max_index is NULL, treat it as if tree_int_cst_lt
9240 returned false.
9241 (process_init_element): Likewise.
9242
eadd3d0d
JJ
92432012-12-20 Jakub Jelinek <jakub@redhat.com>
9244
9245 PR c++/55619
9246 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
9247 argument, don't call default_function_array_conversion
9248 nor c_fully_fold here.
9249 (c_parser_asm_statement): Adjust callers.
9250 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
9251 and outputs here, and call default_function_array_conversion
9252 on inputs that don't need to be addressable.
9253
f8a93a2e
JJ
92542012-12-18 Jakub Jelinek <jakub@redhat.com>
9255
9256 PR c/39464
9257 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
9258 warning require that both c_common_unsigned_type as well as
9259 c_common_signed_type is the same for both mvl and mvr types.
9260
9771b263
DN
92612012-11-16 Diego Novillo <dnovillo@google.com>
9262
9263 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
9264
9265 * c-common.c: Use new vec API in vec.h.
9266 * c-common.h: Likewise.
9267 * c-gimplify.c: Likewise.
9268 * c-pragma.c: Likewise.
9269 * c-pretty-print.c: Likewise.
9270 * c-pretty-print.h: Likewise.
9271 * c-semantics.c: Likewise.
9272 * c-decl.c: Likewise.
9273 * c-parser.c: Likewise.
9274 * c-tree.h: Likewise.
9275 * c-typeck.c: Likewise.
9276
880661a4
JW
92772012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9278
9279 PR c++/54930
9280 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
9281
077d1abe
MLI
92822012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9283
9284 PR c/53066
9285 * c-decl.c (warn_if_shadowing): Do not warn if a variable
9286 shadows a function, unless the variable is a function or a
9287 pointer-to-function.
9288
3a785c97
JJ
92892012-10-12 Jakub Jelinek <jakub@redhat.com>
9290
9291 PR c/54381
9292 * c-parser.c (struct c_tree_loc_pair): Removed.
9293 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
9294 add location_t * and tree * arguments, fill in array of 3
9295 sizeof_arg trees and corresponding locs.
9296 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
9297 c_parser_expr_list callers.
9298 (c_parser_postfix_expression_after_primary): Likewise. Pass
9299 array of 3 sizeof_arg trees and locs (corresponding to first
9300 3 arguments) to sizeof_pointer_memaccess_warning.
9301
703c8606
LC
93022012-10-09 Lawrence Crowl <crowl@google.com>
9303
9304 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
9305 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
9306 hash table.
9307
5d9de0d0
PC
93082012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9309
9310 PR c++/54194
9311 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
9312 call.
9313
a212e43f
MG
93142012-10-09 Marc Glisse <marc.glisse@inria.fr>
9315
9316 PR c++/54427
9317 * c-typeck.c: Include c-common.h.
9318 (enum stv_conv): Moved to c-common.h.
9319 (scalar_to_vector): Moved to c-common.c.
9320 (build_binary_op): Adapt to scalar_to_vector's new prototype.
9321 * Make-lang.in: c-typeck.c depends on c-common.h.
9322
3b78de56
AC
93232012-10-04 Arnaud Charlet <charlet@adacore.com>
9324
9325 * c-decl.c (c_write_global_declarations): Fix handling of
9326 -fdump-ada-spec*.
9327
78c60e3d
SS
93282012-09-30 Sharad Singhai <singhai@google.com>
9329
9330 * c-decl.c (c_write_global_declarations): Use a different method
9331 to determine if the dump has ben initialized.
9332
9f33203d
JM
93332012-09-14 Joseph Myers <joseph@codesourcery.com>
9334
9335 PR c/54552
9336 * c-typeck.c (c_cast_expr): When casting to a type requiring
9337 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
9338 c_fully_fold first.
9339
a27d595d
JM
93402012-09-14 Joseph Myers <joseph@codesourcery.com>
9341
9342 PR c/54103
9343 * c-typeck.c (build_unary_op): Pass original argument of
9344 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
9345 any C_MAYBE_CONST_EXPR, if it has integer operands.
9346 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
9347 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
9348 to c_objc_common_truthvalue_conversion, then remove any
9349 C_MAYBE_CONST_EXPR, if they have integer operands. Use
9350 c_objc_common_truthvalue_conversion not
9351 c_common_truthvalue_conversion.
9352 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
9353 call note_integer_operands for arguments with integer operands
9354 that are not integer constants.
9355
9feb29df
JJ
93562012-09-13 Jakub Jelinek <jakub@redhat.com>
9357
9358 PR c/54559
9359 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
9360 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
9361
d409320c
JJ
93622012-08-31 Jakub Jelinek <jakub@redhat.com>
9363
9364 PR c/54428
9365 * c-convert.c (convert): Don't call fold_convert_loc if
9366 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
9367 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
9368 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
9369
6265d07c
JJ
93702012-08-24 Jakub Jelinek <jakub@redhat.com>
9371
9372 PR c/54355
9373 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
9374 for nested and empty_ok arguments in the call to
9375 c_parser_declaration_or_fndef.
9376
1a4049e7
JJ
93772012-08-17 Jakub Jelinek <jakub@redhat.com>
9378
9379 * c-tree.h (c_last_sizeof_arg): Declare.
9380 * c-parser.c (struct c_tree_loc_pair): New type.
9381 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
9382 non-NULL.
9383 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
9384 (c_parser_postfix_expression_after_primary): Likewise. Call
9385 sizeof_pointer_memaccess_warning if needed.
9386 (sizeof_ptr_memacc_comptypes): New function.
9387 * c-typeck.c (c_last_sizeof_arg): New global variable.
9388 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
9389
0229aee9
UB
93902012-07-24 Uros Bizjak <ubizjak@gmail.com>
9391
9392 * c-lang.h (lang_decl): Add variable_size GTY option.
9393
7ee2468b
SB
93942012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9395
9396 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
9397 * Make-lang.in: Fix dependencies.
9398
d4a10d0a
SB
93992012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9400
9401 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
9402 and add language Makefile hooks.
9403 * config-lang.in: New file.
9404 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
9405 add the required "normal" config-lang.in rules.
9406 * c-lang.h: Moved from gcc/ to here.
9407 * c-tree.h: Likewise.
9408 * c-objc-common.c: Likewise.
9409 * c-objc-common.h: Likewise.
9410 * c-typeck.c: Likewise.
9411 * c-convert.c: Likewise.
9412 * c-lang.c: Likewise.
9413 * c-aux-info.c: Likewise.
9414 * c-errors.c: Likewise.
9415 * gccspec.c: Likewise.
9416 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
9417 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
9418\f
68127a8e 9419Copyright (C) 2012-2023 Free Software Foundation, Inc.
d4a10d0a
SB
9420
9421Copying and distribution of this file, with or without modification,
9422are permitted in any medium without royalty provided the copyright
9423notice and this notice are preserved.