]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
MAINTAINERS: Clarify the policy WRT the Write After Approval list
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
b4df2dd3
GA
12021-11-02 Richard Sandiford <richard.sandiford@arm.com>
2
3 * c-tree.h (c_simulate_record_decl): Declare.
4 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
5 * c-decl.c (c_simulate_record_decl): New function.
6
c2bd5d8a
GA
72021-10-22 Eric Gallager <egallager@gcc.gnu.org>
8
9 PR other/102663
10 * Make-lang.in: Add dummy c.install-dvi target.
11
93d183a5
GA
122021-10-15 Richard Biener <rguenther@suse.de>
13
14 PR c/102763
15 * gimple-parser.c
16 (c_parser_gimple_postfix_expression_after_primary): Check
17 for a pointer do be dereferenced by ->.
18
5d5885c9
GA
192021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
20
21 * c-parser.c (c_finish_omp_declare_variant): Change call from
22 c_omp_check_context_selector to omp_check_context_selector. Change
23 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
24
c9db17b8
GA
252021-10-09 Jakub Jelinek <jakub@redhat.com>
26
27 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
28 (c_parser_omp_scan_loop_body): Use it.
29 (c_parser_omp_sections_scope): Likewise.
30
50e20ee6
GA
312021-10-07 Richard Biener <rguenther@suse.de>
32
33 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
34
bb6194e0
GA
352021-10-05 Richard Biener <rguenther@suse.de>
36
37 PR c/102605
38 * gimple-parser.c (c_parser_gimple_postfix_expression):
39 Accept more address _Literals.
40
da9c5f78
GA
412021-10-04 Marek Polacek <polacek@redhat.com>
42
43 PR c++/97573
44 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
45
9d116bcc
GA
462021-10-01 Martin Sebor <msebor@redhat.com>
47
48 PR c/102103
49 * c-typeck.c (maybe_warn_for_null_address): New function.
50 (build_binary_op): Call it.
51
522021-10-01 Jakub Jelinek <jakub@redhat.com>
53 Richard Biener <rguenther@suse.de>
54
55 PR sanitizer/102515
56 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
57 for division even for SANITIZE_SI_OVERFLOW.
58
592021-10-01 Jakub Jelinek <jakub@redhat.com>
60
61 * c-parser.c (c_parser_omp_clause_order): Set
62 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
63
fd133479
GA
642021-09-28 Andrew Pinski <apinski@marvell.com>
65
66 PR c/32122
67 * c-parser.c (c_parser_statement_after_labels): Pass
68 the c_expr instead of the tree to c_finish_goto_ptr.
69 * c-typeck.c (c_finish_goto_ptr): Change the second
70 argument type to c_expr.
71 * c-tree.h (c_finish_goto_ptr): Likewise.
72 Error out if the expression was not of a pointer type.
73
e4777439
GA
742021-09-22 Jakub Jelinek <jakub@redhat.com>
75
76 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
77 modifiers.
78
cf74e7b5
GA
792021-09-18 Jakub Jelinek <jakub@redhat.com>
80
81 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
82 and reproducible modifiers.
83 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
84
852021-09-18 Jakub Jelinek <jakub@redhat.com>
86
87 * c-parser.c (c_parser_omp_clause_default): Handle private and
88 firstprivate arguments, adjust diagnostics on unknown argument.
89
0a4cb439
GA
902021-09-17 Jakub Jelinek <jakub@redhat.com>
91
92 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
93 is true.
94
a26206ec
GA
952021-09-10 Jakub Jelinek <jakub@redhat.com>
96
97 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
98 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
99 don't call build_conditional_expr, instead build a COND_EXPR directly.
100 (c_parser_binary_expression): Avoid calling parser_build_binary_op
101 if omp_atomic_lhs even in more cases for >, < or ==.
102 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
103 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
104 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
105 * c-typeck.c (build_binary_op): For flag_openmp only handle
106 MIN_EXPR/MAX_EXPR.
107
b2748138
GA
1082021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
109
110 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
111 directive.
112
e11c6046
GA
1132021-09-01 Iain Sandoe <iain@sandoe.co.uk>
114
115 * c-decl.c (enum deprecated_states): Add unavailable state.
116 (merge_decls): Copy unavailability.
117 (quals_from_declspecs): Handle unavailable case.
118 (start_decl): Amend the logic handling suppression of nested
119 deprecation states to include unavailability.
120 (smallest_type_quals_location): Amend comment.
121 (grokdeclarator): Handle the unavailable deprecation state.
122 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
123 * c-tree.h (struct c_declspecs): Add unavailable_p.
124 * c-typeck.c (build_component_ref): Handle unavailability.
125 (build_external_ref): Likewise.
126
1272021-09-01 Roger Sayle <roger@nextmovesoftware.com>
128 Joseph Myers <joseph@codesourcery.com>
129
130 PR c/79412
131 * c-decl.c (duplicate_decls): On significant mismatches, mark the
132 types of both (non-function) decls as error_mark_node, so that the
133 middle-end can see the code is malformed.
134 (free_attr_access_data): Don't process if the type has been set to
135 error_mark_node.
136
6d51ee43
GA
1372021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
138
139 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
140 and 'ancestor' in 'target device' clauses.
141
38b19c5b
GA
1422021-08-23 Jakub Jelinek <jakub@redhat.com>
143
144 * c-parser.c (c_parser_omp_clause_num_tasks,
145 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
146
5b2876f9
GA
1472021-08-22 Martin Uecker <muecker@gwdg.de>
148
149 PR c/98397
150 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
151 for pointers to arrays with qualifiers.
152 (build_conditional_expr): For C23 don't lose qualifiers for pointers
153 to arrays when the other pointer is a void pointer. Update warnings.
154 (convert_for_assignment): Update warnings for C2X when converting from
155 void* with qualifiers to a pointer to array with the same qualifiers.
156
7c9e1645
GA
1572021-08-20 Jakub Jelinek <jakub@redhat.com>
158
159 * c-parser.c (c_parser_omp_error): New function.
160 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
161
1622021-08-20 Jakub Jelinek <jakub@redhat.com>
163
164 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
165 comma at the end of list.
166 (c_parser_omp_requires): Likewise.
167
b57fba5e
GA
1682021-08-19 Jakub Jelinek <jakub@redhat.com>
169
170 * c-parser.c (c_parser_omp_requires): Don't call
171 c_parser_peek_2nd_token and optionally consume token if current
172 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
173
6e529985
GA
1742021-08-18 Jakub Jelinek <jakub@redhat.com>
175
176 * c-parser.c (c_parser_omp_nothing): New function.
177 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
178
1792021-08-18 Jakub Jelinek <jakub@redhat.com>
180
181 * c-parser.c (c_parser_statement_after_labels): Add restart label
182 near the start of the function. If c_parser_pragma returns false,
183 goto restart.
184 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
185 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
186 return what c_parser_omp_declare returned. Return true instead of
187 false after emitting errors that the directive is not allowed in
188 pragma_stmt context.
189 (c_parser_omp_ordered): Return true instead of
190 false after emitting errors that the directive is not allowed in
191 pragma_stmt context.
192 (c_parser_omp_target_update): Likewise.
193 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
194 Change return type from tree to bool, return false if the
195 directive should be ignored in pragma_stmt contexts.
196 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
197 return their result directly.
198 (c_parser_omp_cancellation_point): Change return type from void to
199 bool, return false if the directive should be ignored in pragma_stmt
200 contexts.
201 (c_parser_omp_declare): Likewise.
202
2d14d64b
GA
2032021-08-17 Jakub Jelinek <jakub@redhat.com>
204
205 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
206 (c_parser_omp_scope): New function.
207 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
208
72be20e2
GA
2092021-08-12 Jakub Jelinek <jakub@redhat.com>
210
211 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
212 (c_parser_omp_clause_filter): New function.
213 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
214 (OMP_MASKED_CLAUSE_MASK): Define.
215 (c_parser_omp_masked): New function.
216 (c_parser_omp_parallel): Handle parallel masked.
217 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
218 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
219
2202021-08-12 Martin Uecker <muecker@gwdg.de>
221
222 PR c/101838
223 PR c/29970
224 * c-typeck.c (c_expr_sizeof_type): Evaluate
225 size expressions for structs of variable size.
226
2272021-08-12 Tobias Burnus <tobias@codesourcery.com>
228
229 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
230 'primary' as alias for 'master'.
231
3ae564ea
GA
2322021-08-10 Martin Uecker <muecker@gwdg.de>
233
234 PR c/29970
235 * c-typeck.c (c_expr_sizeof_expr): Evaluate
236 size expressions for structs of variable size.
237
f92f4778
GA
2382021-08-06 Tamar Christina <tamar.christina@arm.com>
239
240 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
241 * c-tree.h (c_simulate_enum_decl): Likewise.
242
2432021-08-06 Martin Sebor <msebor@redhat.com>
244
245 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
246 vec arguments to by-reference.
247 (c_finish_omp_declare_simd): Same.
248 (c_parser_compound_statement_nostart): Same.
249 (c_parser_for_statement): Same.
250 (c_parser_objc_methodprotolist): Same.
251 (c_parser_oacc_routine): Same.
252 (c_parser_omp_for_loop): Same.
253 (c_parser_omp_declare_simd): Same.
254
419c6c68
GA
2552021-07-21 Thomas Schwinge <thomas@codesourcery.com>
256 Joseph Myers <joseph@codesourcery.com>
257 Cesar Philippidis <cesar@codesourcery.com>
258
259 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
260 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
261 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
262 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
263
92d45509
GA
2642021-07-20 Martin Sebor <msebor@redhat.com>
265
266 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
267 by-const-reference.
268 * c-typeck.c (c_build_function_call_vec): Same.
269
d97d71a1
GA
2702021-07-15 Martin Sebor <msebor@redhat.com>
271
272 PR c/101289
273 PR c/97548
274 * c-decl.c (get_parm_array_spec): Strip nops.
275
6fba0eea
GA
2762021-07-06 Martin Sebor <msebor@redhat.com>
277
278 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
279
7a60a6e8
GA
2802021-07-02 Jakub Jelinek <jakub@redhat.com>
281
282 PR c/101297
283 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
284 appears before a CPP_NAME.
285
90708f87
GA
2862021-06-25 Martin Sebor <msebor@redhat.com>
287
288 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
289 warning_suppressed_p, suppress_warning, and copy_no_warning.
290 (diagnose_mismatched_decls): Same.
291 (duplicate_decls): Same.
292 (grokdeclarator): Same.
293 (finish_function): Same.
294 (c_write_global_declarations_1): Same.
295 * c-fold.c (c_fully_fold_internal): Same.
296 * c-parser.c (c_parser_expr_no_commas): Same.
297 (c_parser_postfix_expression): Same.
298 * c-typeck.c (array_to_pointer_conversion): Same.
299 (function_to_pointer_conversion): Same.
300 (default_function_array_conversion): Same.
301 (convert_lvalue_to_rvalue): Same.
302 (default_conversion): Same.
303 (build_indirect_ref): Same.
304 (build_function_call_vec): Same.
305 (build_atomic_assign): Same.
306 (build_unary_op): Same.
307 (c_finish_return): Same.
308 (emit_side_effect_warnings): Same.
309 (c_finish_stmt_expr): Same.
310 (c_omp_clause_copy_ctor): Same.
311
9aa8327e
GA
3122021-06-24 Jakub Jelinek <jakub@redhat.com>
313
314 PR c/101176
315 * c-parser.c (c_parser_has_attribute_expression): Set source range for
316 the result.
317
3182021-06-24 Jakub Jelinek <jakub@redhat.com>
319
320 PR c/101171
321 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
322 error_mark_node.
323
3242021-06-24 Jakub Jelinek <jakub@redhat.com>
325
326 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
327 C_ORT_OMP for clauses on target construct.
328 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
329 (c_parser_omp_target): For non-combined target add
330 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
331 C_ORT_OMP_TARGET to c_finish_omp_clauses.
332 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
333 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
334 never present on C_ORT_*DECLARE_SIMD.
335 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
336 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
337 corresponding map clauses.
338
2f080224
GA
3392021-06-21 Jakub Jelinek <jakub@redhat.com>
340
341 PR inline-asm/100785
342 * c-typeck.c (c_mark_addressable): Diagnose trying to make
343 bit-fields addressable.
344
ede6c356
GA
3452021-06-15 Robin Dapp <rdapp@linux.ibm.com>
346
347 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
348 similar.
349
8dc48181
GA
3502021-06-14 Tobias Burnus <tobias@codesourcery.com>
351
352 PR c/100913
353 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
354 var in the error case.
355
438aac59
GA
3562021-06-07 Eric Botcazou <ebotcazou@adacore.com>
357
358 PR c/100920
359 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
360 spot built-in functions.
361
7d6987e9
GA
3622021-06-06 Jakub Jelinek <jakub@redhat.com>
363
364 PR c/100902
365 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
366 even when target is combined with other constructs.
367
3682021-06-06 Eric Botcazou <ebotcazou@adacore.com>
369
370 PR c/100920
371 * c-decl.c (finish_struct): Fix thinko in previous change.
372 * c-typeck.c (convert_for_assignment): Do not warn on pointer
373 assignment and initialization for storage order purposes if the
374 RHS is a call to a DECL_IS_MALLOC function.
375
600f90cb
GA
3762021-06-04 Martin Sebor <msebor@redhat.com>
377
378 PR c/100783
379 * c-objc-common.c (print_type): Handle erroneous types.
380
440c8a0a
GA
3812021-06-03 Jakub Jelinek <jakub@redhat.com>
382
383 PR c++/100859
384 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
385 after depend only cases.
386
ee682192
GA
3872021-05-31 Richard Biener <rguenther@suse.de>
388
389 PR c++/88601
390 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
391 * c-parser.c (c_parser_postfix_expression): Likewise.
392
48166757
GA
3932021-05-28 Richard Biener <rguenther@suse.de>
394
395 PR c/100803
396 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
397 invalid if conditions.
398
3992021-05-28 Jakub Jelinek <jakub@redhat.com>
400
401 PR middle-end/99928
402 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
403 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
404 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
405 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
406 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
407 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
408 if present in map_head, map_field_head or map_firstprivate_head
409 bitmaps.
410
4112021-05-28 Tobias Burnus <tobias@codesourcery.com>
412
413 * c-parser.c (c_parser_omp_clause_affinity): New.
414 (c_parser_omp_clause_name, c_parser_omp_variable_list,
415 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
416 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
417 c_finish_omp_clauses): Likewise.
418
01c59ef2
GA
4192021-05-26 Eric Botcazou <ebotcazou@adacore.com>
420
421 PR c/100653
422 * c-decl.c (finish_struct): Warn for a union containing an aggregate
423 field with a differing scalar storage order.
424
2832d51b
GA
4252021-05-21 Jakub Jelinek <jakub@redhat.com>
426
427 PR middle-end/99928
428 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
429 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
430 if a decl is mentioned both in map clause and in such firstprivate
431 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
432
65f32e5d
GA
4332021-05-19 Jakub Jelinek <jakub@redhat.com>
434
435 PR middle-end/99928
436 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
437 master when combined with taskloop.
438 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
439 parallel master when not combined with taskloop.
440
a8daf9a1
GA
4412021-05-18 Richard Biener <rguenther@suse.de>
442
443 PR c/100522
444 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
445 Diagnose calls to non-functions.
446 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
447
a7ffc1ef
GA
4482021-05-17 Richard Biener <rguenther@suse.de>
449
450 PR c/100625
451 * gimple-parser.c (c_parser_gimple_label): Avoid building
452 a GIMPLE label with NULL label decl.
453
f9af11c7
GA
4542021-05-13 Martin Sebor <msebor@redhat.com>
455
456 PR c/100550
457 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
458
0ff3a0f2
GA
4592021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
460
461 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
462 'close'.
463
aa891c56
GA
4642021-05-10 Martin Liska <mliska@suse.cz>
465
466 * c-aux-info.c (affix_data_type): Use startswith
467 function instead of strncmp.
468 * c-typeck.c (build_function_call_vec): Likewise.
469 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
470
62d87a32
GA
4712021-05-07 Eric Botcazou <ebotcazou@adacore.com>
472
473 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
474 on the address of a pointer field in a record with reverse SSO.
475
99e8df7a
GA
4762021-05-04 Tobias Burnus <tobias@codesourcery.com>
477
478 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
479 for || and && reductions.
480
3c8e539d
GA
4812021-04-29 Joseph Myers <joseph@codesourcery.com>
482
483 * c-typeck.c (function_types_compatible_p): For C2X, treat
484 unprototyped function as compatible with non-variadic prototyped
485 function even if some argument types are changed by the default
486 argument promotions.
487
ee351f7f
GA
4882021-04-15 Martin Sebor <msebor@redhat.com>
489
490 PR c/99420
491 PR c/99972
492 * c-decl.c (pushdecl): Always propagate type attribute.
493
4942021-04-15 Richard Sandiford <richard.sandiford@arm.com>
495
496 PR c/98852
497 * c-typeck.c (c_common_type): Do not drop attributes that
498 affect type identity.
499
1d54b138
GA
5002021-04-10 Jakub Jelinek <jakub@redhat.com>
501
502 PR c/99990
503 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
504 error_mark_node.
505
4493b1c1
GA
5062021-03-25 Jakub Jelinek <jakub@redhat.com>
507
508 PR c++/99565
509 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
510 to operand_equal_p.
511
5f256a70
GA
5122021-03-19 Jakub Jelinek <jakub@redhat.com>
513
514 PR c/99588
515 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
516 with modifycode NOP_EXPR produces and mark the _Atomic var as read
517 if found.
518 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
519 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
520 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
521
3c5b6d24
GA
5222021-03-15 Tobias Burnus <tobias@codesourcery.com>
523
524 PR c++/99509
525 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
526 ensure that the varpool node is marked as offloadable.
527
ceae9533
GA
5282021-03-05 Tobias Burnus <tobias@codesourcery.com>
529
530 PR c/99137
531 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
532
4028d01a
GA
5332021-02-24 Martin Sebor <msebor@redhat.com>
534
535 PR middle-end/97172
536 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
537
bf81237e
GA
5382021-02-18 Jakub Jelinek <jakub@redhat.com>
539
540 PR c/99136
541 * c-typeck.c (c_finish_return): Don't wrap retval into
542 EXCESS_PRECISION_EXPR in functions that return void.
543
0c5cdb31
GA
5442021-02-11 Marek Polacek <polacek@redhat.com>
545
546 * c-parser.c (c_parser_if_statement): Use vec_free.
547
a19dd5e6
GA
5482021-02-04 Martin Sebor <msebor@redhat.com>
549
550 PR c/97882
551 * c-decl.c (locate_old_decl): Add type to diagnostic output.
552 (diagnose_mismatched_decls): Same.
553 (start_function): Introduce temporaries for better readability.
554 * c-typeck.c (comptypes_internal): Only consider complete enum
555 types in comparisons with integers.
556
f7884fb1
GA
5572021-02-01 Martin Sebor <msebor@redhat.com>
558
559 PR middle-end/97172
560 * c-decl.c (free_attr_access_data): New function.
561 (c_parse_final_cleanups): Call free_attr_access_data.
562
59cf67d1
GA
5632021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
564
565 * c-parser.c (c_parser_omp_clause_detach): New.
566 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
567 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
568 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
569 clause. Prevent use of detach with mergeable and overriding the
570 data sharing mode of the event handle.
571
2f7f0d32
GA
5722021-01-15 Jakub Jelinek <jakub@redhat.com>
573
574 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
575 unqualified element type and then call c_build_qualified_type on the
576 ARRAY_TYPE.
577
7d187e4f
GA
5782021-01-07 Richard Biener <rguenther@suse.de>
579
580 * gimple-parser.c (c_parser_gimple_compound_statement): Only
581 reallocate loop array if it is too small.
582
eefe499f
GA
5832020-12-16 Martin Uecker <muecker@gwdg.de>
584
585 PR c/98047
586 * c-typeck.c (build_modify_expr): Drop qualifiers.
587
5882020-12-16 Martin Uecker <muecker@gwdg.de>
589
590 PR c/98260
591 * c-parser.c (c_parser_expression): Look into
592 nop expression when marking expressions as read.
593
d52945ce
GA
5942020-12-14 Martin Liska <mliska@suse.cz>
595
596 PR sanitizer/98204
597 * c-typeck.c (pointer_diff): Do not emit a top-level
598 sanitization.
599 (build_binary_op): Likewise.
600
ca2bd949
GA
6012020-12-09 Tobias Burnus <tobias@codesourcery.com>
602
603 * c-parser.c (c_parser_omp_allocate): New.
604 (c_parser_omp_construct): Call it.
605
6062020-12-09 Richard Biener <rguenther@suse.de>
607
608 PR c/98200
609 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
610 early on error.
611
bc8a7013
GA
6122020-12-07 Martin Uecker <muecker@gwdg.de>
613
614 PR c/97981
615 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
616 that drops qualifiers to the end of the function.
617
d48df6f2
GA
6182020-11-26 Martin Uecker <muecker@gwdg.de>
619
620 PR c/65455
621 PR c/92935
622 * c-parser.c (c_parser_declaration_or_fndef): Remove
623 redundant code to drop qualifiers of _Atomic types for __auto_type.
624 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
625 types for __typeof__.
626
1e2c9a27
GA
6272020-11-24 Jakub Jelinek <jakub@redhat.com>
628
629 PR c/97958
630 * c-parser.c (c_parser_binary_expression): For omp atomic binary
631 expressions, use make_node instead of build2 to avoid checking build2
632 performs.
633
8e6198d0
GA
6342020-11-23 Joseph Myers <joseph@codesourcery.com>
635
636 PR c/95630
637 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
638 for comparisons of complete and incomplete pointers.
639
7a97e2fc
GA
6402020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
641
642 * c-aux-info.c (gen_type): Support opaque types.
643
82e5048e
GA
6442020-11-20 Martin Sebor <msebor@redhat.com>
645
646 PR middle-end/97879
647 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
648
6492020-11-20 Jakub Jelinek <jakub@redhat.com>
650
651 PR other/97911
652 * Make-lang.in (c.serial): Change from goal to a variable.
653 (.PHONY): Drop c.serial.
654
6552020-11-20 Martin Uecker <muecker@gwdg.de>
656
657 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
658
d62586ee
GA
6592020-11-19 Jakub Jelinek <jakub@redhat.com>
660
661 PR c/97860
662 * c-decl.c (get_parm_array_spec): Bail out of nelts is
663 error_operand_p.
664
25bb75f8
GA
6652020-11-18 Jakub Jelinek <jakub@redhat.com>
666
667 * Make-lang.in (c.serial): New goal.
668 (.PHONY): Add c.serial c.prev.
669 (cc1$(exeext)): Call LINK_PROGRESS.
670
77f67db2
GA
6712020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
672
673 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
674 goto too.
675 * c-typeck.c (build_asm_expr): Remove an assert checking output
676 absence for asm goto.
677
6782020-11-13 Jakub Jelinek <jakub@redhat.com>
679
680 * c-typeck.c (c_finish_omp_clauses): Don't clear
681 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
682
6832020-11-13 Iain Sandoe <iain@sandoe.co.uk>
684
685 PR objc/77404
686 * c-parser.c (c_parser_objc_class_definition): Pass the
687 location of the class name to the interface declaration.
688
bb622641
GA
6892020-11-10 Strager Neds <strager.nds@gmail.com>
690
691 * c-decl.c (merge_decls): Use new overload of
692 set_decl_section_name.
693
6942020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
695
696 * c-parser.c (c_parser_omp_target_data): Add use of
697 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
698 handled map clause kind.
699 (c_parser_omp_target_enter_data): Likewise.
700 (c_parser_omp_target_exit_data): Likewise.
701 (c_parser_omp_target): Likewise.
702 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
703 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
704 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
705 same struct field access to co-exist on OpenMP construct.
706
2da7ee05
GA
7072020-11-07 Martin Uecker <muecker@gwdg.de>
708
709 * c-parser.c (c_parser_label): Implement mixing of labels and code.
710 (c_parser_all_labels): Likewise.
711
44cab2d8
GA
7122020-11-06 Iain Sandoe <iain@sandoe.co.uk>
713
714 * c-parser.c (c_parser_objc_at_property_declaration):
715 Improve parsing fidelity. Associate better location info
716 with @property attributes. Clean up the interface to
717 objc_add_property_declaration ().
718
7192020-11-06 Nathan Sidwell <nathan@acm.org>
720
721 * c-decl.c (diagnose_mismatched_decls): Rename
722 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
723 (warn_if_shadowing, implicitly_declare, names_builtin_p)
724 (collect_source_refs): Likewise.
725 * c-typeck.c (inform_declaration, inform_for_arg)
726 (convert_for_assignment): Likewise.
727
7282020-11-06 Tobias Burnus <tobias@codesourcery.com>
729
730 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
731 OpenACC matching.
732 (c_parser_omp_construct): Update call.
733
35c125cb
GA
7342020-11-04 Jakub Jelinek <jakub@redhat.com>
735
736 PR c++/97670
737 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
738 find underlying decl to clear in the aligned_head bitmap.
739
7402020-11-04 Joseph Myers <joseph@codesourcery.com>
741
742 * c-decl.c (handle_nodiscard_attribute): New.
743 (std_attribute_table): Add nodiscard.
744 * c-parser.c (c_parser_std_attribute): Expect argument to
745 nodiscard attribute to be a string. Do not special-case ignoring
746 nodiscard.
747 * c-typeck.c (maybe_warn_nodiscard): New.
748 (build_compound_expr, emit_side_effect_warnings): Call
749 maybe_warn_nodiscard.
750 (c_process_expr_stmt, c_finish_stmt_expr): Also call
751 emit_side_effect_warnings if warn_unused_result.
752
4f0606fe
GA
7532020-10-29 Asher Gordon <AsDaGo@posteo.net>
754
755 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
756 with XDELETE.
757 (finish_init): Likewise.
758 (pop_init_level): Likewise.
759
e93aae4a
GA
7602020-10-28 Joseph Myers <joseph@codesourcery.com>
761
762 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
763 error_at for omitted parameter name.
764
7652020-10-28 Jakub Jelinek <jakub@redhat.com>
766
767 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
768 (c_parser_omp_clause_allocate): New function.
769 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
770 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
771 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
772 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
773 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
774 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
775 PRAGMA_OMP_CLAUSE_ALLOCATE.
776 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
777
89bb01e7
GA
7782020-10-27 Joseph Myers <joseph@codesourcery.com>
779
780 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
781 standard attributes.
782
efe71fcc
GA
7832020-10-23 Marek Polacek <polacek@redhat.com>
784
785 PR c++/91741
786 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
787 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
788 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
789 * c-tree.h (char_type_p): Declare.
790 * c-typeck.c (char_type_p): No longer static.
791
7922020-10-23 Martin Sebor <msebor@redhat.com>
793
794 PR middle-end/97552
795 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
796
2fe5b7d1
GA
7972020-09-19 Martin Sebor <msebor@redhat.com>
798
799 PR c/50584
800 * c-decl.c (lookup_last_decl): Define new function.
801 (c_decl_attributes): Call it.
802 (start_decl): Add argument and use it.
803 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
804 (get_parm_array_spec): Define new function.
805 (push_parm_decl): Call get_parm_array_spec.
806 (start_function): Call warn_parm_array_mismatch. Build attribute
807 access and add it to current function.
808 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
809 in forms of array parameters.
810 * c-tree.h (start_decl): Add argument.
811
8122020-09-19 Sandra Loosemore <sandra@codesourcery.com>
813
814 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
815 with...
816 (in_statement): New.
817 (start_function): Adjust for above change.
818 (c_push_function_context, c_pop_function_context): Likewise.
819 * c-lang.h (struct language_function): Likewise.
820 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
821 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
822 New.
823 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
824 (c_parser_switch_statement): Adjust break/switch context handling
825 and calls to renamed functions.
826 (c_parser_while_statement): Adjust break/switch context handling and
827 build a WHILE_STMT.
828 (c_parser_do_statement): Ditto, with DO_STMT respectively.
829 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
830 (c_parser_omp_for_loop): Adjust break/switch context handling.
831 * c-tree.h (c_break_label, c_cont_label): Delete.
832 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
833 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
834 (in_statement, switch_statement_break_seen_p): Declare.
835 (c_start_case, c_finish_case): Renamed to...
836 (c_start_switch, c_finish_switch).
837 (c_finish_bc_stmt): Adjust arguments.
838 * c-typeck.c (build_function_call_vec): Don't try to print
839 statements with %qE format.
840 (struct c_switch): Rename switch_expr field to switch_stmt.
841 Add break_stmt_seen_p field.
842 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
843 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
844 (do_case): Update for changes to struct c_switch.
845 (c_finish_case): Rename to c_finish_switch. Update for changes to
846 struct c_switch and change of representation from SWITCH_EXPR to
847 SWITCH_STMT.
848 (c_finish_loop): Delete.
849 (c_finish_bc_stmt): Update to reflect changes to break/continue
850 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
851 of a GOTO_EXPR except for objc foreach loops.
852
e1a4a8a0
GA
8532020-09-01 Jakub Jelinek <jakub@redhat.com>
854
855 PR c++/96867
856 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
857 only on PARM_DECLs.
858
8f7ea26a
GA
8592020-08-28 Martin Sebor <msebor@redhat.com>
860
861 PR c/96596
862 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
863 argument type.
864
8b394f01
GA
8652020-08-27 Martin Liska <mliska@suse.cz>
866
867 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
868 growth function to true.
869
db0f6efe
GA
8702020-08-25 Tobias Burnus <tobias@codesourcery.com>
871
872 PR c/96678
873 * c-typeck.c (handle_omp_array_sections_1): Talk about
874 array function parameter in the error message.
875
5c265693
GA
8762020-08-18 Jakub Jelinek <jakub@redhat.com>
877
878 PR c/96571
879 * c-parser.c (c_parser_generic_selection): Change match_found from bool
880 to int, holding index of the match. Call mark_exp_read on the selector
881 expression and on expressions other than the selected one.
882
4967ca2f
GA
8832020-08-01 Richard Sandiford <richard.sandiford@arm.com>
884
885 PR c/96377
886 * c-typeck.c (process_init_element): Split test for whether to
887 recurse into a record, union or array into...
888 (initialize_elementwise_p): ...this new function. Don't recurse
889 into a vector type if the initialization value is also a vector.
890
48cc2e46
GA
8912020-07-31 Richard Biener <rguenther@suse.de>
892
893 PR debug/96383
894 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
895 Define to c_common_finalize_early_debug.
896
3ea9abca
GA
8972020-07-22 Tobias Burnus <tobias@codesourcery.com>
898
899 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
900 (c_parser_omp_critical): Permit hint(0) clause without named critical.
901 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
902
30430061
GA
9032020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
904
905 PR target/95237
906 * c-decl.c (finish_decl): Call target hook
907 lower_local_decl_alignment to lower local decl alignment.
908
3f8ca9cb
GA
9092020-07-09 Julian Brown <julian@codesourcery.com>
910 Thomas Schwinge <thomas@codesourcery.com>
911
912 PR middle-end/95270
913 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
914 for standalone attach/detach clauses.
915
a82c4c4c 9162020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
917
918 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
919 set, warn for conversion between pointers that point to incompatible
920 scalar storage orders.
921
f60ee68d
GA
9222020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
923
924 * c-parser.c (c_parser_statement_after_labels): Pass correct
925 parameters to c_parser_do_statement.
926
56638b9b
GA
9272020-06-16 Jakub Jelinek <jakub@redhat.com>
928
929 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
930 c_in_omp_for.
931 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
932 premature c_fully_fold. Defer explicit c_fully_fold calls to after
933 c_finish_omp_for.
934 * c-tree.h (c_in_omp_for): Declare.
935 * c-typeck.c (c_in_omp_for): Define.
936 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
937 (digest_init): Likewise.
938 (build_binary_op): Likewise.
939
9402020-06-16 Jakub Jelinek <jakub@redhat.com>
941
942 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
943 from kind by comma rather than colon.
944
1a59f3db
GA
9452020-06-05 Mark Wielaard <mark@klomp.org>
946
947 * c-decl.c (implicit_decl_warning): When warned and olddecl is
948 an undeclared builtin, then add a fixit header hint, if found.
949 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
950 warning_at about implicit builtin declaration type mismatch.
951
9a5b7438
GA
9522020-06-03 Mark Wielaard <mark@klomp.org>
953
954 * c-parser.c (struct c_parser): Add seen_string_literal
955 bitfield.
956 (c_parser_consume_token): Reset seen_string_literal.
957 (c_parser_error_richloc): Add name_hint if seen_string_literal
958 and next token is a CPP_NAME and we have a missing header
959 suggestion for the name.
960 (c_parser_string_literal): Set seen_string_literal.
961
9622020-06-03 Mark Wielaard <mark@klomp.org>
963
964 * c-parser.c (c_parser_postfix_expression_after_primary): Add
965 scope with matching_parens after CPP_OPEN_PAREN.
966
9672020-06-03 Tobias Burnus <tobias@codesourcery.com>
968
969 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
970
53ffb43a
GA
9712020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
972
973 * Make-lang.in: Remove extra slash.
974
8f66f175
ML
9752020-05-19 Martin Liska <mliska@suse.cz>
976
977 * c-parser.c: Fix typo.
978
49ddde69
JJ
9792020-05-14 Jakub Jelinek <jakub@redhat.com>
980
981 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
982
eb72dc66
RB
9832020-05-07 Richard Biener <rguenther@suse.de>
984
985 PR middle-end/94703
986 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
987 DECL_GIMPLE_REG_P.
988
bf915591
JJ
9892020-04-30 Jakub Jelinek <jakub@redhat.com>
990
991 PR c/94842
992 * c-decl.c (set_labels_context_r): In addition to context-less
993 LABEL_DECLs adjust also LABEL_DECLs with context equal to
994 parent function if any.
995 (store_parm_decls): Adjust comment.
996
e1113ffb
JJ
9972020-04-19 Jakub Jelinek <jakub@redhat.com>
998
999 PR objc/94637
1000 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1001 two CPP_COLON tokens.
1002
2e389749
JJ
10032020-04-17 Jakub Jelinek <jakub@redhat.com>
1004
1005 PR other/94629
1006 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1007 to data.clauses.
1008
2dc9294c
JJ
10092020-04-15 Jakub Jelinek <jakub@redhat.com>
1010
1011 PR c/94593
1012 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1013 requires directive when not at file scope.
1014
13e41d8b
TB
10152020-04-08 Tobias Burnus <tobias@codesourcery.com>
1016
1017 PR middle-end/94120
1018 * c-decl.c (c_check_in_current_scope): New function.
1019 * c-tree.h (c_check_in_current_scope): Declare it.
1020 * c-parser.c (c_parser_oacc_declare): Add check that variables
1021 are declared in the same scope as the directive. Fix handling
1022 of namespace vars.
1023
4df50a05
JJ
10242020-04-07 Jakub Jelinek <jakub@redhat.com>
1025
1026 PR c++/94512
1027 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1028 if c_parser_omp_master succeeded.
1029
5db9e893
JJ
10302020-03-23 Jakub Jelinek <jakub@redhat.com>
1031
1032 PR gcov-profile/94029
1033 PR c/94239
1034 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1035 the function_start_locus location. Don't do that afterwards for the
1036 __GIMPLE body parsing.
1037
9def91e9
JJ
10382020-03-19 Jakub Jelinek <jakub@redhat.com>
1039
1040 PR gcov-profile/94029
1041 * c-tree.h (finish_function): Add location_t argument defaulted to
1042 input_location.
1043 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1044 set it to the locus of closing } if non-NULL.
1045 (c_parser_compound_statement_nostart): Return locus of closing }.
1046 (c_parser_parse_rtl_body): Likewise.
1047 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1048 finish_function.
1049 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1050 input_location to set function_end_locus.
1051
046c5890
JJ
10522020-03-17 Jakub Jelinek <jakub@redhat.com>
1053
1054 PR c/94172
1055 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1056 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1057 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1058 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1059 ENUMERAL_TYPEs.
1060 (finish_incomplete_vars): New function, moved from finish_struct. Use
1061 relayout_decl instead of layout_decl.
1062 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1063 being TYPE_VFIELD. Use finish_incomplete_vars.
1064 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1065 finish_incomplete_vars.
1066 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1067 also on ENUMERAL_TYPEs.
1068
c015ff8c
JJ
10692020-03-16 Jakub Jelinek <jakub@redhat.com>
1070
1071 PR c/94179
1072 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1073
f2e9fe5f
MS
10742020-03-13 Martin Sebor <msebor@redhat.com>
1075
1076 PR c/94040
1077 * c-decl.c (builtin_structptr_type_count): New constant.
1078 (match_builtin_function_types): Reject decls that are incompatible
1079 in types pointed to by pointers.
1080 (diagnose_mismatched_decls): Adjust comments.
1081
c9d70946
JM
10822020-03-05 Joseph Myers <joseph@codesourcery.com>
1083
1084 PR c/93577
1085 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1086 empty when initialized type is error_mark_node.
1087 (set_designator, process_init_element): Ignore initializers for
1088 elements of a variable-size type or of error_mark_node.
1089
726e292d
MS
10902020-03-01 Martin Sebor <msebor@redhat.com>
1091
1092 PR middle-end/93926
1093 * c-decl.c (types_close_enough_to_match): New function.
1094 (match_builtin_function_types):
1095 (diagnose_mismatched_decls): Add missing inform call to a warning.
1096
a499c2f8
MS
10972020-03-01 Martin Sebor <msebor@redhat.com>
1098
1099 PR c/93812
1100 * c-typeck.c (build_functype_attribute_variant): New function.
1101 (composite_type): Call it.
1102
9c3da8cc
JJ
11032020-02-25 Jakub Jelinek <jakub@redhat.com>
1104
1105 PR other/93912
1106 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1107 Rename last argument from probablity to probability.
1108
bacdd5e9
JJ
11092020-02-13 Jakub Jelinek <jakub@redhat.com>
1110
1111 PR c/93576
1112 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1113 *expr if it has side effects.
1114
f9eb0973
JL
11152020-01-30 Jeff Law <law@redhat.com>
1116
1117 PR c/88660
1118 * c-parser.c (c_parser_switch_statement): Make sure to request
1119 marking the switch expr as used.
1120
ac68e287
JM
11212020-01-22 Joseph Myers <joseph@codesourcery.com>
1122
1123 PR c/93348
1124 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1125 argument with integer operands.
1126
852f0ae8
KK
11272020-01-16 Kerem Kat <keremkat@gmail.com>
1128
1129 PR c/92833
1130 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1131 to support 4 available tokens.
1132
e2346a33
JM
11332020-01-15 Joseph Myers <joseph@codesourcery.com>
1134
1135 PR c/93072
1136 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1137 determine whether to set DECL_CONTEXT.
1138
3d77686d
JM
11392020-01-13 Joseph Myers <joseph@codesourcery.com>
1140
1141 PR c/93241
1142 * c-typeck.c (build_c_cast): Check for expressions with integer
1143 operands that can occur in an unevaluated part of an integer
1144 constant expression and call note_integer_operands as needed.
1145
f74c4b2c
RB
11462019-01-08 Richard Biener <rguenther@suse.de>
1147
1148 PR middle-end/93199
1149 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1150 permanently.
1151
8d9254fc
JJ
11522020-01-01 Jakub Jelinek <jakub@redhat.com>
1153
1154 Update copyright years.
1155
39292e25
EB
11562019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1157
1158 * c-decl.c (collect_source_ref_cb): Delete.
1159 (for_each_global_decl): Rename into...
1160 (collect_source_refs): ...this. Call collect_source_ref directly.
1161 (c_parse_final_cleanups): Always call collect_source_ref on the main
1162 input filename.
1163
519d7496
JB
11642019-12-19 Julian Brown <julian@codesourcery.com>
1165 Cesar Philippidis <cesar@codesourcery.com>
1166
1167 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1168 detach clauses.
1169 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1170 Allow deref (->) in variable lists if true.
1171 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1172 Pass to c_parser_omp_variable_list.
1173 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1174 call to c_parser_omp_variable_list.
1175 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1176 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1177 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1178 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1179 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1180 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1181 and detach. Support deref.
1182 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1183 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1184 (c_oacc_check_attachments): New function.
1185 (c_finish_omp_clauses): Check attach/detach arguments for being
1186 pointers using above. Support deref.
1187
a6163563
JB
11882019-12-19 Julian Brown <julian@codesourcery.com>
1189 Maciej W. Rozycki <macro@codesourcery.com>
1190 Tobias Burnus <tobias@codesourcery.com>
1191 Thomas Schwinge <thomas@codesourcery.com>
1192
1193 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1194 (c_parser_oacc_data_clause): Likewise.
1195 (c_parser_oacc_all_clauses): Likewise.
1196 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1197 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1198 PRAGMA_OACC_CLAUSE_NO_CREATE.
1199 * c-typeck.c (handle_omp_array_sections): Support
1200 GOMP_MAP_NO_ALLOC.
1201
d68f5d45
DM
12022019-12-09 David Malcolm <dmalcolm@redhat.com>
1203
1204 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1205 Replace label_text ctor calls.
1206
4691bf46
JM
12072019-12-04 Joseph Myers <joseph@codesourcery.com>
1208
1209 PR c/36941
1210 PR c/88827
1211 * c-typeck.c (convert_lvalue_to_rvalue): Call
1212 require_complete_type for arguments not of void types.
1213 (build_indirect_ref): Do not diagnose dereferencing pointers to
1214 incomplete types.
1215 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1216
85d11957
JM
12172019-12-03 Joseph Myers <joseph@codesourcery.com>
1218
1219 PR c/88704
1220 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1221 old-style parameter definitions.
1222
4569f8b3
SL
12232019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1224
1225 PR target/92499
1226
1227 * c-decl.c (flexible_array_type_p): Move to common code.
1228
65ef05d0
RS
12292019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1230
1231 * c-decl.c (start_decl): Allow initialization of variables whose
1232 size is a POLY_INT_CST.
1233 (finish_decl): Use verify_type_context to check whether the target
1234 allows variables with a particular type to have static or thread-local
1235 storage duration. Don't raise a second error if such variables do
1236 not have a constant size.
1237 (grokdeclarator): Use verify_type_context to check whether the
1238 target allows fields or array elements to have a particular type.
1239 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1240 the target allows pointer difference for the types involved.
1241 (build_unary_op): Likewise for pointer increment and decrement.
1242
34b43828
JM
12432019-11-29 Joseph Myers <joseph@codesourcery.com>
1244
1245 * c-parser.c (struct c_parser): Add members raw_tokens and
1246 raw_tokens_used.
1247 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1248 using previously-lexed raw tokens.
1249 (c_parser_peek_nth_token_raw)
1250 (c_parser_check_balanced_raw_token_sequence): New functions.
1251 (c_parser_nth_token_starts_std_attributes): Use
1252 c_parser_check_balanced_raw_token_sequence for Objective-C.
1253
5b8d9367
JM
12542019-11-25 Joseph Myers <joseph@codesourcery.com>
1255
1256 PR c/91985
1257 * c-decl.c (finish_declspecs): Use int instead of decimal
1258 floating-point types if decimal floating-point not supported.
1259
1723e1be
JM
12602019-11-25 Joseph Myers <joseph@codesourcery.com>
1261
1262 * c-tree.h (struct c_declarator): Use a structure for id member.
1263 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1264 declarators at the start, not when handling individual declarators
1265 later. Use u.id.id instead of u.id.
1266 (grokfield): Use u.id.id instead of u.id.
1267 (build_id_declarator): Set u.id.id and u.id.attrs.
1268 (finish_declspecs): Handle postfix attributes in case of typedef
1269 name or typeof used.
1270 * c-parser.c (c_parser_direct_declarator)
1271 (c_parser_direct_declarator_inner): Place declarator for
1272 attributes inside that for function or array, not outside. Set
1273 u.id.attrs for identifiers.
1274 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1275 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1276 instead of u.id.
1277
bdaf8be1
JJ
12782019-11-22 Jakub Jelinek <jakub@redhat.com>
1279
1280 PR c/90677
1281 * c-decl.c (identifier_global_tag): Define.
1282
3e00ba47
RB
12832019-11-20 Richard Biener <rguenther@suse.de>
1284
1285 PR c/92088
1286 * c-decl.c (grokdeclarator): Prevent inlining of nested
1287 function with VLA arguments.
1288
8c5b727a
JM
12892019-11-20 Joseph Myers <joseph@codesourcery.com>
1290
1291 * c-decl.c (c_warn_type_attributes): New function.
1292 (groktypename, grokdeclarator, finish_declspecs): Call
1293 c_warn_type_attributes before applying attributes to types.
1294 * c-tree.h (c_warn_type_attributes): Declare.
1295
192961ff
JM
12962019-11-19 Joseph Myers <joseph@codesourcery.com>
1297
1298 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1299 standard attributes.
1300 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1301 pedwarn for unknown standard attributes and return error_mark_node
1302 for them.
1303
20a38017
MM
13042019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1305
1306 * c-parser.c (c_parser_parse_rtl_body): Always call
1307 run_rtl_passes, even if startwith pass is not provided.
1308
d5fbe5e0
JM
13092019-11-15 Joseph Myers <joseph@codesourcery.com>
1310
1311 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1312 duplicate standard attributes.
1313
97cc1187
JM
13142019-11-15 Joseph Myers <joseph@codesourcery.com>
1315
1316 * c-decl.c (std_attribute_table): Add maybe_unused.
1317
f8aea5e3
JM
13182019-11-15 Joseph Myers <joseph@codesourcery.com>
1319
1320 * c-decl.c (std_attribute_table): Add fallthrough.
1321 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1322 attribute at top level.
1323
2cc94aa8
JM
13242019-11-15 Joseph Myers <joseph@codesourcery.com>
1325
1326 * c-decl.c (std_attribute_table): New.
1327 (c_init_decl_processing): Register attributes from
1328 std_attribute_table.
1329 * c-parser.c (c_parser_attribute_arguments): Add arguments
1330 require_string and allow_empty_args. All callers changed.
1331 (c_parser_std_attribute): Set require_string argument for
1332 "deprecated" attribute.
1333
7c5890cc
JM
13342019-11-14 Joseph Myers <joseph@codesourcery.com>
1335
1336 * c-parser.c (c_parser_postfix_expression)
1337 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1338 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1339
e8738f4e
RS
13402019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1341
1342 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1343 of build_same_sized_truth_vector_type.
1344 (build_vec_cmp): Likewise.
1345
b2417b59
JJ
13462019-11-14 Jakub Jelinek <jakub@redhat.com>
1347
bedb7f04
JJ
1348 * c-parser.c (c_parser_omp_context_selector): Don't require score
1349 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1350 negative score.
1351
b2417b59
JJ
1352 * c-parser.c (c_parser_omp_context_selector): Rename
1353 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1354 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1355 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1356 and string literals.
1357
4e03c3a7
JM
13582019-11-14 Joseph Myers <joseph@codesourcery.com>
1359
1360 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1361 ctsk_tagfirstref_attrs.
1362 (struct c_declspecs): Update description of attrs. Add
1363 postfix_attrs and non_std_attrs_seen_p. Increase size of
1364 typespec_kind bit-field.
1365 (c_warn_unused_attributes): New declaration.
1366 (parser_xref_tag): Update prototype.
1367 * c-decl.c (c_warn_unused_attributes): New function.
1368 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1369 ctsk_tagref_attrs. Handle attribute declarations.
1370 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1371 (grokdeclarator): Handle standard attributes.
1372 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1373 attributes to incomplete type reference.
1374 (xref_tag): Update call to parser_xref_tag.
1375 (declspecs_add_addrspace, declspecs_add_type)
1376 (declspecs_add_scspec, declspecs_add_attrs): Set
1377 non_std_attrs_seen_p.
1378 (finish_declspecs): Apply postfix standard attributes to type.
1379 * c-parser.c (c_token_starts_declspecs)
1380 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1381 (c_parser_next_tokens_start_declaration): Update comments.
1382 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1383 parser->tokens[2] to parser->tokens[1].
1384 (c_parser_nth_token_starts_std_attributes)
1385 (c_parser_std_attribute_specifier_sequence): New functions.
1386 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1387 attrs. All callers changed. Handle standard attributes.
1388 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1389 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1390 All callers changed.
1391 (c_parser_declspecs): Add arguments start_std_attr_ok and
1392 end_std_attr_ok. All callers changed. Handle standard
1393 attributes.
1394 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1395 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1396 (c_parser_compound_statement_nostart, c_parser_all_labels)
1397 (c_parser_label, c_parser_statement, c_parser_for_statement):
1398 Handle standard attributes.
1399 * c-parser.h (c_parser_declspecs): Update prototype.
1400 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1401 c_parser_declspecs.
1402
0c29cac4
ML
14032019-11-12 Martin Liska <mliska@suse.cz>
1404
1405 * gimple-parser.c: Do not include params.h.
1406
028d4092
ML
14072019-11-12 Martin Liska <mliska@suse.cz>
1408
1409 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1410 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1411 macro.
1412
62aee289
MR
14132019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1414 Frederik Harwath <frederik@codesourcery.com>
1415
1416 gcc/c/
1417 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1418 (c_parser_oacc_kernels_parallel): Rename function to...
1419 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1420 (c_parser_omp_construct): Update accordingly.
1421
1422
7cec9588
JJ
14232019-11-11 Jakub Jelinek <jakub@redhat.com>
1424
1425 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1426 without corresponding end declare target.
1427
f486280c
RS
14282019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1429
1430 * c-convert.c (convert): Only handle vector conversions if one of
1431 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1432 allows it.
1433 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1434 vectors satisfy gnu_vector_type_p.
1435 (build_unary_op): Only allow unary operators to be applied to
1436 vectors if they satisfy gnu_vector_type_p.
1437 (digest_init): Only allow by-element initialization of vectors
1438 if they satisfy gnu_vector_type_p.
1439 (really_start_incremental_init): Likewise.
1440 (push_init_level): Likewise.
1441 (pop_init_level): Likewise.
1442 (process_init_element): Likewise.
1443 (build_binary_op): Only allow binary operators to be applied to
1444 vectors if they satisfy gnu_vector_type_p.
1445
017c6491
JM
14462019-11-08 Joseph Myers <joseph@codesourcery.com>
1447
1448 * c-decl.c (grokparms): Convert () in a function definition to
1449 (void) for C2x.
1450 (store_parm_decls_oldstyle): Pedwarn for C2x.
1451 (store_parm_decls): Update comment about () not generating a
1452 prototype.
1453
c01bd174
JM
14542019-11-07 Joseph Myers <joseph@codesourcery.com>
1455
1456 * c-parser.c (c_parser_attribute_arguments): New function.
1457 Factored out of c_parser_gnu_attribute.
1458 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1459 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1460 (c_parser_std_attribute_specifier): New functions.
1461 (c_parser_transaction_attributes): Use
1462 c_parser_std_attribute_specifier.
1463
471c5330
JM
14642019-11-07 Joseph Myers <joseph@codesourcery.com>
1465
1466 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1467 lex_joined_string and translate_strings_p.
1468 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1469 c_lex_with_flags.
1470 (c_parser_string_literal): New function.
1471 (c_parser_static_assert_declaration_no_semi): Use
1472 c_parser_string_literal. Do not set lex_untranslated_string.
1473 (c_parser_asm_string_literal): Use c_parser_string_literal.
1474 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1475 (c_parser_gnu_attributes): Set and restore translate_strings_p
1476 instead of lex_untranslated_string.
1477 (c_parser_asm_statement): Do not set lex_untranslated_string.
1478 (c_parser_asm_operands): Likewise.
1479 (c_parser_has_attribute_expression): Set and restore
1480 translate_strings_p instead of lex_untranslated_string.
1481 (c_parser_postfix_expression): Use c_parser_string_literal.
1482 (pragma_lex): Likewise.
1483 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1484 (c_parse_file): Set translate_strings_p.
1485 * gimple-parser.c (c_parser_gimple_postfix_expression)
1486 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1487 * c-parser.c (c_parser_string_literal): Declare function.
1488
d0c464d2
JJ
14892019-11-02 Jakub Jelinek <jakub@redhat.com>
1490
1491 * c-parser.c (c_finish_omp_declare_variant): Use
1492 omp_get_context_selector instead of c_omp_get_context_selector.
1493
ac2cfa6c
RS
14942019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1495
1496 * c-tree.h (c_simulate_enum_decl): Declare.
1497 * c-decl.c (c_simulate_enum_decl): New function.
1498 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1499
74078538
RS
15002019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1501
1502 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1503 * c-decl.c (c_simulate_builtin_function_decl): New function.
1504 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1505 to the above.
1506
ad1539d5
MS
15072019-10-28 Martin Sebor <msebor@redhat.com>
1508
1509 PR c/66970
1510 * c-decl.c (names_builtin_p): Define a new function.
1511
cb73e4e7
RB
15122019-10-28 Richard Biener <rguenther@suse.de>
1513
1514 PR c/92249
1515 * gimple-parser.c (c_parser_parse_gimple_body): Make
1516 current_bb the entry block initially to easier recover
1517 from errors.
1518 (c_parser_gimple_compound_statement): Adjust.
1519
135df52c
JJ
15202019-10-24 Jakub Jelinek <jakub@redhat.com>
1521
1522 * c-parser.c (c_finish_omp_declare_variant): Use
1523 omp_context_selector_matches instead of
1524 c_omp_context_selector_matches.
1525 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1526 attribute in between declare target and end declare target
1527 pragmas.
1528
783bfe5e
JM
15292019-10-15 Joseph Myers <joseph@codesourcery.com>
1530
1531 * c-parser.c (c_parser_attribute_any_word): Rename to
1532 c_parser_gnu_attribute_any_word. All callers changed.
1533 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1534 callers changed.
1535 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1536 callers changed.
1537 (c_parser_declaration_or_fndef, c_parser_declspecs)
1538 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1539 (c_parser_struct_declaration, c_parser_declarator)
1540 (c_parser_gnu_attribute, c_parser_compound_statement)
1541 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1542 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1543 attribute-related syntax productions.
1544
56898e43
RS
15452019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1546
1547 * c-objc-common.c (useful_aka_type_p): Replace with...
1548 (get_aka_type): ...this new function. Given the original type,
1549 decide which aka type to print (if any). Only look through typedefs
1550 if user_facing_original_type_p.
1551 (print_type): Update accordingly.
1552
b9424661
JJ
15532019-10-14 Jakub Jelinek <jakub@redhat.com>
1554
1555 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1556 into int NESTED, if it is 2, diagnose missing commas in between
1557 clauses.
1558 (c_parser_omp_context_selector): Pass 2 as last argument to
1559 c_parser_omp_all_clauses.
1560
20de9568
JJ
15612019-10-12 Jakub Jelinek <jakub@redhat.com>
1562
1563 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1564 For simd properties, put them directly into TREE_VALUE.
1565 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1566 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1567 add "omp declare variant base" attribute rather than
1568 "omp declare variant".
1569
fe2bc27c
JM
15702019-10-11 Joseph Myers <joseph@codesourcery.com>
1571
1572 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1573
94e7f906
JJ
15742019-10-10 Jakub Jelinek <jakub@redhat.com>
1575
1576 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1577 true, terminate processing on closing paren and don't skip to end of
1578 pragma line.
1579 (c_parser_omp_declare_simd): Handle also declare variant.
1580 (omp_construct_selectors, omp_device_selectors,
1581 omp_implementation_selectors, omp_user_selectors): New variables.
1582 (c_parser_omp_context_selector,
1583 c_parser_omp_context_selector_specification,
1584 c_finish_omp_declare_variant): New functions.
1585 (c_finish_omp_declare_simd): Handle both declare simd and
1586 declare variant.
1587 (c_parser_omp_declare): Handle declare variant.
1588
93313b94
JM
15892019-10-02 Joseph Myers <joseph@codesourcery.com>
1590
1591 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1592 CPP_COLON tokens.
1593
55879815
RS
15942019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1595
1596 * c-objc-common.c (useful_aka_type_p): New function.
1597 (print_type): Use it to decide whether an aka type is worth printing.
1598
59bc434a
JJ
15992019-09-27 Jakub Jelinek <jakub@redhat.com>
1600
1601 PR c++/88203
1602 * c-parser.c (c_parser_predefined_identifier): New function.
1603 (c_parser_postfix_expression): Use it.
1604 (c_parser_omp_variable_list): Parse predefined identifiers.
1605 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1606 in shared and firstprivate clauses, even when they are predetermined
1607 shared.
1608
c6447c20
RS
16092019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1610
1611 * c-typeck.c (build_function_call_vec): Take the original function
1612 decl as an optional final parameter. Pass all built-in calls to
1613 check_builtin_function_arguments.
1614
522da4c2
EB
16152019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1616
1617 PR c/91815
1618 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1619 of identifiers in the external scope only for variables and functions.
1620
68e2c199
PK
16212019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1622
1623 PR c/78736
1624 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1625
22f8849d
IS
16262019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1627
1628 PR pch/61250
1629 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1630 after determining that the first token is not
1631 PRAGMA_GCC_PCH_PREPROCESS.
1632
db376f45
EB
16332019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1634
1635 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1636 FUNCTION_DECL to the right value in the presence of nested declarators.
1637
4d732405
RS
16382019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1639
1640 PR middle-end/91421
1641 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1642
cb1180d5
RS
16432019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1644
1645 PR middle-end/91421
1646 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1647 of a built_in_function.
1648 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1649
77eb117f
JJ
16502019-08-10 Jakub Jelinek <jakub@redhat.com>
1651
1652 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1653 (c_parser_omp_clause_device_type): New function.
1654 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1655 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1656 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1657 diagnostics for declare target with clauses nested in clause-less
1658 declare target declaration-definition-seq.
1659 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1660
2c3b8bad
JJ
16612019-08-09 Jakub Jelinek <jakub@redhat.com>
1662
bb522e2e
JJ
1663 * c-parser.c (check_no_duplicate_clause): Simplify using
1664 omp_find_clause.
1665 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1666 directive name modifiers.
1667 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1668
2c3b8bad
JJ
1669 PR c/91401
1670 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1671 check_no_duplicate_clause call. Comment it out, instead emit a
1672 warning for duplicate dist_schedule clauses.
1673
99769e7f
RS
16742019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1675
1676 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1677
8860d270
JJ
16782019-08-08 Jakub Jelinek <jakub@redhat.com>
1679
1680 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1681 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1682 instead of generic_head to track duplicates.
1683
398e3feb
JJ
16842019-08-07 Jakub Jelinek <jakub@redhat.com>
1685
1686 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1687 (c_parser_omp_clause_use_device_addr): New function.
1688 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1689 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1690 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1691 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1692 map or use_device_* clauses.
1693 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1694 in OpenMP, require pointer type rather than pointer or array type.
1695 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1696
a28351e7
JJ
16972019-07-31 Jakub Jelinek <jakub@redhat.com>
1698
1699 PR c/91192
1700 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1701 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1702 case.
1703
6343b6bf
ML
17042019-07-25 Martin Liska <mliska@suse.cz>
1705 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1706
1707 PR c++/23383
1708 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1709
cb50701e
ML
17102019-07-25 Martin Liska <mliska@suse.cz>
1711
1712 * c-decl.c (merge_decls): Use new macros
1713 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1714
62e3e66f
RB
17152019-07-23 Richard Biener <rguenther@suse.de>
1716
1717 PR tree-optimization/83518
1718 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1719 a CFG also rebuild cgraph edges.
1720
554a530f
JJ
17212019-07-20 Jakub Jelinek <jakub@redhat.com>
1722
1723 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1724 (c_parser_omp_clause_bind): New function.
1725 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1726 (OMP_LOOP_CLAUSE_MASK): Define.
1727 (c_parser_omp_loop): New function.
1728 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1729 loop combined with parallel or teams.
1730 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1731 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1732
d119bf79
RS
17332019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1734
1735 PR c/53633
1736 * c-decl.c (finish_function): Check targetm.warn_func_return
1737 before issuing a -Wreturn-type warning.
1738
ab20d992 17392019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1740
1741 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1742 (c_parser_compound_statement): Call it.
1743
1fdd6f04
JJ
17442019-07-12 Jakub Jelinek <jakub@redhat.com>
1745
1746 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1747 (c_parser_omp_clause_order): New function.
1748 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1749 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1750 PRAGMA_OMP_CLAUSE_ORDER.
1751 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1752
8389386c
RB
17532019-07-10 Richard Biener <rguenther@suse.de>
1754
1755 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1756 _Literal (int *) &x for address literals.
1757
99b1c316
MS
17582019-07-09 Martin Sebor <msebor@redhat.com>
1759
1760 PR c++/61339
1761 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1762 to class.
1763 (field_decl_cmp): Same.
1764 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1765 * c-tree.h: Same.
1766 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1767
6c1dae73
MS
17682019-07-09 Martin Sebor <msebor@redhat.com>
1769
1770 PR c++/61339
1771 * c-decl.c: Change class-key from class to struct and vice versa
1772 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1773 * gimple-parser.c: Same.
1774
69b5279e
RB
17752019-07-01 Richard Biener <rguenther@suse.de>
1776
1777 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1778 _Literal (char *) &"foo" for address literals pointing to
1779 STRING_CSTs.
1780
ab20d992
JJ
17812019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1782
1783 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1784 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1785 C incompatibility if alternate "__intN__" form is used.
1786
1e3d475e
MS
17872019-06-24 Martin Sebor <msebor@redhat.com>
1788
1789 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1790
bf38f7e9
JJ
17912019-06-10 Jakub Jelinek <jakub@redhat.com>
1792
1793 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1794 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1795 (c_parser_omp_scan_loop_body): New function.
1796 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1797 inscan reduction clauses.
1798 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1799 non-inscan reductions on the same construct, or inscan reductions with
1800 ordered or schedule clauses, or inscan array reductions.
1801
65985d78
MS
18022019-06-05 Martin Sebor <msebor@redhat.com>
1803
1804 PR c/90737
1805 * c-typeck.c (c_finish_return): Only consider functions returning
1806 pointers as candidates for -Wreturn-local-addr.
1807
0ecf545c
MS
18082019-06-05 Martin Sebor <msebor@redhat.com>
1809
1810 * c-decl.c (start_decl): Adjust quoting and hyphenation
1811 in diagnostics.
1812 (finish_decl): Same.
1813 (finish_enum): Same.
1814 (start_function): Same.
1815 (declspecs_add_type): Same.
1816 * c-parser.c (warn_for_abs): Same.
1817 * c-typeck.c (build_binary_op): Same.
1818
e03436e7
TS
18192019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1820
b48f44bf
TS
1821 PR c/89433
1822 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1823 marked with an OpenACC 'routine' directive.
1824
5bf04509
TS
1825 PR c/89433
1826 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1827 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1828
e03436e7
TS
1829 PR c/89433
1830 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1831 clauses from "omp declare target" attribute.
1832
a9c697b8
MS
18332019-05-16 Martin Sebor <msebor@redhat.com>
1834
ab20d992
JJ
1835 * c-decl.c (start_decl): Quote keywords, operators, and
1836 types in diagnostics.
1837 (finish_decl): Same.
1838 * c-parser.c (c_parser_asm_statement): Same.
1839 (c_parser_conditional_expression): Same.
1840 (c_parser_transaction_cancel): Same.
1841 * c-typeck.c (c_common_type): Same.
1842 (build_conditional_expr): Same.
1843 (digest_init): Same.
1844 (process_init_element): Same.
1845 (build_binary_op): Same.
a9c697b8 1846
c4499192
RB
18472019-05-17 Richard Biener <rguenther@suse.de>
1848
1849 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1850 (c_parser_gimple_unary_expression): Likewise.
1851 (c_parser_gimple_parentized_ternary_expression): New function.
1852
adfe6e4b
RB
18532019-05-16 Richard Biener <rguenther@suse.de>
1854
1855 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1856 (c_parser_gimple_unary_expression): Likewise.
1857
186dabf2
RB
18582019-05-15 Richard Biener <rguenther@suse.de>
1859
1860 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1861 __BIT_FIELD_REF.
1862
1158c5b4
RB
18632019-05-14 Richard Biener <rguenther@suse.de>
1864
1865 * gimple-parser.c (c_parser_gimple_statement): Remove
1866 questionable auto-promotion to VIEW_CONVERT_EXPR.
1867 (c_parser_gimple_typespec): Split out from __MEM parsing.
1868 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1869 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1870 as __VIEW_CONVERT with -gimple.
1871
fd4485aa
ML
18722019-05-09 Martin Liska <mliska@suse.cz>
1873
1874 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1875 __MAX.
1876 (c_parser_gimple_unary_expression): Parse also binary expression
1877 __MIN and __MAX.
1878 (c_parser_gimple_parentized_binary_expression): New function.
1879
d276406a
ML
18802019-05-09 Martin Liska <mliska@suse.cz>
1881
1882 * gimple-parser.c (struct gimple_parser): Add probability.
1883 for gimple_parser_edge.
1884 (gimple_parser::push_edge): Add new argument probability.
1885 (c_parser_gimple_parse_bb_spec): Parse also probability
1886 if present.
1887 (c_parser_parse_gimple_body): Set edge probability.
1888 (c_parser_gimple_compound_statement): Consume token
1889 before calling c_parser_gimple_goto_stmt.
1890 Parse BB counts.
1891 (c_parser_gimple_statement): Pass new argument.
1892 (c_parser_gimple_goto_stmt): Likewise.
1893 (c_parser_gimple_if_stmt): Likewise.
1894 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1895 * c-parser.c (c_parser_declaration_or_fndef): Pass
1896 hot_bb_threshold argument.
1897 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1898 field.
1899 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1900
f179b64e
JJ
19012019-04-26 Jakub Jelinek <jakub@redhat.com>
1902
1903 PR debug/90197
1904 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1905 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1906 (c_parser_do_statement): Likewise.
1907 (c_parser_for_statement): Likewise. Formatting fixes.
1908 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1909 emit DEBUG_BEGIN_STMTs if needed.
1910
e7178413
JJ
19112019-04-19 Jakub Jelinek <jakub@redhat.com>
1912
c280b7ee
JJ
1913 PR c/89888
1914 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1915 (c_start_case): Don't clear it.
1916 (do_case): Adjust c_add_case_label caller.
1917 (c_finish_case): Adjust c_do_switch_warnings caller.
1918
e7178413
JJ
1919 PR c++/90108
1920 * c-decl.c (merge_decls): If remove is main variant and
1921 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1922 variant that has newdecl as TYPE_NAME if any.
1923
60a2c645
JJ
19242019-04-12 Jakub Jelinek <jakub@redhat.com>
1925
1926 PR c/89933
1927 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1928 don't try to remove it from the variant list, but instead assert
1929 it has no variants.
1930
2a82beaa
RB
19312019-04-01 Richard Biener <rguenther@suse.de>
1932
1933 PR c/71598
1934 * c-tree.h (c_get_alias_set): Declare.
1935 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1936 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1937 as the underlying integer type.
1938
bec1da64
MS
19392019-03-19 Martin Sebor <msebor@redhat.com>
1940
1941 PR tree-optimization/89688
1942 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1943 kinds of initializers.
1944
855cd9b1
JJ
19452019-03-19 Jakub Jelinek <jakub@redhat.com>
1946
1947 PR c/89734
1948 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1949 return type even if quals_used is 0. Formatting fixes.
1950
baa09dc5
RB
19512019-03-14 Richard Biener <rguenther@suse.de>
1952
1953 * c-tree.h (enum c_declspec_il): New.
1954 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1955 enum bitfield.
1956 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1957 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1958 (c_parser_declspecs): Adjust.
1959 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1960 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1961 and bitmap.h.
1962 (struct gimple_parser): New.
1963 (gimple_parser::push_edge): New method.
1964 (c_parser_gimple_parse_bb_spec): New helper.
1965 (c_parser_parse_gimple_body): Get start pass and IL specification.
1966 Initialize SSA and CFG.
1967 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1968 Build a gimple_parser parsing state and pass it along.
1969 (c_parser_gimple_statement): Change intermittend __PHI internal
1970 function argument for the edge.
1971 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1972 (c_parser_gimple_goto_stmt): Record edges to build.
1973 (c_parser_gimple_if_stmt): Likewise.
1974 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1975 (c_parser_gimple_or_rtl_pass_list): Likewise.
1976
a3f9f006
ML
19772019-03-11 Martin Liska <mliska@suse.cz>
1978
1979 * c-decl.c (check_for_loop_decls): Wrap an option name
1980 in a string format message and fix GNU coding style.
1981 * c-parser.c (c_parser_declspecs): Likewise.
1982
1db01ff9
JJ
19832019-03-08 Jakub Jelinek <jakub@redhat.com>
1984
1985 PR tree-optimization/89550
1986 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1987 returned true.
1988 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1989 or warning returned true.
1990
66dcb747
JJ
19912019-02-28 Jakub Jelinek <jakub@redhat.com>
1992
1993 PR c/89525
1994 * c-typeck.c (convert_arguments): Call inform_declaration only if
1995 the previous warning_at call returned true.
1996
2263c9f2
TS
19972019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1998
1999 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2000 parameter. Adjust all users.
2001 (c_parser_oacc_simple_clause): Replace parser with loc formal
2002 parameter. Adjust all users.
2003
ab20d992 20042019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2005
2006 PR c/87924
2007 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2008 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2009
5f88ba10
JJ
20102019-02-15 Jakub Jelinek <jakub@redhat.com>
2011
2012 PR c/89340
2013 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2014 before c_decl_attributes rather than after it.
2015
cfc30fd1
JJ
20162019-02-06 Jakub Jelinek <jakub@redhat.com>
2017
2018 PR c/89211
2019 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2020 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2021 instead of 3 nested ifs.
2022
fbe83e6b
JM
20232019-02-06 Joseph Myers <joseph@codesourcery.com>
2024
2025 PR c/88584
2026 * c-decl.c (finish_decl): Do not complete array types for arrays
2027 with external linkage not at file scope.
2028
f461f938
RB
20292019-02-05 Richard Biener <rguenther@suse.de>
2030
2031 PR c/88606
2032 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2033 all type variants when not supported.
2034
fe509359
JJ
20352019-01-30 Jakub Jelinek <jakub@redhat.com>
2036
2037 PR c/89061
2038 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2039 * c-decl.c (decl_jump_unsafe): Return false for
2040 C_DECL_COMPOUND_LITERAL_P decls.
2041 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2042
6a335b96
JJ
20432019-01-29 Jakub Jelinek <jakub@redhat.com>
2044
f4b7e754
JJ
2045 PR c/89045
2046 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2047 scope.
2048
6a335b96
JJ
2049 PR c/86125
2050 * c-decl.c (last_fileptr_type): Remove.
2051 (last_structptr_types): New variable.
2052 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2053 {old,new}rettype instead of the types themselves. Assert
2054 last_structptr_types array has the same number of elements
2055 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2056 argument oldtype and newtype. Instead of handling
2057 just fileptr_type_node specially, handle all builtin_structptr_types
2058 pointer nodes. Formatting fix.
2059
d8b5a1a0
MS
20602019-01-24 Martin Sebor <msebor@redhat.com>
2061
2062 PR c/86125
2063 PR c/88886
2064 PR middle-end/86308
2065 * c-decl.c (match_builtin_function_types): Add arguments.
2066 (diagnose_mismatched_decls): Diagnose mismatched declarations
2067 of built-ins more strictly.
2068
e21c4491
JJ
20692019-01-24 Jakub Jelinek <jakub@redhat.com>
2070
2071 PR c++/88976
2072 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2073 on #pragma omp cancel with different modifiers.
2074
420183d9
L
20752019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2076
2077 PR c/51628
2078 PR c/88664
2079 * c-typeck.c (convert_for_assignment): Upate the
2080 warn_for_address_or_pointer_of_packed_member call.
2081
17ad43dd
TH
20822019-01-16 Tom Honermann <tom@honermann.net>
2083 Jason Merrill <jason@redhat.com>
2084
2085 * c-typeck.c (digest_init): Revised the error message produced for
2086 ill-formed cases of array initialization with a string literal.
2087 (error_init): Make variadic.
2088
5f07d78a
JJ
20892019-01-12 Jakub Jelinek <jakub@redhat.com>
2090
2091 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2092
c4581bbf
JJ
20932019-01-07 Jakub Jelinek <jakub@redhat.com>
2094
2095 PR c/88701
2096 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2097 if current_function_decl is non-NULL.
2098
65c5b1eb
JM
20992019-01-07 Joseph Myers <joseph@codesourcery.com>
2100
2101 PR c/88720
2102 PR c/88726
2103 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2104 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2105 functions declared but never defined only for external scope, not
2106 for other scopes.
2107
d8fcab68
JJ
21082019-01-07 Jakub Jelinek <jakub@redhat.com>
2109
2110 PR c++/85052
2111 * c-parser.c (c_parser_postfix_expression): Parse
2112 __builtin_convertvector.
2113
a5544970
JJ
21142019-01-01 Jakub Jelinek <jakub@redhat.com>
2115
2116 Update copyright years.
2117
da77eace
L
21182018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2119
2120 PR c/51628
2121 * c-typeck.c (convert_for_assignment): Call
2122 warn_for_address_or_pointer_of_packed_member.
2123
1edf8866
SB
21242018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2125
2126 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2127 a more specific error message (instead of just falling through).
2128
db4fd626
SB
21292018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2130
2131 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2132 asm qualifier is first seen; use that to give nicer "duplicate asm
2133 qualifier" messages. Delete 'quals" variable, instead pass the
2134 "is_volatile_ flag to build_asm_stmt directly.
2135 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2136 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2137
9c9cfcbb
SB
21382018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2139
2140 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2141 "done" boolean variable.
2142
a14feb3c
DM
21432018-12-19 David Malcolm <dmalcolm@redhat.com>
2144
2145 PR c++/87504
2146 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2147 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2148 (build_binary_op): Use struct op_location_t and
2149 class binary_op_rich_location.
2150
6d939173
JJ
21512018-12-11 Jakub Jelinek <jakub@redhat.com>
2152
2153 PR sanitizer/88426
2154 * c-convert.c (convert): Call c_fully_fold before calling
2155 ubsan_instrument_float_cast.
2156
b7055028
SB
21572018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2158
2159 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2160 setting "quals".
2161
5b76e75f
SB
21622018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2163
2164 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2165 after asm. Pass a flag for it to build_asm_expr.
2166 * c-tree.h (build_asm_expr): Update declaration.
2167 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2168 set ASM_INLINE_P.
2169
30bd42b9
SB
21702018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2171
2172 PR inline-asm/55681
2173 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2174 combination of volatile and goto, in any order, without repetitions.
2175
9df6c0e4
JB
21762018-12-04 James Norris <jnorris@codesourcery.com>
2177 Cesar Philippidis <cesar@codesourcery.com>
2178 Julian Brown <julian@codesourcery.com>
2179
2180 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2181 code.
2182
f44697b7
RB
21832018-11-30 Richard Biener <rguenther@suse.de>
2184
2185 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2186 _Literal (type) { ... } as empty aggregate or vector constructor.
2187
550dfbdc
MS
21882018-11-29 Martin Sebor <msebor@redhat.com>
2189
2190 PR c/88091
2191 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2192 (convert_arguments): Add comments. Pass additional argument to
2193 the function above.
2194
673670da
MS
21952018-11-29 Martin Sebor <msebor@redhat.com>
2196
2197 PR c/88172
2198 PR testsuite/88208
2199 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2200
db1d09b0
MS
22012018-11-23 Martin Sebor <msebor@redhat.com>
2202
2203 PR testsuite/88098
2204 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2205 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2206
98f08eb8
MS
22072018-11-20 Martin Sebor <msebor@redhat.com>
2208
2209 * c-parser.c (c_parser_has_attribute_expression): New function.
2210 (c_parser_attribute): New function.
2211 (c_parser_attributes): Move code into c_parser_attribute.
2212 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2213
cd5da983
MS
22142018-11-15 Martin Sebor <msebor@redhat.com>
2215
2216 PR c/83656
2217 * c-decl.c (header_for_builtin_fn): Declare.
2218 (diagnose_mismatched_decls): Diagnose declarations of built-in
2219 functions without a prototype.
2220 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2221 (convert_argument): Same.
2222 (convert_arguments): Factor code out into convert_argument.
2223 Detect mismatches between built-in formal arguments in calls
2224 to built-in without prototype.
2225 (build_conditional_expr): Same.
2226 (type_or_builtin_type): New function.
2227 (convert_for_assignment): Add argument. Conditionally issue
2228 warnings instead of errors for mismatches.
2229
620e594b
DM
22302018-11-13 David Malcolm <dmalcolm@redhat.com>
2231
2232 * c-decl.c: Replace "source_location" with "location_t".
2233 * c-tree.h: Likewise.
2234 * c-typeck.c: Likewise.
2235 * gimple-parser.c: Likewise.
2236
3179ebae
JJ
22372018-11-09 Jakub Jelinek <jakub@redhat.com>
2238
81a227c6
JJ
2239 * c-parser.c (c_parser_omp_clause_final): Use
2240 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2241 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2242 parsing instead of c_parser_paren_condition.
2243 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2244 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2245 c_fully_fold instead of c_parser_condition.
2246 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2247 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2248 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2249 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2250 c_parser_expr_no_commas instead of c_parser_expression.
2251
98c91c56
JJ
2252 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2253 reduction clause with inscan modifier.
2254
3179ebae
JJ
2255 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2256 clauses other than atomic_default_mem_order.
2257
28567c40
JJ
22582018-11-08 Jakub Jelinek <jakub@redhat.com>
2259
2260 * c-parser.c: Include memmode.h.
2261 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2262 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2263 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2264 task_reduction clauses.
2265 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2266 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2267 section, or lvalue assignment expression.
2268 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2269 (c_parser_omp_clause_lastprivate): Parse optional
2270 conditional: modifier.
2271 (c_parser_omp_clause_hint): Require constant integer expression rather
2272 than just integer expression.
2273 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2274 clause.
2275 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2276 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2277 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2278 functions.
2279 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2280 iterators. Parse mutexinoutset and depobj kinds.
2281 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2282 callers.
2283 (c_parser_omp_all_clauses): Likewise. Handle
2284 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2285 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2286 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2287 default memory order from requires directive if any. Adjust
2288 c_finish_omp_atomic caller.
2289 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2290 (c_parser_omp_flush): Parse flush with memory-order-clause.
2291 (c_parser_omp_for_loop): Allow NE_EXPR even in
2292 OpenMP loops, adjust c_finish_omp_for caller.
2293 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2294 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2295 Allow to be called while parsing combined parallel master.
2296 Parse combined master taskloop{, simd}.
2297 (c_parser_omp_parallel): Parse combined
2298 parallel master{, taskloop{, simd}} constructs.
2299 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2300 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2301 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2302 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2303 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2304 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2305 around teams body. Use SET_EXPR_LOCATION.
2306 (c_parser_omp_target_data): Allow target data
2307 with only use_device_ptr clauses.
2308 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2309 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2310 (c_parser_omp_requires): New function.
2311 (c_finish_taskloop_clauses): New function.
2312 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2313 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2314 declaration. Disallow in_reduction clause when combined with parallel
2315 master.
2316 (c_parser_omp_construct): Adjust c_parser_omp_master and
2317 c_parser_omp_taskgroup callers.
2318 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2319 other than cancel.
2320 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2321 like OMP_CLAUSE_REDUCTION.
2322 (handle_omp_array_sections): Likewise. Call save_expr on array
2323 reductions before calling build_index_type. Handle depend clauses
2324 with iterators.
2325 (struct c_find_omp_var_s): New type.
2326 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2327 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2328 with static, runtime or auto schedule kinds. Call save_expr for whole
2329 array reduction sizes. Diagnose reductions with zero sized elements
2330 or variable length structures. Diagnose nogroup clause used with
2331 reduction clause(s). Handle depend clause with
2332 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2333 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2334 some different type for other kinds. Use build_unary_op with
2335 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2336 Handle depend clauses with iterators. Remove no longer needed special
2337 case that predetermined const qualified vars may be specified in
2338 firstprivate clause. Complain if const qualified vars are mentioned
2339 in data-sharing clauses other than firstprivate or shared. Use
2340 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2341 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2342 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2343 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2344
7e2de6df
DM
23452018-10-29 David Malcolm <dmalcolm@redhat.com>
2346
2347 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2348 logic for change to name_hint::operator bool.
2349 (undeclared_variable): Likewise.
2350 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2351 (c_parser_parameter_declaration): Likewise.
2352
9f936c86
JM
23532018-10-17 Joseph Myers <joseph@codesourcery.com>
2354
2355 * c-errors.c (pedwarn_c11): New function.
2356 * c-parser.c (disable_extension_diagnostics): Save
2357 warn_c11_c2x_compat and set it to 0.
2358 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2359 (c_parser_static_assert_declaration_no_semi): Handle
2360 _Static_assert without string constant.
2361 * c-tree.h (pedwarn_c11): New prototype.
2362
033eb567
DM
23632018-10-17 David Malcolm <dmalcolm@redhat.com>
2364
2365 * Make-lang.in (selftest-c): New.
2366 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2367 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2368 from gcc/Makefile.in.
2369
0edf3afe
RB
23702018-10-02 Richard Biener <rguenther@suse.de>
2371
2372 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2373
8313a764
JM
23742018-09-26 Joseph Myers <joseph@codesourcery.com>
2375
2376 PR c/87390
2377 * c-typeck.c (build_binary_op): Use excess precision for
2378 comparisons of integers and floating-point for C11 and later.
2379
ce6f0888
MJ
23802018-09-26 Martin Jambor <mjambor@suse.cz>
2381
2382 PR c/87347
2383 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2384 comment.
ce6f0888 2385
9c4a4b3c
DM
23862018-09-17 David Malcolm <dmalcolm@redhat.com>
2387
2388 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2389 Update for new param.
2390 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2391 Likewise.
2392
80c6d1f4
MJ
23932018-09-17 Martin Jambor <mjambor@suse.cz>
2394
2395 PR c/63886
2396 * c-parser.c: (warn_for_abs): New function.
2397 (c_parser_postfix_expression_after_primary): Call it.
2398
4a426e36
BE
23992018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2400
2401 * c-typeck.c (digest_init): Shorten overlength strings.
2402
6d900107
BE
24032018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2404
2405 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2406
b5764229
BE
24072018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2408
2409 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2410 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2411
22eea6b2
AM
24122018-08-30 Alexander Monakov <amonakov@ispras.ru>
2413
2414 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2415 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2416
85204e23
DM
24172018-08-27 David Malcolm <dmalcolm@redhat.com>
2418
2419 PR 87091
2420 * c-decl.c (implicitly_declare): Update call to
2421 maybe_add_include_fixit to suggest overriding the location, as it
2422 is for a note.
2423 * c-objc-common.c (c_tree_printer): Update for conversion of
2424 show_caret_p to a tri-state.
2425
3d78e008
ML
24262018-08-27 Martin Liska <mliska@suse.cz>
2427
2428 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2429 fndecl_built_in_p and remove check for FUNCTION_DECL if
2430 possible.
3d78e008
ML
2431 (diagnose_mismatched_decls): Likewise.
2432 (merge_decls): Likewise.
2433 (warn_if_shadowing): Likewise.
2434 (pushdecl): Likewise.
2435 (implicitly_declare): Likewise.
2436 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2437 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2438 * c-typeck.c (build_function_call_vec): Likewise.
2439 (convert_arguments): Likewise.
2440
097f82ec
DM
24412018-08-20 David Malcolm <dmalcolm@redhat.com>
2442
2443 PR other/84889
2444 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2445 (diagnose_mismatched_decls): Likewise, in various places.
2446 (warn_if_shadowing): Likewise.
2447 (implicit_decl_warning): Likewise.
2448 (implicitly_declare): Likewise.
2449 (undeclared_variable): Likewise.
2450 (declare_label): Likewise.
2451 (grokdeclarator): Likewise.
2452 (start_function): Likewise.
2453 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2454 (c_parser_parameter_declaration): Likewise.
2455 (c_parser_binary_expression): Likewise.
2456 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2457 (parser_build_binary_op): Likewise.
2458 (build_unary_op): Likewise.
2459 (error_init): Likewise.
2460 (pedwarn_init): Likewise.
2461 (warning_init): Likewise.
2462 (convert_for_assignment): Likewise.
2463
96e6ae57
DM
24642018-08-15 David Malcolm <dmalcolm@redhat.com>
2465
2466 * c-objc-common.c: Include "gcc-rich-location.h".
2467 (c_tree_printer): Move implemenation of '%T' to...
2468 (print_type): ...this new function.
2469 (range_label_for_type_mismatch::get_text): New function.
2470 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2471 range for the various ic_argpass cases.
2472 (class maybe_range_label_for_tree_type_mismatch): New class.
2473 (build_binary_op): Use it when calling binary_op_error.
2474
0cd020ae 24752018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2476
0cd020ae
PK
2477 * c-decl.c (start_decl): Do not warn if variables is named as main
2478 and is a local variable.
2479
72733314
IS
24802018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2481
2482 PR c/19315
2483 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2484 objects of unknown size.
2485
23aa9f7c
MS
24862018-08-13 Martin Sebor <msebor@redhat.com>
2487
2488 PR tree-optimization/71625
2489 * c-parser.c (c_parser_declaration_or_fndef): Call
2490 braced_list_to_string.
2491
e5e7e50d
BH
24922018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2493
2494 PR c/86690
2495 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2496 errors.
2497
8a45b051
MS
24982018-08-01 Martin Sebor <msebor@redhat.com>
2499
2500 PR tree-optimization/86650
2501 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2502 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2503
5922dcb5
JJ
25042018-08-01 Jakub Jelinek <jakub@redhat.com>
2505
2506 PR c/85704
2507 * c-typeck.c (init_field_decl_cmp): New function.
2508 (output_pending_init_elements): Use it for field comparisons
2509 instead of pure bit_position comparisons.
2510
9b452033
JJ
25112018-07-12 Jakub Jelinek <jakub@redhat.com>
2512
2513 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2514 type here, instead add "omp declare target implicit" attribute.
2515 (finish_decl): Diagnose vars without mappable type here.
2516
ab20d992
JJ
25172018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2518 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2519 Cesar Philippidis <cesar@codesourcery.com>
2520
2521 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2522 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2523 to their non-present_or_* counterparts. Make 'self' an alias to
2524 PRAGMA_OACC_CLAUSE_HOST.
2525 (c_parser_oacc_data_clause): Update GOMP mappings for
2526 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2527 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2528 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2529 Remove support for present_or_* clauses.
2530 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2531 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2532 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2533 (OACC_DATA_CLAUSE_MASK): Likewise.
2534 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2535 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2536 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2537 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2538 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2539
e197e64e
KV
25402018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2541
2542 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2543 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2544 (c_parser_gimple_unary_expression): Likewise.
2545
487f2f61
JJ
25462018-06-15 Jakub Jelinek <jakub@redhat.com>
2547
2548 PR c/86093
2549 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2550 before doing POINTER_DIFF_EXPR.
2551
e4d44a37
MP
25522018-06-07 Marek Polacek <polacek@redhat.com>
2553
2554 PR c/85318
2555 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2556 for loop initial declarations.
2557
b67b9225
DP
25582018-05-30 David Pagan <dave.pagan@oracle.com>
2559
2560 PR c/55976
2561 * c-decl.c (grokdeclarator): Update check for return type warnings.
2562 (start_function): Likewise.
2563 (finish_function): Likewise.
2564 * c-typeck.c (c_finish_return): Update check for return type warnings.
2565 Pass OPT_Wreturn_type to pedwarn when appropriate.
2566
c566cc9f
RS
25672018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2568
2569 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2570 __FMA_EXPR handlng.
2571
e4f81565
RS
25722018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2573
2574 * gimple-parser.c: Include internal-fn.h.
2575 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2576 (c_parser_gimple_call_internal): New function.
2577 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2578 Fix typos in comment.
2579
79e7b1fe
JJ
25802018-05-10 Jakub Jelinek <jakub@redhat.com>
2581
2582 PR c++/85662
2583 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2584 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2585 fold_convert_loc.
2586 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2587 fold_offsetof_1, pass argtype as TYPE to it and drop the
2588 fold_convert_loc.
2589
f7584c81
DP
25902018-05-02 David Pagan <dave.pagan@oracle.com>
2591
2592 PR c/30552
2593 * c-decl.c (old_style_parameter_scope): New function.
2594 * c-parser.c (c_parser_postfix_expression): Check for statement
2595 expressions in old-style function parameter list declarations.
2596 * c-parser.h (old_style_parameter_scope): New extern declaration.
2597
b33a0cb3
JJ
25982018-04-25 Jakub Jelinek <jakub@redhat.com>
2599
2600 PR sanitizer/84307
2601 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2602 it is not TREE_STATIC.
2603 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2604 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2605 its COMPOUND_LITERAL_EXPR_DECL.
2606
c5c5822a
JM
26072018-03-21 Joseph Myers <joseph@codesourcery.com>
2608
2609 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2610 where all functions return the same _FloatN or _FloatNx type,
2611 treat integer types as _Float64 instead of double.
2612
aa1c9429
JJ
26132018-03-21 Jakub Jelinek <jakub@redhat.com>
2614
2615 PR c/84999
2616 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2617 building vector comparison, diagnose it and return error_mark_node.
2618
9bb45a95
JJ
26192018-03-15 Jakub Jelinek <jakub@redhat.com>
2620
2621 PR c/84853
2622 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2623 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2624 INTEGER_TYPE element type.
2625
ada6bad9
DP
26262018-03-13 David Pagan <dave.pagan@oracle.com>
2627
2628 PR c/46921
2629 * c-typeck.c (output_init_element): Ensure field initializer
2630 expression is always evaluated if there are side effects.
2631
849bbdb9
JJ
26322018-03-06 Jakub Jelinek <jakub@redhat.com>
2633
2634 PR c/84721
2635 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2636 !building_stmt_list_p ().
2637
d74641bd
RS
26382018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2639
2640 PR c/84305
2641 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2642 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2643 and include the BIND_EXPR in the list of things that need to be
2644 pre-evaluated.
2645
0444aa9c
NS
26462018-02-09 Nathan Sidwell <nathan@acm.org>
2647
2648 PR c/84293
2649 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2650 to strict_aliasing_warning.
2651
7c30b12a
PC
26522018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2653
2654 * c-typeck.c (really_start_incremental_init, push_init_level,
2655 set_nonincremental_init, output_init_element, process_init_element):
2656 Use DECL_UNNAMED_BIT_FIELD.
2657
2be4dfcb
MP
26582018-01-31 Marek Polacek <polacek@redhat.com>
2659
2660 PR c/81779
2661 * c-parser.c (c_parser_compound_statement_nostart): Call
2662 expansion_point_location_if_in_system_header.
2663
bb9869d5
DM
26642018-01-17 David Malcolm <dmalcolm@redhat.com>
2665
2666 PR c++/83814
2667 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2668 the C part.
2669
b4923738
JJ
26702018-01-13 Jakub Jelinek <jakub@redhat.com>
2671
2672 PR c/83801
2673 * c-tree.h (decl_constant_value_1): Add a bool argument.
2674 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2675 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2676 (decl_constant_value): Adjust caller.
2677 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2678 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2679 decl_constant_value returns initializer that has BLKmode or
2680 array type.
2681 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2682
928686b1
RS
26832018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2684 Alan Hayward <alan.hayward@arm.com>
2685 David Sherwood <david.sherwood@arm.com>
2686
2687 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2688 TYPE_VECTOR_SUBPARTS.
2689
85ec4feb
JJ
26902018-01-03 Jakub Jelinek <jakub@redhat.com>
2691
2692 Update copyright years.
2693
913884f7
JJ
26942018-01-01 Jakub Jelinek <jakub@redhat.com>
2695
2696 PR c/83595
2697 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2698 c_parser_conditional_expression, c_parser_cast_expression,
2699 c_parser_sizeof_expression, c_parser_alignof_expression,
2700 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2701 c_parser_transaction_expression): Use set_error () method instead
2702 of setting value member to error_mark_node.
2703
c6cfa2bf
MM
27042017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2705
2706 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2707 and _Float<N>X built-in functions.
2708
11d29d63
JJ
27092017-12-22 Jakub Jelinek <jakub@redhat.com>
2710
14ec014e
JJ
2711 PR debug/83550
2712 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2713 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2714 incomplete vars rather than after it.
2715
11d29d63
JJ
2716 PR debug/83547
2717 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2718 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2719 and consider empty ones if there are no other stmts. For
2720 -Wunused-value walk all statements before the one only followed by
2721 DEBUG_BEGIN_STMTs.
2722
170a8bd6 27232017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2724 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2725
2726 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2727 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2728 (c_parser_do_statement): Likewise.
2729 (c_parser_for_statement): Likewise.
2730 (c_parser_statement_after_labels): Adjust calls to above.
2731 (c_parse_pragma_ivdep): New static function.
2732 (c_parser_pragma_unroll): Likewise.
2733 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2734 <PRAGMA_UNROLL>: New case.
2735
01512446
JJ
27362017-12-19 Jakub Jelinek <jakub@redhat.com>
2737
2738 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2739 perform_integral_promotions, digest_init): Replace Yoda conditions
2740 with typical order conditions.
2741 * c-decl.c (check_bitfield_type_and_width): Likewise.
2742
c65e18d3
BE
27432017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2744
2745 * c-typeck.c (c_safe_arg_type_equiv_p,
2746 c_safe_function_type_cast_p): New function.
2747 (build_c_cast): Implement -Wcast-function-type.
2748
b7280579
RB
27492017-12-14 Richard Biener <rguenther@suse.de>
2750
2751 PR c/83415
2752 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2753 like REALPART_EXPR for the behavior of whether its operand
2754 is an lvalue.
2755
49e6a6c0
MP
27562017-12-12 Marek Polacek <polacek@redhat.com>
2757
2758 PR c/82679
2759 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2760
ab20d992 27612017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2762
2763 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2764 * c-parser.c (add_debug_begin_stmt): New.
2765 (c_parser_declaration_or_fndef): Call it.
2766 (c_parser_compound_statement_nostart): Likewise.
2767 (c_parser_statement_after_labels): Likewise.
2768 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2769
4b2b493f
JM
27702017-12-07 Joseph Myers <joseph@codesourcery.com>
2771
2772 * c-decl.c (build_compound_literal): Add parameter alignas_align
2773 and set alignment of decl if nonzero.
2774 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2775 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2776 qualifier.
2777 (c_parser_struct_declaration): Update syntax comment.
2778 (c_parser_type_name): Add alignas_ok argument and pass it to
2779 c_parser_declspecs.
2780 (c_parser_cast_expression): Pass true to c_parser_type_name and
2781 give error if a cast used an _Alignas specifier.
2782 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2783 give error if sizeof (type-name) used an _Alignas specifier.
2784 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2785 give error if _Alignof (type-name) used an _Alignas specifier.
2786 (c_parser_postfix_expression_after_paren_type): Check specified
2787 alignment for a compound literal and pass it to
2788 build_compound_literal.
2789 * c-parser.h (c_parser_type_name): Update prototype.
2790 * c-tree.h (build_compound_literal): Update prototype.
2791
5d9ae53d
MS
27922017-12-07 Martin Sebor <msebor@redhat.com>
2793
2794 PR c/81544
2795 * c-decl.c (c_decl_attributes): Look up existing declaration and
2796 pass it to decl_attributes.
2797
c79144f8
DM
27982017-12-06 David Malcolm <dmalcolm@redhat.com>
2799
2800 PR c/83236
2801 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2802 reserved for use by the implementation.
2803
613bc14f
DM
28042017-12-06 David Malcolm <dmalcolm@redhat.com>
2805
2806 * c-decl.c: Include "c-family/c-spellcheck.h".
2807
05abad4c
ML
28082017-12-05 Martin Liska <mliska@suse.cz>
2809 Jakub Jelinek <jakub@redhat.com>
2810
2811 * c-typeck.c (pointer_diff): Add new argument and instrument
2812 pointer subtraction.
2813 (build_binary_op): Similar for pointer comparison.
2814
cc6534d4
JJ
28152017-12-01 Jakub Jelinek <jakub@redhat.com>
2816
65791f42
JJ
2817 PR c/79153
2818 * c-parser.c: Include tree-iterator.h.
2819 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2820 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2821 on it.
2822
cc6534d4
JJ
2823 PR c/83222
2824 * c-tree.h (decl_constant_value_1): Declare.
2825 * c-typeck.c (decl_constant_value_1): New function.
2826 (decl_constant_value): Use it.
2827 * c-fold.c (c_fully_fold_internal): If in_init, use
2828 decl_constant_value_1 instead of decl_constant_value.
2829
5de73c05
JJ
28302017-11-30 Jakub Jelinek <jakub@redhat.com>
2831
2832 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2833
058f0b9e
JJ
28342017-11-28 Jakub Jelinek <jakub@redhat.com>
2835
2836 PR sanitizer/81275
2837 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2838 c_switch_covers_all_cases_p returns true.
2839
5e9d6aa4 28402017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2841 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2842
2843 * Make-lang.in (c/c-array-notation.o): Remove.
2844 * c-array-notation.c: Delete.
2845 * c-decl.c: Remove cilkplus condition.
2846 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2847 c_parser_cilk_verify_simd, c_parser_array_notation,
2848 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2849 c_parser_cilk_simd_fn_vector_attrs,
2850 c_finish_cilk_simd_fn_tokens): Delete.
2851 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2852 (c_parser_direct_declarator_inner): Ditto.
2853 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2854 (c_parser_attributes, c_parser_compound_statement,
2855 c_parser_statement_after_labels, c_parser_if_statement,
2856 c_parser_switch_statement, c_parser_while_statement,
2857 c_parser_do_statement, c_parser_for_statement,
2858 c_parser_unary_expression, c_parser_postfix_expression,
2859 c_parser_postfix_expression_after_primary,
2860 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2861 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2862 support.
2863 * c-typeck.c (build_array_ref, build_function_call_vec,
2864 convert_arguments,
2865 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2866 c_finish_loop, build_binary_op): Remove cilkplus support.
2867
9e851845
JJ
28682017-11-28 Jakub Jelinek <jakub@redhat.com>
2869
2870 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2871 of build3.
2872
ab20d992 28732017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2874
2875 * Make-lang.in (c.install-plugin): Install backend import library.
2876
41521dee
JJ
28772017-11-23 Jakub Jelinek <jakub@redhat.com>
2878
2879 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2880 pragma_stmt context.
2881
ac9effed
EB
28822017-11-23 Mike Stump <mikestump@comcast.net>
2883 Eric Botcazou <ebotcazou@adacore.com>
2884
2885 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2886 ANNOTATE_EXPR.
2887 (c_parser_do_statement): Likewise.
2888 (c_parser_for_statement): Likewise.
2889
ce95abc4
DM
28902017-11-22 David Malcolm <dmalcolm@redhat.com>
2891
2892 PR c++/62170
2893 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2894 bool to bool *. Within '%T' handling, if showing an "aka", use
2895 "quoted" param to add appropriate quoting.
2896
974aedcc
MP
28972017-11-22 Marek Polacek <polacek@redhat.com>
2898
2899 PR c++/60336
2900 PR middle-end/67239
2901 PR target/68355
2902 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2903
d4300cc6
DM
29042017-11-21 David Malcolm <dmalcolm@redhat.com>
2905
2906 PR c/83056
2907 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2908 earlier failed lookups.
2909
1af4ebf5
MG
29102017-11-21 Marc Glisse <marc.glisse@inria.fr>
2911
2912 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2913 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2914
26edace6
DM
29152017-11-20 David Malcolm <dmalcolm@redhat.com>
2916
2917 PR c/81404
2918 * c-decl.c: Include "c-family/known-headers.h".
2919 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2920 to known-headers.cc.
2921 (class suggest_missing_header): Move to known-header.h.
2922 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2923 than get_c_name_hint.
2924
b1212255
DM
29252017-11-20 David Malcolm <dmalcolm@redhat.com>
2926
2927 * c-decl.c (get_c_name_hint): New function.
2928 (class suggest_missing_header): New class.
2929 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2930 suggest missing headers to the user.
2931
6c7a259b
DM
29322017-11-20 David Malcolm <dmalcolm@redhat.com>
2933
2934 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2935 Include "c-family/name-hint.h"
2936 (implicit_decl_warning): Convert "hint" from
2937 const char * to name_hint. Pass location to
2938 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2939 warning was not printed.
2940 (undeclared_variable): Likewise for "guessed_id".
2941 (lookup_name_fuzzy): Convert return type from const char *
2942 to name_hint. Add location_t param.
2943 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2944 Include "c-family/name-hint.h"
2945 (c_parser_declaration_or_fndef): Convert "hint" from
2946 const char * to name_hint. Pass location to lookup_name_fuzzy.
2947 (c_parser_parameter_declaration): Likewise.
2948
f9c59f7e
JJ
29492017-11-19 Jakub Jelinek <jakub@redhat.com>
2950
2951 PR c/66618
2952 PR c/69960
2953 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2954 where needed.
2955 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2956 handle_omp_array_sections): Likewise.
2957 (digest_init): Don't call decl_constant_value_for_optimization.
2958 * c-tree.h (decl_constant_value_for_optimization): Removed.
2959 * c-fold.c (c_fold_array_ref): New function.
2960 (c_fully_fold_internal): Add LVAL argument, propagate it through
2961 recursive calls. For VAR_P call decl_constant_value and
2962 unshare if not LVAL and either optimizing or IN_INIT. Remove
2963 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2964 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2965 (c_fully_fold): Add LVAL argument, pass it through to
2966 c_fully_fold_internal.
2967 (decl_constant_value_for_optimization): Removed.
2968
3ca0dc60
JM
29692017-11-15 Joseph Myers <joseph@codesourcery.com>
2970
2971 PR c/81156
2972 * c-parser.c (check_tgmath_function): New function.
2973 (enum tgmath_parm_kind): New enum.
2974 (c_parser_postfix_expression): Handle __builtin_tgmath.
2975
64a5912c
DM
29762017-10-31 David Malcolm <dmalcolm@redhat.com>
2977
2978 * c-decl.c (implicit_decl_warning): Update for renaming of
2979 pedwarn_at_rich_loc and warning_at_rich_loc.
2980 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2981 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2982 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2983 (c_parser_struct_or_union_specifier): Likewise for renaming of
2984 pedwarn_at_rich_loc.
2985 (c_parser_parameter_declaration): Likewise for renaming of
2986 error_at_rich_loc.
2987 * c-typeck.c (build_component_ref): Likewise.
2988 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2989 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2990 (set_init_label): Likewise for renaming of error_at_rich_loc.
2991
c1136864
RB
29922017-10-30 Richard Biener <rguenther@suse.de>
2993
2994 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2995 stmts.
2996
ee5fd23a
MM
29972017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2998
2999 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3000 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3001
1a59ccf2
DM
30022017-10-25 David Malcolm <dmalcolm@redhat.com>
3003
3004 PR c/7356
3005 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3006 semicolons.
3007
bc1a75dd
JJ
30082017-10-25 Jakub Jelinek <jakub@redhat.com>
3009
3010 PR libstdc++/81706
3011 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3012 newdecl to corresponding __builtin_ if any.
3013
ff1ff960
PC
30142017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3015
3016 PR c++/82466
3017 * c-decl.c (diagnose_mismatched_decls): Use
3018 OPT_Wbuiltin_declaration_mismatch.
3019
62e1c678
DM
30202017-10-12 David Malcolm <dmalcolm@redhat.com>
3021
3022 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3023 use it to guard calls to maybe_suggest_missing_token_insertion.
3024 (c_parser_parms_list_declarator): Override default value of new
3025 "type_is_unique" param to c_parser_require.
3026 (c_parser_asm_statement): Likewise.
3027 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3028 defaulting to true.
3029
a92f6726
NS
30302017-10-11 Nathan Sidwell <nathan@acm.org>
3031
3032 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3033
8e6cdc90
RS
30342017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3035
3036 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3037 operating on trees as wide_ints.
3038 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3039 (c_tree_equal): Likewise.
3040
8139a48e
DM
30412017-10-04 David Malcolm <dmalcolm@redhat.com>
3042
3043 * c-decl.c (push_parm_decl): Store c_parm's location into the
3044 PARAM_DECL.
3045 (build_c_parm): Add "loc" param and store it within the c_parm.
3046 * c-parser.c (struct c_parser): Add "last_token_location" field.
3047 (c_parser_consume_token): Store location of the token into the
3048 new field.
3049 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3050 when handling a FUNCTION_DECL, if it doesn't already have them.
3051 (c_parser_parameter_declaration): Generate a location for the
3052 parameter, and pass it to the call to build_c_parm.
3053 * c-tree.h (struct c_parm): Add field "loc".
3054 (build_c_parm): Add location_t param.
3055 * c-typeck.c (get_fndecl_argument_location): New function.
3056 (inform_for_arg): New function.
3057 (convert_for_assignment): Use inform_for_arg when dealing with
3058 ic_argpass.
3059
2a389958
JJ
30602017-09-29 Jakub Jelinek <jakub@redhat.com>
3061
7d386d45
JJ
3062 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3063 width is non-NULL.
3064 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3065 don't SET_DECL_C_BIT_FIELD here.
3066
2a389958
JJ
3067 PR c/82340
3068 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3069 instead of trying to set just TREE_READONLY manually.
3070
ebc6a85e
TV
30712017-09-16 Tom de Vries <tom@codesourcery.com>
3072
3073 PR c/81875
3074 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3075 cond itself.
3076
bb75facd
JM
30772017-09-15 Joseph Myers <joseph@codesourcery.com>
3078
3079 PR c/82071
3080 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3081 for C11.
3082 (build_conditional_expr): For C11, generate result with excess
3083 precision when one argument is an integer and the other is of a
3084 type using excess precision.
3085
1d933576
BE
30862017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3087
3088 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3089
267bbb6f
MP
30902017-09-13 Marek Polacek <polacek@redhat.com>
3091
3092 PR c/82167
3093 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3094 than expr.original_type.
3095
6836632e
NS
30962017-09-12 Nathan Sidwell <nathan@acm.org>
3097
3098 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3099 resort_sorted_fields): Moved from c-family/c-common.c.
3100 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3101
e035be33
JM
31022017-09-01 Joseph Myers <joseph@codesourcery.com>
3103
3104 PR c/82071
3105 * c-typeck.c (build_atomic_assign): Handle argument with excess
3106 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3107 argument passed to build_binary_op and convert_for_assignment but
3108 not for call to c_fully_fold.
3109 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3110 Ensure build_binary_op is called with argument with original
3111 semantic type. Avoid calling c_fully_fold with an
3112 EXCESS_PRECISION_EXPR from build_binary_op.
3113
d2e05fcb
JJ
31142017-09-01 Jakub Jelinek <jakub@redhat.com>
3115
3116 PR c/81887
3117 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3118
b397965c
RS
31192017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3120 Alan Hayward <alan.hayward@arm.com>
3121 David Sherwood <david.sherwood@arm.com>
3122
3123 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3124 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3125 m1 and m2 to the signed equivalent of a fixed-point
3126 SCALAR_TYPE_MODE.
3127
14e18d71
DM
31282017-08-24 David Malcolm <dmalcolm@redhat.com>
3129
3130 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3131 than CAN_HAVE_LOCATION_P when determining whether to use the
3132 location_t value within "value".
3133
7f204c0f
DM
31342017-08-21 David Malcolm <dmalcolm@redhat.com>
3135
3136 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3137 rather than peeking the location of the first token.
3138 * c-tree.h (c_expr::get_location): New method.
3139
2f687306
DM
31402017-08-21 David Malcolm <dmalcolm@redhat.com>
3141
3142 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3143 to check_function_arguments.
3144
3e7b80d7
MP
31452017-08-18 Marek Polacek <polacek@redhat.com>
3146
3147 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3148 commentary.
3149
00aa1fa2
L
31502017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3151
3152 PR c/53037
3153 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3154 (check_bitfield_type_and_width): Don't allow bit-field with
3155 warn_if_not_aligned type.
3156
da67acb9
MS
31572017-08-14 Martin Sebor <msebor@redhat.com>
3158
3159 PR c/81117
3160 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3161
bb85aa74
MP
31622017-08-11 Marek Polacek <polacek@redhat.com>
3163
3164 PR c/81795
3165 * c-decl.c (pushtag): Only print inform if the warning was printed.
3166 (grokdeclarator): Likewise.
3167
32129a17
DM
31682017-08-10 David Malcolm <dmalcolm@redhat.com>
3169
3170 * c-parser.c (c_parser_error): Rename to...
3171 (c_parser_error_richloc): ...this, making static, and adding
3172 "richloc" parameter, passing it to the c_parse_error call,
3173 rather than calling c_parser_set_source_position_from_token.
3174 (c_parser_error): Reintroduce, reimplementing in terms of the
3175 above, converting return type from void to bool.
3176 (class token_pair): New class.
3177 (struct matching_paren_traits): New struct.
3178 (matching_parens): New typedef.
3179 (struct matching_brace_traits): New struct.
3180 (matching_braces): New typedef.
3181 (get_matching_symbol): New function.
3182 (c_parser_require): Add param MATCHING_LOCATION, using it to
3183 highlight matching "opening" tokens for missing "closing" tokens.
3184 (c_parser_skip_until_found): Likewise.
3185 (c_parser_static_assert_declaration_no_semi): Convert explicit
3186 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3187 class matching_parens, so that the pertinent open parenthesis is
3188 highlighted when there are problems locating the close
3189 parenthesis.
3190 (c_parser_struct_or_union_specifier): Likewise.
3191 (c_parser_typeof_specifier): Likewise.
3192 (c_parser_alignas_specifier): Likewise.
3193 (c_parser_simple_asm_expr): Likewise.
3194 (c_parser_braced_init): Likewise, for matching_braces.
3195 (c_parser_paren_condition): Likewise, for matching_parens.
3196 (c_parser_switch_statement): Likewise.
3197 (c_parser_for_statement): Likewise.
3198 (c_parser_asm_statement): Likewise.
3199 (c_parser_asm_operands): Likewise.
3200 (c_parser_cast_expression): Likewise.
3201 (c_parser_sizeof_expression): Likewise.
3202 (c_parser_alignof_expression): Likewise.
3203 (c_parser_generic_selection): Likewise.
3204 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3205 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3206 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3207 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3208 c_parser_skip_until_found call.
3209 (c_parser_objc_class_definition): Use class matching_parens as
3210 above.
3211 (c_parser_objc_method_decl): Likewise.
3212 (c_parser_objc_try_catch_finally_statement): Likewise.
3213 (c_parser_objc_synchronized_statement): Likewise.
3214 (c_parser_objc_at_property_declaration): Likewise.
3215 (c_parser_oacc_wait_list): Likewise.
3216 (c_parser_omp_var_list_parens): Likewise.
3217 (c_parser_omp_clause_collapse): Likewise.
3218 (c_parser_omp_clause_default): Likewise.
3219 (c_parser_omp_clause_if): Likewise.
3220 (c_parser_omp_clause_num_threads): Likewise.
3221 (c_parser_omp_clause_num_tasks): Likewise.
3222 (c_parser_omp_clause_grainsize): Likewise.
3223 (c_parser_omp_clause_priority): Likewise.
3224 (c_parser_omp_clause_hint): Likewise.
3225 (c_parser_omp_clause_defaultmap): Likewise.
3226 (c_parser_oacc_single_int_clause): Likewise.
3227 (c_parser_omp_clause_ordered): Likewise.
3228 (c_parser_omp_clause_reduction): Likewise.
3229 (c_parser_omp_clause_schedule): Likewise.
3230 (c_parser_omp_clause_num_teams): Likewise.
3231 (c_parser_omp_clause_thread_limit): Likewise.
3232 (c_parser_omp_clause_aligned): Likewise.
3233 (c_parser_omp_clause_linear): Likewise.
3234 (c_parser_omp_clause_safelen): Likewise.
3235 (c_parser_omp_clause_simdlen): Likewise.
3236 (c_parser_omp_clause_depend): Likewise.
3237 (c_parser_omp_clause_map): Likewise.
3238 (c_parser_omp_clause_device): Likewise.
3239 (c_parser_omp_clause_dist_schedule): Likewise.
3240 (c_parser_omp_clause_proc_bind): Likewise.
3241 (c_parser_omp_clause_uniform): Likewise.
3242 (c_parser_omp_for_loop): Likewise.
3243 (c_parser_cilk_clause_vectorlength): Likewise.
3244 (c_parser_cilk_clause_linear): Likewise.
3245 (c_parser_transaction_expression): Likewise.
3246 * c-parser.h (c_parser_require): Add param matching_location with
3247 default UNKNOWN_LOCATION.
3248 (c_parser_error): Convert return type from void to bool.
3249 (c_parser_skip_until_found): Add param matching_location with
3250 default UNKNOWN_LOCATION.
3251
30af3a2b
MP
32522017-08-09 Marek Polacek <polacek@redhat.com>
3253
3254 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3255 * c-tree.h (build_external_ref): Update declaration.
3256 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3257 (build_external_ref): Change the type of a parameter to bool.
3258 (parser_build_binary_op): Use true/false instead of 1/0.
3259 (pointer_diff): Likewise.
3260 (build_modify_expr): Likewise.
3261 (set_designator): Change the type of a parameter to bool.
3262 (set_init_index): Use true/false instead of 1/0.
3263 (set_init_label): Likewise.
3264 (output_init_element): Change the type of a parameter to bool.
3265 (output_pending_init_elements): Use true/false instead of 1/0.
3266 (process_init_element): Likewise.
3267 (build_binary_op): Change the type of a parameter to bool.
3268
296c53ac
MP
32692017-08-09 Marek Polacek <polacek@redhat.com>
3270
3271 PR c/81233
3272 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3273 Call emit_diagnostic_valist instead of pedwarn.
3274 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3275 Print the relevant types in diagnostics.
3276
a32c8316
MP
32772017-08-09 Marek Polacek <polacek@redhat.com>
3278
3279 PR c/81417
3280 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3281 build_conditional_expr.
a32c8316
MP
3282 * c-parser.c (c_parser_conditional_expression): Create locations for
3283 EXP1 and EXP2 from their source ranges. Pass the locations down to
3284 build_conditional_expr.
3285 * c-tree.h (build_conditional_expr): Update declaration.
3286 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3287 For -Wsign-compare, also print the types.
3288
314e6352
ML
32892017-08-08 Martin Liska <mliska@suse.cz>
3290
3291 * c-convert.c: Include header files.
3292 * c-typeck.c: Likewise.
3293
577eec56
ML
32942017-08-07 Martin Liska <mliska@suse.cz>
3295
3296 * c-parser.c (c_parser_attributes): Canonicalize name of an
3297 attribute.
3298
f7b6353a
MP
32992017-08-02 Marek Polacek <polacek@redhat.com>
3300
3301 PR c/81289
3302 * c-parser.c (c_parser_unary_expression): Use set_error.
3303
8a6eab34
MP
3304 PR c/81448
3305 PR c/81306
3306 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3307 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3308
ab20d992 33092017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3310 Martin Liska <mliska@suse.cz>
3311
3312 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3313 statement.
7fef86d3 3314
f34ebeb2
ML
33152017-07-31 Martin Liska <mliska@suse.cz>
3316
3317 PR sanitize/81530
3318 * c-convert.c (convert): Guard condition with flag_sanitize_p
3319 also with current_function_decl non-null equality.
3320 * c-decl.c (grokdeclarator): Likewise.
3321 * c-typeck.c (build_binary_op): Likewise.
3322
8595f67b
MP
33232017-07-25 Marek Polacek <polacek@redhat.com>
3324
3325 * c-decl.c (grokfield): Remove local variable.
3326
d49718d6
MP
33272017-07-25 Marek Polacek <polacek@redhat.com>
3328
3329 PR c/81364
3330 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3331 macro expansion if the body is in { }.
3332 (c_parser_while_statement): Likewise.
3333 (c_parser_for_statement): Likewise.
3334
ff22eb12
NS
33352017-07-18 Nathan Sidwell <nathan@acm.org>
3336
3337 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3338
eea77d1f
DM
33392017-07-14 David Malcolm <dmalcolm@redhat.com>
3340
3341 * c-decl.c (implicitly_declare): When suggesting a missing
3342 #include, provide a fix-it hint.
3343
b6f43128
DM
33442017-07-06 David Malcolm <dmalcolm@redhat.com>
3345
3346 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3347 and call that instead.
3348 * c-tree.h (selftest::run_c_tests): New decl.
3349
3e2becc4
MP
33502017-06-26 Marek Polacek <polacek@redhat.com>
3351
3352 PR c/80116
3353 * c-parser.c (c_parser_if_body): Set the location of the
3354 body of the conditional after parsing all the labels. Call
3355 warn_for_multistatement_macros.
3356 (c_parser_else_body): Likewise.
3357 (c_parser_switch_statement): Likewise.
3358 (c_parser_while_statement): Likewise.
3359 (c_parser_for_statement): Likewise.
3360 (c_parser_statement): Add a default argument. Save the location
3361 after labels have been parsed.
3362 (c_parser_c99_block_statement): Likewise.
3363
343ae898
RB
33642017-06-19 Richard Biener <rguenther@suse.de>
3365
3366 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3367 negated _Literals to parse _Literal (int) -1.
3368
45b2222a
ML
33692017-06-13 Martin Liska <mliska@suse.cz>
3370
3371 PR sanitize/78204
3372 * c-convert.c (convert): Use sanitize_flags_p.
3373 * c-decl.c (grokdeclarator): Likewise.
3374 * c-typeck.c (convert_for_assignment): Likewise.
3375 (c_finish_return): Likewise.
3376 (build_binary_op): Likewise.
3377
8ab7005b
JJ
33782017-06-08 Jakub Jelinek <jakub@redhat.com>
3379
3380 PR c/81006
3381 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3382 to sizetype before size_binop.
3383
363dc72c
JJ
33842017-06-07 Jakub Jelinek <jakub@redhat.com>
3385
3386 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3387 of TDI_generic.
3388
dc949728
MP
33892017-06-06 Marek Polacek <polacek@redhat.com>
3390
3391 PR c/79983
3392 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3393 ref.
3394 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3395
40ffd95f
BE
33962017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3397
3398 * c-parser.c (c_parser_binary_expression): Implement the
3399 -Wsizeof_pointer_div warning.
3400 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3401 from a parenthesized expression.
3402 (c_parser_expr_list): Use c_last_sizeof_loc.
3403 * c-tree.h (c_last_sizeof_loc): New external.
3404 * c-typeck.c (c_last_sizeof_loc): New variable.
3405 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3406
9fc5e7a4
MM
34072017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3408
3409 PR testsuite/80580
3410 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3411
f012c8ef
DM
34122017-05-30 David Malcolm <dmalcolm@redhat.com>
3413
3414 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3415 parameters.
3416
3cd211af
MS
34172017-05-24 Martin Sebor <msebor@redhat.com>
3418
3419 PR c/80731
3420 * c-fold.c (c_fully_fold_internal): Adjust.
3421 * c-typeck.c (parser_build_unary_op): Adjust.
3422
fd71a9a2
TS
34232017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3424
3425 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3426 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3427 "VECTOR_LENGTH".
3428
92fa0f9e
MP
34292017-05-23 Marek Polacek <polacek@redhat.com>
3430
3431 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3432 quotes.
3433
d11c168a
JJ
34342017-05-22 Jakub Jelinek <jakub@redhat.com>
3435
3436 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3437 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3438 it returned invariant. Call tree_invariant_p unconditionally
3439 afterwards to decide whether to return expr or op0.
3440
58aca9d9
NS
34412017-05-22 Nathan Sidwell <nathan@acm.org>
3442
3443 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3444
7fd549d2
TS
34452017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3446
3447 * c-parser.c (c_parser_omp_clause_default): Handle
3448 "OMP_CLAUSE_DEFAULT_PRESENT".
3449
6ecd2339
BE
34502017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3451
3452 * config-lang.in (gtfiles): Add c-family/c-format.c.
3453
8a57ecff
NS
34542017-05-18 Nathan Sidwell <nathan@acm.org>
3455
3456 * c-decl.c (pushdecl_top_level): Delete unused function.
3457
6574d78e
MP
34582017-05-18 Marek Polacek <polacek@redhat.com>
3459
3460 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3461 (check_earlier_gotos): Likewise.
3462 (define_label): Likewise.
3463 (pending_xref_error): Likewise.
3464 (smallest_type_quals_location): Likewise.
3465 (grokdeclarator): Likewise.
3466 (grokparms): Likewise.
3467 (identifier_global_value): Likewise.
3468 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3469 (find_init_member): Likewise.
3470
e3455240
MP
34712017-05-18 Marek Polacek <polacek@redhat.com>
3472
3473 * c-decl.c (start_decl): Use false/true instead of 0/1.
3474 (grokdeclarator): Likewise.
3475 (finish_struct): Likewise.
3476 (start_function): Change the return type to bool. Use false/true
3477 instead of 0/1.
3478 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3479 * c-tree.h (start_function): Update.
3480 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3481 (set_designator): Change the return type to bool. Use false/true
3482 instead of 0/1.
3483
3fa8871b
MP
34842017-05-17 Marek Polacek <polacek@redhat.com>
3485
3486 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3487 * c-typeck.c: Likewise.
3488
142473df
MP
34892017-05-17 Marek Polacek <polacek@redhat.com>
3490
3491 PR sanitizer/80659
3492 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3493 DECL_IGNORED_P even for non-static compound literals.
3494
1a817418
ML
34952017-05-17 Martin Liska <mliska@suse.cz>
3496
3497 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3498 use it instead of int type.
3499
b2fa0a8b
MP
35002017-05-17 Marek Polacek <polacek@redhat.com>
3501
3502 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3503 call c_fully_fold.
3504 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3505 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3506 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3507 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3508 save_expr.
3509 (c_parser_conditional_expression): Likewise.
3510 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3511 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3512 (process_init_element): Likewise.
3513 (build_binary_op): Likewise.
3514 (handle_omp_array_sections_1): Likewise.
3515
1e47f02b
TS
35162017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3517
3518 * c-parser.c (c_parser_omp_clause_num_gangs)
3519 (c_parser_omp_clause_num_workers)
3520 (c_parser_omp_clause_vector_length): Merge functions into...
3521 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3522 all users.
3523
c24e924f
NS
35242017-05-11 Nathan Sidwell <nathan@acm.org>
3525
3526 * gimple-parser.c: Don't #include tree-dump.h.
3527
c587104e
MM
35282017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3529
3530 PR testsuite/80580
3531 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3532
67ac9a9d
MM
35332017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3534
3535 PR testsuite/80580
3536 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3537 incorrect __MEM syntax.
3538
ac4eb40f
MM
35392017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3540
3541 PR testsuite/80580
3542 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3543 type of unary '*'.
3544
641da50a
NS
35452017-05-09 Nathan Sidwell <nathan@acm.org>
3546
3547 * c-tree.h (pushdecl): Declare.
3548
56d35585
DM
35492017-05-05 David Malcolm <dmalcolm@redhat.com>
3550
3551 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3552 with diagnostic_report_diagnostic.
3553 * c-errors.c (pedwarn_c99): Likewise.
3554 (pedwarn_c90): Likewise.
3555
815d9cc6
XR
35562017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3557
92a285c1 3558 PR c++/80038
815d9cc6
XR
3559 * c-gimplify.c (c_gimplify_expr): Remove calls to
3560 cilk_gimplifY_call_params_in_spawned_fn.
3561
1c4ea66f
DM
35622017-04-25 David Malcolm <dmalcolm@redhat.com>
3563
3564 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3565 hint for removing extra semicolon.
3566
666f7903
JJ
35672017-04-21 Jakub Jelinek <jakub@redhat.com>
3568
3569 PR c/80468
3570 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3571 enabled, set specs->type to integer_type_node.
3572
5764ee3c
JW
35732017-04-03 Jonathan Wakely <jwakely@redhat.com>
3574
3575 * c-array-notation.c: Fix typo in comment.
3576
10fa8dfb
MP
35772017-03-29 Marek Polacek <polacek@redhat.com>
3578
3579 PR c/79730
3580 * c-decl.c (finish_decl): Check VAR_P.
3581
a9e4a1a5
JJ
35822017-03-27 Jakub Jelinek <jakub@redhat.com>
3583
3584 PR middle-end/80162
3585 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3586 * c-typeck.c (c_mark_addressable): Likewise. Look through
3587 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3588 to ARRAY_TYPE.
3589 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3590
ee3ff394
MP
35912017-03-23 Marek Polacek <polacek@redhat.com>
3592
3593 * c-tree.h: Remove a C_RID_YYCODE reference.
3594
4d1b8e70
JJ
35952017-03-21 Jakub Jelinek <jakub@redhat.com>
3596
3597 PR c/80097
3598 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3599 optional COMPOUND_EXPR with ubsan instrumentation.
3600
31dc71a8
MP
36012017-03-17 Marek Polacek <polacek@redhat.com>
3602
3603 * c-parser.c: Add C11 references.
3604
d579c385
MP
36052017-03-15 Marek Polacek <polacek@redhat.com>
3606
3607 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3608
85059a38
MP
36092017-03-11 Marek Polacek <polacek@redhat.com>
3610
3611 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3612
2f6f187a
DM
36132017-03-10 David Malcolm <dmalcolm@redhat.com>
3614
3615 PR translation/79848
3616 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3617 "%qs".
3618 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3619
36618428
MP
36202017-03-09 Marek Polacek <polacek@redhat.com>
3621
3622 PR sanitizer/79757
3623 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3624 parameter declarations with initializers.
3625
01e5af5a
JJ
36262017-03-09 Jakub Jelinek <jakub@redhat.com>
3627
3628 PR c/79969
3629 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3630 TYPE_STUB_DECL.
3631
a71dbc63
JJ
36322017-03-07 Jakub Jelinek <jakub@redhat.com>
3633
3634 PR c/79834
3635 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3636 for "may only be used in compound statements" diagnostics, change it
3637 such that the same translatable string is used for all pragmas. For
3638 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3639 diagnostics.
3640 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3641 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3642 "may only be used in compound statements" diagnostics, such that the
3643 same translatable string is used for all pragmas.
3644
1ff4bae6
MP
36452017-03-04 Marek Polacek <polacek@redhat.com>
3646
3647 PR c/79847
3648 * c-decl.c (implicit_decl_warning): Add missing space.
3649
7f5a7d78
MP
36502017-03-03 Marek Polacek <polacek@redhat.com>
3651
3652 PR c/79758
3653 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3654 current_function_prototype_arg_types is error_mark_node. Fix
3655 formatting. Use TREE_VALUE instead of TREE_TYPE.
3656
883c8f06
JJ
36572017-03-03 Jakub Jelinek <jakub@redhat.com>
3658
79c9b7a8
JJ
3659 PR c/79837
3660 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3661 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3662 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3663 diagnostics.
3664
883c8f06
JJ
3665 PR c/79836
3666 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3667 instead of %<_Generic>.
3668 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3669 (c_parser_omp_target_exit_data): Use %<release%> instead of
3670 %<release>.
3671
324ff1a0
JJ
36722017-02-28 Jakub Jelinek <jakub@redhat.com>
3673
3674 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3675 instead of just cond ? "..." : "...".
3676 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3677 for "enter"/"exit" keyword.
3678 (c_finish_oacc_routine): Don't use %s to supply portions of the
3679 message.
3680
4227c9ad
JJ
36812017-02-24 Jakub Jelinek <jakub@redhat.com>
3682
3683 PR c++/79588
3684 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3685 handle -Wrestrict here.
3686 * c-typeck.c (build_function_call_vec): Adjust
3687 check_function_arguments caller.
3688
5d972e66
RB
36892017-02-23 Richard Biener <rguenther@suse.de>
3690
3691 PR c/79684
3692 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3693 to initialize c_exprs to return.
3694 (c_parser_gimple_binary_expression): Likewise.
3695 (c_parser_gimple_unary_expression): Likewise.
3696 (c_parser_gimple_postfix_expression): Likewise.
3697
61ac5ebe
MP
36982017-02-22 Marek Polacek <polacek@redhat.com>
3699
3700 PR c/79662
3701 * c-typeck.c (convert_arguments): Handle error_mark_node.
3702
41d1b0b1
PK
37032017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3704
3705 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3706 value of c_parser_parse_ssa_name against error_mark_node and emit
3707 error if ssa name is anonymous and written as default definition.
3708
eab1f169
PK
37092017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3710
3711 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3712 FMA_EXPR.
3713
bcac0b4d
JJ
37142017-02-16 Jakub Jelinek <jakub@redhat.com>
3715
3716 PR c++/79512
3717 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3718 ignore #pragma omp target even when not followed by identifier.
3719
1be33173
PK
37202017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3721
3722 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3723 (c_parser_gimple_unary_expression): Likewise.
3724
aa326bfb
JJ
37252017-02-13 Jakub Jelinek <jakub@redhat.com>
3726
3727 * c-parser.c (c_parser_oacc_declare): Add missing space in
3728 diagnostics.
3729
8a398bc5
PK
37302017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3731
3732 PR c/79478
3733 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3734 set_c_expr_source_range when parsing ssa-name.
3735
3dcde5ef 37362017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3737 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3738
3739 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3740 building IL when arguments are error_mark_node.
3741 (c_parser_gimple_unary_expression): Likewise.
3742 (c_parser_gimple_if_stmt): Likewise.
3743 (c_parser_gimple_switch_stmt): Likewise.
3744 (c_parser_gimple_return_stmt): Likewise.
3745 (c_parser_parse_ssa_name): When name lookup fails do not build
3746 an SSA name. Use undeclared rather than not declared in error
3747 reporting.
3748
192b048b
MP
37492017-02-09 Marek Polacek <polacek@redhat.com>
3750
3751 PR c/79428
3752 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3753 instead of c_parser_skip_until_found.
3754
56f71478
JJ
37552017-02-09 Jakub Jelinek <jakub@redhat.com>
3756
3757 PR c/79431
3758 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3759 symtab_node::get on automatic variables.
3760
02889d23
CLT
37612016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3762 Chung-Lin Tang <cltang@codesourcery.com>
3763
3764 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3765 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3766 semantic checking.
3767 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3768
7af4b20d
RB
37692017-02-07 Richard Biener <rguenther@suse.de>
3770
3771 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3772 (c_parser_gimple_postfix_expression_after_primary):
3773 Do not use c_build_function_call_vec to avoid folding and promotion.
3774 Simplify.
3775
e5e391d6
MO
37762017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3777
3778 PR lto/79061
3779 * c-decl.c (pop_scope): Pass main_input_filename to
3780 build_translation_unit_decl.
3781
c2e84327
DM
37822017-01-24 David Malcolm <dmalcolm@redhat.com>
3783
3784 * c-parser.c: Include "read-rtl-function.h" and
3785 "run-rtl-passes.h".
3786 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3787 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3788 production. Update for renaming of field "gimple_pass" to
3789 "gimple_or_rtl_pass". If __RTL was seen, call
3790 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3791 to an auto_timevar, to cope with early exit.
3792 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3793 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3794 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3795 Handle RID_RTL.
3796 (c_parser_parse_rtl_body): New function.
3797 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3798 (struct c_declspecs): Rename field "gimple_pass" to
3799 "gimple_or_rtl_pass". Add field "rtl_p".
3800 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3801 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3802 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3803 (c_parser_gimple_or_rtl_pass_list): ...this.
3804
2ebd93e1
MP
38052017-01-20 Marek Polacek <polacek@redhat.com>
3806
3807 PR c/64279
3808 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3809
b1c95bb5
RB
38102017-01-13 Richard Biener <rguenther@suse.de>
3811
3812 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3813 nops.
3814
25329913
RB
38152017-01-13 Richard Biener <rguenther@suse.de>
3816
3817 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3818 _Literal ( type-name ) number.
3819
6bb4ea5c
RB
38202017-01-12 Richard Biener <rguenther@suse.de>
3821
3822 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3823 __MEM.
3824
6b5b4e9c
JJ
38252017-01-11 Jakub Jelinek <jakub@redhat.com>
3826
3827 PR c++/72813
3828 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3829 PCH file.
3830
e3252775
RB
38312017-01-11 Richard Biener <rguenther@suse.de>
3832
3833 PR bootstrap/79052
3834 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3835 returns on parse errors.
3836
a9342885
MP
38372017-01-04 Marek Polacek <polacek@redhat.com>
3838
3839 PR c++/64767
3840 * c-parser.c (c_parser_postfix_expression): Mark zero character
3841 constants by setting original_type in c_expr.
3842 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3843 with a zero character constant.
3844 (char_type_p): New function.
3845
5dd9a9d0
DM
38462017-01-04 David Malcolm <dmalcolm@redhat.com>
3847
3848 * c-parser.c (c_parser_declaration_or_fndef): Create a
3849 rich_location at init_loc and parse it to start_init.
3850 (last_init_list_comma): New global.
3851 (c_parser_braced_init): Update last_init_list_comma when parsing
3852 commas. Pass it to pop_init_level. Pass location of closing
3853 brace to pop_init_level.
3854 (c_parser_postfix_expression_after_paren_type): Create a
3855 rich_location at type_loc and parse it to start_init.
3856 (c_parser_omp_declare_reduction): Likewise for loc.
3857 * c-tree.h (start_init): Add rich_location * param.
3858 (pop_init_level): Add location_t param.
3859 * c-typeck.c (struct initializer_stack): Add field
3860 "missing_brace_richloc".
3861 (start_init): Add richloc param, use it to initialize
3862 the stack node's missing_brace_richloc.
3863 (last_init_list_comma): New decl.
3864 (finish_implicit_inits): Pass last_init_list_comma to
3865 pop_init_level.
3866 (push_init_level): When finding missing open braces, add fix-it
3867 hints to the richloc.
3868 (pop_init_level): Add "insert_before" param and pass it
3869 when calling pop_init_level. Add fixits about missing
3870 close braces to any richloc. Use the richloc for the
3871 -Wmissing-braces warning.
3872 (set_designator): Pass last_init_list_comma to pop_init_level.
3873 (process_init_element): Likewise.
3874
cbe34bb5
JJ
38752017-01-01 Jakub Jelinek <jakub@redhat.com>
3876
3877 Update copyright years.
3878
d17680f3
JJ
38792016-12-21 Jakub Jelinek <jakub@redhat.com>
3880
0dba7960
JJ
3881 PR bootstrap/78817
3882 * c-typeck.c (build_function_call_vec): If check_function_arguments
3883 returns true, set TREE_NO_WARNING on CALL_EXPR.
3884
d17680f3
JJ
3885 PR c/77767
3886 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3887 to *expr instead of overwriting it.
3888
aa90531e
RB
38892016-12-20 Richard Biener <rguenther@suse.de>
3890
3891 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3892 error recovery.
3893 (c_parser_gimple_statement): Only build assigns for non-error
3894 stmts.
3895 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3896
629b3d75
MJ
38972016-12-14 Martin Jambor <mjambor@suse.cz>
3898
3899 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3900 omp-low.h.
3901 (c_finish_oacc_routine): Adjusted call to
3902 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3903 to use their new names.
3904 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3905 use its new name.
3906 (c_parser_oacc_update): Likewise.
3907 (c_parser_omp_simd): Likewise.
3908 (c_parser_omp_target_update): Likewise.
3909 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3910 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3911 name.
3912 (c_finish_omp_cancellation_point): Likewise.
3913 * gimple-parser.c: Do not include omp-low.h
3914
c5af52eb
CP
39152016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3916 James Norris <jnorris@codesourcery.com>
3917
3918 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3919 EXIT_DATA,WAIT} are not used in compound statements.
3920 (c_parser_oacc_enter_exit_data): Update diagnostics.
3921
48330c93
BE
39222016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3923
3924 PR c++/71973
3925 * c-decl.c (diagnose_mismatched_decls): Use
3926 OPT_Wbuiltin_declaration_mismatch here too.
3927
899ca90e 39282016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3929 Alan Hayward <alan.hayward@arm.com>
3930 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3931
3932 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3933 (make_label, finish_struct): Likewise.
3934
1ee62b92 39352016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3936 Richard Biener <rguenther@suse.de>
22b15758 3937
8e745a17
JJ
3938 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3939 * config-lang.in (gtfiles): Add c/c-parser.h.
3940 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3941 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3942 * c-parser.c (enum c_id_kind, struct c_token,
3943 c_parser_next_token_is, c_parser_next_token_is_not,
3944 c_parser_next_token_is_keyword,
3945 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3946 Split out to ...
3947 * c-parser.h: ... new header.
3948 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3949 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3950 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3951 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3952 c_parser_error, c_parser_require, c_parser_skip_until_found,
3953 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3954 c_parser_type_name): Export.
3955 (c_parser_tokens_buf): New function.
3956 (c_parser_error): Likewise.
3957 (c_parser_set_error): Likewise.
3958 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3959 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3960 via c_parser_parse_gimple_body.
8e745a17
JJ
3961 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3962 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3963 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3964 c_parser_error, c_parser_require, c_parser_skip_until_found,
3965 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3966 c_parser_type_name): Declare.
1ee62b92
PG
3967 (struct c_parser): Declare forward.
3968 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3969 (c_parser_error): Likewise.
3970 (c_parser_set_error): Likewise.
3971 * gimple-parser.c: New file.
3972 * gimple-parser.h: Likewise.
1ee62b92 3973
22b15758
UB
39742016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3975
3976 PR c/35503
3977 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3978 warn_for_restrict.
3979
84ff4775
LCW
39802016-09-11 Le-Chun Wu <lcwu@google.com>
3981 Mark Wielaard <mjw@redhat.com>
3982
3983 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3984 to the given -Wshadow= variant.
3985
4d0cdd0c
TP
39862016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3987
3988 * c-typeck.c: Include memmodel.h.
3989
1202f33e
JJ
39902016-10-13 Jakub Jelinek <jakub@redhat.com>
3991
3992 PR target/77957
3993 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3994 instead of lhd_return_null_tree_v.
3995
8a14afd0
BS
39962016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3997
3998 PR c++/69733
3999 * c-decl.c (smallest_type_quals_location): New static function.
4000 (grokdeclarator): Try to find the correct location for an ignored
4001 qualifier.
4002
81fea426
MP
40032016-09-26 Marek Polacek <polacek@redhat.com>
4004
4005 PR c/7652
4006 * c-decl.c (pop_scope): Add gcc_fallthrough.
4007
40082016-09-26 Marek Polacek <polacek@redhat.com>
4009
4010 PR c/7652
4011 * c-parser.c (struct c_token): Add flags field.
4012 (c_lex_one_token): Pass it to c_lex_with_flags.
4013 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4014 into IFN_FALLTHROUGH.
4015 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4016 attribute fallthrough after a case label or default label.
4017 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4018
9a2300e9
MP
40192016-09-24 Marek Polacek <polacek@redhat.com>
4020
4021 PR c/77490
4022 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4023 have boolean value. Warn about ++/-- on booleans.
4024
7de76362
JJ
40252016-09-23 Jakub Jelinek <jakub@redhat.com>
4026
4027 * c-parser.c (incomplete_record_decls): Remove unnecessary
4028 = vNULL initialization of file scope vec.
4029
5b73d2ab
MP
40302016-09-16 Marek Polacek <polacek@redhat.com>
4031
4032 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4033
e51fbec3
MP
40342016-09-14 Marek Polacek <polacek@redhat.com>
4035
4036 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4037 (fix_array_notation_expr): Likewise.
4038 * c-decl.c (finish_decl): Likewise.
4039 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4040 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4041 (function_to_pointer_conversion): Use false instead of 0.
4042 (convert_lvalue_to_rvalue): Likewise.
4043 (parser_build_unary_op): Likewise.
4044 (build_atomic_assign): Likewise.
4045 (build_unary_op): Change nonconvert parameter type to bool, use
4046 true/false instead of 1/0.
4047 (build_binary_op): Use true instead of 1.
4048
254830ba
DM
40492016-09-13 David Malcolm <dmalcolm@redhat.com>
4050
4051 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4052 of add_fixit_insert to add_fixit_insert_before.
4053
4c13ba17
MP
40542016-09-13 Marek Polacek <polacek@redhat.com>
4055
4056 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4057 it.
4058
54dcdb88
BE
40592016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4060
4061 PR c++/77496
4062 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4063 COMPOUND_EXPR to warn_for_omitted_condop.
4064
e5106e27
DM
40652016-09-07 David Malcolm <dmalcolm@redhat.com>
4066
4067 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4068 c_get_substring_location for this new langhook.
4069
9dc5773f
JJ
40702016-09-02 Jakub Jelinek <jakub@redhat.com>
4071
4072 PR c/65467
4073 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4074 flag_openmp.
4075 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4076 instead of mark_exp_read on low_bound/length expression.
4077 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4078 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4079 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4080 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4081 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4082 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4083 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4084 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4085 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4086 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4087 instead of mark_expr_read.
4088 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4089 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4090 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4091 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4092 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4093 array section bases outside of depend clause, for depend clause
4094 use convert_lvalue_to_rvalue on the base.
4095 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4096 linear, aligned, map, to and from clauses.
4097 (c_omp_clause_copy_ctor): New function.
4098
295844f6
MP
40992016-09-01 Marek Polacek <polacek@redhat.com>
4100
4101 PR c/7652
4102 * c-typeck.c (composite_type): Add FALLTHRU comment.
4103
089af25c
DM
41042016-08-31 David Malcolm <dmalcolm@redhat.com>
4105
4106 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4107 to the insertion fixits for "struct", "union", and "enum".
4108
f9087798
DM
41092016-08-30 David Malcolm <dmalcolm@redhat.com>
4110
4111 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4112 rather than add_fixit_misspelled_id.
4113 (undeclared_variable): Likewise.
4114 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4115 now-redundant "here" params from add_fixit_insert method calls.
4116 (c_parser_parameter_declaration): Likewise.
4117 * c-typeck.c (build_component_ref): Remove now-redundant range
4118 param from add_fixit_replace method calls.
4119
ebef225f
MP
41202016-08-25 Marek Polacek <polacek@redhat.com>
4121
4122 * c-typeck.c (parser_build_binary_op): Pass LHS to
4123 warn_logical_not_parentheses.
4124
fe377a48
MP
41252016-08-25 Marek Polacek <polacek@redhat.com>
4126
4127 PR c/77323
4128 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4129 or _FloatN or _FloatNx is not supported.
4130 (finish_declspecs): Set type to integer_type_node when _FloatN or
4131 _FloatNx is not supported.
4132
c65699ef
JM
41332016-08-19 Joseph Myers <joseph@codesourcery.com>
4134
4135 PR c/32187
4136 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4137 (struct c_declspecs): Add field floatn_nx_idx.
4138 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4139 and _FloatNx type specifiers.
4140 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4141 (c_parser_declspecs, c_parser_attribute_any_word)
4142 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4143 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4144 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4145 narrower than double.
4146
2f1364c2
JJ
41472016-08-12 Jakub Jelinek <jakub@redhat.com>
4148 Martin Liska <mliska@suse.cz>
4149
4150 PR c/67410
4151 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4152 % to determine val element to change. Assert that
4153 wchar_bytes * charwidth fits into val array.
4154
191816a3
MP
41552016-08-12 Marek Polacek <polacek@redhat.com>
4156
4157 PR c/7652
4158 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4159 (c_parser_postfix_expression): Likewise.
4160 * c-typeck.c (build_unary_op): Adjust fall through comment.
4161 (c_mark_addressable): Likewise.
4162
b95a64bb
JJ
41632016-08-11 Jakub Jelinek <jakub@redhat.com>
4164
4165 PR c/72816
4166 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4167 array member through typedef, for orig_qual_indirect == 0 clear
4168 orig_qual_type.
4169
895aa8e1
DM
41702016-08-08 David Malcolm <dmalcolm@redhat.com>
4171
4172 PR c/64955
4173 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4174 this up to selftest::run_c_tests.
4175 (selftest::run_c_tests): New function.
4176
0b212d8c
TS
41772016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4178
ae9281fc
TS
4179 * c-parser.c (struct oacc_routine_data): Add error_seen and
4180 fndecl_seen members.
4181 (c_finish_oacc_routine): Use these.
4182 (c_parser_declaration_or_fndef): Adjust.
4183 (c_parser_oacc_routine): Likewise. Support more C language
4184 constructs, and improve diagnostics. Move pragma context
4185 checking...
4186 (c_parser_pragma): ... here.
4187
0b212d8c
TS
4188 * c-parser.c (struct oacc_routine_data): New.
4189 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4190 Simplify code.
4191 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4192 declare target" attribute.
4193
76e2c821
JB
41942016-08-01 Jan Beulich <jbeulich@suse.com>
4195
4196 * c-fold.c (c_fully_fold_internal): Also emit shift count
4197 warnings for vector types.
4198 * c-typeck.c (build_binary_op): Likewise.
4199
f618a472
MP
42002016-07-29 Marek Polacek <polacek@redhat.com>
4201
4202 PR c/71742
4203 * c-decl.c (finish_struct): Rephrase an error message.
4204
efd0786f
MP
4205 PR c/71853
4206 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4207 to error node for invalid code.
4208
e00dceaf
MP
4209 PR c/71573
4210 * c-decl.c (implicitly_declare): Return decl early not only for
4211 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4212
673a107a
JJ
42132016-07-29 Jakub Jelinek <jakub@redhat.com>
4214
4215 PR c/71969
4216 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4217 on GNU extern inline functions.
4218
a5b5c8b6
MP
42192016-07-29 Marek Polacek <polacek@redhat.com>
4220
4221 PR c/71583
4222 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4223 check expr.value.
4224
e3fe09c1
UB
42252016-07-22 Uros Bizjak <ubizjak@gmail.com>
4226
4227 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4228
7c8f7eaa
DM
42292016-07-20 David Malcolm <dmalcolm@redhat.com>
4230
4231 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4232 spellcheck-tree.h
4233 (best_macro_match): Likewise, converting from a typedef to a
4234 subclass.
4235 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4236 (lookup_name_fuzzy): Update for change of best_macro_match to a
4237 subclass with a ctor that calls cpp_forall_identifiers.
4238
de6a69ee
DM
42392016-07-20 David Malcolm <dmalcolm@redhat.com>
4240
4241 * c-decl.c (implicit_decl_warning): Update for conversion of
4242 return type of lookup_name_fuzzy to const char *.
4243 (undeclared_variable): Likewise.
4244 (lookup_name_fuzzy): Convert return type from tree to
4245 const char *.
4246 * c-parser.c (c_parser_declaration_or_fndef): Update for
4247 conversion of return type of lookup_name_fuzzy to const char *.
4248 (c_parser_parameter_declaration): Likewise.
4249
b1c9c068
CP
42502016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4251
4252 * c-parser.c (c_parser_oacc_declare): Don't scan for
4253 GOMP_MAP_POINTER.
4254 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4255 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4256 zero-length subarrays.
4257
ddbbcb19
JJ
42582016-07-15 Jakub Jelinek <jakub@redhat.com>
4259
4260 PR c/71858
4261 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4262 instead of FUZZY_LOOKUP_NAME.
4263 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4264 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4265
dd36b877
JJ
42662016-07-14 Jakub Jelinek <jakub@redhat.com>
4267
4268 PR c/71858
4269 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4270
8c681247
TS
42712016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4272
4273 * c-parser.c (c_parser_generic_selection): Make type of variable
4274 auto_vec.
4275 (c_parser_omp_declare_simd): Likewise.
4276
bf4fa671
TS
42772016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4278
4279 * c-decl.c (struct c_struct_parse_info): Change member types
4280 from vec to auto_vec.
4281 (start_struct): Adjust.
4282 (finish_struct): Likewise.
4283
557e8c49
JJ
42842016-07-02 Jakub Jelinek <jakub@redhat.com>
4285
4286 PR c/71719
4287 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4288
54d19c3b
TS
42892016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4290
4291 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4292 Move pragma context checking into...
4293 (c_parser_omp_cancellation_point): ... here, and improve
4294 diagnostic messages.
4295 * c-typeck.c (c_finish_omp_cancel)
4296 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4297
152ef731
JJ
42982016-06-29 Jakub Jelinek <jakub@redhat.com>
4299
4300 PR c/71685
4301 * c-typeck.c (c_build_qualified_type): Don't clear
4302 C_TYPE_INCOMPLETE_VARS for the main variant.
4303
43042016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4305
4306 PR c/71552
4307 * c-typeck.c (output_init_element): Diagnose incompatible types
4308 before non-constant initializers.
4309
e9ac1f86
JJ
43102016-06-28 Jakub Jelinek <jakub@redhat.com>
4311
4312 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4313
277d7ee0
AK
43142016-06-23 Andi Kleen <ak@linux.intel.com>
4315
4316 * Make-lang.in: Add support for autofdo.
4317
1a4f11c8
DM
43182016-06-22 David Malcolm <dmalcolm@redhat.com>
4319
4320 PR c/70339
4321 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4322 (implicit_decl_warning): When issuing warnings for implicit
4323 declarations, attempt to provide a suggestion via
4324 lookup_name_fuzzy.
4325 (undeclared_variable): Likewise when issuing errors.
4326 (lookup_name_in_scope): Likewise.
4327 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4328 (best_macro_match): New typedef.
4329 (find_closest_macro_cpp_cb): New function.
4330 (lookup_name_fuzzy): New function.
4331 * c-parser.c: Include gcc-rich-location.h.
4332 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4333 (c_keyword_starts_typename): ...this new function.
4334 (c_parser_declaration_or_fndef): When issuing errors about
4335 missing "struct" etc, add a fixit. For other kinds of errors,
4336 attempt to provide a suggestion via lookup_name_fuzzy.
4337 (c_parser_parms_declarator): When looking ahead to detect typos in
4338 type names, also reject CPP_KEYWORD.
4339 (c_parser_parameter_declaration): When issuing errors about
4340 unknown type names, attempt to provide a suggestion via
4341 lookup_name_fuzzy.
4342 * c-tree.h (c_keyword_starts_typename): New prototype.
4343
5a578671
JM
43442016-06-20 Joseph Myers <joseph@codesourcery.com>
4345
4346 PR c/71601
4347 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4348 c_common_type returns error_mark_node.
4349
3f8257db 43502016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4351
4352 PR c/69507
4353 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4354 __alignof__ (expression).
4355
6a3f203c
DM
43562016-06-14 David Malcolm <dmalcolm@redhat.com>
4357
4358 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4359
264757fb
DM
43602016-06-14 David Malcolm <dmalcolm@redhat.com>
4361
4362 * c-typeck.c (build_component_ref): Simplify fixit code by
4363 using gcc_rich_location::add_fixit_misspelled_id.
4364 (set_init_label): Likewise.
4365
f7e4f2e3
DM
43662016-06-13 David Malcolm <dmalcolm@redhat.com>
4367
4368 * c-parser.c (c_parser_initelt): Provide location of name for new
4369 location_t param of set_init_label.
4370 * c-tree.h (set_init_label): Add location_t param.
4371 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4372 param and use it when issuing error messages about unrecognized
4373 field names. Attempt to provide a fixit hint if appropriate,
4374 otherwise update the error message to provide the type name.
4375
4b1ffdb1
TS
43762016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4377
4378 PR c/71381
4379 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4380 Loosen checking.
4381
44a845ca
MS
43822016-06-08 Martin Sebor <msebor@redhat.com>
4383 Jakub Jelinek <jakub@redhat.com>
4384
4385 PR c++/70507
4386 PR c/68120
4387 * c-typeck.c (convert_arguments): Don't promote last argument
4388 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4389
92a5f2ba
MP
43902016-06-08 Marek Polacek <polacek@redhat.com>
4391
4392 PR c/71418
4393 * c-decl.c (grokdeclarator): Check TYPE_P.
4394
08203f73
MP
4395 PR c/71426
4396 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4397 code.
4398
6ffd47b7
DM
43992016-06-07 David Malcolm <dmalcolm@redhat.com>
4400
4401 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4402 and structure element reference, capture the location of the
4403 element name token and pass it to build_component_ref.
4404 (c_parser_postfix_expression_after_primary): Likewise for
4405 structure element dereference.
4406 (c_parser_omp_variable_list): Likewise for
4407 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4408 * c-tree.h (build_component_ref): Add location_t param.
4409 * c-typeck.c (build_component_ref): Add location_t param
4410 COMPONENT_LOC. Use it, if available, when issuing hints about
4411 mispelled member names to provide a fixit replacement hint.
4412
1f40cff3
MP
44132016-06-06 Marek Polacek <polacek@redhat.com>
4414
4415 PR c/71362
4416 * c-parser.c (c_parser_direct_declarator): Set location.
4417
5545a907
MP
44182016-06-06 Marek Polacek <polacek@redhat.com>
4419
4420 * c-typeck.c (comptypes_internal): Handle comparisons of
4421 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4422 TYPE_REF_CAN_ALIAS_ALL.
4423
b605f663
CLT
44242016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4425
4426 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4427 arguments as addressable when async clause exists.
4428
00631022
JJ
44292016-05-30 Jakub Jelinek <jakub@redhat.com>
4430
4431 PR c++/71349
4432 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4433 when combined with target construct.
4434
7211a097
JJ
44352016-05-26 Jakub Jelinek <jakub@redhat.com>
4436
4437 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4438 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4439
95efe6b6
MP
44402016-05-25 Marek Polacek <polacek@redhat.com>
4441
4442 PR c/71265
4443 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4444
a23faf7a
MP
4445 PR c/71266
4446 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4447
e46c7770
CP
44482016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4449
4450 * c-parser.c (c_parser_oacc_declare): Add support for
4451 GOMP_MAP_FIRSTPRIVATE_POINTER.
4452 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4453 argument with enum c_omp_region_type ort.
4454 (handle_omp_array_sections): Likewise. Update call to
4455 handle_omp_array_sections_1.
4456 (c_finish_omp_clauses): Add specific errors and warning messages for
4457 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4458 call to handle_omp_array_sections.
4459
a04e69c0
TS
44602016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4461
4462 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4463
f17a223d
RB
44642016-05-24 Richard Biener <rguenther@suse.de>
4465
4466 PR middle-end/70434
4467 PR c/69504
4468 * c-typeck.c (build_array_ref): Do not complain about indexing
4469 non-lvalue vectors. Adjust for function name change.
4470
79063edd
MS
44712016-05-20 Martin Sebor <msebor@redhat.com>
4472
4473 PR c/71115
4474 * c-typeck.c (error_init): Use
4475 expansion_point_location_if_in_system_header.
4476 (warning_init): Same.
4477
8a40fef3
DM
44782016-05-19 David Malcolm <dmalcolm@redhat.com>
4479
4480 PR c/71171
4481 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4482 in error-handling.
4483 (c_parser_postfix_expression): Likewise.
4484 * c-tree.h (c_expr::set_error): New method.
4485 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4486 that result's range is initialized.
4487
e9892350
JG
44882016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4489
4490 * c-typeck.c (parser_build_unary_op): Fix formatting.
4491
8fad45f5
MW
44922016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4493
4494 * c-decl.c (grokdeclarator): Remove errmsg and use of
4495 targetm.invalid_return_type.
4496 (grokparms): Remove errmsg and use of
4497 targetm.invalid_parameter_type.
4498
aa4b467b
JM
44992016-05-13 Joseph Myers <joseph@codesourcery.com>
4500
4501 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4502 function return type.
4503
4f2e1536
MP
45042016-05-12 Marek Polacek <polacek@redhat.com>
4505
4506 PR c/70756
4507 * c-decl.c (build_compound_literal): Pass LOC down to
4508 c_incomplete_type_error.
4509 * c-tree.h (require_complete_type): Adjust declaration.
4510 (c_incomplete_type_error): Likewise.
4511 * c-typeck.c (require_complete_type): Add location parameter, pass it
4512 down to c_incomplete_type_error.
4513 (c_incomplete_type_error): Add location parameter, pass it down to
4514 error_at.
4515 (build_component_ref): Pass location down to c_incomplete_type_error.
4516 (default_conversion): Pass location down to require_complete_type.
4517 (build_array_ref): Likewise.
4518 (build_function_call_vec): Likewise.
4519 (convert_arguments): Likewise.
4520 (build_unary_op): Likewise.
4521 (build_c_cast): Likewise.
4522 (build_modify_expr): Likewise.
4523 (convert_for_assignment): Likewise.
4524 (c_finish_omp_clauses): Likewise.
4525
d6e83a8d
MM
45262016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4527
4528 PR c/43651
4529 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4530 is enabled.
4531 * c-errors.c (pedwarn_c90): Return true if warned.
4532 * c-tree.h (pedwarn_c90): Change return type to bool.
4533 (enum c_declspec_word): Add new enumerator cdw_atomic.
4534
5c3a10fb
MP
45352016-05-11 Marek Polacek <polacek@redhat.com>
4536
4537 PR c++/71024
4538 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4539 diagnose_mismatched_attributes and call it.
4540
cf68d92c
MP
45412016-05-10 Marek Polacek <polacek@redhat.com>
4542
4543 PR c/70255
4544 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4545 on a declaration following the definition.
4546
351f85c5
JJ
45472016-05-05 Jakub Jelinek <jakub@redhat.com>
4548
4549 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4550 parse it through to c_parser_c99_block_statement.
4551 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4552 caller.
4553
deef7113
MP
45542016-05-04 Marek Polacek <polacek@redhat.com>
4555
4556 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4557 OPT_Wdangling_else.
4558
de55efd5
MP
45592016-05-04 Marek Polacek <polacek@redhat.com>
4560
4561 PR c/48778
4562 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4563 for macro expansions.
4564
79ce98bc
MP
45652016-05-03 Marek Polacek <polacek@redhat.com>
4566
4567 PR c/70859
4568 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4569 check_builtin_function_arguments.
4570
fb2647aa
RB
45712016-05-03 Richard Biener <rguenther@suse.de>
4572
4573 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4574 the checksum from the previous stage.
4575
77886428
CP
45762016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4577
4578 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4579 c_finish_omp_clauses.
4580 (c_parser_omp_all_clauses): Likewise.
4581 (c_parser_oacc_cache): Likewise.
4582 (c_parser_oacc_loop): Likewise.
4583 (omp_split_clauses): Likewise.
4584 (c_parser_omp_declare_target): Likewise.
4585 (c_parser_cilk_all_clauses): Likewise.
4586 (c_parser_cilk_for): Likewise.
4587 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4588 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4589
7176a4a0
MP
45902016-05-02 Marek Polacek <polacek@redhat.com>
4591
4592 PR c/70851
4593 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4594 incomplete type.
4595
e7ff0319
CP
45962016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4597
4598 PR middle-end/70626
4599 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4600 OACC_LOOP_CLAUSE_MASK.
4601 (c_parser_oacc_kernels_parallel): Update call to
4602 c_oacc_split_loop_clauses.
4603
9f405ce1
AM
46042016-04-28 Andrew MacLeod <amacleod@redhat.com>
4605
4606 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4607 argument to build_modify_expr in two cases.
4608
c1e1f433
BS
46092016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4610
4611 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4612 warn_for_memset instead of warning directly here.
4613
2448a956
MP
46142016-04-26 Marek Polacek <polacek@redhat.com>
4615
4616 PR c/67784
4617 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4618 out of ...
4619 (c_parser_for_statement): ... here.
4620 (c_parser_if_statement): Use it.
4621 (c_parser_switch_statement): Use it.
4622 (c_parser_while_statement): Use it.
4623
b02a5e26
MP
4624 PR c/70791
4625 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4626
477d4906
IV
46272016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4628
4629 PR c++/69363
4630 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4631 instead of c_finish_cilk_clauses.
4632 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4633 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4634 floating-point variables in the linear clause for Cilk Plus.
4635
fe37c7af
MM
46362016-04-18 Michael Matz <matz@suse.de>
4637
4638 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4639 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4640
949505a9
MP
46412016-04-15 Marek Polacek <polacek@redhat.com>
4642
4643 PR c/70671
4644 * c-typeck.c (build_unary_op): Pass location down to error and
4645 warning call.
4646
dda1bf61
JJ
46472016-04-15 Jakub Jelinek <jakub@redhat.com>
4648
4649 PR c/70436
4650 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4651 where needed.
4652 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4653 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4654 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4655 Adjust c_parser_pragma callers.
4656 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4657 caller.
4658 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4659 c_parser_statement.
4660 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4661 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4662 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4663 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4664 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4665 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4666 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4667 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4668 down where needed.
4669 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4670 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4671 calls.
4672
99cd9857
MP
46732016-04-13 Marek Polacek <polacek@redhat.com>
4674
4675 PR c/70436
4676 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4677 adjust callers.
4678 (c_parser_statement): Likewise.
4679 (c_parser_c99_block_statement): Likewise.
4680 (c_parser_while_statement): Likewise.
4681 (c_parser_for_statement): Likewise.
4682 (c_parser_if_body): Don't set IF_P here.
4683 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4684 about dangling else here.
4685 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4686 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4687 warn about dangling else here.
4688
f13355da
MP
46892016-04-04 Marek Polacek <polacek@redhat.com>
4690
4691 PR c/70307
4692 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4693
5fde6a45
MP
46942016-03-31 Marek Polacek <polacek@redhat.com>
4695
4696 PR c/70297
4697 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4698
4bbf545b
DM
46992016-03-18 David Malcolm <dmalcolm@redhat.com>
4700
4701 PR c/70281
4702 * c-parser.c (c_parser_postfix_expression): Set the source range
4703 for uses of "__builtin_types_compatible_p".
4704
fcc2b74f
JJ
47052016-03-17 Jakub Jelinek <jakub@redhat.com>
4706
4707 PR c/70280
4708 * c-typeck.c (composite_type): Don't count void_list_node
4709 into len, if the list is terminated by void_list_node, start
4710 with void_list_node instead of NULL for newargs. Stop
4711 at void_list_node.
4712
ab4c578f
MP
47132016-03-16 Marek Polacek <polacek@redhat.com>
4714
4715 PR c/70093
4716 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4717 nested functions returning VM types.
4718
96b3c82d
CP
47192016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4720
4721 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4722 when calling c_finish_omp_clauses.
4723
29b9828f
BS
47242016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4725
4726 PR c/69824
4727 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4728 for later.
4729
7ff6ca38
MP
47302016-03-04 Marek Polacek <polacek@redhat.com>
4731
4732 PR c/69798
4733 * c-parser.c (c_parser_postfix_expression): Call
4734 c_parser_cast_expression rather than c_parser_postfix_expression.
4735
686e2237
JJ
47362016-03-01 Jakub Jelinek <jakub@redhat.com>
4737
4738 PR c/69796
4739 PR c/69974
4740 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4741 of incomplete decls to error_mark_node.
4742
0b05329b
MP
47432016-02-24 Marek Polacek <polacek@redhat.com>
4744
4745 PR c/69819
4746 * c-decl.c (finish_decl): Don't update the copy of the type of a
4747 different decl type.
4748
067fbd8b
JJ
47492016-02-23 Jakub Jelinek <jakub@redhat.com>
4750
4751 PR objc/69844
4752 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4753 in id_kind reclassification.
4754
bf14eba2
JJ
47552016-02-16 Jakub Jelinek <jakub@redhat.com>
4756
4757 PR c/69835
4758 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4759
ba539195
JN
47602016-02-16 James Norris <jnorris@codesourcery.com>
4761
4762 PR c/64748
4763 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4764
16595a1f
BS
47652016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4766
f48dfe98
BS
4767 * c-decl.c (build_null_declspecs): Zero the entire struct.
4768
16595a1f
BS
4769 PR c/69522
4770 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4771 callers changed. If nested_p is true, use it to call
4772 finish_implicit_inits.
4773 * c-tree.h (finish_implicit_inits): Declare.
4774 * c-typeck.c (finish_implicit_inits): New function. Move code
4775 from ...
4776 (push_init_level): ... here.
4777 (set_designator, process_init_element): Call finish_implicit_inits.
4778
66756373
JJ
47792016-02-11 Jakub Jelinek <jakub@redhat.com>
4780
4781 PR c/69768
4782 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4783 arguments for -Waddress warning.
4784
1066e9b5
JJ
47852016-02-04 Jakub Jelinek <jakub@redhat.com>
4786
4787 PR c/69669
4788 * c-decl.c (finish_enum): When honoring mode attribute,
4789 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4790
3a5d2ba4
JJ
47912016-01-29 Jakub Jelinek <jakub@redhat.com>
4792
4793 PR debug/69518
4794 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4795 all type variants, not just TYPE_MAIN_VARIANT.
4796
cbdd8ae0
JJ
47972016-01-27 Jakub Jelinek <jakub@redhat.com>
4798
4799 PR debug/66869
4800 * c-decl.c (c_write_global_declarations_1): Warn with
4801 warn_unused_function if static prototype without definition
4802 is not C_DECL_USED.
4803
fa74a4bc
MP
48042016-01-27 Marek Polacek <polacek@redhat.com>
4805
4806 PR c/68062
4807 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4808 to unsigned, if needed. Add -Wsign-compare warning.
4809
13f92e8d
JJ
48102016-01-26 Jakub Jelinek <jakub@redhat.com>
4811
4812 PR tree-optimization/69483
4813 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4814
cd8e73dc 48152016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4816
4817 PR c/24293
4818 * c-tree.h (incomplete_record_decls): Declare.
4819 * c-parser.c (incomplete_record_decls): Define.
4820 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4821 report error if any decl has zero size.
4822 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4823 or enum type to incomplete_record_decls.
4824
e6d6ec9e
TV
48252016-01-14 Tom de Vries <tom@codesourcery.com>
4826
4827 PR tree-optimization/68773
4828 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4829 set force_output.
4830
00083992
MP
48312016-01-14 Marek Polacek <polacek@redhat.com>
4832
4833 PR c/69262
4834 * c-decl.c (grokdeclarator): Provide more information for invalid
4835 array declarations.
4836
7443cf13
DM
48372016-01-06 David Malcolm <dmalcolm@redhat.com>
4838
4839 * c-parser.c (c_parser_unary_expression): For dereferences, build
4840 a combined location before calling build_indirect_ref, so that
4841 error reports cover the full range, manually updating the c_expr
4842 src_range.
4843
6b131d5b
MP
48442016-01-06 Marek Polacek <polacek@redhat.com>
4845
4846 PR sanitizer/69099
4847 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4848 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4849 NULL.
4850
818ab71a
JJ
48512016-01-04 Jakub Jelinek <jakub@redhat.com>
4852
4853 Update copyright years.
4854
2fe0a208
MP
48552016-01-04 Marek Polacek <polacek@redhat.com>
4856
4857 PR c/68908
4858 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4859 optimization to use __atomic_fetch_* built-in if possible.
4860
c7b48c8a
TS
48612015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4862
4863 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4864 into...
4865 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4866 all users.
4867
fda5652f
MP
48682015-12-22 Marek Polacek <polacek@redhat.com>
4869
4870 PR c/69002
4871 * c-typeck.c (build_component_ref): Warn when acessing elements of
4872 atomic structures or unions.
4873
745e411d
DM
48742015-12-21 David Malcolm <dmalcolm@redhat.com>
4875
4876 * c-typeck.c: Include "gcc-rich-location.h".
4877 (build_binary_op): In the two places that call binary_op_error,
4878 create a gcc_rich_location and populate it with the location of
4879 the binary op and its two operands.
4880
94c40e19
DM
48812015-12-16 David Malcolm <dmalcolm@redhat.com>
4882
4883 * c-parser.c (c_parser_statement_after_labels): When calling
4884 c_finish_return, Use the return expression's location if it has
4885 one, falling back to the location of the first token within it.
4886 * c-typeck.c (c_finish_return): When issuing warnings about
4887 the incorrect presence/absence of a return value, issue a note
4888 showing the declaration of the function.
4889
de67c4c3
DM
48902015-12-16 David Malcolm <dmalcolm@redhat.com>
4891
4892 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4893 to 4.
4894 (c_parser_peek_nth_token): New function.
4895 (c_parser_peek_conflict_marker): New function.
4896 (c_parser_error): Detect conflict markers and report them as such.
4897
a10704e1
DM
48982015-12-16 David Malcolm <dmalcolm@redhat.com>
4899
4900 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4901 to preserve range information for the primary expression
4902 in the call to c_parser_postfix_expression_after_primary.
4903
8062bca6
DM
49042015-12-16 David Malcolm <dmalcolm@redhat.com>
4905
4906 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4907 expression location, falling back on the first token location,
4908 rather than always using the latter.
4909
d06f8b75
MP
49102015-12-16 Marek Polacek <polacek@redhat.com>
4911
4912 PR c/64637
4913 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4914 available.
4915
2994fb91
MP
49162015-12-15 Marek Polacek <polacek@redhat.com>
4917
4918 PR c/68907
4919 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4920 artificial decl.
4921
a1b93f8d
DM
49222015-12-08 David Malcolm <dmalcolm@redhat.com>
4923
4924 * c-parser.c (c_parser_alignof_expression): Capture location of
4925 closing parenthesis (if any), or of end of unary expression, and
4926 use it to build a src_range for the expression.
4927
46c6e1e2
DM
49282015-12-08 David Malcolm <dmalcolm@redhat.com>
4929
4930 PR c/68757
4931 * c-parser.c (c_parser_get_builtin_args): Add
4932 "out_close_paren_loc" param, and write back to it.
4933 (c_parser_postfix_expression): Capture the closing
4934 parenthesis location for RID_CHOOSE_EXPR,
4935 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4936 RID_BUILTIN_SHUFFLE and use it to set the source range
4937 for such expressions; within RID_BUILTIN_COMPLEX set
4938 the underlying location.
4939
66189108
MP
49402015-12-07 Marek Polacek <polacek@redhat.com>
4941
4942 PR c/68668
4943 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4944 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4945
f187980b
EB
49462015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4947
4948 * c-tree.h (c_build_va_arg): Adjust prototype.
4949 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4950 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4951 parameter, adjust throughout and issue an error if EXPR is a component
4952 with reverse storage order.
4953
4250754e
JM
49542015-12-02 Jason Merrill <jason@redhat.com>
4955
4956 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4957 (c_fully_fold_internal, decl_constant_value_for_optimization):
4958 Move from c-common.c.
4959 * c-tree.h: Declare decl_constant_value_for_optimization.
4960 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4961
e9e32ee6
JM
49622015-12-02 Joseph Myers <joseph@codesourcery.com>
4963
4964 PR c/68162
4965 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4966 following link from declarator to next declarator. Track original
4967 qualified type and pass it to c_build_qualified_type.
4968 * c-typeck.c (c_build_qualified_type): Add arguments
4969 orig_qual_type and orig_qual_indirect.
4970
ff7a55bf
TS
49712015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4972
4973 * c-parser.c (c_parser_omp_clause_name)
4974 (c_parser_oacc_all_clauses): Alphabetical sorting.
4975
657e4e47
JJ
49762015-12-02 Jakub Jelinek <jakub@redhat.com>
4977
4978 PR c/68533
4979 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4980 for diagnostics.
4981
37d5ad46
JB
49822015-12-01 Julian Brown <julian@codesourcery.com>
4983 Cesar Philippidis <cesar@codesourcery.com>
4984 James Norris <James_Norris@mentor.com>
4985
4986 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4987 (c_parser_oacc_clause_use_device): New function.
4988 (c_parser_oacc_all_clauses): Add use_device support.
4989 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4990 (c_parser_oacc_host_data): New function.
4991 (c_parser_omp_construct): Add host_data support.
4992 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4993 * c-typeck.c (c_finish_oacc_host_data): New function.
4994 (c_finish_omp_clauses): Add use_device support.
4995
a4850ce9
JH
49962015-11-29 Jan Hubicka <hubicka@ucw.cz>
4997
4998 PR c/67106
4999 * c-decl.c: Set TYPE_PACKED in variants.
5000
b58d3df2
ML
50012015-11-27 Martin Liska <mliska@suse.cz>
5002
5003 PR c++/68312
5004 * c-array-notation.c (fix_builtin_array_notation_fn):
5005 Use release_vec_vec instead of vec::release.
5006 (build_array_notation_expr): Likewise.
5007 (fix_conditional_array_notations_1): Likewise.
5008 (fix_array_notation_expr): Likewise.
5009 (fix_array_notation_call_expr): Likewise.
5010
aec17bfe
JJ
50112015-11-27 Jakub Jelinek <jakub@redhat.com>
5012
5013 PR c/63326
5014 * c-parser.c (c_parser_compound_statement_nostart): If
5015 last_label is true, use pragma_stmt instead of pragma_compound
5016 as second c_parser_pragma argument.
5017 (c_parser_omp_ordered, c_parser_omp_target_update,
5018 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5019 false as second argument to c_parser_skip_to_pragma_eol after
5020 diagnosing standalone directives used in pragma_stmt context.
5021
688c4de0
IV
50222015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5023
5024 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5025 with "if (ENABLE_OFFLOADING)".
5026
cbd03aee
DM
50272015-11-23 David Malcolm <dmalcolm@redhat.com>
5028
5029 PR objc/68438
5030 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5031 for various Objective-C constructs: Class.name syntax,
5032 @selector(), @protocol(), @encode(), and [] message syntax.
5033
a87a86e1
DM
50342015-11-20 David Malcolm <dmalcolm@redhat.com>
5035
5036 PR 62314
5037 * c-typeck.c (should_suggest_deref_p): New function.
5038 (build_component_ref): Special-case POINTER_TYPE when
5039 generating a "not a structure of union" error message, and
5040 suggest a "->" rather than a ".", providing a fix-it hint.
5041
8ece8dfb
DM
50422015-11-19 David Malcolm <dmalcolm@redhat.com>
5043
5044 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5045 candidate into a new function, find_closest_identifier.
5046
433068cc
MP
50472015-11-19 Marek Polacek <polacek@redhat.com>
5048
5049 PR c/68412
5050 * c-typeck.c (parser_build_binary_op): Properly handle
5051 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5052
bef08b71
DM
50532015-11-17 David Malcolm <dmalcolm@redhat.com>
5054
5055 * c-parser.c (set_c_expr_source_range): Bulletproof both
5056 overloaded implementations against NULL expr->value.
5057 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5058 values.
5059 (c_parser_unary_expression): Likewise when handling addresses of
5060 labels.
5061 (c_parser_postfix_expression): Likewise for statement expressions,
5062 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5063 __builtin_va_arg, and for __builtin_offset_of.
5064 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5065 src_range using the range of the braced initializer.
5066 (c_parser_transaction_expression): Set src_range for "ret" to a
5067 sane pair of values.
5068
fff77217
KY
50692015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5070
5071 * c-parser.c (c_finish_omp_declare_simd): Look for
5072 "simd" attribute as well. Update error message.
5073
1d899da2
TS
50742015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5075
5076 * c-parser.c (c_parser_omp_declare_target): Adjust.
5077
e4606348
JJ
50782015-11-14 Jakub Jelinek <jakub@redhat.com>
5079
5080 * c-typeck.c (c_finish_omp_clauses): Don't mark
5081 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5082
3e636daf
MP
50832015-11-14 Marek Polacek <polacek@redhat.com>
5084
5085 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5086 * c-typeck.c: Likewise.
5087
ebedc9a3
DM
50882015-11-13 David Malcolm <dmalcolm@redhat.com>
5089
5090 * c-decl.c (warn_defaults_to): Pass line_table to
5091 rich_location ctor.
5092 * c-errors.c (pedwarn_c99): Likewise.
5093 (pedwarn_c90): Likewise.
5094 * c-parser.c (set_c_expr_source_range): New functions.
5095 (c_token::get_range): New method.
5096 (c_token::get_finish): New method.
5097 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5098 based on the range from the start of the LHS to the end of the
5099 RHS.
5100 (c_parser_conditional_expression): Likewise, based on the range
5101 from the start of the cond.value to the end of exp2.value.
5102 (c_parser_binary_expression): Call set_c_expr_source_range on
5103 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5104 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5105 based on the cast_loc through to the end of the expr.
5106 (c_parser_unary_expression): Likewise, based on the
5107 op_loc through to the end of op.
5108 (c_parser_sizeof_expression) Likewise, based on the start of the
5109 sizeof token through to either the closing paren or the end of
5110 expr.
5111 (c_parser_postfix_expression): Likewise, using the token range,
5112 or from the open paren through to the close paren for
5113 parenthesized expressions.
5114 (c_parser_postfix_expression_after_primary): Likewise, for
5115 various kinds of expression.
5116 * c-tree.h (struct c_expr): Add field "src_range".
5117 (c_expr::get_start): New method.
5118 (c_expr::get_finish): New method.
5119 (set_c_expr_source_range): New decls.
5120 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5121 on ret for prefix unary ops.
5122 (parser_build_binary_op): Likewise, running from the start of
5123 arg1.value through to the end of arg2.value.
5124
ec8b536f
MP
51252015-11-13 Marek Polacek <polacek@redhat.com>
5126
5127 PR c/68320
5128 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5129
277fe616
DM
51302015-11-13 David Malcolm <dmalcolm@redhat.com>
5131
5132 * c-typeck.c: Include spellcheck.h.
5133 (lookup_field_fuzzy_find_candidates): New function.
5134 (lookup_field_fuzzy): New function.
5135 (build_component_ref): If the field was not found, try using
5136 lookup_field_fuzzy and potentially offer a suggestion.
5137
6e232ba4
JN
51382015-11-12 James Norris <jnorris@codesourcery.com>
5139 Joseph Myers <joseph@codesourcery.com>
5140
5141 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5142 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5143 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5144 and PRAGMA_OMP_CLAUSE_LINK.
5145 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5146 and PRAGMA_OACC_CLAUSE_LINK.
5147 (OACC_DECLARE_CLAUSE_MASK): New definition.
5148 (c_parser_oacc_declare): New function.
5149
9be4f715
MP
51502015-11-12 Marek Polacek <polacek@redhat.com>
5151
5152 PR c/67784
5153 * c-parser.c (c_parser_for_statement): Reclassify the token in
5154 a correct scope.
5155
e78bede6
MP
51562015-11-11 Marek Polacek <polacek@redhat.com>
5157
5158 PR c/68107
5159 PR c++/68266
5160 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5161 checking the size of an array.
5162
69f293c9
AM
51632015-11-11 Andrew MacLeod <amacleod@redhat.com>
5164
5165 * c-array-notation.c: Remove unused header files.
5166 * c-aux-info.c: Likewise.
5167 * c-convert.c: Likewise.
5168 * c-decl.c: Likewise.
5169 * c-errors.c: Likewise.
5170 * c-lang.c: Likewise.
5171 * c-objc-common.c: Likewise.
5172 * c-parser.c: Likewise.
5173 * c-typeck.c: Likewise.
5174 * gccspec.c: Likewise.
5175
3a40d81d
NS
51762015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5177 Cesar Philippidis <cesar@codesourcery.com>
5178 James Norris <jnorris@codesourcery.com>
5179 Julian Brown <julian@codesourcery.com>
5180 Nathan Sidwell <nathan@codesourcery.com>
5181
3a40d81d
NS
5182 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5183 routine arg.
5184 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5185 (c_parser_pragma): Parse 'acc routine'.
5186 (OACC_ROUTINE_CLAUSE_MARK): Define.
5187 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5188
fc402eec
AA
51892015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5190
5191 PR debug/67192
5192 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5193 location of the backward-goto to the start of the loop body.
5194
f6b0b3db
AA
51952015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5196
5197 PR debug/67192
5198 * c-parser.c (c_parser_while_statement): Finish the loop before
5199 parsing ahead for misleading indentation.
5200 (c_parser_for_statement): Likewise.
5201
ee45a32d
EB
52022015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5203
5204 * c-decl.c (finish_struct): If the structure has reverse storage
5205 order, rewrite the type of array fields with scalar component. Call
5206 maybe_apply_pragma_scalar_storage_order on entry.
5207 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5208 errors on bit-fields and reverse SSO here and not...
5209 (c_mark_addressable): ...here.
5210 (output_init_element): Adjust call to initializer_constant_valid_p.
5211 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5212
8a645150
DM
52132015-11-06 David Malcolm <dmalcolm@redhat.com>
5214
5215 * c-decl.c (warn_defaults_to): Update for change in signature
5216 of diagnostic_set_info.
5217 * c-errors.c (pedwarn_c99): Likewise.
5218 (pedwarn_c90): Likewise.
5219 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5220 for textinfo::set_location.
5221
7a5e4956
CP
52222015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5223 Thomas Schwinge <thomas@codesourcery.com>
5224 James Norris <jnorris@codesourcery.com>
5225
5226 * c-parser.c (c_parser_omp_clause_name): Add support for
5227 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5228 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5229 default(none) in OpenACC.
5230 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5231 arguments.
5232 (c_parser_oacc_clause_tile): New function.
5233 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5234 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5235 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5236 TILE}.
5237 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5238 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5239 FIRSTPRIVATE}.
5240 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5241 (c_parser_oacc_update): Update the error message for missing clauses.
5242 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5243 and OMP_CLAUSE_INDEPENDENT.
5244
bfcfbfa0
MP
52452015-11-05 Marek Polacek <polacek@redhat.com>
5246
5247 PR c/68090
5248 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5249 deal with pre-evaluation on invalid types.
5250
e01d41e5
JJ
52512015-11-05 Jakub Jelinek <jakub@redhat.com>
5252 Ilya Verbin <ilya.verbin@intel.com>
5253
5254 * c-parser.c: Include context.h and gimple-expr.h.
5255 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5256 monotonic together with nonmonotonic.
5257 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5258 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5259 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5260 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5261 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5262 expressions on combined target teams before the target.
5263 (c_parser_omp_declare_target): If decl has "omp declare target" or
5264 "omp declare target link" attribute, and cgraph or varpool node already
5265 exists, then set corresponding flags. Call c_finish_omp_clauses
5266 in the parenthesized extended-list syntax case.
5267 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5268 declare target.
5269 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5270 on OMP_CLAUSE_REDUCTION array sections.
5271 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5272 into the constant offset, or for variable low-bound using
5273 POINTER_PLUS_EXPR. For structure element based array sections use
5274 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5275 (c_finish_omp_clauses): Drop generic_field_head, structure
5276 elements are now always mapped even as array section bases,
5277 diagnose same var in data sharing and mapping clauses. Diagnose if
5278 linear step on declare simd is neither a constant nor a uniform
5279 parameter. Look through POINTER_PLUS_EXPR for array section
5280 reductions. Diagnose the same var or function appearing multiple
5281 times on the same directive. Fix up wording for the to clause if t
5282 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5283 modifier on kinds other than dynamic or guided or nonmonotonic
5284 modifier together with ordered clause.
5285
4bf9e5a8
TS
52862015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5287 Chung-Lin Tang <cltang@codesourcery.com>
5288
5289 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5290
2adfab87
AM
52912015-10-29 Andrew MacLeod <amacleod@redhat.com>
5292
5293 * c-array-notation.c: Reorder #include's and remove duplicates.
5294 * c-aux-info.c: Likewise.
5295 * c-convert.c: Likewise.
5296 * c-decl.c: Likewise.
5297 * c-errors.c: Likewise.
5298 * c-lang.c: Likewise.
5299 * c-objc-common.c: Likewise.
5300 * c-parser.c: Likewise.
5301 * c-typeck.c: Likewise.
5302
e922069e
JW
53032015-10-26 Jim Wilson <jim.wilson@linaro.org>
5304
5305 PR debug/66068
5306 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5307 after calling build_qualified_type.
5308
765dd391
CP
53092015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5310 Thomas Schwinge <thomas@codesourcery.com>
5311 James Norris <jnorris@codesourcery.com>
5312 Joseph Myers <joseph@codesourcery.com>
5313 Julian Brown <julian@codesourcery.com>
5314 Bernd Schmidt <bschmidt@redhat.com>
5315
5316 * c-parser.c (c_parser_oacc_shape_clause): New.
5317 (c_parser_oacc_simple_clause): New.
5318 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5319 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5320
88bae6f4
TS
53212015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5322 James Norris <jnorris@codesourcery.com>
5323 Cesar Philippidis <cesar@codesourcery.com>
5324
5325 PR c/64765
5326 PR c/64880
5327 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5328 parameters, and handle these. Adjust all users.
5329 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5330 into...
5331 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5332 all users.
5333 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5334 declare functions.
5335 (c_finish_omp_construct): Declare function.
5336 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5337 Merge functions into...
5338 (c_finish_omp_construct): ... this new function.
5339
a8fc2579
RB
53402015-10-22 Richard Biener <rguenther@suse.de>
5341
5342 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5343 before folding a MINUS_EXPR.
5344
e9122ef6
MP
53452015-10-21 Marek Polacek <polacek@redhat.com>
5346
5347 PR c/68024
5348 * c-decl.c (start_function): Warn about vararg functions without
5349 a prototype.
5350
9f47c7e5
IE
53512015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5352
5353 * c-typeck.c (build_conditional_expr): Use boolean vector
5354 type for vector comparison.
5355 (build_vec_cmp): New.
5356 (build_binary_op): Use build_vec_cmp for comparison.
5357
fa60eeb9
MP
53582015-10-20 Marek Polacek <polacek@redhat.com>
5359
5360 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5361
2c7020eb
MP
53622015-10-20 Marek Polacek <polacek@redhat.com>
5363
5364 PR c/67964
5365 * c-parser.c (c_parser_attributes): Break out of the loop if the
5366 token after an attribute isn't a comma.
5367
d9a6bd32
JJ
53682015-10-13 Jakub Jelinek <jakub@redhat.com>
5369 Aldy Hernandez <aldyh@redhat.com>
5370
5371 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5372 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5373 (c_parser_omp_variable_list): Handle structure elements for
5374 map, to and from clauses. Handle array sections in reduction
5375 clause. Formatting fixes.
5376 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5377 if clause modifiers.
5378 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5379 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5380 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5381 c_parser_omp_clause_is_device_ptr): New functions.
5382 (c_parser_omp_clause_ordered): Parse optional parameter.
5383 (c_parser_omp_clause_reduction): Handle array reductions.
5384 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5385 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5386 functions.
5387 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5388 (c_parser_omp_clause_depend_sink): New function.
5389 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5390 (c_parser_omp_clause_map): Parse release/delete map kinds and
5391 optional always modifier.
5392 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5393 and c_finish_omp_clauses callers.
5394 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5395 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5396 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5397 (OMP_CRITICAL_CLAUSE_MASK): Define.
5398 (c_parser_omp_critical): Parse critical clauses.
5399 (c_parser_omp_for_loop): Handle doacross loops, adjust
5400 c_finish_omp_for and c_finish_omp_clauses callers.
5401 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5402 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5403 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5404 (c_parser_omp_for): Disallow ordered clause when combined with
5405 distribute. Disallow linear clause when combined with distribute
5406 and not combined with simd.
5407 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5408 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5409 parse clauses and if depend clause is found, don't parse a body.
5410 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5411 Allow target parallel without for after it.
5412 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5413 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5414 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5415 invalid kinds.
5416 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5417 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5418 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5419 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5420 functions.
5421 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5422 defaultmap and is_device_ptr clauses.
5423 (c_parser_omp_target): Parse target parallel and target simd. Set
5424 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5425 and target exit data. Diagnose invalid map kinds.
5426 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5427 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5428 construct.
5429 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5430 &omp_priv.
5431 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5432 (c_parser_omp_taskloop): New function.
5433 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5434 handle PRAGMA_OMP_TASKLOOP.
5435 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5436 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5437 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5438 Add IS_OMP argument, handle structure element bases, diagnose
5439 bitfields, pass IS_OMP recursively, diagnose known zero length
5440 array sections in depend clauses, handle array sections in reduction
5441 clause, diagnose negative length even for pointers.
5442 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5443 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5444 array sections in reduction clause, set
5445 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5446 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5447 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5448 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5449
21ba0cea
MP
54502015-10-06 Marek Polacek <polacek@redhat.com>
5451
5452 * c-parser.c (c_parser_statement_after_labels): Use
5453 protected_set_expr_location.
5454 (c_parser_omp_clause_num_gangs): Likewise.
5455 (c_parser_omp_clause_num_threads): Likewise.
5456 (c_parser_omp_clause_num_workers): Likewise.
5457 (c_parser_omp_clause_vector_length): Likewise.
5458 (c_parser_omp_clause_num_teams): Likewise.
5459 (c_parser_omp_clause_thread_limit): Likewise.
5460 * c-typeck.c (build_c_cast): Likewise.
5461 (c_cast_expr): Likewise.
5462
624d31fe
RS
54632015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5464
5465 * c-typeck.c (c_tree_equal): Use real_equal instead of
5466 REAL_VALUES_EQUAL.
5467
b8fd7909
JM
54682015-10-04 Jason Merrill <jason@redhat.com>
5469
5470 * c-parser.c (c_lex_one_token): Handle @synchronized.
5471 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5472 can change whether the function is transaction_safe.
5473
1c7485af
MP
54742015-10-02 Marek Polacek <polacek@redhat.com>
5475
5476 PR c/67730
5477 * c-typeck.c (convert_for_assignment): Use the expansion point
5478 location throughout.
5479
3e3b8d63
MP
54802015-10-02 Marek Polacek <polacek@redhat.com>
5481
5482 PR c/64249
5483 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5484 and pass it down to c_parser_if_statement.
5485 (c_parser_else_body): Add CHAIN parameter and pass it down to
5486 c_parser_statement_after_labels.
5487 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5488 duplicated if-else-if conditions.
5489
aabef2de
MP
54902015-10-01 Marek Polacek <polacek@redhat.com>
5491
5492 * c-typeck.c (convert_for_assignment): Improve commentary.
5493
de8ddd5f
MP
54942015-09-30 Marek Polacek <polacek@redhat.com>
5495
5496 PR c/67730
5497 * c-typeck.c (c_finish_return): Use the expansion point location for
5498 certain "return with value" warnings.
5499
c4914de6
MLI
55002015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5501
5502 * c-parser.c (pragma_lex): Add loc argument.
5503
0e36f5c7
MP
55042015-09-15 Marek Polacek <polacek@redhat.com>
5505
5506 PR c/67580
5507 * c-decl.c (tag_exists_p): New function.
5508 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5509 struct/union/enum keywords are missing.
5510 * c-tree.h (tag_exists_p): Declare.
5511
2f3bb934
MP
55122015-09-15 Marek Polacek <polacek@redhat.com>
5513
5514 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5515 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5516 Return NULL_TREE instead of 0.
5517 (lookup_name): Return NULL_TREE instead of 0.
5518 (lookup_name_in_scope): Likewise.
5519 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5520 (parser_xref_tag): Use false instead of 0.
5521 (start_struct): Use true instead of 1.
5522 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5523
aa256c4a
MP
55242015-09-14 Marek Polacek <polacek@redhat.com>
5525
5526 * c-typeck.c (set_nonincremental_init_from_string): Use
5527 HOST_WIDE_INT_M1U when shifting a negative value.
5528
dbb68221
MW
55292015-09-09 Mark Wielaard <mjw@redhat.com>
5530
5531 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5532 parm against NULL.
5533
a8a098ac
JJ
55342015-09-10 Jakub Jelinek <jakub@redhat.com>
5535
5536 PR c/67502
5537 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5538 into OMP_FOR_PRE_BODY rather than before the loop.
5539
f4b189d5
JJ
55402015-09-09 Jakub Jelinek <jakub@redhat.com>
5541
0bb99c11
JJ
5542 PR c/67501
5543 * c-parser.c (c_parser_oacc_all_clauses,
5544 c_parser_omp_all_clauses): Remove invalid clause from
5545 list of clauses even if parser->error is set.
5546
fce5e5e3
JJ
5547 PR c/67500
5548 * c-parser.c (c_parser_omp_clause_aligned,
5549 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5550 test for errors.
5551 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5552 error_mark_node.
5553
f4b189d5
JJ
5554 PR c/67495
5555 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5556 instead of c_parser_unary_expression. If the result is !lvalue_p,
5557 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5558
b2aaf235
MP
55592015-09-04 Marek Polacek <polacek@redhat.com>
5560
5561 PR sanitizer/67279
5562 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5563
1807ffc1
MS
55642015-09-03 Martin Sebor <msebor@redhat.com>
5565
5566 PR c/66516
8b652e65
JJ
5567 * c-typeck.c (convert_arguments, parser_build_unary_op,
5568 build_conditional_expr, c_cast_expr, convert_for_assignment,
5569 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5570 reject_gcc_builtin.
5571 (c_decl_implicit): Define.
5572
d04ff417
MP
55732015-09-02 Marek Polacek <polacek@redhat.com>
5574
5575 PR c/67432
5576 * c-parser.c (c_parser_enum_specifier): Give a better error for
5577 an empty enum.
5578
a79683d5
TS
55792015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5580
5581 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5582
191a6b94
MP
55832015-08-12 Marek Polacek <polacek@redhat.com>
5584
5585 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5586 LOC to it.
5587
420a9d9b
MP
55882015-08-03 Marek Polacek <polacek@redhat.com>
5589
5590 PR c/67088
5591 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5592 Use it.
5593 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5594
992118a1
PP
55952015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5596
5597 * c-parser.c (c_parser_if_body): Take token_indent_info
5598 argument. Call warn_for_misleading_indentation even when the
5599 body is a semicolon. Extract token_indent_infos corresponding
5600 to the guard, body and next tokens. Adjust call to
5601 warn_for_misleading_indentation accordingly.
5602 (c_parser_else_body): Likewise.
5603 (c_parser_if_statement): Likewise.
5604 (c_parser_while_statement): Likewise.
5605 (c_parser_for_statement): Likewise.
5606
46308474
LFSM
56072015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5608 Manuel López-Ibáñez <manu@gcc.gnu.org>
5609
5610 * c-decl.c (get_parm_info): Remove static var. Update warning
5611 message.
5612
05b28fd6
MP
56132015-07-27 Marek Polacek <polacek@redhat.com>
5614
5615 PR c++/66555
5616 PR c/54979
5617 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5618
451b5e48
MP
56192015-07-20 Marek Polacek <polacek@redhat.com>
5620
5621 PR c++/55095
5622 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5623 (build_binary_op): Warn about left shift overflows.
5624
1916bcb5
AM
56252015-07-09 Andrew MacLeod <amacleod@redhat.com>
5626
5627 * c-array-notation.c: Adjust includes for flags.h changes.
5628 * c-objc-common.c: Likewise.
5629
c7131fb2
AM
56302015-07-07 Andrew MacLeod <amacleod@redhat.com>
5631
5632 * c-array-notation.c: Adjust includes.
5633 * c-aux-info.c: Likewise.
5634 * c-convert.c: Likewise.
5635 * c-decl.c: Likewise.
5636 * c-errors.c: Likewise.
5637 * c-lang.c: Likewise.
5638 * c-objc-common.c: Likewise.
5639 * c-parser.c: Likewise.
5640 * c-typeck.c: Likewise.
5641
da2e71c9
MLI
56422015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5643
5644 PR fortran/66605
5645 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5646
b155cfd9
MP
56472015-06-29 Marek Polacek <polacek@redhat.com>
5648
5649 PR c/66322
5650 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5651 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5652 about -Wswitch-bool here.
5653 (do_case): Update c_add_case_label call.
5654 (c_finish_case): Update c_do_switch_warnings call.
5655
31521951
MP
56562015-06-27 Marek Polacek <polacek@redhat.com>
5657
5658 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5659
22d03525
MP
56602015-06-26 Marek Polacek <polacek@redhat.com>
5661
5662 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5663 INDIRECT_REF_P.
5664 * c-typeck.c (array_to_pointer_conversion): Likewise.
5665 (build_unary_op): Likewise.
5666 (c_finish_return): Likewise.
5667
f0889939
AM
56682015-06-25 Andrew MacLeod <amacleod@redhat.com>
5669
5670 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5671 * c-parser.c: Likewise.
5672
8d67ee55
RS
56732015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5674
5675 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5676 instead of pointer_hash.
5677 (detect_field_duplicates): Likewise.
5678
0ae9bd27
MP
56792015-06-25 Marek Polacek <polacek@redhat.com>
5680
5681 * c-array-notation.c: Use VAR_P throughout.
5682 * c-decl.c: Likewise.
5683 * c-objc-common.c: Likewise.
5684 * c-parser.c: Likewise.
5685 * c-typeck.c: Likewise.
5686
62f9079a
MP
56872015-06-25 Marek Polacek <polacek@redhat.com>
5688
5689 * c-decl.c: Use is_global_var throughout.
5690 * c-parser.c: Likewise.
5691 * c-typeck.c: Likewise.
5692
abb226c9
AM
56932015-06-17 Andrew MacLeod <amacleod@redhat.com>
5694
5695 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5696 * c-aux-info.c: Likewise.
5697 * c-convert.c: Likewise.
5698 * c-decl.c: Likewise.
5699 * c-errors.c: Likewise.
5700 * c-lang.c: Likewise.
5701 * c-objc-common.c: Likewise.
5702 * c-parser.c: Likewise.
5703 * c-typeck.c: Likewise.
5704
8cbababc
JH
57052015-06-11 Jan Hubicka <hubicka@ucw.cz>
5706
5707 PR middle-end/66325
5708 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5709 variants.
5710
a0349665
PMR
57112015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5712
5713 * c-decl.c (pop_scope): Register the main translation unit
5714 through the new debug hook.
5715
13fdf2e2
AM
57162015-06-08 Andrew MacLeod <amacleod@redhat.com>
5717
5718 * c-array-notation.c : Adjust include files.
5719 * c-aux-info.c : Likewise.
5720 * c-convert.c : Likewise.
5721 * c-decl.c : Likewise.
5722 * c-errors.c : Likewise.
5723 * c-lang.c : Likewise.
5724 * c-lang.h : Likewise.
5725 * c-objc-common.c : Likewise.
5726 * c-parser.c : Likewise.
5727 * c-typeck.c : Likewise.
5728
d7438551
AH
57292015-06-05 Aldy Hernandez <aldyh@redhat.com>
5730
5731 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5732 immediately clobber it.
5733 (c_write_global_declarations_1): Remove call to
5734 check_global_declaration_1.
5735 (c_write_global_declarations_2): Remove.
5736 (c_write_final_cleanups): Rename from c_write_global_declarations.
5737 Remove call to finalize_compilation_unit.
5738 Remove calls to debugging hooks.
5739 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5740 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5741 * c-tree.h: Remove c_write_global_declarations.
5742
ecb9f223
AM
57432015-06-04 Andrew MacLeod <amacleod@redhat.com>
5744
5745 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5746 * c-aux-info.c: Likewise.
5747 * c-convert.c: Likewise.
5748 * c-decl.c: Likewise.
5749 * c-errors.c: Likewise.
5750 * c-lang.c: Likewise.
5751 * c-objc-common.c: Likewise.
5752 * c-parser.c: Likewise.
5753 * c-typeck.c: Likewise.
5754
9482b620
MP
57552015-06-04 Marek Polacek <polacek@redhat.com>
5756
5757 PR c/66341
5758 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5759 it is a lvalue.
5760
bc51ace3
PK
57612015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5762
5763 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5764 Warn for empty struct.
5765 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5766
ea5b45b6
AT
57672015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5768
5769 * c-decl.c (start_function): Call plugin before parsing.
5770 (finish_function): Call plugin after parsing.
5771
c2d47482
PK
57722015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5773
5774 PR c/49551
5775 * c-decl.c (merge_decls): Merge DECL_COMMON.
5776
a95492ab
JW
57772015-05-22 Jim Wilson <jim.wilson@linaro.org>
5778
5779 * Make-lang.in (check_gcc_pallelize): Define.
5780
fd5c817a
MP
57812015-05-22 Marek Polacek <polacek@redhat.com>
5782
5783 PR c/47043
5784 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5785 attributes.
5786
c7b70a3c
MP
57872015-05-21 Marek Polacek <polacek@redhat.com>
5788
5789 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5790 DECL_BUILT_IN.
5791
21b634ae
MP
57922015-05-20 Marek Polacek <polacek@redhat.com>
5793
5794 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5795 * c-typeck.c: Likewise.
5796
296a8c2f
MP
57972015-05-19 Marek Polacek <polacek@redhat.com>
5798
5799 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5800
41b37d5e
JJ
58012015-05-19 Jakub Jelinek <jakub@redhat.com>
5802
5803 PR middle-end/66199
5804 * c-parser.c (c_parser_omp_for_loop): Don't add
5805 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5806 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5807 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5808 constructs.
5809
fab27f52
MM
58102015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5811
5812 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5813 swaps.
fab27f52 5814
40de31cf
MLI
58152015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5816
5817 PR fortran/44054
5818 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5819 accessor function.
5820
3aa3c9fc
MP
58212015-05-14 Marek Polacek <polacek@redhat.com>
5822
5823 PR c/66066
5824 PR c/66127
5825 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5826 rather than with 0.
5827
c3388e62
DM
58282015-05-12 David Malcolm <dmalcolm@redhat.com>
5829
5830 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5831 to add a call to warn_for_misleading_indentation.
5832 (c_parser_else_body): Likewise, adding param "else_loc".
5833 (c_parser_if_statement): Check for misleading indentation.
5834 (c_parser_while_statement): Likewise.
5835 (c_parser_for_statement): Likewise.
5836
755e528f
MP
58372015-05-08 Marek Polacek <polacek@redhat.com>
5838
5839 PR c/64918
5840 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5841 (output_init_element): Likewise.
5842
0173bd2a
MP
58432015-05-07 Marek Polacek <polacek@redhat.com>
5844
5845 PR c/65179
5846 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5847 value.
5848
9babc352
MP
58492015-04-30 Marek Polacek <polacek@redhat.com>
5850
5851 * c-typeck.c (set_init_label): Call error_at instead of error and
5852 pass LOC to it.
5853
ac9f18db
MP
5854 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5855 the type of a decl.
5856
ec3fba51
MP
5857 * c-typeck.c (c_build_va_arg): Clarify the error message.
5858
b811915d
TS
58592015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5860
5861 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5862 OMP_STANDALONE_CLAUSES.
5863
f3075008
MP
58642015-04-28 Marek Polacek <polacek@redhat.com>
5865
5866 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5867
4e81b788
MP
58682015-04-28 Marek Polacek <polacek@redhat.com>
5869
5870 PR c/65901
5871 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5872
6c1db78e
MP
58732015-04-25 Marek Polacek <polacek@redhat.com>
5874
5875 PR c/52085
5876 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5877 attribute.
5878
5c4abbb8
MP
58792015-04-23 Marek Polacek <polacek@redhat.com>
5880
5881 PR c/65345
5882 * c-decl.c (set_labels_context_r): New function.
5883 (store_parm_decls): Call it via walk_tree_without_duplicates.
5884 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5885 instead of create_tmp_var. Build TARGET_EXPR instead of
5886 COMPOUND_EXPR.
5887 (build_atomic_assign): Use create_tmp_var_raw instead of
5888 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5889
06aca1d5
IV
58902015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5891
5892 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5893 (c_parser_omp_target_update): Add missed %> to error_at ().
5894
8fba1830
BRF
58952015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5896
5897 PR target/55143
5898 * c-decl.c (c_default_pointer_mode): Remove definition.
5899 * c-tree.h (c_default_pointer_mode): Remove declaration.
5900
62021f64
TB
59012015-03-27 Tobias Burnus <burnus@net-b.de>
5902
5903 PR c/65586
5904 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5905 error out.
5906 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5907 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5908 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5909
9b65e171
JJ
59102015-03-19 Jakub Jelinek <jakub@redhat.com>
5911
5912 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5913 attribute for DECL_EXTERNAL VAR_DECLs.
5914
17958621
JJ
59152015-03-11 Jakub Jelinek <jakub@redhat.com>
5916
5917 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5918 argument.
5919
7ccb1a11
JJ
59202015-03-10 Jakub Jelinek <jakub@redhat.com>
5921
5922 PR c/65120
5923 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5924 before preparing arguments to warn_logical_not_parentheses.
5925
01177669
JJ
59262015-03-09 Jakub Jelinek <jakub@redhat.com>
5927
5928 PR c/65120
5929 * c-typeck.c (parser_build_binary_op): Don't warn for
5930 !!x == y or !b == y where b is _Bool.
5931
802ac282
MP
59322015-03-09 Marek Polacek <polacek@redhat.com>
5933
5934 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5935 * c-decl.c (grokdeclarator): Likewise.
5936 * c-typeck.c (build_binary_op): Likewise.
5937
e5165b60
MP
59382015-02-27 Marek Polacek <polacek@redhat.com>
5939
5940 PR c/65228
5941 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5942
065d214c
MP
59432015-02-14 Marek Polacek <polacek@redhat.com>
5944
5945 PR c/64768
5946 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5947 declared through a typedef name.
5948
e5d9235b
MP
59492015-02-13 Marek Polacek <polacek@redhat.com>
5950
5951 PR c/65050
5952 * c-decl.c (grokdeclarator): Print also the type when giving
5953 the error message about array's incomplete element type.
5954
fa01ffcc
JJ
59552015-02-11 Jakub Jelinek <jakub@redhat.com>
5956
5957 PR c/64824
5958 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5959 check in the POP macro.
5960
c3e38a03
MP
59612015-02-09 Marek Polacek <polacek@redhat.com>
5962
5963 PR c/64856
5964 * c-typeck.c (process_init_element): Don't always wrap
5965 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5966 initializing a range of elements.
5967
4886ec8e
JJ
59682015-02-04 Jakub Jelinek <jakub@redhat.com>
5969
5970 PR c/64824
5971 PR c/64868
5972 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5973
c3e38a03 59742015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5975
5976 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5977 processing enum declaration.
5978
7b33f0c8
MP
59792015-01-29 Marek Polacek <polacek@redhat.com>
5980
5981 PR c/64709
5982 * c-typeck.c (pop_init_level): If constructor_elements has
5983 exactly one element with integer_zerop value, set constructor_zeroinit
5984 to 1. Remove braces around warning_init call.
5985
dea63e49
JJ
59862015-01-27 Jakub Jelinek <jakub@redhat.com>
5987
5988 PR c/64766
5989 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5990 of FUNCTION_DECLs with error_mark_node.
5991
d38f7dce
JJ
59922015-01-26 Jakub Jelinek <jakub@redhat.com>
5993
5994 PR c/64778
5995 * c-typeck.c (convert_arguments): Return -1 if there are
5996 error_args, even if we've diagnosed too many arguments.
5997
cbf5d0e7
RB
59982015-01-21 Richard Biener <rguenther@suse.de>
5999
6000 PR middle-end/64313
6001 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6002 for builtins the user declared correctly.
6003
41dbbb37
TS
60042015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6005 Bernd Schmidt <bernds@codesourcery.com>
6006 Cesar Philippidis <cesar@codesourcery.com>
6007 James Norris <jnorris@codesourcery.com>
6008 Jakub Jelinek <jakub@redhat.com>
6009 Ilmir Usmanov <i.usmanov@samsung.com>
6010
6011 * c-parser.c: Include "gomp-constants.h".
6012 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6013 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6014 Use OMP_CLAUSE_SET_MAP_KIND.
6015 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6016 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6017 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6018 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6019 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6020 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6021 "copyout", "create", "delete", "deviceptr", "gang", "host",
6022 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6023 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6024 "present_or_create", "pcreate", "seq", "self", "vector",
6025 "vector_length", "wait", "worker".
6026 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6027 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6028 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6029 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6030 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6031 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6032 (c_parser_oacc_data_clause_deviceptr)
6033 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6034 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6035 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6036 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6037 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6038 (c_parser_oacc_parallel, c_parser_oacc_update)
6039 (c_parser_oacc_wait): New functions.
6040 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6041 (c_finish_oacc_data): New prototypes.
6042 * c-typeck.c: Include "gomp-constants.h".
6043 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6044 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6045 OMP_CLAUSE_SET_MAP_KIND.
6046 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6047 (c_finish_oacc_data): New functions.
6048 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6049 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6050 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6051 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6052 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6053 GOMP_MAP_FORCE_DEVICEPTR.
6054
adfac8df
JJ
60552015-01-09 Michael Collison <michael.collison@linaro.org>
6056
6057 * c-array-notation.c: Include hash-set.h, machmode.h,
6058 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6059 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6060 * c-aux-info.c: Ditto.
6061 * c-convert.c: Ditto.
6062 * c-decl.c: Ditto.
6063 * c-errors.c: Ditto.
6064 * c-lang.c: Dittoxs.
6065 * c-objc-common.c: Ditto.
6066 * c-parser.c: Ditto.
6067 * c-typeck.c: Include hash-set.h, machmode.h,
6068 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6069 fold-const.h, wide-int.h, inchash.h, real.h and
6070 fixed-value.h due to flattening of tree.h.
6071
2cc901dc
MP
60722015-01-07 Marek Polacek <polacek@redhat.com>
6073
6074 PR c/64417
6075 * c-typeck.c (process_init_element): Disallow initialization of
6076 a flexible array member with a string constant if the structure
6077 is in an array.
6078
5624e564
JJ
60792015-01-05 Jakub Jelinek <jakub@redhat.com>
6080
e5341100
JJ
6081 PR sanitizer/64344
6082 * c-typeck.c (convert_for_assignment, c_finish_return): For
6083 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6084 types also set in_late_binary_op around convert call.
6085 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6086 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6087 result on expr as last argument to ubsan_instrument_float_cast,
6088 if in_late_binary_op, don't use c_save_expr but save_expr.
6089
5624e564
JJ
6090 Update copyright years.
6091
5bd012f8
MP
60922015-01-05 Marek Polacek <polacek@redhat.com>
6093
6094 PR c/64423
6095 * c-typeck.c (build_array_ref): Pass loc down to
6096 warn_array_subscript_with_type_char.
6097
3f8257db 60982014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6099
6100 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6101 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6102 element type.
8e745a17 6103 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6104 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6105 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6106 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6107 to PEDWARN_FOR_QUALIFIERS.
768952be 6108
8f94a8c4
JJ
61092014-12-17 Jakub Jelinek <jakub@redhat.com>
6110
6111 PR sanitizer/64289
6112 * c-convert.c: Include ubsan.h.
6113 (convert): For real -> integral casts and
6114 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6115 instead instrument the float cast directly.
6116
b731b390
JJ
61172014-11-29 Jakub Jelinek <jakub@redhat.com>
6118
6119 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6120 c_finish_stmt_expr): Remove NULL last argument from
6121 create_tmp_var_raw and create_tmp_var calls.
6122 * c-array-notation.c (fix_builtin_array_notation_fn,
6123 build_array_notation_expr, fix_conditional_array_notations_1,
6124 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6125
541e35a6
MP
61262014-11-28 Marek Polacek <polacek@redhat.com>
6127
6128 PR c/63862
6129 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6130 convert the right operand to integer type.
6131
b286be94
MP
61322014-11-25 Marek Polacek <polacek@redhat.com>
6133
6134 PR c/63877
6135 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6136 for inline functions.
6137
aa7da51a
JJ
61382014-11-21 Jakub Jelinek <jakub@redhat.com>
6139
6140 PR target/63764
6141 * c-typeck.c (build_array_ref): Adjust
6142 convert_vector_to_pointer_for_subscript caller. If it returns true,
6143 call non_lvalue_loc on the result.
6144
d876207f
RB
61452014-11-11 Richard Biener <rguenther@suse.de>
6146
6147 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6148 to true.
6149
e5e44252
AK
61502014-11-10 Andi Kleen <ak@linux.intel.com>
6151
6152 PR c/60804
6153 * c-parser.c (c_parser_statement_after_labels): Call
6154 check_no_cilk.
6155 (c_parser_if_statement): Dito.
6156 (c_parser_switch_statement): Dito.
6157 (c_parser_while_statement): Dito.
6158 (c_parser_do_statement): Dito.
6159 (c_parser_for_statement): Dito.
6160 * c-typeck.c (c_finish_loop): Dito.
6161
13c21655
PC
61622014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6163
6164 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6165 OPT_Wshift_count_overflow in the warnings.
6166
2d51fcef
MP
61672014-10-30 Marek Polacek <polacek@redhat.com>
6168
6169 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6170 print the stripped version as well, if they're not the same.
6171
ef4bddc2
RS
61722014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6173
6174 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6175 machine_mode.
6176
c582198b
AM
61772014-10-28 Andrew MacLeod <amacleod@redhat.com>
6178
6179 * c-decl.c: Adjust include files.
6180 * c-parser.c: Ditto.
6181
ddc8de03
PM
61822014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6183 Tom Tromey <tromey@redhat.com>
6184
6185 * c-tree.h (enum c_oracle_request): New.
6186 (c_binding_oracle_function): New typedef.
6187 (c_binding_oracle, c_pushtag, c_bind): Declare.
6188 * c-decl.c (c_binding_oracle): New global.
6189 (I_SYMBOL_CHECKED): New macro.
6190 (i_symbol_binding): New function.
6191 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6192 (I_TAG_CHECKED): New macro.
6193 (i_tag_binding): New function.
6194 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6195 (I_LABEL_CHECKED): New macro.
6196 (i_label_binding): New function.
6197 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6198 (c_print_identifier): Save and restore c_binding_oracle.
6199 (c_pushtag, c_bind): New functions.
6200
60393bbc
AM
62012014-10-27 Andrew MacLeod <amacleod@redhat.com>
6202
6203 * c-typeck.c: Adjust include files.
6204
d723bb7c
MLI
62052014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6206
6207 PR c++/53061
6208 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6209 initialization here...
6210 (c_initialize_diagnostics): ... but here. Set defaults after
6211 building pretty-printer.
6212
1bc5a451
MP
62132014-10-23 Marek Polacek <polacek@redhat.com>
6214
6215 PR c/63626
6216 * c-decl.c (pop_scope): Don't print warning in external_scope.
6217
4435bb92
MP
62182014-10-19 Marek Polacek <polacek@redhat.com>
6219
6220 PR c/63567
6221 * c-typeck.c (output_init_element): Allow initializing objects with
6222 static storage duration with compound literals even in C99 and add
6223 pedwarn for it.
6224
7278465e
MP
62252014-10-17 Marek Polacek <polacek@redhat.com>
6226
6227 PR c/63567
6228 * c-typeck.c (digest_init): Allow initializing objects with static
6229 storage duration with compound literals even in C99 and add pedwarn
6230 for it.
6231
d9b7be2e
MP
62322014-10-17 Marek Polacek <polacek@redhat.com>
6233
6234 PR c/63543
6235 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6236 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6237 error multiple times. Print the type.
6238
f406ae1f
MP
62392014-10-17 Marek Polacek <polacek@redhat.com>
6240
6241 PR c/63549
6242 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6243 type.
6244
92574c7c
MP
62452014-10-17 Marek Polacek <polacek@redhat.com>
6246
6247 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6248 (start_function): Use OPT_Wimplicit_int instead of 0.
6249 (store_parm_decls_oldstyle): Likewise.
6250
1bc4a978
MT
62512014-10-17 Alan Modra <amodra@gmail.com>
6252
6253 PR middle-end/61848
6254 * c-decl.c (merge_decls): Don't merge section name or tls model
6255 to newdecl symtab node, instead merge to olddecl. Override
6256 existing olddecl section name. Set tls_model for all thread-local
6257 vars, not just OMP thread-private ones. Remove incorrect comment.
6258
83685514
AM
62592014-10-16 Andrew MacLeod <amacleod@redhat.com>
6260
6261 * c-decl.c: Adjust include files.
6262
78a7c317
DD
62632014-10-14 DJ Delorie <dj@redhat.com>
6264
6265 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6266 (c_token_starts_typename): Check all __intN, not just __int128.
6267 (c_token_starts_declspecs): Likewise.
6268 (c_parser_declspecs): Likewise.
6269 (c_parser_attribute_any_word): Likewise.
6270 (c_parser_objc_selector): Likewise.
6271 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6272 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6273 is specified.
6274 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6275 __int128.
6276 (finish_declspecs): Likewise.
6277
74d98c1e
AB
62782014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6279
8e745a17 6280 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6281 the duplicate code.
8e745a17 6282 (c_parser_statement): Call the new function.
74d98c1e 6283
84937de2
MP
62842014-10-09 Marek Polacek <polacek@redhat.com>
6285
6286 PR c/63480
6287 * c-typeck.c (pop_init_level): Don't warn about initializing
6288 with { }.
6289
0382aaa0
MP
62902014-10-07 Marek Polacek <polacek@redhat.com>
6291
6292 PR c/59717
6293 * c-decl.c (header_for_builtin_fn): New function.
6294 (implicitly_declare): Suggest which header to include.
6295
7a0ca710
MP
62962014-10-07 Marek Polacek <polacek@redhat.com>
6297
6298 * c-convert.c (convert): Use error_operand_p.
6299 * c-typeck.c (require_complete_type): Likewise.
6300 (really_atomic_lvalue): Likewise.
6301 (digest_init): Likewise.
6302 (handle_omp_array_sections_1): Likewise.
6303
6bc8a126
MP
63042014-10-03 Marek Polacek <polacek@redhat.com>
6305
6306 PR c/63453
6307 * c-decl.c (pop_scope): Don't warn about "inline function declared
6308 but never defined" for functions marked with gnu_inline attribute.
6309
d90c0a59
JJ
63102014-09-25 Jakub Jelinek <jakub@redhat.com>
6311
6312 PR c++/63249
6313 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6314 on low_bound and length.
6315
083e891e
MP
63162014-09-24 Marek Polacek <polacek@redhat.com>
6317
6318 PR c/61405
6319 PR c/53874
6320 * c-parser.c: Don't define CPP_KEYWORD.
6321 (c_parser_switch_statement): Pass original type to c_finish_case.
6322 * c-tree.h (c_finish_case): Update declaration.
6323 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6324 conditionally to c_do_switch_warnings.
6325
8d95fe25
MP
63262014-09-03 Marek Polacek <polacek@redhat.com>
6327
6328 PR c/62024
6329 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6330 conversions.
6331
9a771876
JJ
63322014-09-02 Jakub Jelinek <jakub@redhat.com>
6333 Balaji V. Iyer <balaji.v.iyer@intel.com>
6334 Igor Zamyatin <igor.zamyatin@intel.com>
6335
6336 * c-parser.c (c_parser_cilk_for): New function.
6337 (c_parser_cilk_grainsize): Likewise.
6338 (c_get_temp_regvar): Likewise.
6339 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6340 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6341 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6342 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6343 case.
6344
b7679d96
CG
63452014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6346
6347 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6348 with using HOST_WIDE_INT without truncation to 'int'
6349
59ea0364
MP
63502014-08-22 Marek Polacek <polacek@redhat.com>
6351
6352 PR c++/62199
6353 * c-typeck.c (parser_build_binary_op): Adjust call to
6354 warn_logical_not_parentheses.
6355
671a475e
IZ
63562014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6357
6358 PR other/62008
6359 * c-parser.c (c_parser_array_notation): Check for correct
6360 type of an array added.
6361
04159acf
MP
63622014-08-19 Marek Polacek <polacek@redhat.com>
6363
6364 PR c++/62153
6365 * c-typeck.c (build_binary_op): If either operand of a comparison
6366 is a boolean expression, call maybe_warn_bool_compare.
6367
c77935ee
PP
63682014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6369
6370 PR c/45584
6371 * c-typeck.c (build_c_cast): Do a conversion even when the
6372 TYPE_MAIN_VARIANTs are the same.
6373
35aff4fb
MP
63742014-08-19 Marek Polacek <polacek@redhat.com>
6375
6376 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6377 pedwarn_c99 instead of pedwarn.
6378 (grokfield): Likewise.
6379 (warn_defaults_to): New function.
6380 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6381 Unconditionally call pedwarn_c99 instead of pedwarn.
6382 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6383 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6384 check flag_isoc11 before.
6385 * c-errors.c (pedwarn_c99): Change the return type to bool.
6386 Handle -Wc99-c11-compat.
6387 * c-parser.c (disable_extension_diagnostics): Handle
6388 warn_c99_c11_compat.
6389 (restore_extension_diagnostics): Likewise.
6390 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6391 instead of pedwarn, don't check flag_isoc11 before.
6392 (c_parser_declspecs): Likewise.
6393 (c_parser_alignas_specifier): Likewise.
6394 (c_parser_alignof_expression): Likewise.
6395 (c_parser_generic_selection): Likewise.
6396 * c-tree.h (pedwarn_c99): Update declaration.
6397 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6398 of pedwarn_c99.
6399
177cce46
MP
64002014-08-19 Marek Polacek <polacek@redhat.com>
6401
6402 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6403 to pedwarn_c90.
6404 * c-errors.c: Include "opts.h".
6405 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6406 * c-parser.c (disable_extension_diagnostics): Handle negative value
6407 of warn_c90_c99_compat, too.
6408 (restore_extension_diagnostics): Likewise.
6409 (c_parser_compound_statement_nostart): Pass
6410 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6411
6dc99c33
MP
64122014-08-12 Marek Polacek <polacek@redhat.com>
6413
6414 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6415 Add pedwarn.
6416 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6417 Likewise.
6418 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6419
3f8257db 64202014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6421
6422 PR c/51849
6423 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6424 Call pedwarn_c90 instead of pedwarn.
6425 (check_bitfield_type_and_width): Likewise.
6426 (declspecs_add_qual): Likewise.
6427 (declspecs_add_type): Likewise.
6428 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6429 Adjust to only call pedwarn_c90.
6430 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6431 pedwarn_c90 instead of pedwarn.
6432 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6433 * c-parser.c (disable_extension_diagnostics): Handle
6434 warn_c90_c99_compat.
6435 (restore_extension_diagnostics): Likewise.
6436 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6437 pedwarn_c90 instead of pedwarn.
6438 (c_parser_initelt): Likewise.
6439 (c_parser_postfix_expression): Likewise.
6440 (c_parser_postfix_expression_after_paren_type): Likewise.
6441 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6442 * c-tree.h: Fix formatting.
6443 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6444 pedwarn_c90 instead of pedwarn.
6445
9f25a338
TS
64462014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6447
6448 * c-typeck.c: Remove include of pointer-set.h.
6449
044331a8
MP
64502014-08-07 Marek Polacek <polacek@redhat.com>
6451
6452 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6453
b787e7a2
TS
64542014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6455
6456 * c-typeck.c: Use hash_map instead of pointer_map.
6457
6e2830c3
TS
64582014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6459
6460 * c-decl.c: Use hash_set instead of pointer_set.
6461
a7ee52fb
IZ
64622014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6463
6464 PR middle-end/61455
6465 * c-array-notation.c (expand_array_notations): Handling
6466 of DECL_EXPR added.
6467
b4dfdc11
MG
64682014-07-31 Marc Glisse <marc.glisse@inria.fr>
6469
6470 PR c++/60517
6471 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6472 a local variable.
6473
976d5a22
TT
64742014-07-30 Tom Tromey <tromey@redhat.com>
6475
6476 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6477 field.
6478 (really_start_incremental_init, push_init_level): Initialize
6479 designator_depth.
6480 (pop_init_level): Set global designator_depth.
6481 (process_init_element): Check for designated_init attribute.
6482
30281de2
MP
64832014-07-20 Marek Polacek <polacek@redhat.com>
6484
6485 PR c/61852
6486 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6487 (implicitly_declare): Pass location to implicit_decl_warning.
6488
b108f48f
JJ
64892014-07-14 Jakub Jelinek <jakub@redhat.com>
6490
6491 PR middle-end/61294
6492 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6493 If non-NULL, call c_parser_check_literal_zero.
6494 (c_parser_check_literal_zero): New function.
6495 (c_parser_postfix_expression_after_primary): Adjust
6496 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6497
773ec47f
MP
64982014-07-06 Marek Polacek <polacek@redhat.com>
6499
6500 PR c/6940
6501 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6502 * c-tree.h (C_ARRAY_PARAMETER): Define.
6503 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6504 function parameter.
6505
22e1cf1c 65062014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6507 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6508
6509 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6510 releasing symbol.
6511
52ec0ea3
MP
65122014-07-01 Marek Polacek <polacek@redhat.com>
6513
6514 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6515 instead of 0 to WARN_FOR_ASSIGNMENT.
6516
d5c3d343
MP
65172014-07-01 Marek Polacek <polacek@redhat.com>
6518
6519 PR c/58286
6520 * c-typeck.c (convert_for_assignment): Pass
6521 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6522
6a7253a4
MP
65232014-06-30 Marek Polacek <polacek@redhat.com>
6524
6525 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6526 has no_sanitize_undefined attribute.
6527
5e88a8f4
IZ
65282014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6529
6530 PR middle-end/57541
6531 * c-array-notation.c (fix_builtin_array_notation_fn):
6532 Check for 0 arguments in builtin call. Check that bultin argument is
6533 correct.
6534 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6535 index.
6536
9698b078
SH
65372014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6538
6539 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6540 qualifiers in __auto_type for atomic types.
6541 (c_parser_typeof_specifier): Discard all type qualifiers in
6542 __typeof__ for atomic types.
6543
6e07c515
MP
65442014-06-25 Marek Polacek <polacek@redhat.com>
6545
6546 PR c/61162
6547 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6548 the return expression to c_finish_return.
6549
da6f124d
JJ
65502014-06-25 Jakub Jelinek <jakub@redhat.com>
6551
6552 * c-typeck.c (c_finish_omp_clauses): Make sure
6553 OMP_CLAUSE_LINEAR_STEP has correct type.
6554
c203e8a7
TS
65552014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6556
6557 * c-decl.c: Adjust.
6558
56ad0e38
JJ
65592014-06-24 Jakub Jelinek <jakub@redhat.com>
6560
6561 * c-parser.c (c_parser_omp_for_loop): For
6562 #pragma omp parallel for simd move lastprivate clause from parallel
6563 to for rather than simd.
6564
47c2554f
MP
65652014-06-23 Marek Polacek <polacek@redhat.com>
6566
6567 * c-typeck.c (parser_build_binary_op): Don't call
6568 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6569
56363ffd
JH
65702014-06-15 Jan Hubicka <hubicka@ucw.cz>
6571
6572 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6573 * c-decl.c (merge_decls): Likewise.
6574
d7ff7ae5
MP
65752014-06-09 Marek Polacek <polacek@redhat.com>
6576
6577 PR c/36446
6578 * c-typeck.c (error_init): Call inform instead of error_at.
6579 (pedwarn_init): Call inform instead of pedwarn.
6580 (warning_init): Call inform instead of warning_at.
6581
24d047a3
JH
65822014-06-07 Jan Hubicka <hubicka@ucw.cz>
6583
6584 * c-decl.c (merge_decls): Use set_decl_section_name.
6585 (duplicate_decls): Remove node if it exists.
6586
9bac5cbb
G
65872014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6588
6589 PR c/53119
6590 * c-typeck.c (push_init_level, process_init_element,
6591 pop_init_level): Correct check for zero initialization, move
6592 missing brace warning to respect zero initialization.
6593
8ffcdea8
MP
65942014-06-05 Marek Polacek <polacek@redhat.com>
6595
6596 PR c/56724
6597 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6598
742938c9
MP
65992014-06-05 Marek Polacek <polacek@redhat.com>
6600
6601 PR c/49706
6602 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6603 on the left hand side operand of a comparison.
742938c9 6604
6447c55d
MP
66052014-06-05 Marek Polacek <polacek@redhat.com>
6606
6607 PR c/48062
6608 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6609 Print note only if the warning was printed.
6610
9dc7743c
IZ
66112014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6612
6613 PR c/58942
6614 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6615 with a pointer.
6616
fedfecef
MP
66172014-06-03 Marek Polacek <polacek@redhat.com>
6618
6619 PR c/60439
6620 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6621 c_start_case.
6622 * c-tree.h (c_start_case): Update.
6623 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6624 switch condition has boolean value.
6625
9b2b7279
AM
66262014-06-02 Andrew MacLeod <amacleod@redhat.com>
6627
6628 * c-decl.c: Include builtins.h.
6629 * c-parser.c: Likewise.
6630
5c1bc275
MP
66312014-05-27 Marek Polacek <polacek@redhat.com>
6632
6633 PR c/56724
6634 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6635 error and warning calls to error_at and warning_at. Pass location of
6636 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6637 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6638 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6639
97563bc8
IZ
66402014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6641
6642 PR c/61191
6643 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6644 function parameters.
6645
aede2c10
JH
66462014-05-23 Jan Hubicka <hubicka@ucw.cz>
6647
6648 * c-decl.c (merge_decls): Preserve symtab node pointers.
6649 (duplicate_decls): Free new decl.
6650
edbba2ce
TS
66512014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6652
f3316c6d
TS
6653 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6654 initialization.
6655
edbba2ce
TS
6656 * c-parser.c (c_parser_omp_target): Return bool values.
6657
68c81f24
TS
66582014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6659
6660 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6661 num_teams_loc variable to num_thread_limit_loc.
6662
632f2871
RS
66632014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6664
6665 * c-array-notation.c (expand_array_notations): Use void_node
6666 instead of void_zero_node.
6667
766090c2
TS
66682014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6669
6670 * c-decl.c (finish_struct): Adjust.
6671 (finish_enum): Likewise.
6672 (bind): Adjust.
6673 (record_inline_static): Likewise.
6674 (push_scope): Likewise.
6675 (make_label): Likewise.
6676 (lookup_label_for_goto): Likewise.
6677 (finish_struct): Likewise.
6678 (finish_enum): Likewise.
6679 (store_parm_decls): Likewise.
6680 (c_push_function_context): Likewise.
6681 * c-lang.h: Remove usage of variable_size gty attribute.
6682 * c-parser.c (c_parse_init): Adjust.
6683 (c_parse_file): Likewise.
6684
2b107f6b
MP
66852014-05-13 Marek Polacek <polacek@redhat.com>
6686
6687 PR c/61162
6688 * c-typeck.c (convert_for_assignment): Pass location to
6689 WARN_FOR_ASSIGNMENT instead of input_location.
6690
d033409e
MP
66912014-05-10 Marek Polacek <polacek@redhat.com>
6692
6693 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6694 maybe_warn_string_init.
6695 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6696 maybe_warn_string_init.
6697 * c-tree.h (maybe_warn_string_init): Update declaration.
6698 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6699 Call pedwarn_init with loc instead of with input_location.
6700 (digest_init): Pass init_loc to maybe_warn_string_init.
6701 (pop_init_level): Call pedwarn_init with loc instead of with
6702 input_location.
6703 (set_init_index): Likewise.
6704 (process_init_element): Likewise.
6705
ea58ef42
MP
67062014-05-09 Marek Polacek <polacek@redhat.com>
6707
6708 PR c/61096
6709 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6710 (c_parser_initelt): Pass location to set_init_label. Pass array index
6711 location to set_init_index.
6712 * c-tree.h (push_init_level): Update declaration.
6713 (pop_init_level): Likewise.
6714 (set_init_index): Likewise.
6715 (set_init_label): Likewise.
6716 * c-typeck.c (error_init): Add location parameter. Call error_at
6717 instead of error.
6718 (digest_init): Pass init_loc to error_init.
6719 (really_start_incremental_init):
6720 (push_init_level): Add location parameter. Pass loc to pop_init_level
6721 and error_init.
6722 (pop_init_level): Likewise.
6723 (set_designator): Add location parameter. Pass loc to pop_init_level,
6724 push_init_level, and error_init.
6725 (set_init_index): Add location parameter. Pass loc to error_init and
6726 set_designator.
6727 (set_init_label): Likewise.
6728 (output_init_element): Pass loc to error_init.
6729 (process_init_element): Pass loc to error_init, pop_init_level,
6730 pedwarn_init, and push_init_level.
6731
661a0813
MP
67322014-05-09 Marek Polacek <polacek@redhat.com>
6733
6734 PR c/50459
6735 * c-parser.c (c_parser_attributes): Parse the arguments as an
6736 expression-list if the attribute takes identifier.
6737
2793eeab
MP
67382014-05-08 Marek Polacek <polacek@redhat.com>
6739
6740 PR c/61053
6741 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6742 TYPE_ALIGN_UNIT.
6743
f827930a
MP
67442014-05-08 Marek Polacek <polacek@redhat.com>
6745
6746 PR c/61077
6747 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6748 of main.
6749
1d60af08
KZ
67502014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6751 Mike Stump <mikestump@comcast.net>
6752 Richard Sandiford <rdsandiford@googlemail.com>
6753
6754 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6755 (finish_enum): Use wide-int interfaces.
6756 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6757 * c-typeck.c (build_c_cast): Likewise.
6758 (set_nonincremental_init_from_string): Likewise.
6759 (c_tree_equal): Likewise.
6760
a0e24419
MP
67612014-05-02 Marek Polacek <polacek@redhat.com>
6762
6763 PR c/25801
6764 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6765 Return size_one_node when the type is not complete.
6766 (pointer_diff): Remove comment.
6767 (build_unary_op): Improve error messages.
6768
19fc9faa
MP
67692014-05-02 Marek Polacek <polacek@redhat.com>
6770
6771 * c-typeck.c (c_finish_return): Separate warning_at calls.
6772
63bc4e87
MP
67732014-05-02 Marek Polacek <polacek@redhat.com>
6774
6775 * c-tree.h (error_init): Remove declaration.
6776 (pedwarn_init): Likewise.
6777 * c-typeck.c (error_init): Make static and move above.
6778 (pedwarn_init): Likewise.
6779 (warning_init): Move above.
6780 (maybe_warn_string_init): Likewise.
6781
4bd2511b
JL
67822014-05-01 Jeff Law <law@redhat.com>
6783
6784 Revert:
6785
6786 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6787 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6788 avoid goto.
6789
6a358dcb
MP
67902014-05-02 Marek Polacek <polacek@redhat.com>
6791
6792 PR c/60784
6793 * c-typeck.c (push_init_level): Set constructor_designated to
6794 p->designated for structures.
6795
ae5ebda4
MP
67962014-05-01 Marek Polacek <polacek@redhat.com>
6797
6798 PR c/60915
6799 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6800 function-definition has an attribute after the declarator.
6801
96b40f8d
MP
68022014-05-01 Marek Polacek <polacek@redhat.com>
6803
6804 PR c/60257
6805 * c-typeck.c (warning_init): Add location_t parameter. Call
6806 warning_at instead of warning.
6807 (push_init_level): Pass input_location to warning_init.
6808 (add_pending_init): Add location_t parameter. Pass loc to
6809 warning_init.
6810 (set_nonincremental_init): Pass input_location to add_pending_init.
6811 (set_nonincremental_init_from_string): Likewise.
6812 (output_init_element): Pass loc to warning_init and to
6813 add_pending_init.
6814
32e00768
MP
68152014-05-01 Marek Polacek <polacek@redhat.com>
6816
6817 PR c/43395
6818 * c-typeck.c (c_finish_return): Distinguish between label and variable
6819 when warning about returning local address.
6820
c9379ce2
MP
68212014-05-01 Marek Polacek <polacek@redhat.com>
6822
6823 PR c/29467
6824 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6825 in C89 mode.
6826
d00887e8
MP
68272014-05-01 Marek Polacek <polacek@redhat.com>
6828
6829 PR c/43245
6830 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6831 instead of 0 to WARN_FOR_QUALIFIERS.
6832
5436fa2e
MP
68332014-05-01 Marek Polacek <polacek@redhat.com>
6834
6835 PR c/56989
6836 * c-typeck.c (default_conversion): Use better location for
6837 error call.
6838
f8ed5150
MP
68392014-04-30 Marek Polacek <polacek@redhat.com>
6840
6841 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6842 also when SANITIZE_FLOAT_DIVIDE is on.
6843
8337d1db
MP
68442014-04-30 Marek Polacek <polacek@redhat.com>
6845
6846 PR c/60139
6847 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6848 and pedwarn_init. Use loc insted of input_location.
6849
c4bdc42f
MP
68502014-04-30 Marek Polacek <polacek@redhat.com>
6851
6852 PR c/60351
6853 * c-typeck.c (build_binary_op): Use location when warning about
6854 shift count.
6855
45484dcf
MP
68562014-04-25 Marek Polacek <polacek@redhat.com>
6857
6858 PR c/18079
6859 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6860 always_inline/noinline and hot/cold attributes.
6861
34cf811f
MP
68622014-04-25 Marek Polacek <polacek@redhat.com>
6863
6864 PR c/60114
6865 * c-parser.c (c_parser_initelt): Pass input_location to
6866 process_init_element.
6867 (c_parser_initval): Pass loc to process_init_element.
6868 * c-tree.h (process_init_element): Adjust declaration.
6869 * c-typeck.c (push_init_level): Pass input_location to
6870 process_init_element.
6871 (pop_init_level): Likewise.
6872 (set_designator): Likewise.
6873 (output_init_element): Add location_t parameter. Pass loc to
6874 digest_init.
6875 (output_pending_init_elements): Pass input_location to
6876 output_init_element.
6877 (process_init_element): Add location_t parameter. Pass loc to
6878 output_init_element.
6879
42056eac
JJ
68802014-04-24 Jakub Jelinek <jakub@redhat.com>
6881
6882 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6883 atomic-clause, allow comma in between atomic-clause and
6884 seq_cst.
6885
e162a134
JJ
68862014-04-22 Jakub Jelinek <jakub@redhat.com>
6887
6888 PR c/59073
6889 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6890 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6891
2f6babac
IZ
68922014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6893
6894 PR middle-end/60469
6895 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6896 create_tmp_var instead build_decl for creating temps.
6897 (build_array_notation_expr): Likewise.
6898 (fix_conditional_array_notations_1): Likewise.
6899 (fix_array_notation_expr): Likewise.
6900 (fix_array_notation_call_expr): Likewise.
6901
8edbfaa6
JJ
69022014-03-28 Jakub Jelinek <jakub@redhat.com>
6903
6904 PR c++/60689
6905 * c-tree.h (c_build_function_call_vec): New prototype.
6906 * c-typeck.c (build_function_call_vec): Don't call
6907 resolve_overloaded_builtin here.
6908 (c_build_function_call_vec): New wrapper function around
6909 build_function_call_vec. Call resolve_overloaded_builtin here.
6910 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6911 Call c_build_function_call_vec instead of build_function_call_vec.
6912 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6913 * c-decl.c (finish_decl): Likewise.
6914
7485aeea
MLI
69152014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6916
6917 PR c/55383
6918 * c-typeck.c: Use correct format string in cast-qual warning
6919
b17a8b07
TS
69202014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6921
6922 * c-decl.c (c_decl_attributes): Use
6923 lang_hooks.types.omp_mappable_type.
6924 * c-typeck.c (c_finish_omp_clauses): Likewise.
6925
3af9c5e9
MP
69262014-03-06 Marek Polacek <polacek@redhat.com>
6927
6928 PR c/60197
6929 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6930 of checking tree code.
6931
1c9f5f33
PK
69322014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6933
6934 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6935 (c_parser_parameter_declaration): Likewise.
6936
cc28fc7f
MP
69372014-02-19 Marek Polacek <polacek@redhat.com>
6938
6939 PR c/60195
6940 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6941 Call mark_exp_read on exp.value.
6942 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6943 TREE_ADDRESSABLE on old instead of val.
6944 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6945
b581c05c
PK
69462014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6947
6948 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6949 C_EXPR_APPEND by vec_safe_push.
6950 * c-tree.h (C_EXPR_APPEND): Remove.
6951
81e5eca8
MP
69522014-01-31 Marek Polacek <polacek@redhat.com>
6953
6954 PR c/59963
6955 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6956 build_function_call_vec.
6957 (build_function_call): Likewise.
6958 (build_atomic_assign): Likewise.
6959 (build_function_call_vec): Add arg_loc parameter. Use it.
6960 (convert_arguments): Likewise.
6961 (convert_for_assignment): Rename rhs_loc to expr_loc.
6962 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6963 (c_parser_objc_keywordexpr): Likewise.
6964 (c_parser_postfix_expression_after_primary): Call
6965 build_function_call_vec with expr_loc rather than op_loc.
6966 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6967 build_function_call_vec.
6968 (c_parser_expr_list): Add locations parameter. Fill it with locations
6969 of function arguments.
6970 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6971
68fca595
MP
69722014-01-30 Marek Polacek <polacek@redhat.com>
6973
6974 PR c/59940
6975 * c-typeck.c (build_function_call_vec): Use loc parameter.
6976 (convert_arguments): Add location parameter. Use it.
6977 (ep_convert_and_check): Likewise.
6978 (build_atomic_assign): Adjust convert_for_assignment call.
6979 (build_modify_expr): Likewise.
6980 (digest_init): Likewise.
6981 (c_finish_return): Likewise.
6982 (build_conditional_expr): Adjust ep_convert_and_check calls.
6983 (convert_for_assignment): Add rhs_loc parameter. Use it.
6984 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6985 calls.
6986
fa337f3a
RB
69872014-01-30 Richard Biener <rguenther@suse.de>
6988
6989 PR c/59905
6990 * c-typeck.c (build_function_call_vec): Do not replace calls
6991 to a function via an incompatible type with a runtime abort.
6992
b72271b9
BI
69932014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6994
6995 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6996 flag_enable_cilkplus with flag_cilkplus.
6997 (c_parser_direct_declarator_inner): Likewise.
6998 (c_parser_attribute_any_word): Likewise.
6999 (c_parser_attributes): Likewise.
7000 (c_parser_compound_statement): Likewise.
7001 (c_parser_statement_after_labels): Likewise.
7002 (c_parser_if_statement): Likewise.
7003 (c_parser_switch_statement): Likewise.
7004 (c_parser_do_statement): Likewise.
7005 (c_parser_for_statement): Likewise.
7006 (c_parser_unary_expression): Likewise.
7007 (c_parser_postfix_expression): Likewise.
7008 (c_parser_postfix_expression_after_primary): Likewise.
7009 (c_parser_postfix_expression_after_primary): Likewise.
7010 (c_parser_omp_clause_name): Likewise.
7011 (c_finish_omp_declare_simd): Likewise.
7012 (c_parser_cilk_verify_simd): Likewise.
7013 * c-typeck.c (build_array_ref): Likewise.
7014 (build_function_call_vec): Likewise.
7015 (convert_arguments): Likewise.
7016 (build_compound_expr): Likewise.
7017 (c_finish_return): Likewise.
7018 (c_finish_if_stmt): Likewise.
7019 (c_finish_loop): Likewise.
7020 (build_binary_op): Likewise.
7021
393e8e8b
MP
70222014-01-23 Marek Polacek <polacek@redhat.com>
7023
7024 PR c/59846
7025 * c-typeck.c (parser_build_binary_op): Use location instead of
7026 input_location.
7027 (build_binary_op): Pass location to shorten_compare.
7028
f04dda30
MP
70292014-01-23 Marek Polacek <polacek@redhat.com>
7030
7031 PR c/58346
7032 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7033 an empty aggregate.
7034
789eadcd
MP
70352014-01-23 Marek Polacek <polacek@redhat.com>
7036
7037 PR c/59871
7038 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7039 of a comma expression.
7040 (emit_side_effect_warnings): Likewise.
7041
40f14e9f
BI
70422014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7043
7044 PR c/59825
7045 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7046 function to use walk_tree and moved a lot of its functionality to
7047 expand_array_notations.
7048 (expand_array_notations): New function.
7049
74558dd9
BI
70502014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7051
7052 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7053 attribute an attribute without value.
7054
652fea39
JJ
70552014-01-23 Jakub Jelinek <jakub@redhat.com>
7056
7057 PR middle-end/58809
7058 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7059 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7060
f34f1c87
MP
70612014-01-22 Marek Polacek <polacek@redhat.com>
7062
7063 PR c/59891
7064 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7065 of remove_c_maybe_const_expr on op1 and op2.
7066
241f845a
JJ
70672014-01-15 Jakub Jelinek <jakub@redhat.com>
7068
7069 PR c/58943
7070 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7071 effects, preevaluate rhs using SAVE_EXPR first.
7072
9a74f20c
BI
70732014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7074
7075 PR c++/59631
7076 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7077 statements with if-elseif statements.
7078
96066ce1
MP
70792014-01-06 Marek Polacek <polacek@redhat.com>
7080
7081 PR c/57773
7082 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7083 defined bit-field types only in ISO C.
7084
23a5b65a
RS
70852014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7086
7087 Update copyright years
7088
f9030485
RS
70892014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7090
7091 * c-array-notation.c: Use the standard form for the copyright notice.
7092
41958c28
BI
70932013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7094
7095 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7096 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7097 field in parser is not empty. If not-empty, call the function
7098 c_parser_finish_omp_declare_simd.
7099 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7100 between SIMD-enabled functions and #pragma simd. Added new parameter.
7101 (c_parser_cilk_all_clauses): Modified the usage of the function
7102 c_parser_cilk_clause_vectorlength as mentioned above.
7103 (c_parser_cilk_simd_fn_vector_attrs): New function.
7104 (c_finish_cilk_simd_fn_tokens): Likewise.
7105 (is_cilkplus_vector_p): Likewise.
7106 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7107 "nomask," and "mask" strings in clause name.
7108 (c_parser_omp_all_clauses): Added 3 new case statements:
7109 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7110 PRAGMA_CILK_CLAUSE_NOMASK.
7111 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7112 check for vector attribute and if so call the function
7113 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7114 called the function c_finish_cilk_simd_fn_tokens.
7115 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7116 parser field is non-empty. If so, parse them as you would parse
7117 the omp declare simd pragma.
7118 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7119 Added a check when step is a parameter and flag it as error.
7120 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7121 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7122 pragma_omp_clause.
7123
cef0fd0e
TS
71242013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7125
7126 * c-parser.c (c_parser_omp_parallel): Fix description.
7127
12893402
BI
71282013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7129
7130 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7131 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7132 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7133 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7134
296674db
JM
71352013-12-04 Joseph Myers <joseph@codesourcery.com>
7136
7137 PR c/52023
7138 * c-parser.c (c_parser_alignas_specifier): Use
7139 c_sizeof_or_alignof_type instead of c_alignof.
7140 (c_parser_alignof_expression): Likewise, with min_alignof
7141 parameter depending on alignof spelling used.
7142
edd28054
MP
71432013-12-04 Marek Polacek <polacek@redhat.com>
7144
7145 PR c/54113
7146 * c-decl.c (start_function): Don't warn for missing prototype for
7147 inline functions.
7148
da0fc454
MP
71492013-12-03 Marek Polacek <polacek@redhat.com>
7150
7151 PR c/59351
7152 * c-decl.c (build_compound_literal): Allow compound literals with
7153 empty initial value.
7154
4c2ecab0
JM
71552013-12-02 Joseph Myers <joseph@codesourcery.com>
7156
7157 PR c/58235
7158 * c-typeck.c (build_modify_expr): Diagnose assignment to
7159 expression with array type.
7160
340baef7
JM
71612013-11-29 Joseph Myers <joseph@codesourcery.com>
7162
7163 PR c/42262
7164 * c-typeck.c (process_init_element): Do not treat a string as
7165 initializing a whole array when used with a designator for an
7166 individual element.
7167
6763b9f7
JM
71682013-11-29 Joseph Myers <joseph@codesourcery.com>
7169
7170 PR c/57574
7171 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7172 an inline function following a static declaration.
7173
e7bd1de1
JJ
71742013-11-28 Jakub Jelinek <jakub@redhat.com>
7175
7176 PR c/59310
7177 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7178 to p_name before calling c_parser_omp_teams instead of after.
7179 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7180 argument. Remove unused p_name variable.
7181
0136f8f0
AH
71822013-11-27 Aldy Hernandez <aldyh@redhat.com>
7183 Jakub Jelinek <jakub@redhat.com>
7184
7185 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7186 external_scope is NULL.
7187
241b71bb
TV
71882013-11-27 Tom de Vries <tom@codesourcery.com>
7189 Marc Glisse <marc.glisse@inria.fr>
7190
7191 PR c++/59032
7192 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7193
2fb9a547
AM
71942013-11-22 Andrew MacLeod <amacleod@redhat.com>
7195
7196 * c-typeck.c: Add required include files from gimple.h.
7197
8400e75e
DM
71982013-11-22 David Malcolm <dmalcolm@redhat.com>
7199
7200 * c-decl.c (define_label, shadow_tag_warned)
7201 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7202 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7203 (declspecs_add_type): Remove use of in_system_header macro.
7204 * c-parser.c (c_parser_unary_expression): Likewise.
7205 * c-typeck.c (store_init_value, process_init_element)
7206 (c_start_case): Likewise.
7207
7208 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7209 macro.
7210
7211 * c-parser.c (c_parser_set_source_position_from_token): Remove
7212 reference to in_system_header from comment.
7213
386b1f1f
RS
72142013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7215
7216 * c-decl.c (grokdeclarator): Update comment to refer to
7217 tree_to_[su]hwi rather than tree_low_cst.
7218
ae7e9ddd
RS
72192013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7220
7221 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7222 tree_to_uhwi throughout.
7223
9439e9a1
RS
72242013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7225
7226 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7227 throughout.
7228
9541ffee
RS
72292013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7230
7231 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7232 throughout.
7233
c02065fc
AH
72342013-11-15 Aldy Hernandez <aldyh@redhat.com>
7235
7236 * c-parser.c (c_parser_cilk_simd): New.
7237 (c_parser_cilk_verify_simd): New.
7238 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7239 (c_parser_omp_for_loop): Add case for NE_EXPR.
7240 Set c_break_label for CILK_SIMD.
7241 (c_parser_cilk_clause_vectorlength): New.
7242 (c_parser_cilk_clause_linear): New.
7243 (c_parser_cilk_clause_name): New.
7244 (c_parser_cilk_all_clauses): New.
7245 * c-typeck.c (build_unary_op): Pass location argument to
7246 readonly_error.
7247 (build_modify_expr): Same.
7248 (build_asm_expr): Same.
7249 (c_finish_bc_stmt): Error on break/continue in loops.
7250
18f429e2
AM
72512013-11-14 Andrew MacLeod <amacleod@redhat.com>
7252
7253 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7254
d8a2d370
DN
72552013-11-14 Diego Novillo <dnovillo@google.com>
7256
7257 * c-decl.c: Include print-tree.h.
7258 Include stor-layout.h.
7259 Include varasm.h.
7260 Include attribs.h.
7261 Include stringpool.h.
7262 * c-lang.c: Include fold-const.h.
7263 * c-parser.c: Include stringpool.h.
7264 Include attribs.h.
7265 Include stor-layout.h.
7266 Include varasm.h.
7267 Include trans-mem.h.
7268 * c-typeck.c: Include stor-layout.h.
7269 Include trans-mem.h.
7270 Include varasm.h.
7271 Include stmt.h.
7272
38b7bc7f
JM
72732013-11-13 Joseph Myers <joseph@codesourcery.com>
7274
7275 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7276 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7277 __auto_type.
7278 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7279 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7280 RID_AUTO_TYPE.
7281 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7282 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7283 (c_parser_declarator, c_parser_direct_declarator_inner)
7284 (c_parser_parameter_declaration, c_parser_type_name): All callers
7285 changed.
7286 (c_parser_declaration_or_fndef): Handle declarations with type
7287 determined from the initializer.
7288
45b0be94
AM
72892013-11-12 Andrew MacLeod <amacleod@redhat.com>
7290
18f429e2 7291 * c-typeck.c: Include gimplify.h.
45b0be94 7292
582d9b50
JM
72932013-11-12 Joseph Myers <joseph@codesourcery.com>
7294
7295 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7296 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7297 comment.
7298 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7299 or _Thread_local as appropriate in diagnostics.
7300 (build_null_declspecs): Initialize ret->thread_gnu_p.
7301 (declspecs_add_scspec): Handle either __thread or _Thread_local
7302 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7303 pedantic. Do not disallow _Thread_local extern and _Thread_local
7304 static.
7305
267bac10
JM
73062013-11-07 Joseph Myers <joseph@codesourcery.com>
7307 Andrew MacLeod <amacleod@redhat.com>
7308
7309 * c-aux-info.c (gen_type): Handle atomic qualifier.
7310 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7311 qualifiers when compating types.
7312 (shadow_tag_warned): Handle atomic_p in declspecs.
7313 (quals_from_declspecs): Likewise.
7314 (start_decl): Use c_type_promotes_to when promoting argument
7315 types.
7316 (grokdeclarator): Handle _Atomic.
7317 (get_parm_info): Diagnose any qualifier on "void" as only
7318 parameter.
7319 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7320 comparing types. Use c_type_promotes_to when promoting argument
7321 types.
7322 (finish_function): Use c_type_promotes_to when promoting argument
7323 types.
7324 (build_null_declspecs): Handle atomic_p in declspecs.
7325 (declspecs_add_qual): Handle RID_ATOMIC.
7326 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7327 (c_token_starts_declspecs): Handle RID_ATOMIC.
7328 (c_parser_declspecs): Handle atomic type specifiers and
7329 qualifiers.
7330 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7331 from types of expressions with atomic type.
7332 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7333 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7334 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7335 (c_parser_statement_after_labels, c_parser_switch_statement)
7336 (c_parser_for_statement, c_parser_expr_no_commas)
7337 (c_parser_conditional_expression, c_parser_binary_expression)
7338 (c_parser_cast_expression, c_parser_unary_expression)
7339 (c_parser_postfix_expression)
7340 (c_parser_postfix_expression_after_primary, c_parser_expression):
7341 Use convert_lvalue_to_rvalue.
7342 (c_parser_expression_conv, c_parser_expr_list): Document
7343 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7344 (c_parser_objc_synchronized_statement): Use
7345 convert_lvalue_to_rvalue.
7346 (c_parser_objc_selector): Handle RID_ATOMIC.
7347 (c_parser_objc_receiver, c_parser_array_notation): Use
7348 convert_lvalue_to_rvalue.
7349 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7350 _Atomic (type-name).
7351 (struct c_declspecs): Add atomic_p field.
7352 (convert_lvalue_to_rvalue): Declare.
7353 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7354 corresponding atomic types.
7355 (qualify_type): Don't add _Atomic qualifiers from second argument.
7356 (comp_target_types): Do not allow _Atomic mismatches.
7357 (type_lists_compatible_p): Do not remove atomic qualifiers when
7358 comparing types.
7359 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7360 (build_atomic_assign): New functions.
7361 (build_unary_op): Use build_atomic_assign for atomic increment and
7362 decrement.
7363 (build_conditional_expr): Do not treat _Atomic void as a qualified
7364 version of void.
7365 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7366 (find_anonymous_field_with_type, convert_to_anonymous_field)
7367 (convert_for_assignment): Do not remove atomic qualifiers when
7368 comparing types.
7369 (digest_init): Do not accept initialization of arrays of atomic
7370 elements by string constants.
7371 (build_asm_expr): Use convert_lvalue_to_rvalue.
7372 (build_binary_op): Do not treat _Atomic void as a qualified
7373 version of void.
7374
0c249d4b
DD
73752013-11-06 DJ Delorie <dj@redhat.com>
7376
7377 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7378 both explicit and builtin, print the location of the explicit one.
7379
6d7f7e0a
TB
73802013-11-05 Tobias Burnus <burnus@net-b.de>
7381
7382 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7383 c_parser_omp_distribute, c_parser_omp_teams,
7384 c_parser_omp_target, c_parser_omp_declare): Handle
7385 -fopenmp-simd.
7386
b906f4ca
MP
73872013-11-03 Marek Polacek <polacek@redhat.com>
7388
7389 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7390
ee1d5a02
JJ
73912013-11-01 Jakub Jelinek <jakub@redhat.com>
7392
7393 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7394 check_dup_generic at the end, unless remove is true.
7395 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7396 remove = true;.
7397 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7398
5a9785fb
JJ
73992013-10-31 Jakub Jelinek <jakub@redhat.com>
7400
7401 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7402 with decl that is not pointer nor array.
7403
939b37da
BI
74042013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7405
7406 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7407 a spawning function is found.
7408 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7409 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7410 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7411 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7412 case.
7413 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7414 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7415 expr.
7416 (c_finish_return): Added a check to reject _Cilk_spawn in return
7417 expression.
7418 (build_cilk_spawn): New function.
7419 (build_cilk_sync): Likewise.
7420 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7421
d4af74d4
TB
74222013-10-27 Tobias Burnus <burnus@net-b.de>
7423
7424 PR other/33426
7425 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7426 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7427 (c_parser_statement_after_labels): Update calls.
7428
d73749df 74292013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7430
7431 PR other/33426
7432 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7433 Handle PRAGMA_IVDEP.
7434 (c_parser_statement_after_labels): Update call.
7435
f28aa681
MP
74362013-10-24 Marek Polacek <polacek@redhat.com>
7437
7438 * c-parser.c (c_parser_struct_declaration): Add a comment.
7439 (c_parser_declarator): Don't allow _Alignas here.
7440
0645c1a2
AM
74412013-10-17 Andrew MacLeod <amacleod@redhat.com>
7442
7443 * c-parser.c: Include omp-low.h.
7444 * c-typeck.c: Likewise.
7445
568a31f2
MP
74462013-10-17 Marek Polacek <polacek@redhat.com>
7447
7448 PR c/58267
7449 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7450 Document syntax of the array-declarator.
7451 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7452 are not permitted.
7453 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7454 (c_parser_struct_declaration): Likewise.
7455 (c_parser_declarator): Likewise.
7456 (c_parser_direct_declarator_inner): Likewise.
7457 (c_parser_parameter_declaration): Likewise.
7458 (c_parser_type_name): Likewise.
7459
acf0174b
JJ
74602013-10-11 Jakub Jelinek <jakub@redhat.com>
7461
7462 * c-lang.h (current_omp_declare_target_attribute): New extern
7463 decl.
7464 * c-parser.c: Include c-lang.h.
7465 (struct c_parser): Change tokens to c_token *.
7466 Add tokens_buf field. Change tokens_avail type to unsigned int.
7467 (c_parser_consume_token): If parser->tokens isn't
7468 &parser->tokens_buf[0], increment parser->tokens.
7469 (c_parser_consume_pragma): Likewise.
7470 (enum pragma_context): Add pragma_struct and pragma_param.
7471 (c_parser_external_declaration): Adjust
7472 c_parser_declaration_or_fndef caller.
7473 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7474 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7475 Adjust recursive call.
7476 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7477 of pragma_external.
7478 (c_parser_parameter_declaration): Use pragma_param instead of
7479 pragma_external.
7480 (c_parser_compound_statement_nostart, c_parser_label,
7481 c_parser_for_statement): Adjust
7482 c_parser_declaration_or_fndef callers.
7483 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7484 it through to c_parser_conditional_expression.
7485 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7486 pass it through to c_parser_binary_expression. Adjust recursive
7487 call.
7488 (c_parser_binary_expression): Remove prec argument, add
7489 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7490 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7491 binop matches it, use build2 instead of parser_build_binary_op.
7492 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7493 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7494 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7495 Handle pragma_struct and pragma_param the same as pragma_external.
7496 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7497 (c_parser_omp_variable_list): Parse array sections for
7498 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7499 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7500 (c_parser_omp_clause_reduction): Handle user defined reductions.
7501 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7502 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7503 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7504 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7505 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7506 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7507 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7508 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7509 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7510 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7511 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7512 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7513 (c_parser_omp_for_loop): Add CODE argument, pass it through
7514 to c_finish_omp_for. Change last argument to cclauses,
7515 and adjust uses to grab parallel clauses from the array of all
7516 the split clauses. Adjust c_parser_binary_expression,
7517 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7518 (omp_split_clauses): New function.
7519 (c_parser_omp_simd): New function.
7520 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7521 Allow the function to be called also when parsing combined constructs,
7522 and call c_parser_omp_simd when parsing for simd.
7523 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7524 #pragma omp section, require exactly one structured-block instead of
7525 sequence of statements.
7526 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7527 Allow the function to be called also when parsing combined constructs.
7528 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7529 Allow the function to be called also when parsing combined
7530 constructs.
7531 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7532 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7533 c_parser_omp_teams, c_parser_omp_target_data,
7534 c_parser_omp_target_update, c_parser_omp_target,
7535 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7536 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7537 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7538 (c_parser_omp_construct): Add p_name and mask vars. Handle
7539 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7540 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7541 and c_parser_omp_sections callers.
7542 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7543 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7544 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7545 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7546 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7547 OMP_CLAUSE_DEPEND.
7548 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7549 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7550 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7551 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7552 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7553 * c-typeck.c: Include tree-inline.h.
7554 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7555 handle_omp_array_sections_1, handle_omp_array_sections,
7556 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7557 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7558 user defined reductions.
7559 (c_tree_equal): New function.
7560 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7561 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7562 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7563 c_check_omp_declare_reduction_r): New prototypes.
7564 * c-decl.c (current_omp_declare_target_attribute): New variable.
7565 (c_decl_attributes): New function.
7566 (start_decl, start_function): Use it instead of decl_attributes.
7567 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7568 c_omp_reduction_decl, c_omp_reduction_lookup,
7569 c_check_omp_declare_reduction_r): New functions.
7570
0a6c2227
TT
75712013-09-25 Tom Tromey <tromey@redhat.com>
7572
7573 * Make-lang.in (c/gccspec.o): Remove.
7574 (CFLAGS-c/gccspec.o): New variable.
7575 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7576 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7577 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7578
f3bc55f0
TT
75792013-09-25 Tom Tromey <tromey@redhat.com>
7580
7581 * Make-lang.in (c/gccspec.o): Don't use subshell.
7582
a24d975c
MP
75832013-09-18 Marek Polacek <polacek@redhat.com>
7584
7585 PR sanitize/58443
7586 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7587 Remove unnecessary check.
7588
ce6923c5
MP
75892013-09-18 Marek Polacek <polacek@redhat.com>
7590
7591 PR sanitizer/58411
7592 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7593 no_sanitize_undefined attribute.
7594
a1e51df9
KT
75952013-09-13 Kai Tietz <ktietz@redhat.com>
7596
7597 PR target/57848
7598 * c-decl.c (c_builtin_function_ext_scope): Remove
7599 wrong assumption that it is never called on prexisting
7600 symbol.
7601
0af94e6f
JR
76022013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7603
7604 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7605
20059c8b
GDR
76062013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7607
7608 * c-objc-common.c (c_tree_printer): Tidy.
7609
de5a5fa1
MP
76102013-08-30 Marek Polacek <polacek@redhat.com>
7611
7612 * c-typeck.c (build_binary_op): Add division by zero and shift
7613 instrumentation.
7614
2531a1d9 76152013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7616 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7617
6e2bcc98 7618 PR c/35649
2531a1d9
JR
7619 * c-typeck.c (c_common_type): Prefer double_type_node over
7620 other REAL_TYPE types with the same precision.
7621 (convert_arguments): Likewise.
7622
025311c4
GDR
76232013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7624
7625 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7626 (c_initialize_diagnostics): Call a destructor for the early printer.
7627
da6ca2b5
GDR
76282013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7629
7630 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7631 printer initialization.
7632
318cda85 76332013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7634
318cda85
BI
7635 PR c/57490
7636 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7637 check for truth values.
7638 (expand_array_notation_exprs): Added truth values case. Removed an
7639 unwanted else. Added for-loop to walk through subtrees in default
7640 case.
7641
b066401f
GDR
76422013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7643
7644 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7645
fb48aadc
JM
76462013-07-23 Joseph Myers <joseph@codesourcery.com>
7647
7648 * c-parser.c (struct c_generic_association): Fix typo.
7649
433cc7b0
TT
76502013-07-23 Tom Tromey <tromey@redhat.com>
7651 Joseph Myers <joseph@codesourcery.com>
7652
7653 * c-parser.c (struct c_generic_association): New.
7654 (c_generic_association_d): New typedef.
7655 (c_parser_generic_selection): New function.
7656 (c_parser_postfix_expression): Handle RID_GENERIC.
7657
26d40c3d
JM
76582013-07-13 Jason Merrill <jason@redhat.com>
7659
7660 PR c++/57793
7661 * c-decl.c (finish_struct): Check for too-large class.
7662
ecdbd01a 76632013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7664
7665 PR c/57821
7666 * c-typeck.c (set_init_index): When folding, check for index overflow.
7667
1141ed3f
BI
76682013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7669
7670 * c-parser.c (c_parser_array_notation): Removed rejection of array
7671 notations in an array of function pointers.
7672
713b46fa
BI
76732013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7674
7675 * c-array-notation.c (make_triplet_val_inv): New function.
7676 (create_cmp_incr): Likewise.
7677 (create_array_refs): Likewise.
7678 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7679 Also modularized common parts between functions and called the function.
7680 (build_array_notation_expr): Likewise.
7681 (fix_conditional_array_notations_1): Likewise.
7682 (fix_array_notation_expr): Likewise.
7683 (fix_array_notation_call_expr): Likewise.
7684
92f20202
MP
76852013-06-18 Marek Polacek <polacek@redhat.com>
7686
7687 PR c/57630
7688 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7689
73a23b06
BI
76902013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7691
7692 * c-array-notation.c (build_array_notation_expr): Reject array notation
7693 mismatch between LHS and RHS even inside a call_expr. Also, removed
7694 a couple while statements that were dead code.
7695
00b8517d
BI
76962013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7697
7698 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7699 excessive precision expressions in function parameters. Also removed
7700 couple unwanted while statements.
7701
1509bdda
BI
77022013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7703
7704 * c-array-notation.c (expand_array_notation_exprs): Added
7705 ARRAY_NOTATION_REF case.
ab20d992 7706
d60f1706
BI
77072013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7708
7709 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7710 function to c-family/array-notation-common.c.
7711 (is_cilkplus_reduce_builtin): Likewise.
7712 (find_rank): Likewise.
7713 (extract_array_notation_exprs): Likewise.
7714 (replace_array_notations): Likewise.
7715 (find_inv_trees): Likewise.
7716 (replace_inv_trees): Likewise.
7717 (contains_array_notation_expr): Likewise.
7718 (find_correct_array_notation_type): Likewise.
7719 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7720 (struct inv_list): Moved this to c-family/array-notation-common.c.
7721 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7722
6d6efbb3
BI
77232013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7724
7725 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7726 reduction functions outside the for-loop. Added a check if the fundecl
7727 is non-NULL. Finally, removed an unwanted if-statement, and made the
7728 body unconditional.
7729
25c22937
BI
77302013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7731
7732 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7733 condition of the if-statement matches the rank of else-block and then-
7734 block when array notations are used.
7735 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7736 expression after the entire function body is parsed.
7737 (c_parser_expr_no_commas): Delayed creating array notation expressions
7738 to the end of function parsing.
7739 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7740 whole if-statement instead of just the condition.
ab20d992 7741 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7742
edd25645
BI
77432013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7744
7745 PR c/57474
7746 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7747 array to NULL_TREE if they are unused. Also added a check for the
7748 field to be NULL before its fields are used in future.
ab20d992 7749
065ce7f1
RO
77502013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7751
7752 PR bootstrap/57450
7753 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7754 (build_array_notation_expr): Likewise.
7755
36536d79
BI
77562013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7757
7758 * c-typeck.c (build_array_ref): Added a check to see if array's
7759 index is greater than one. If true, then emit an error.
7760 (build_function_call_vec): Exclude error reporting and checking
7761 for builtin array-notation functions.
7762 (convert_arguments): Likewise.
7763 (c_finish_return): Added a check for array notations as a return
7764 expression. If true, then emit an error.
7765 (c_finish_loop): Added a check for array notations in a loop
7766 condition. If true then emit an error.
7767 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7768 (build_binary_op): Added a check for array notation expr inside
7769 op1 and op0. If present, we call another function to find correct
7770 type.
7771 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7772 * c-parser.c (c_parser_compound_statement): Check if array
7773 notation code is used in tree, if so, then transform them into
7774 appropriate C code.
7775 (c_parser_expr_no_commas): Check if array notation is used in LHS
7776 or RHS, if so, then build array notation expression instead of
7777 regular modify.
7778 (c_parser_postfix_expression_after_primary): Added a check for
7779 colon(s) after square braces, if so then handle it like an array
7780 notation. Also, break up array notations in unary op if found.
7781 (c_parser_direct_declarator_inner): Added a check for array
7782 notation.
7783 (c_parser_compound_statement): Added a check for array notation in
7784 a stmt. If one is present, then expand array notation expr.
7785 (c_parser_if_statement): Likewise.
7786 (c_parser_switch_statement): Added a check for array notations in
7787 a switch statement's condition. If true, then output an error.
7788 (c_parser_while_statement): Similarly, but for a while.
7789 (c_parser_do_statement): Similarly, but for a do-while.
7790 (c_parser_for_statement): Similarly, but for a for-loop.
7791 (c_parser_unary_expression): Check if array notation is used in a
7792 pre-increment or pre-decrement expression. If true, then expand
7793 them.
7794 (c_parser_array_notation): New function.
7795 * c-array-notation.c: New file.
7796 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7797
cd192ccc
MS
77982013-05-23 Mike Stump <mikestump@comcast.net>
7799
7800 * c-typeck.c (convert_for_assignment): Handle references to memory
7801 spaces better.
7802
427b248d
JM
78032013-05-16 Jason Merrill <jason@redhat.com>
7804
7805 * Make-lang.in (cc1$(exeext)): Use link mutex.
7806
44d90fe1
PC
78072013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7808
7809 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7810 to simply use OPT_Wpointer_arith.
7811 (build_unary_op): Likewise.
7812
4e7d7b3d
JJ
78132013-04-03 Jakub Jelinek <jakub@redhat.com>
7814
7815 PR c/19449
7816 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7817 argument. If set, or it temporarily for parsing of the first
7818 argument into force_folding_builtin_constant_p.
7819 (c_parser_postfix_expression): Adjust callers.
7820
839b422f
RB
78212013-03-21 Richard Biener <rguenther@suse.de>
7822
7823 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7824 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7825
2ee028f1
MP
78262013-02-12 Marek Polacek <polacek@redhat.com>
7827
7828 PR c/44938
7829 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7830 origtypes to NULL.
7831
8824edff
JJ
78322013-01-24 Jakub Jelinek <jakub@redhat.com>
7833
7834 PR c/56078
7835 * c-typeck.c (set_nonincremental_init_from_string): If
7836 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7837 returned false.
7838 (process_init_element): Likewise.
7839
eadd3d0d
JJ
78402012-12-20 Jakub Jelinek <jakub@redhat.com>
7841
7842 PR c++/55619
7843 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7844 argument, don't call default_function_array_conversion
7845 nor c_fully_fold here.
7846 (c_parser_asm_statement): Adjust callers.
7847 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7848 and outputs here, and call default_function_array_conversion
7849 on inputs that don't need to be addressable.
7850
f8a93a2e
JJ
78512012-12-18 Jakub Jelinek <jakub@redhat.com>
7852
7853 PR c/39464
7854 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7855 warning require that both c_common_unsigned_type as well as
7856 c_common_signed_type is the same for both mvl and mvr types.
7857
9771b263
DN
78582012-11-16 Diego Novillo <dnovillo@google.com>
7859
7860 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7861
7862 * c-common.c: Use new vec API in vec.h.
7863 * c-common.h: Likewise.
7864 * c-gimplify.c: Likewise.
7865 * c-pragma.c: Likewise.
7866 * c-pretty-print.c: Likewise.
7867 * c-pretty-print.h: Likewise.
7868 * c-semantics.c: Likewise.
7869 * c-decl.c: Likewise.
7870 * c-parser.c: Likewise.
7871 * c-tree.h: Likewise.
7872 * c-typeck.c: Likewise.
7873
880661a4
JW
78742012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7875
7876 PR c++/54930
7877 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7878
077d1abe
MLI
78792012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7880
7881 PR c/53066
7882 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7883 shadows a function, unless the variable is a function or a
7884 pointer-to-function.
7885
3a785c97
JJ
78862012-10-12 Jakub Jelinek <jakub@redhat.com>
7887
7888 PR c/54381
7889 * c-parser.c (struct c_tree_loc_pair): Removed.
7890 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7891 add location_t * and tree * arguments, fill in array of 3
7892 sizeof_arg trees and corresponding locs.
7893 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7894 c_parser_expr_list callers.
7895 (c_parser_postfix_expression_after_primary): Likewise. Pass
7896 array of 3 sizeof_arg trees and locs (corresponding to first
7897 3 arguments) to sizeof_pointer_memaccess_warning.
7898
703c8606
LC
78992012-10-09 Lawrence Crowl <crowl@google.com>
7900
7901 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7902 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7903 hash table.
7904
5d9de0d0
PC
79052012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7906
7907 PR c++/54194
7908 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7909 call.
7910
a212e43f
MG
79112012-10-09 Marc Glisse <marc.glisse@inria.fr>
7912
7913 PR c++/54427
7914 * c-typeck.c: Include c-common.h.
7915 (enum stv_conv): Moved to c-common.h.
7916 (scalar_to_vector): Moved to c-common.c.
7917 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7918 * Make-lang.in: c-typeck.c depends on c-common.h.
7919
3b78de56
AC
79202012-10-04 Arnaud Charlet <charlet@adacore.com>
7921
7922 * c-decl.c (c_write_global_declarations): Fix handling of
7923 -fdump-ada-spec*.
7924
78c60e3d
SS
79252012-09-30 Sharad Singhai <singhai@google.com>
7926
7927 * c-decl.c (c_write_global_declarations): Use a different method
7928 to determine if the dump has ben initialized.
7929
9f33203d
JM
79302012-09-14 Joseph Myers <joseph@codesourcery.com>
7931
7932 PR c/54552
7933 * c-typeck.c (c_cast_expr): When casting to a type requiring
7934 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7935 c_fully_fold first.
7936
a27d595d
JM
79372012-09-14 Joseph Myers <joseph@codesourcery.com>
7938
7939 PR c/54103
7940 * c-typeck.c (build_unary_op): Pass original argument of
7941 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7942 any C_MAYBE_CONST_EXPR, if it has integer operands.
7943 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7944 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7945 to c_objc_common_truthvalue_conversion, then remove any
7946 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7947 c_objc_common_truthvalue_conversion not
7948 c_common_truthvalue_conversion.
7949 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7950 call note_integer_operands for arguments with integer operands
7951 that are not integer constants.
7952
9feb29df
JJ
79532012-09-13 Jakub Jelinek <jakub@redhat.com>
7954
7955 PR c/54559
7956 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7957 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7958
d409320c
JJ
79592012-08-31 Jakub Jelinek <jakub@redhat.com>
7960
7961 PR c/54428
7962 * c-convert.c (convert): Don't call fold_convert_loc if
7963 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7964 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7965 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7966
6265d07c
JJ
79672012-08-24 Jakub Jelinek <jakub@redhat.com>
7968
7969 PR c/54355
7970 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7971 for nested and empty_ok arguments in the call to
7972 c_parser_declaration_or_fndef.
7973
1a4049e7
JJ
79742012-08-17 Jakub Jelinek <jakub@redhat.com>
7975
7976 * c-tree.h (c_last_sizeof_arg): Declare.
7977 * c-parser.c (struct c_tree_loc_pair): New type.
7978 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7979 non-NULL.
7980 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7981 (c_parser_postfix_expression_after_primary): Likewise. Call
7982 sizeof_pointer_memaccess_warning if needed.
7983 (sizeof_ptr_memacc_comptypes): New function.
7984 * c-typeck.c (c_last_sizeof_arg): New global variable.
7985 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7986
0229aee9
UB
79872012-07-24 Uros Bizjak <ubizjak@gmail.com>
7988
7989 * c-lang.h (lang_decl): Add variable_size GTY option.
7990
7ee2468b
SB
79912012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7992
7993 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7994 * Make-lang.in: Fix dependencies.
7995
d4a10d0a
SB
79962012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7997
7998 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7999 and add language Makefile hooks.
8000 * config-lang.in: New file.
8001 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8002 add the required "normal" config-lang.in rules.
8003 * c-lang.h: Moved from gcc/ to here.
8004 * c-tree.h: Likewise.
8005 * c-objc-common.c: Likewise.
8006 * c-objc-common.h: Likewise.
8007 * c-typeck.c: Likewise.
8008 * c-convert.c: Likewise.
8009 * c-lang.c: Likewise.
8010 * c-aux-info.c: Likewise.
8011 * c-errors.c: Likewise.
8012 * gccspec.c: Likewise.
8013 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8014 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8015\f
c48514be 8016Copyright (C) 2012-2021 Free Software Foundation, Inc.
d4a10d0a
SB
8017
8018Copying and distribution of this file, with or without modification,
8019are permitted in any medium without royalty provided the copyright
8020notice and this notice are preserved.