]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
libgccjit: Generate debug info for variables
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
b2748138
GA
12021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
2
3 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
4 directive.
5
e11c6046
GA
62021-09-01 Iain Sandoe <iain@sandoe.co.uk>
7
8 * c-decl.c (enum deprecated_states): Add unavailable state.
9 (merge_decls): Copy unavailability.
10 (quals_from_declspecs): Handle unavailable case.
11 (start_decl): Amend the logic handling suppression of nested
12 deprecation states to include unavailability.
13 (smallest_type_quals_location): Amend comment.
14 (grokdeclarator): Handle the unavailable deprecation state.
15 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
16 * c-tree.h (struct c_declspecs): Add unavailable_p.
17 * c-typeck.c (build_component_ref): Handle unavailability.
18 (build_external_ref): Likewise.
19
202021-09-01 Roger Sayle <roger@nextmovesoftware.com>
21 Joseph Myers <joseph@codesourcery.com>
22
23 PR c/79412
24 * c-decl.c (duplicate_decls): On significant mismatches, mark the
25 types of both (non-function) decls as error_mark_node, so that the
26 middle-end can see the code is malformed.
27 (free_attr_access_data): Don't process if the type has been set to
28 error_mark_node.
29
6d51ee43
GA
302021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
31
32 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
33 and 'ancestor' in 'target device' clauses.
34
38b19c5b
GA
352021-08-23 Jakub Jelinek <jakub@redhat.com>
36
37 * c-parser.c (c_parser_omp_clause_num_tasks,
38 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
39
5b2876f9
GA
402021-08-22 Martin Uecker <muecker@gwdg.de>
41
42 PR c/98397
43 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
44 for pointers to arrays with qualifiers.
45 (build_conditional_expr): For C23 don't lose qualifiers for pointers
46 to arrays when the other pointer is a void pointer. Update warnings.
47 (convert_for_assignment): Update warnings for C2X when converting from
48 void* with qualifiers to a pointer to array with the same qualifiers.
49
7c9e1645
GA
502021-08-20 Jakub Jelinek <jakub@redhat.com>
51
52 * c-parser.c (c_parser_omp_error): New function.
53 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
54
552021-08-20 Jakub Jelinek <jakub@redhat.com>
56
57 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
58 comma at the end of list.
59 (c_parser_omp_requires): Likewise.
60
b57fba5e
GA
612021-08-19 Jakub Jelinek <jakub@redhat.com>
62
63 * c-parser.c (c_parser_omp_requires): Don't call
64 c_parser_peek_2nd_token and optionally consume token if current
65 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
66
6e529985
GA
672021-08-18 Jakub Jelinek <jakub@redhat.com>
68
69 * c-parser.c (c_parser_omp_nothing): New function.
70 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
71
722021-08-18 Jakub Jelinek <jakub@redhat.com>
73
74 * c-parser.c (c_parser_statement_after_labels): Add restart label
75 near the start of the function. If c_parser_pragma returns false,
76 goto restart.
77 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
78 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
79 return what c_parser_omp_declare returned. Return true instead of
80 false after emitting errors that the directive is not allowed in
81 pragma_stmt context.
82 (c_parser_omp_ordered): Return true instead of
83 false after emitting errors that the directive is not allowed in
84 pragma_stmt context.
85 (c_parser_omp_target_update): Likewise.
86 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
87 Change return type from tree to bool, return false if the
88 directive should be ignored in pragma_stmt contexts.
89 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
90 return their result directly.
91 (c_parser_omp_cancellation_point): Change return type from void to
92 bool, return false if the directive should be ignored in pragma_stmt
93 contexts.
94 (c_parser_omp_declare): Likewise.
95
2d14d64b
GA
962021-08-17 Jakub Jelinek <jakub@redhat.com>
97
98 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
99 (c_parser_omp_scope): New function.
100 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
101
72be20e2
GA
1022021-08-12 Jakub Jelinek <jakub@redhat.com>
103
104 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
105 (c_parser_omp_clause_filter): New function.
106 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
107 (OMP_MASKED_CLAUSE_MASK): Define.
108 (c_parser_omp_masked): New function.
109 (c_parser_omp_parallel): Handle parallel masked.
110 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
111 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
112
1132021-08-12 Martin Uecker <muecker@gwdg.de>
114
115 PR c/101838
116 PR c/29970
117 * c-typeck.c (c_expr_sizeof_type): Evaluate
118 size expressions for structs of variable size.
119
1202021-08-12 Tobias Burnus <tobias@codesourcery.com>
121
122 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
123 'primary' as alias for 'master'.
124
3ae564ea
GA
1252021-08-10 Martin Uecker <muecker@gwdg.de>
126
127 PR c/29970
128 * c-typeck.c (c_expr_sizeof_expr): Evaluate
129 size expressions for structs of variable size.
130
f92f4778
GA
1312021-08-06 Tamar Christina <tamar.christina@arm.com>
132
133 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
134 * c-tree.h (c_simulate_enum_decl): Likewise.
135
1362021-08-06 Martin Sebor <msebor@redhat.com>
137
138 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
139 vec arguments to by-reference.
140 (c_finish_omp_declare_simd): Same.
141 (c_parser_compound_statement_nostart): Same.
142 (c_parser_for_statement): Same.
143 (c_parser_objc_methodprotolist): Same.
144 (c_parser_oacc_routine): Same.
145 (c_parser_omp_for_loop): Same.
146 (c_parser_omp_declare_simd): Same.
147
419c6c68
GA
1482021-07-21 Thomas Schwinge <thomas@codesourcery.com>
149 Joseph Myers <joseph@codesourcery.com>
150 Cesar Philippidis <cesar@codesourcery.com>
151
152 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
153 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
154 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
155 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
156
92d45509
GA
1572021-07-20 Martin Sebor <msebor@redhat.com>
158
159 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
160 by-const-reference.
161 * c-typeck.c (c_build_function_call_vec): Same.
162
d97d71a1
GA
1632021-07-15 Martin Sebor <msebor@redhat.com>
164
165 PR c/101289
166 PR c/97548
167 * c-decl.c (get_parm_array_spec): Strip nops.
168
6fba0eea
GA
1692021-07-06 Martin Sebor <msebor@redhat.com>
170
171 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
172
7a60a6e8
GA
1732021-07-02 Jakub Jelinek <jakub@redhat.com>
174
175 PR c/101297
176 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
177 appears before a CPP_NAME.
178
90708f87
GA
1792021-06-25 Martin Sebor <msebor@redhat.com>
180
181 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
182 warning_suppressed_p, suppress_warning, and copy_no_warning.
183 (diagnose_mismatched_decls): Same.
184 (duplicate_decls): Same.
185 (grokdeclarator): Same.
186 (finish_function): Same.
187 (c_write_global_declarations_1): Same.
188 * c-fold.c (c_fully_fold_internal): Same.
189 * c-parser.c (c_parser_expr_no_commas): Same.
190 (c_parser_postfix_expression): Same.
191 * c-typeck.c (array_to_pointer_conversion): Same.
192 (function_to_pointer_conversion): Same.
193 (default_function_array_conversion): Same.
194 (convert_lvalue_to_rvalue): Same.
195 (default_conversion): Same.
196 (build_indirect_ref): Same.
197 (build_function_call_vec): Same.
198 (build_atomic_assign): Same.
199 (build_unary_op): Same.
200 (c_finish_return): Same.
201 (emit_side_effect_warnings): Same.
202 (c_finish_stmt_expr): Same.
203 (c_omp_clause_copy_ctor): Same.
204
9aa8327e
GA
2052021-06-24 Jakub Jelinek <jakub@redhat.com>
206
207 PR c/101176
208 * c-parser.c (c_parser_has_attribute_expression): Set source range for
209 the result.
210
2112021-06-24 Jakub Jelinek <jakub@redhat.com>
212
213 PR c/101171
214 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
215 error_mark_node.
216
2172021-06-24 Jakub Jelinek <jakub@redhat.com>
218
219 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
220 C_ORT_OMP for clauses on target construct.
221 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
222 (c_parser_omp_target): For non-combined target add
223 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
224 C_ORT_OMP_TARGET to c_finish_omp_clauses.
225 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
226 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
227 never present on C_ORT_*DECLARE_SIMD.
228 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
229 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
230 corresponding map clauses.
231
2f080224
GA
2322021-06-21 Jakub Jelinek <jakub@redhat.com>
233
234 PR inline-asm/100785
235 * c-typeck.c (c_mark_addressable): Diagnose trying to make
236 bit-fields addressable.
237
ede6c356
GA
2382021-06-15 Robin Dapp <rdapp@linux.ibm.com>
239
240 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
241 similar.
242
8dc48181
GA
2432021-06-14 Tobias Burnus <tobias@codesourcery.com>
244
245 PR c/100913
246 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
247 var in the error case.
248
438aac59
GA
2492021-06-07 Eric Botcazou <ebotcazou@adacore.com>
250
251 PR c/100920
252 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
253 spot built-in functions.
254
7d6987e9
GA
2552021-06-06 Jakub Jelinek <jakub@redhat.com>
256
257 PR c/100902
258 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
259 even when target is combined with other constructs.
260
2612021-06-06 Eric Botcazou <ebotcazou@adacore.com>
262
263 PR c/100920
264 * c-decl.c (finish_struct): Fix thinko in previous change.
265 * c-typeck.c (convert_for_assignment): Do not warn on pointer
266 assignment and initialization for storage order purposes if the
267 RHS is a call to a DECL_IS_MALLOC function.
268
600f90cb
GA
2692021-06-04 Martin Sebor <msebor@redhat.com>
270
271 PR c/100783
272 * c-objc-common.c (print_type): Handle erroneous types.
273
440c8a0a
GA
2742021-06-03 Jakub Jelinek <jakub@redhat.com>
275
276 PR c++/100859
277 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
278 after depend only cases.
279
ee682192
GA
2802021-05-31 Richard Biener <rguenther@suse.de>
281
282 PR c++/88601
283 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
284 * c-parser.c (c_parser_postfix_expression): Likewise.
285
48166757
GA
2862021-05-28 Richard Biener <rguenther@suse.de>
287
288 PR c/100803
289 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
290 invalid if conditions.
291
2922021-05-28 Jakub Jelinek <jakub@redhat.com>
293
294 PR middle-end/99928
295 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
296 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
297 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
298 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
299 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
300 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
301 if present in map_head, map_field_head or map_firstprivate_head
302 bitmaps.
303
3042021-05-28 Tobias Burnus <tobias@codesourcery.com>
305
306 * c-parser.c (c_parser_omp_clause_affinity): New.
307 (c_parser_omp_clause_name, c_parser_omp_variable_list,
308 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
309 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
310 c_finish_omp_clauses): Likewise.
311
01c59ef2
GA
3122021-05-26 Eric Botcazou <ebotcazou@adacore.com>
313
314 PR c/100653
315 * c-decl.c (finish_struct): Warn for a union containing an aggregate
316 field with a differing scalar storage order.
317
2832d51b
GA
3182021-05-21 Jakub Jelinek <jakub@redhat.com>
319
320 PR middle-end/99928
321 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
322 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
323 if a decl is mentioned both in map clause and in such firstprivate
324 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
325
65f32e5d
GA
3262021-05-19 Jakub Jelinek <jakub@redhat.com>
327
328 PR middle-end/99928
329 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
330 master when combined with taskloop.
331 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
332 parallel master when not combined with taskloop.
333
a8daf9a1
GA
3342021-05-18 Richard Biener <rguenther@suse.de>
335
336 PR c/100522
337 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
338 Diagnose calls to non-functions.
339 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
340
a7ffc1ef
GA
3412021-05-17 Richard Biener <rguenther@suse.de>
342
343 PR c/100625
344 * gimple-parser.c (c_parser_gimple_label): Avoid building
345 a GIMPLE label with NULL label decl.
346
f9af11c7
GA
3472021-05-13 Martin Sebor <msebor@redhat.com>
348
349 PR c/100550
350 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
351
0ff3a0f2
GA
3522021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
353
354 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
355 'close'.
356
aa891c56
GA
3572021-05-10 Martin Liska <mliska@suse.cz>
358
359 * c-aux-info.c (affix_data_type): Use startswith
360 function instead of strncmp.
361 * c-typeck.c (build_function_call_vec): Likewise.
362 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
363
62d87a32
GA
3642021-05-07 Eric Botcazou <ebotcazou@adacore.com>
365
366 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
367 on the address of a pointer field in a record with reverse SSO.
368
99e8df7a
GA
3692021-05-04 Tobias Burnus <tobias@codesourcery.com>
370
371 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
372 for || and && reductions.
373
3c8e539d
GA
3742021-04-29 Joseph Myers <joseph@codesourcery.com>
375
376 * c-typeck.c (function_types_compatible_p): For C2X, treat
377 unprototyped function as compatible with non-variadic prototyped
378 function even if some argument types are changed by the default
379 argument promotions.
380
ee351f7f
GA
3812021-04-15 Martin Sebor <msebor@redhat.com>
382
383 PR c/99420
384 PR c/99972
385 * c-decl.c (pushdecl): Always propagate type attribute.
386
3872021-04-15 Richard Sandiford <richard.sandiford@arm.com>
388
389 PR c/98852
390 * c-typeck.c (c_common_type): Do not drop attributes that
391 affect type identity.
392
1d54b138
GA
3932021-04-10 Jakub Jelinek <jakub@redhat.com>
394
395 PR c/99990
396 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
397 error_mark_node.
398
4493b1c1
GA
3992021-03-25 Jakub Jelinek <jakub@redhat.com>
400
401 PR c++/99565
402 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
403 to operand_equal_p.
404
5f256a70
GA
4052021-03-19 Jakub Jelinek <jakub@redhat.com>
406
407 PR c/99588
408 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
409 with modifycode NOP_EXPR produces and mark the _Atomic var as read
410 if found.
411 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
412 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
413 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
414
3c5b6d24
GA
4152021-03-15 Tobias Burnus <tobias@codesourcery.com>
416
417 PR c++/99509
418 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
419 ensure that the varpool node is marked as offloadable.
420
ceae9533
GA
4212021-03-05 Tobias Burnus <tobias@codesourcery.com>
422
423 PR c/99137
424 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
425
4028d01a
GA
4262021-02-24 Martin Sebor <msebor@redhat.com>
427
428 PR middle-end/97172
429 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
430
bf81237e
GA
4312021-02-18 Jakub Jelinek <jakub@redhat.com>
432
433 PR c/99136
434 * c-typeck.c (c_finish_return): Don't wrap retval into
435 EXCESS_PRECISION_EXPR in functions that return void.
436
0c5cdb31
GA
4372021-02-11 Marek Polacek <polacek@redhat.com>
438
439 * c-parser.c (c_parser_if_statement): Use vec_free.
440
a19dd5e6
GA
4412021-02-04 Martin Sebor <msebor@redhat.com>
442
443 PR c/97882
444 * c-decl.c (locate_old_decl): Add type to diagnostic output.
445 (diagnose_mismatched_decls): Same.
446 (start_function): Introduce temporaries for better readability.
447 * c-typeck.c (comptypes_internal): Only consider complete enum
448 types in comparisons with integers.
449
f7884fb1
GA
4502021-02-01 Martin Sebor <msebor@redhat.com>
451
452 PR middle-end/97172
453 * c-decl.c (free_attr_access_data): New function.
454 (c_parse_final_cleanups): Call free_attr_access_data.
455
59cf67d1
GA
4562021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
457
458 * c-parser.c (c_parser_omp_clause_detach): New.
459 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
460 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
461 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
462 clause. Prevent use of detach with mergeable and overriding the
463 data sharing mode of the event handle.
464
2f7f0d32
GA
4652021-01-15 Jakub Jelinek <jakub@redhat.com>
466
467 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
468 unqualified element type and then call c_build_qualified_type on the
469 ARRAY_TYPE.
470
7d187e4f
GA
4712021-01-07 Richard Biener <rguenther@suse.de>
472
473 * gimple-parser.c (c_parser_gimple_compound_statement): Only
474 reallocate loop array if it is too small.
475
eefe499f
GA
4762020-12-16 Martin Uecker <muecker@gwdg.de>
477
478 PR c/98047
479 * c-typeck.c (build_modify_expr): Drop qualifiers.
480
4812020-12-16 Martin Uecker <muecker@gwdg.de>
482
483 PR c/98260
484 * c-parser.c (c_parser_expression): Look into
485 nop expression when marking expressions as read.
486
d52945ce
GA
4872020-12-14 Martin Liska <mliska@suse.cz>
488
489 PR sanitizer/98204
490 * c-typeck.c (pointer_diff): Do not emit a top-level
491 sanitization.
492 (build_binary_op): Likewise.
493
ca2bd949
GA
4942020-12-09 Tobias Burnus <tobias@codesourcery.com>
495
496 * c-parser.c (c_parser_omp_allocate): New.
497 (c_parser_omp_construct): Call it.
498
4992020-12-09 Richard Biener <rguenther@suse.de>
500
501 PR c/98200
502 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
503 early on error.
504
bc8a7013
GA
5052020-12-07 Martin Uecker <muecker@gwdg.de>
506
507 PR c/97981
508 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
509 that drops qualifiers to the end of the function.
510
d48df6f2
GA
5112020-11-26 Martin Uecker <muecker@gwdg.de>
512
513 PR c/65455
514 PR c/92935
515 * c-parser.c (c_parser_declaration_or_fndef): Remove
516 redundant code to drop qualifiers of _Atomic types for __auto_type.
517 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
518 types for __typeof__.
519
1e2c9a27
GA
5202020-11-24 Jakub Jelinek <jakub@redhat.com>
521
522 PR c/97958
523 * c-parser.c (c_parser_binary_expression): For omp atomic binary
524 expressions, use make_node instead of build2 to avoid checking build2
525 performs.
526
8e6198d0
GA
5272020-11-23 Joseph Myers <joseph@codesourcery.com>
528
529 PR c/95630
530 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
531 for comparisons of complete and incomplete pointers.
532
7a97e2fc
GA
5332020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
534
535 * c-aux-info.c (gen_type): Support opaque types.
536
82e5048e
GA
5372020-11-20 Martin Sebor <msebor@redhat.com>
538
539 PR middle-end/97879
540 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
541
5422020-11-20 Jakub Jelinek <jakub@redhat.com>
543
544 PR other/97911
545 * Make-lang.in (c.serial): Change from goal to a variable.
546 (.PHONY): Drop c.serial.
547
5482020-11-20 Martin Uecker <muecker@gwdg.de>
549
550 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
551
d62586ee
GA
5522020-11-19 Jakub Jelinek <jakub@redhat.com>
553
554 PR c/97860
555 * c-decl.c (get_parm_array_spec): Bail out of nelts is
556 error_operand_p.
557
25bb75f8
GA
5582020-11-18 Jakub Jelinek <jakub@redhat.com>
559
560 * Make-lang.in (c.serial): New goal.
561 (.PHONY): Add c.serial c.prev.
562 (cc1$(exeext)): Call LINK_PROGRESS.
563
77f67db2
GA
5642020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
565
566 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
567 goto too.
568 * c-typeck.c (build_asm_expr): Remove an assert checking output
569 absence for asm goto.
570
5712020-11-13 Jakub Jelinek <jakub@redhat.com>
572
573 * c-typeck.c (c_finish_omp_clauses): Don't clear
574 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
575
5762020-11-13 Iain Sandoe <iain@sandoe.co.uk>
577
578 PR objc/77404
579 * c-parser.c (c_parser_objc_class_definition): Pass the
580 location of the class name to the interface declaration.
581
bb622641
GA
5822020-11-10 Strager Neds <strager.nds@gmail.com>
583
584 * c-decl.c (merge_decls): Use new overload of
585 set_decl_section_name.
586
5872020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
588
589 * c-parser.c (c_parser_omp_target_data): Add use of
590 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
591 handled map clause kind.
592 (c_parser_omp_target_enter_data): Likewise.
593 (c_parser_omp_target_exit_data): Likewise.
594 (c_parser_omp_target): Likewise.
595 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
596 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
597 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
598 same struct field access to co-exist on OpenMP construct.
599
2da7ee05
GA
6002020-11-07 Martin Uecker <muecker@gwdg.de>
601
602 * c-parser.c (c_parser_label): Implement mixing of labels and code.
603 (c_parser_all_labels): Likewise.
604
44cab2d8
GA
6052020-11-06 Iain Sandoe <iain@sandoe.co.uk>
606
607 * c-parser.c (c_parser_objc_at_property_declaration):
608 Improve parsing fidelity. Associate better location info
609 with @property attributes. Clean up the interface to
610 objc_add_property_declaration ().
611
6122020-11-06 Nathan Sidwell <nathan@acm.org>
613
614 * c-decl.c (diagnose_mismatched_decls): Rename
615 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
616 (warn_if_shadowing, implicitly_declare, names_builtin_p)
617 (collect_source_refs): Likewise.
618 * c-typeck.c (inform_declaration, inform_for_arg)
619 (convert_for_assignment): Likewise.
620
6212020-11-06 Tobias Burnus <tobias@codesourcery.com>
622
623 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
624 OpenACC matching.
625 (c_parser_omp_construct): Update call.
626
35c125cb
GA
6272020-11-04 Jakub Jelinek <jakub@redhat.com>
628
629 PR c++/97670
630 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
631 find underlying decl to clear in the aligned_head bitmap.
632
6332020-11-04 Joseph Myers <joseph@codesourcery.com>
634
635 * c-decl.c (handle_nodiscard_attribute): New.
636 (std_attribute_table): Add nodiscard.
637 * c-parser.c (c_parser_std_attribute): Expect argument to
638 nodiscard attribute to be a string. Do not special-case ignoring
639 nodiscard.
640 * c-typeck.c (maybe_warn_nodiscard): New.
641 (build_compound_expr, emit_side_effect_warnings): Call
642 maybe_warn_nodiscard.
643 (c_process_expr_stmt, c_finish_stmt_expr): Also call
644 emit_side_effect_warnings if warn_unused_result.
645
4f0606fe
GA
6462020-10-29 Asher Gordon <AsDaGo@posteo.net>
647
648 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
649 with XDELETE.
650 (finish_init): Likewise.
651 (pop_init_level): Likewise.
652
e93aae4a
GA
6532020-10-28 Joseph Myers <joseph@codesourcery.com>
654
655 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
656 error_at for omitted parameter name.
657
6582020-10-28 Jakub Jelinek <jakub@redhat.com>
659
660 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
661 (c_parser_omp_clause_allocate): New function.
662 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
663 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
664 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
665 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
666 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
667 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
668 PRAGMA_OMP_CLAUSE_ALLOCATE.
669 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
670
89bb01e7
GA
6712020-10-27 Joseph Myers <joseph@codesourcery.com>
672
673 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
674 standard attributes.
675
efe71fcc
GA
6762020-10-23 Marek Polacek <polacek@redhat.com>
677
678 PR c++/91741
679 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
680 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
681 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
682 * c-tree.h (char_type_p): Declare.
683 * c-typeck.c (char_type_p): No longer static.
684
6852020-10-23 Martin Sebor <msebor@redhat.com>
686
687 PR middle-end/97552
688 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
689
2fe5b7d1
GA
6902020-09-19 Martin Sebor <msebor@redhat.com>
691
692 PR c/50584
693 * c-decl.c (lookup_last_decl): Define new function.
694 (c_decl_attributes): Call it.
695 (start_decl): Add argument and use it.
696 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
697 (get_parm_array_spec): Define new function.
698 (push_parm_decl): Call get_parm_array_spec.
699 (start_function): Call warn_parm_array_mismatch. Build attribute
700 access and add it to current function.
701 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
702 in forms of array parameters.
703 * c-tree.h (start_decl): Add argument.
704
7052020-09-19 Sandra Loosemore <sandra@codesourcery.com>
706
707 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
708 with...
709 (in_statement): New.
710 (start_function): Adjust for above change.
711 (c_push_function_context, c_pop_function_context): Likewise.
712 * c-lang.h (struct language_function): Likewise.
713 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
714 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
715 New.
716 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
717 (c_parser_switch_statement): Adjust break/switch context handling
718 and calls to renamed functions.
719 (c_parser_while_statement): Adjust break/switch context handling and
720 build a WHILE_STMT.
721 (c_parser_do_statement): Ditto, with DO_STMT respectively.
722 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
723 (c_parser_omp_for_loop): Adjust break/switch context handling.
724 * c-tree.h (c_break_label, c_cont_label): Delete.
725 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
726 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
727 (in_statement, switch_statement_break_seen_p): Declare.
728 (c_start_case, c_finish_case): Renamed to...
729 (c_start_switch, c_finish_switch).
730 (c_finish_bc_stmt): Adjust arguments.
731 * c-typeck.c (build_function_call_vec): Don't try to print
732 statements with %qE format.
733 (struct c_switch): Rename switch_expr field to switch_stmt.
734 Add break_stmt_seen_p field.
735 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
736 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
737 (do_case): Update for changes to struct c_switch.
738 (c_finish_case): Rename to c_finish_switch. Update for changes to
739 struct c_switch and change of representation from SWITCH_EXPR to
740 SWITCH_STMT.
741 (c_finish_loop): Delete.
742 (c_finish_bc_stmt): Update to reflect changes to break/continue
743 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
744 of a GOTO_EXPR except for objc foreach loops.
745
e1a4a8a0
GA
7462020-09-01 Jakub Jelinek <jakub@redhat.com>
747
748 PR c++/96867
749 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
750 only on PARM_DECLs.
751
8f7ea26a
GA
7522020-08-28 Martin Sebor <msebor@redhat.com>
753
754 PR c/96596
755 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
756 argument type.
757
8b394f01
GA
7582020-08-27 Martin Liska <mliska@suse.cz>
759
760 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
761 growth function to true.
762
db0f6efe
GA
7632020-08-25 Tobias Burnus <tobias@codesourcery.com>
764
765 PR c/96678
766 * c-typeck.c (handle_omp_array_sections_1): Talk about
767 array function parameter in the error message.
768
5c265693
GA
7692020-08-18 Jakub Jelinek <jakub@redhat.com>
770
771 PR c/96571
772 * c-parser.c (c_parser_generic_selection): Change match_found from bool
773 to int, holding index of the match. Call mark_exp_read on the selector
774 expression and on expressions other than the selected one.
775
4967ca2f
GA
7762020-08-01 Richard Sandiford <richard.sandiford@arm.com>
777
778 PR c/96377
779 * c-typeck.c (process_init_element): Split test for whether to
780 recurse into a record, union or array into...
781 (initialize_elementwise_p): ...this new function. Don't recurse
782 into a vector type if the initialization value is also a vector.
783
48cc2e46
GA
7842020-07-31 Richard Biener <rguenther@suse.de>
785
786 PR debug/96383
787 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
788 Define to c_common_finalize_early_debug.
789
3ea9abca
GA
7902020-07-22 Tobias Burnus <tobias@codesourcery.com>
791
792 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
793 (c_parser_omp_critical): Permit hint(0) clause without named critical.
794 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
795
30430061
GA
7962020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
797
798 PR target/95237
799 * c-decl.c (finish_decl): Call target hook
800 lower_local_decl_alignment to lower local decl alignment.
801
3f8ca9cb
GA
8022020-07-09 Julian Brown <julian@codesourcery.com>
803 Thomas Schwinge <thomas@codesourcery.com>
804
805 PR middle-end/95270
806 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
807 for standalone attach/detach clauses.
808
a82c4c4c 8092020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
810
811 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
812 set, warn for conversion between pointers that point to incompatible
813 scalar storage orders.
814
f60ee68d
GA
8152020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
816
817 * c-parser.c (c_parser_statement_after_labels): Pass correct
818 parameters to c_parser_do_statement.
819
56638b9b
GA
8202020-06-16 Jakub Jelinek <jakub@redhat.com>
821
822 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
823 c_in_omp_for.
824 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
825 premature c_fully_fold. Defer explicit c_fully_fold calls to after
826 c_finish_omp_for.
827 * c-tree.h (c_in_omp_for): Declare.
828 * c-typeck.c (c_in_omp_for): Define.
829 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
830 (digest_init): Likewise.
831 (build_binary_op): Likewise.
832
8332020-06-16 Jakub Jelinek <jakub@redhat.com>
834
835 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
836 from kind by comma rather than colon.
837
1a59f3db
GA
8382020-06-05 Mark Wielaard <mark@klomp.org>
839
840 * c-decl.c (implicit_decl_warning): When warned and olddecl is
841 an undeclared builtin, then add a fixit header hint, if found.
842 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
843 warning_at about implicit builtin declaration type mismatch.
844
9a5b7438
GA
8452020-06-03 Mark Wielaard <mark@klomp.org>
846
847 * c-parser.c (struct c_parser): Add seen_string_literal
848 bitfield.
849 (c_parser_consume_token): Reset seen_string_literal.
850 (c_parser_error_richloc): Add name_hint if seen_string_literal
851 and next token is a CPP_NAME and we have a missing header
852 suggestion for the name.
853 (c_parser_string_literal): Set seen_string_literal.
854
8552020-06-03 Mark Wielaard <mark@klomp.org>
856
857 * c-parser.c (c_parser_postfix_expression_after_primary): Add
858 scope with matching_parens after CPP_OPEN_PAREN.
859
8602020-06-03 Tobias Burnus <tobias@codesourcery.com>
861
862 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
863
53ffb43a
GA
8642020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
865
866 * Make-lang.in: Remove extra slash.
867
8f66f175
ML
8682020-05-19 Martin Liska <mliska@suse.cz>
869
870 * c-parser.c: Fix typo.
871
49ddde69
JJ
8722020-05-14 Jakub Jelinek <jakub@redhat.com>
873
874 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
875
eb72dc66
RB
8762020-05-07 Richard Biener <rguenther@suse.de>
877
878 PR middle-end/94703
879 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
880 DECL_GIMPLE_REG_P.
881
bf915591
JJ
8822020-04-30 Jakub Jelinek <jakub@redhat.com>
883
884 PR c/94842
885 * c-decl.c (set_labels_context_r): In addition to context-less
886 LABEL_DECLs adjust also LABEL_DECLs with context equal to
887 parent function if any.
888 (store_parm_decls): Adjust comment.
889
e1113ffb
JJ
8902020-04-19 Jakub Jelinek <jakub@redhat.com>
891
892 PR objc/94637
893 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
894 two CPP_COLON tokens.
895
2e389749
JJ
8962020-04-17 Jakub Jelinek <jakub@redhat.com>
897
898 PR other/94629
899 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
900 to data.clauses.
901
2dc9294c
JJ
9022020-04-15 Jakub Jelinek <jakub@redhat.com>
903
904 PR c/94593
905 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
906 requires directive when not at file scope.
907
13e41d8b
TB
9082020-04-08 Tobias Burnus <tobias@codesourcery.com>
909
910 PR middle-end/94120
911 * c-decl.c (c_check_in_current_scope): New function.
912 * c-tree.h (c_check_in_current_scope): Declare it.
913 * c-parser.c (c_parser_oacc_declare): Add check that variables
914 are declared in the same scope as the directive. Fix handling
915 of namespace vars.
916
4df50a05
JJ
9172020-04-07 Jakub Jelinek <jakub@redhat.com>
918
919 PR c++/94512
920 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
921 if c_parser_omp_master succeeded.
922
5db9e893
JJ
9232020-03-23 Jakub Jelinek <jakub@redhat.com>
924
925 PR gcov-profile/94029
926 PR c/94239
927 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
928 the function_start_locus location. Don't do that afterwards for the
929 __GIMPLE body parsing.
930
9def91e9
JJ
9312020-03-19 Jakub Jelinek <jakub@redhat.com>
932
933 PR gcov-profile/94029
934 * c-tree.h (finish_function): Add location_t argument defaulted to
935 input_location.
936 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
937 set it to the locus of closing } if non-NULL.
938 (c_parser_compound_statement_nostart): Return locus of closing }.
939 (c_parser_parse_rtl_body): Likewise.
940 (c_parser_declaration_or_fndef): Propagate locus of closing } to
941 finish_function.
942 * c-decl.c (finish_function): Add end_loc argument, use it instead of
943 input_location to set function_end_locus.
944
046c5890
JJ
9452020-03-17 Jakub Jelinek <jakub@redhat.com>
946
947 PR c/94172
948 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
949 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
950 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
951 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
952 ENUMERAL_TYPEs.
953 (finish_incomplete_vars): New function, moved from finish_struct. Use
954 relayout_decl instead of layout_decl.
955 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
956 being TYPE_VFIELD. Use finish_incomplete_vars.
957 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
958 finish_incomplete_vars.
959 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
960 also on ENUMERAL_TYPEs.
961
c015ff8c
JJ
9622020-03-16 Jakub Jelinek <jakub@redhat.com>
963
964 PR c/94179
965 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
966
f2e9fe5f
MS
9672020-03-13 Martin Sebor <msebor@redhat.com>
968
969 PR c/94040
970 * c-decl.c (builtin_structptr_type_count): New constant.
971 (match_builtin_function_types): Reject decls that are incompatible
972 in types pointed to by pointers.
973 (diagnose_mismatched_decls): Adjust comments.
974
c9d70946
JM
9752020-03-05 Joseph Myers <joseph@codesourcery.com>
976
977 PR c/93577
978 * c-typeck.c (pop_init_level): Do not diagnose initializers as
979 empty when initialized type is error_mark_node.
980 (set_designator, process_init_element): Ignore initializers for
981 elements of a variable-size type or of error_mark_node.
982
726e292d
MS
9832020-03-01 Martin Sebor <msebor@redhat.com>
984
985 PR middle-end/93926
986 * c-decl.c (types_close_enough_to_match): New function.
987 (match_builtin_function_types):
988 (diagnose_mismatched_decls): Add missing inform call to a warning.
989
a499c2f8
MS
9902020-03-01 Martin Sebor <msebor@redhat.com>
991
992 PR c/93812
993 * c-typeck.c (build_functype_attribute_variant): New function.
994 (composite_type): Call it.
995
9c3da8cc
JJ
9962020-02-25 Jakub Jelinek <jakub@redhat.com>
997
998 PR other/93912
999 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1000 Rename last argument from probablity to probability.
1001
bacdd5e9
JJ
10022020-02-13 Jakub Jelinek <jakub@redhat.com>
1003
1004 PR c/93576
1005 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1006 *expr if it has side effects.
1007
f9eb0973
JL
10082020-01-30 Jeff Law <law@redhat.com>
1009
1010 PR c/88660
1011 * c-parser.c (c_parser_switch_statement): Make sure to request
1012 marking the switch expr as used.
1013
ac68e287
JM
10142020-01-22 Joseph Myers <joseph@codesourcery.com>
1015
1016 PR c/93348
1017 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1018 argument with integer operands.
1019
852f0ae8
KK
10202020-01-16 Kerem Kat <keremkat@gmail.com>
1021
1022 PR c/92833
1023 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1024 to support 4 available tokens.
1025
e2346a33
JM
10262020-01-15 Joseph Myers <joseph@codesourcery.com>
1027
1028 PR c/93072
1029 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1030 determine whether to set DECL_CONTEXT.
1031
3d77686d
JM
10322020-01-13 Joseph Myers <joseph@codesourcery.com>
1033
1034 PR c/93241
1035 * c-typeck.c (build_c_cast): Check for expressions with integer
1036 operands that can occur in an unevaluated part of an integer
1037 constant expression and call note_integer_operands as needed.
1038
f74c4b2c
RB
10392019-01-08 Richard Biener <rguenther@suse.de>
1040
1041 PR middle-end/93199
1042 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1043 permanently.
1044
8d9254fc
JJ
10452020-01-01 Jakub Jelinek <jakub@redhat.com>
1046
1047 Update copyright years.
1048
39292e25
EB
10492019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1050
1051 * c-decl.c (collect_source_ref_cb): Delete.
1052 (for_each_global_decl): Rename into...
1053 (collect_source_refs): ...this. Call collect_source_ref directly.
1054 (c_parse_final_cleanups): Always call collect_source_ref on the main
1055 input filename.
1056
519d7496
JB
10572019-12-19 Julian Brown <julian@codesourcery.com>
1058 Cesar Philippidis <cesar@codesourcery.com>
1059
1060 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1061 detach clauses.
1062 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1063 Allow deref (->) in variable lists if true.
1064 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1065 Pass to c_parser_omp_variable_list.
1066 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1067 call to c_parser_omp_variable_list.
1068 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1069 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1070 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1071 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1072 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1073 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1074 and detach. Support deref.
1075 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1076 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1077 (c_oacc_check_attachments): New function.
1078 (c_finish_omp_clauses): Check attach/detach arguments for being
1079 pointers using above. Support deref.
1080
a6163563
JB
10812019-12-19 Julian Brown <julian@codesourcery.com>
1082 Maciej W. Rozycki <macro@codesourcery.com>
1083 Tobias Burnus <tobias@codesourcery.com>
1084 Thomas Schwinge <thomas@codesourcery.com>
1085
1086 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1087 (c_parser_oacc_data_clause): Likewise.
1088 (c_parser_oacc_all_clauses): Likewise.
1089 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1090 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1091 PRAGMA_OACC_CLAUSE_NO_CREATE.
1092 * c-typeck.c (handle_omp_array_sections): Support
1093 GOMP_MAP_NO_ALLOC.
1094
d68f5d45
DM
10952019-12-09 David Malcolm <dmalcolm@redhat.com>
1096
1097 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1098 Replace label_text ctor calls.
1099
4691bf46
JM
11002019-12-04 Joseph Myers <joseph@codesourcery.com>
1101
1102 PR c/36941
1103 PR c/88827
1104 * c-typeck.c (convert_lvalue_to_rvalue): Call
1105 require_complete_type for arguments not of void types.
1106 (build_indirect_ref): Do not diagnose dereferencing pointers to
1107 incomplete types.
1108 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1109
85d11957
JM
11102019-12-03 Joseph Myers <joseph@codesourcery.com>
1111
1112 PR c/88704
1113 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1114 old-style parameter definitions.
1115
4569f8b3
SL
11162019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1117
1118 PR target/92499
1119
1120 * c-decl.c (flexible_array_type_p): Move to common code.
1121
65ef05d0
RS
11222019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1123
1124 * c-decl.c (start_decl): Allow initialization of variables whose
1125 size is a POLY_INT_CST.
1126 (finish_decl): Use verify_type_context to check whether the target
1127 allows variables with a particular type to have static or thread-local
1128 storage duration. Don't raise a second error if such variables do
1129 not have a constant size.
1130 (grokdeclarator): Use verify_type_context to check whether the
1131 target allows fields or array elements to have a particular type.
1132 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1133 the target allows pointer difference for the types involved.
1134 (build_unary_op): Likewise for pointer increment and decrement.
1135
34b43828
JM
11362019-11-29 Joseph Myers <joseph@codesourcery.com>
1137
1138 * c-parser.c (struct c_parser): Add members raw_tokens and
1139 raw_tokens_used.
1140 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1141 using previously-lexed raw tokens.
1142 (c_parser_peek_nth_token_raw)
1143 (c_parser_check_balanced_raw_token_sequence): New functions.
1144 (c_parser_nth_token_starts_std_attributes): Use
1145 c_parser_check_balanced_raw_token_sequence for Objective-C.
1146
5b8d9367
JM
11472019-11-25 Joseph Myers <joseph@codesourcery.com>
1148
1149 PR c/91985
1150 * c-decl.c (finish_declspecs): Use int instead of decimal
1151 floating-point types if decimal floating-point not supported.
1152
1723e1be
JM
11532019-11-25 Joseph Myers <joseph@codesourcery.com>
1154
1155 * c-tree.h (struct c_declarator): Use a structure for id member.
1156 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1157 declarators at the start, not when handling individual declarators
1158 later. Use u.id.id instead of u.id.
1159 (grokfield): Use u.id.id instead of u.id.
1160 (build_id_declarator): Set u.id.id and u.id.attrs.
1161 (finish_declspecs): Handle postfix attributes in case of typedef
1162 name or typeof used.
1163 * c-parser.c (c_parser_direct_declarator)
1164 (c_parser_direct_declarator_inner): Place declarator for
1165 attributes inside that for function or array, not outside. Set
1166 u.id.attrs for identifiers.
1167 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1168 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1169 instead of u.id.
1170
bdaf8be1
JJ
11712019-11-22 Jakub Jelinek <jakub@redhat.com>
1172
1173 PR c/90677
1174 * c-decl.c (identifier_global_tag): Define.
1175
3e00ba47
RB
11762019-11-20 Richard Biener <rguenther@suse.de>
1177
1178 PR c/92088
1179 * c-decl.c (grokdeclarator): Prevent inlining of nested
1180 function with VLA arguments.
1181
8c5b727a
JM
11822019-11-20 Joseph Myers <joseph@codesourcery.com>
1183
1184 * c-decl.c (c_warn_type_attributes): New function.
1185 (groktypename, grokdeclarator, finish_declspecs): Call
1186 c_warn_type_attributes before applying attributes to types.
1187 * c-tree.h (c_warn_type_attributes): Declare.
1188
192961ff
JM
11892019-11-19 Joseph Myers <joseph@codesourcery.com>
1190
1191 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1192 standard attributes.
1193 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1194 pedwarn for unknown standard attributes and return error_mark_node
1195 for them.
1196
20a38017
MM
11972019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1198
1199 * c-parser.c (c_parser_parse_rtl_body): Always call
1200 run_rtl_passes, even if startwith pass is not provided.
1201
d5fbe5e0
JM
12022019-11-15 Joseph Myers <joseph@codesourcery.com>
1203
1204 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1205 duplicate standard attributes.
1206
97cc1187
JM
12072019-11-15 Joseph Myers <joseph@codesourcery.com>
1208
1209 * c-decl.c (std_attribute_table): Add maybe_unused.
1210
f8aea5e3
JM
12112019-11-15 Joseph Myers <joseph@codesourcery.com>
1212
1213 * c-decl.c (std_attribute_table): Add fallthrough.
1214 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1215 attribute at top level.
1216
2cc94aa8
JM
12172019-11-15 Joseph Myers <joseph@codesourcery.com>
1218
1219 * c-decl.c (std_attribute_table): New.
1220 (c_init_decl_processing): Register attributes from
1221 std_attribute_table.
1222 * c-parser.c (c_parser_attribute_arguments): Add arguments
1223 require_string and allow_empty_args. All callers changed.
1224 (c_parser_std_attribute): Set require_string argument for
1225 "deprecated" attribute.
1226
7c5890cc
JM
12272019-11-14 Joseph Myers <joseph@codesourcery.com>
1228
1229 * c-parser.c (c_parser_postfix_expression)
1230 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1231 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1232
e8738f4e
RS
12332019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1234
1235 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1236 of build_same_sized_truth_vector_type.
1237 (build_vec_cmp): Likewise.
1238
b2417b59
JJ
12392019-11-14 Jakub Jelinek <jakub@redhat.com>
1240
bedb7f04
JJ
1241 * c-parser.c (c_parser_omp_context_selector): Don't require score
1242 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1243 negative score.
1244
b2417b59
JJ
1245 * c-parser.c (c_parser_omp_context_selector): Rename
1246 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1247 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1248 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1249 and string literals.
1250
4e03c3a7
JM
12512019-11-14 Joseph Myers <joseph@codesourcery.com>
1252
1253 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1254 ctsk_tagfirstref_attrs.
1255 (struct c_declspecs): Update description of attrs. Add
1256 postfix_attrs and non_std_attrs_seen_p. Increase size of
1257 typespec_kind bit-field.
1258 (c_warn_unused_attributes): New declaration.
1259 (parser_xref_tag): Update prototype.
1260 * c-decl.c (c_warn_unused_attributes): New function.
1261 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1262 ctsk_tagref_attrs. Handle attribute declarations.
1263 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1264 (grokdeclarator): Handle standard attributes.
1265 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1266 attributes to incomplete type reference.
1267 (xref_tag): Update call to parser_xref_tag.
1268 (declspecs_add_addrspace, declspecs_add_type)
1269 (declspecs_add_scspec, declspecs_add_attrs): Set
1270 non_std_attrs_seen_p.
1271 (finish_declspecs): Apply postfix standard attributes to type.
1272 * c-parser.c (c_token_starts_declspecs)
1273 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1274 (c_parser_next_tokens_start_declaration): Update comments.
1275 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1276 parser->tokens[2] to parser->tokens[1].
1277 (c_parser_nth_token_starts_std_attributes)
1278 (c_parser_std_attribute_specifier_sequence): New functions.
1279 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1280 attrs. All callers changed. Handle standard attributes.
1281 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1282 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1283 All callers changed.
1284 (c_parser_declspecs): Add arguments start_std_attr_ok and
1285 end_std_attr_ok. All callers changed. Handle standard
1286 attributes.
1287 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1288 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1289 (c_parser_compound_statement_nostart, c_parser_all_labels)
1290 (c_parser_label, c_parser_statement, c_parser_for_statement):
1291 Handle standard attributes.
1292 * c-parser.h (c_parser_declspecs): Update prototype.
1293 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1294 c_parser_declspecs.
1295
0c29cac4
ML
12962019-11-12 Martin Liska <mliska@suse.cz>
1297
1298 * gimple-parser.c: Do not include params.h.
1299
028d4092
ML
13002019-11-12 Martin Liska <mliska@suse.cz>
1301
1302 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1303 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1304 macro.
1305
62aee289
MR
13062019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1307 Frederik Harwath <frederik@codesourcery.com>
1308
1309 gcc/c/
1310 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1311 (c_parser_oacc_kernels_parallel): Rename function to...
1312 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1313 (c_parser_omp_construct): Update accordingly.
1314
1315
7cec9588
JJ
13162019-11-11 Jakub Jelinek <jakub@redhat.com>
1317
1318 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1319 without corresponding end declare target.
1320
f486280c
RS
13212019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1322
1323 * c-convert.c (convert): Only handle vector conversions if one of
1324 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1325 allows it.
1326 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1327 vectors satisfy gnu_vector_type_p.
1328 (build_unary_op): Only allow unary operators to be applied to
1329 vectors if they satisfy gnu_vector_type_p.
1330 (digest_init): Only allow by-element initialization of vectors
1331 if they satisfy gnu_vector_type_p.
1332 (really_start_incremental_init): Likewise.
1333 (push_init_level): Likewise.
1334 (pop_init_level): Likewise.
1335 (process_init_element): Likewise.
1336 (build_binary_op): Only allow binary operators to be applied to
1337 vectors if they satisfy gnu_vector_type_p.
1338
017c6491
JM
13392019-11-08 Joseph Myers <joseph@codesourcery.com>
1340
1341 * c-decl.c (grokparms): Convert () in a function definition to
1342 (void) for C2x.
1343 (store_parm_decls_oldstyle): Pedwarn for C2x.
1344 (store_parm_decls): Update comment about () not generating a
1345 prototype.
1346
c01bd174
JM
13472019-11-07 Joseph Myers <joseph@codesourcery.com>
1348
1349 * c-parser.c (c_parser_attribute_arguments): New function.
1350 Factored out of c_parser_gnu_attribute.
1351 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1352 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1353 (c_parser_std_attribute_specifier): New functions.
1354 (c_parser_transaction_attributes): Use
1355 c_parser_std_attribute_specifier.
1356
471c5330
JM
13572019-11-07 Joseph Myers <joseph@codesourcery.com>
1358
1359 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1360 lex_joined_string and translate_strings_p.
1361 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1362 c_lex_with_flags.
1363 (c_parser_string_literal): New function.
1364 (c_parser_static_assert_declaration_no_semi): Use
1365 c_parser_string_literal. Do not set lex_untranslated_string.
1366 (c_parser_asm_string_literal): Use c_parser_string_literal.
1367 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1368 (c_parser_gnu_attributes): Set and restore translate_strings_p
1369 instead of lex_untranslated_string.
1370 (c_parser_asm_statement): Do not set lex_untranslated_string.
1371 (c_parser_asm_operands): Likewise.
1372 (c_parser_has_attribute_expression): Set and restore
1373 translate_strings_p instead of lex_untranslated_string.
1374 (c_parser_postfix_expression): Use c_parser_string_literal.
1375 (pragma_lex): Likewise.
1376 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1377 (c_parse_file): Set translate_strings_p.
1378 * gimple-parser.c (c_parser_gimple_postfix_expression)
1379 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1380 * c-parser.c (c_parser_string_literal): Declare function.
1381
d0c464d2
JJ
13822019-11-02 Jakub Jelinek <jakub@redhat.com>
1383
1384 * c-parser.c (c_finish_omp_declare_variant): Use
1385 omp_get_context_selector instead of c_omp_get_context_selector.
1386
ac2cfa6c
RS
13872019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1388
1389 * c-tree.h (c_simulate_enum_decl): Declare.
1390 * c-decl.c (c_simulate_enum_decl): New function.
1391 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1392
74078538
RS
13932019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1394
1395 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1396 * c-decl.c (c_simulate_builtin_function_decl): New function.
1397 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1398 to the above.
1399
ad1539d5
MS
14002019-10-28 Martin Sebor <msebor@redhat.com>
1401
1402 PR c/66970
1403 * c-decl.c (names_builtin_p): Define a new function.
1404
cb73e4e7
RB
14052019-10-28 Richard Biener <rguenther@suse.de>
1406
1407 PR c/92249
1408 * gimple-parser.c (c_parser_parse_gimple_body): Make
1409 current_bb the entry block initially to easier recover
1410 from errors.
1411 (c_parser_gimple_compound_statement): Adjust.
1412
135df52c
JJ
14132019-10-24 Jakub Jelinek <jakub@redhat.com>
1414
1415 * c-parser.c (c_finish_omp_declare_variant): Use
1416 omp_context_selector_matches instead of
1417 c_omp_context_selector_matches.
1418 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1419 attribute in between declare target and end declare target
1420 pragmas.
1421
783bfe5e
JM
14222019-10-15 Joseph Myers <joseph@codesourcery.com>
1423
1424 * c-parser.c (c_parser_attribute_any_word): Rename to
1425 c_parser_gnu_attribute_any_word. All callers changed.
1426 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1427 callers changed.
1428 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1429 callers changed.
1430 (c_parser_declaration_or_fndef, c_parser_declspecs)
1431 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1432 (c_parser_struct_declaration, c_parser_declarator)
1433 (c_parser_gnu_attribute, c_parser_compound_statement)
1434 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1435 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1436 attribute-related syntax productions.
1437
56898e43
RS
14382019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1439
1440 * c-objc-common.c (useful_aka_type_p): Replace with...
1441 (get_aka_type): ...this new function. Given the original type,
1442 decide which aka type to print (if any). Only look through typedefs
1443 if user_facing_original_type_p.
1444 (print_type): Update accordingly.
1445
b9424661
JJ
14462019-10-14 Jakub Jelinek <jakub@redhat.com>
1447
1448 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1449 into int NESTED, if it is 2, diagnose missing commas in between
1450 clauses.
1451 (c_parser_omp_context_selector): Pass 2 as last argument to
1452 c_parser_omp_all_clauses.
1453
20de9568
JJ
14542019-10-12 Jakub Jelinek <jakub@redhat.com>
1455
1456 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1457 For simd properties, put them directly into TREE_VALUE.
1458 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1459 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1460 add "omp declare variant base" attribute rather than
1461 "omp declare variant".
1462
fe2bc27c
JM
14632019-10-11 Joseph Myers <joseph@codesourcery.com>
1464
1465 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1466
94e7f906
JJ
14672019-10-10 Jakub Jelinek <jakub@redhat.com>
1468
1469 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1470 true, terminate processing on closing paren and don't skip to end of
1471 pragma line.
1472 (c_parser_omp_declare_simd): Handle also declare variant.
1473 (omp_construct_selectors, omp_device_selectors,
1474 omp_implementation_selectors, omp_user_selectors): New variables.
1475 (c_parser_omp_context_selector,
1476 c_parser_omp_context_selector_specification,
1477 c_finish_omp_declare_variant): New functions.
1478 (c_finish_omp_declare_simd): Handle both declare simd and
1479 declare variant.
1480 (c_parser_omp_declare): Handle declare variant.
1481
93313b94
JM
14822019-10-02 Joseph Myers <joseph@codesourcery.com>
1483
1484 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1485 CPP_COLON tokens.
1486
55879815
RS
14872019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1488
1489 * c-objc-common.c (useful_aka_type_p): New function.
1490 (print_type): Use it to decide whether an aka type is worth printing.
1491
59bc434a
JJ
14922019-09-27 Jakub Jelinek <jakub@redhat.com>
1493
1494 PR c++/88203
1495 * c-parser.c (c_parser_predefined_identifier): New function.
1496 (c_parser_postfix_expression): Use it.
1497 (c_parser_omp_variable_list): Parse predefined identifiers.
1498 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1499 in shared and firstprivate clauses, even when they are predetermined
1500 shared.
1501
c6447c20
RS
15022019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1503
1504 * c-typeck.c (build_function_call_vec): Take the original function
1505 decl as an optional final parameter. Pass all built-in calls to
1506 check_builtin_function_arguments.
1507
522da4c2
EB
15082019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1509
1510 PR c/91815
1511 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1512 of identifiers in the external scope only for variables and functions.
1513
68e2c199
PK
15142019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1515
1516 PR c/78736
1517 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1518
22f8849d
IS
15192019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1520
1521 PR pch/61250
1522 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1523 after determining that the first token is not
1524 PRAGMA_GCC_PCH_PREPROCESS.
1525
db376f45
EB
15262019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1527
1528 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1529 FUNCTION_DECL to the right value in the presence of nested declarators.
1530
4d732405
RS
15312019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1532
1533 PR middle-end/91421
1534 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1535
cb1180d5
RS
15362019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1537
1538 PR middle-end/91421
1539 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1540 of a built_in_function.
1541 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1542
77eb117f
JJ
15432019-08-10 Jakub Jelinek <jakub@redhat.com>
1544
1545 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1546 (c_parser_omp_clause_device_type): New function.
1547 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1548 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1549 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1550 diagnostics for declare target with clauses nested in clause-less
1551 declare target declaration-definition-seq.
1552 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1553
2c3b8bad
JJ
15542019-08-09 Jakub Jelinek <jakub@redhat.com>
1555
bb522e2e
JJ
1556 * c-parser.c (check_no_duplicate_clause): Simplify using
1557 omp_find_clause.
1558 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1559 directive name modifiers.
1560 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1561
2c3b8bad
JJ
1562 PR c/91401
1563 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1564 check_no_duplicate_clause call. Comment it out, instead emit a
1565 warning for duplicate dist_schedule clauses.
1566
99769e7f
RS
15672019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1568
1569 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1570
8860d270
JJ
15712019-08-08 Jakub Jelinek <jakub@redhat.com>
1572
1573 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1574 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1575 instead of generic_head to track duplicates.
1576
398e3feb
JJ
15772019-08-07 Jakub Jelinek <jakub@redhat.com>
1578
1579 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1580 (c_parser_omp_clause_use_device_addr): New function.
1581 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1582 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1583 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1584 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1585 map or use_device_* clauses.
1586 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1587 in OpenMP, require pointer type rather than pointer or array type.
1588 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1589
a28351e7
JJ
15902019-07-31 Jakub Jelinek <jakub@redhat.com>
1591
1592 PR c/91192
1593 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1594 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1595 case.
1596
6343b6bf
ML
15972019-07-25 Martin Liska <mliska@suse.cz>
1598 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1599
1600 PR c++/23383
1601 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1602
cb50701e
ML
16032019-07-25 Martin Liska <mliska@suse.cz>
1604
1605 * c-decl.c (merge_decls): Use new macros
1606 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1607
62e3e66f
RB
16082019-07-23 Richard Biener <rguenther@suse.de>
1609
1610 PR tree-optimization/83518
1611 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1612 a CFG also rebuild cgraph edges.
1613
554a530f
JJ
16142019-07-20 Jakub Jelinek <jakub@redhat.com>
1615
1616 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1617 (c_parser_omp_clause_bind): New function.
1618 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1619 (OMP_LOOP_CLAUSE_MASK): Define.
1620 (c_parser_omp_loop): New function.
1621 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1622 loop combined with parallel or teams.
1623 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1624 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1625
d119bf79
RS
16262019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1627
1628 PR c/53633
1629 * c-decl.c (finish_function): Check targetm.warn_func_return
1630 before issuing a -Wreturn-type warning.
1631
ab20d992 16322019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1633
1634 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1635 (c_parser_compound_statement): Call it.
1636
1fdd6f04
JJ
16372019-07-12 Jakub Jelinek <jakub@redhat.com>
1638
1639 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1640 (c_parser_omp_clause_order): New function.
1641 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1642 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1643 PRAGMA_OMP_CLAUSE_ORDER.
1644 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1645
8389386c
RB
16462019-07-10 Richard Biener <rguenther@suse.de>
1647
1648 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1649 _Literal (int *) &x for address literals.
1650
99b1c316
MS
16512019-07-09 Martin Sebor <msebor@redhat.com>
1652
1653 PR c++/61339
1654 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1655 to class.
1656 (field_decl_cmp): Same.
1657 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1658 * c-tree.h: Same.
1659 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1660
6c1dae73
MS
16612019-07-09 Martin Sebor <msebor@redhat.com>
1662
1663 PR c++/61339
1664 * c-decl.c: Change class-key from class to struct and vice versa
1665 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1666 * gimple-parser.c: Same.
1667
69b5279e
RB
16682019-07-01 Richard Biener <rguenther@suse.de>
1669
1670 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1671 _Literal (char *) &"foo" for address literals pointing to
1672 STRING_CSTs.
1673
ab20d992
JJ
16742019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1675
1676 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1677 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1678 C incompatibility if alternate "__intN__" form is used.
1679
1e3d475e
MS
16802019-06-24 Martin Sebor <msebor@redhat.com>
1681
1682 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1683
bf38f7e9
JJ
16842019-06-10 Jakub Jelinek <jakub@redhat.com>
1685
1686 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1687 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1688 (c_parser_omp_scan_loop_body): New function.
1689 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1690 inscan reduction clauses.
1691 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1692 non-inscan reductions on the same construct, or inscan reductions with
1693 ordered or schedule clauses, or inscan array reductions.
1694
65985d78
MS
16952019-06-05 Martin Sebor <msebor@redhat.com>
1696
1697 PR c/90737
1698 * c-typeck.c (c_finish_return): Only consider functions returning
1699 pointers as candidates for -Wreturn-local-addr.
1700
0ecf545c
MS
17012019-06-05 Martin Sebor <msebor@redhat.com>
1702
1703 * c-decl.c (start_decl): Adjust quoting and hyphenation
1704 in diagnostics.
1705 (finish_decl): Same.
1706 (finish_enum): Same.
1707 (start_function): Same.
1708 (declspecs_add_type): Same.
1709 * c-parser.c (warn_for_abs): Same.
1710 * c-typeck.c (build_binary_op): Same.
1711
e03436e7
TS
17122019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1713
b48f44bf
TS
1714 PR c/89433
1715 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1716 marked with an OpenACC 'routine' directive.
1717
5bf04509
TS
1718 PR c/89433
1719 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1720 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1721
e03436e7
TS
1722 PR c/89433
1723 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1724 clauses from "omp declare target" attribute.
1725
a9c697b8
MS
17262019-05-16 Martin Sebor <msebor@redhat.com>
1727
ab20d992
JJ
1728 * c-decl.c (start_decl): Quote keywords, operators, and
1729 types in diagnostics.
1730 (finish_decl): Same.
1731 * c-parser.c (c_parser_asm_statement): Same.
1732 (c_parser_conditional_expression): Same.
1733 (c_parser_transaction_cancel): Same.
1734 * c-typeck.c (c_common_type): Same.
1735 (build_conditional_expr): Same.
1736 (digest_init): Same.
1737 (process_init_element): Same.
1738 (build_binary_op): Same.
a9c697b8 1739
c4499192
RB
17402019-05-17 Richard Biener <rguenther@suse.de>
1741
1742 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1743 (c_parser_gimple_unary_expression): Likewise.
1744 (c_parser_gimple_parentized_ternary_expression): New function.
1745
adfe6e4b
RB
17462019-05-16 Richard Biener <rguenther@suse.de>
1747
1748 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1749 (c_parser_gimple_unary_expression): Likewise.
1750
186dabf2
RB
17512019-05-15 Richard Biener <rguenther@suse.de>
1752
1753 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1754 __BIT_FIELD_REF.
1755
1158c5b4
RB
17562019-05-14 Richard Biener <rguenther@suse.de>
1757
1758 * gimple-parser.c (c_parser_gimple_statement): Remove
1759 questionable auto-promotion to VIEW_CONVERT_EXPR.
1760 (c_parser_gimple_typespec): Split out from __MEM parsing.
1761 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1762 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1763 as __VIEW_CONVERT with -gimple.
1764
fd4485aa
ML
17652019-05-09 Martin Liska <mliska@suse.cz>
1766
1767 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1768 __MAX.
1769 (c_parser_gimple_unary_expression): Parse also binary expression
1770 __MIN and __MAX.
1771 (c_parser_gimple_parentized_binary_expression): New function.
1772
d276406a
ML
17732019-05-09 Martin Liska <mliska@suse.cz>
1774
1775 * gimple-parser.c (struct gimple_parser): Add probability.
1776 for gimple_parser_edge.
1777 (gimple_parser::push_edge): Add new argument probability.
1778 (c_parser_gimple_parse_bb_spec): Parse also probability
1779 if present.
1780 (c_parser_parse_gimple_body): Set edge probability.
1781 (c_parser_gimple_compound_statement): Consume token
1782 before calling c_parser_gimple_goto_stmt.
1783 Parse BB counts.
1784 (c_parser_gimple_statement): Pass new argument.
1785 (c_parser_gimple_goto_stmt): Likewise.
1786 (c_parser_gimple_if_stmt): Likewise.
1787 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1788 * c-parser.c (c_parser_declaration_or_fndef): Pass
1789 hot_bb_threshold argument.
1790 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1791 field.
1792 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1793
f179b64e
JJ
17942019-04-26 Jakub Jelinek <jakub@redhat.com>
1795
1796 PR debug/90197
1797 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1798 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1799 (c_parser_do_statement): Likewise.
1800 (c_parser_for_statement): Likewise. Formatting fixes.
1801 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1802 emit DEBUG_BEGIN_STMTs if needed.
1803
e7178413
JJ
18042019-04-19 Jakub Jelinek <jakub@redhat.com>
1805
c280b7ee
JJ
1806 PR c/89888
1807 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1808 (c_start_case): Don't clear it.
1809 (do_case): Adjust c_add_case_label caller.
1810 (c_finish_case): Adjust c_do_switch_warnings caller.
1811
e7178413
JJ
1812 PR c++/90108
1813 * c-decl.c (merge_decls): If remove is main variant and
1814 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1815 variant that has newdecl as TYPE_NAME if any.
1816
60a2c645
JJ
18172019-04-12 Jakub Jelinek <jakub@redhat.com>
1818
1819 PR c/89933
1820 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1821 don't try to remove it from the variant list, but instead assert
1822 it has no variants.
1823
2a82beaa
RB
18242019-04-01 Richard Biener <rguenther@suse.de>
1825
1826 PR c/71598
1827 * c-tree.h (c_get_alias_set): Declare.
1828 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1829 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1830 as the underlying integer type.
1831
bec1da64
MS
18322019-03-19 Martin Sebor <msebor@redhat.com>
1833
1834 PR tree-optimization/89688
1835 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1836 kinds of initializers.
1837
855cd9b1
JJ
18382019-03-19 Jakub Jelinek <jakub@redhat.com>
1839
1840 PR c/89734
1841 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1842 return type even if quals_used is 0. Formatting fixes.
1843
baa09dc5
RB
18442019-03-14 Richard Biener <rguenther@suse.de>
1845
1846 * c-tree.h (enum c_declspec_il): New.
1847 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1848 enum bitfield.
1849 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1850 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1851 (c_parser_declspecs): Adjust.
1852 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1853 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1854 and bitmap.h.
1855 (struct gimple_parser): New.
1856 (gimple_parser::push_edge): New method.
1857 (c_parser_gimple_parse_bb_spec): New helper.
1858 (c_parser_parse_gimple_body): Get start pass and IL specification.
1859 Initialize SSA and CFG.
1860 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1861 Build a gimple_parser parsing state and pass it along.
1862 (c_parser_gimple_statement): Change intermittend __PHI internal
1863 function argument for the edge.
1864 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1865 (c_parser_gimple_goto_stmt): Record edges to build.
1866 (c_parser_gimple_if_stmt): Likewise.
1867 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1868 (c_parser_gimple_or_rtl_pass_list): Likewise.
1869
a3f9f006
ML
18702019-03-11 Martin Liska <mliska@suse.cz>
1871
1872 * c-decl.c (check_for_loop_decls): Wrap an option name
1873 in a string format message and fix GNU coding style.
1874 * c-parser.c (c_parser_declspecs): Likewise.
1875
1db01ff9
JJ
18762019-03-08 Jakub Jelinek <jakub@redhat.com>
1877
1878 PR tree-optimization/89550
1879 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1880 returned true.
1881 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1882 or warning returned true.
1883
66dcb747
JJ
18842019-02-28 Jakub Jelinek <jakub@redhat.com>
1885
1886 PR c/89525
1887 * c-typeck.c (convert_arguments): Call inform_declaration only if
1888 the previous warning_at call returned true.
1889
2263c9f2
TS
18902019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1891
1892 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1893 parameter. Adjust all users.
1894 (c_parser_oacc_simple_clause): Replace parser with loc formal
1895 parameter. Adjust all users.
1896
ab20d992 18972019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1898
1899 PR c/87924
1900 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1901 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1902
5f88ba10
JJ
19032019-02-15 Jakub Jelinek <jakub@redhat.com>
1904
1905 PR c/89340
1906 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1907 before c_decl_attributes rather than after it.
1908
cfc30fd1
JJ
19092019-02-06 Jakub Jelinek <jakub@redhat.com>
1910
1911 PR c/89211
1912 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1913 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1914 instead of 3 nested ifs.
1915
fbe83e6b
JM
19162019-02-06 Joseph Myers <joseph@codesourcery.com>
1917
1918 PR c/88584
1919 * c-decl.c (finish_decl): Do not complete array types for arrays
1920 with external linkage not at file scope.
1921
f461f938
RB
19222019-02-05 Richard Biener <rguenther@suse.de>
1923
1924 PR c/88606
1925 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1926 all type variants when not supported.
1927
fe509359
JJ
19282019-01-30 Jakub Jelinek <jakub@redhat.com>
1929
1930 PR c/89061
1931 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1932 * c-decl.c (decl_jump_unsafe): Return false for
1933 C_DECL_COMPOUND_LITERAL_P decls.
1934 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1935
6a335b96
JJ
19362019-01-29 Jakub Jelinek <jakub@redhat.com>
1937
f4b7e754
JJ
1938 PR c/89045
1939 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1940 scope.
1941
6a335b96
JJ
1942 PR c/86125
1943 * c-decl.c (last_fileptr_type): Remove.
1944 (last_structptr_types): New variable.
1945 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1946 {old,new}rettype instead of the types themselves. Assert
1947 last_structptr_types array has the same number of elements
1948 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1949 argument oldtype and newtype. Instead of handling
1950 just fileptr_type_node specially, handle all builtin_structptr_types
1951 pointer nodes. Formatting fix.
1952
d8b5a1a0
MS
19532019-01-24 Martin Sebor <msebor@redhat.com>
1954
1955 PR c/86125
1956 PR c/88886
1957 PR middle-end/86308
1958 * c-decl.c (match_builtin_function_types): Add arguments.
1959 (diagnose_mismatched_decls): Diagnose mismatched declarations
1960 of built-ins more strictly.
1961
e21c4491
JJ
19622019-01-24 Jakub Jelinek <jakub@redhat.com>
1963
1964 PR c++/88976
1965 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1966 on #pragma omp cancel with different modifiers.
1967
420183d9
L
19682019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1969
1970 PR c/51628
1971 PR c/88664
1972 * c-typeck.c (convert_for_assignment): Upate the
1973 warn_for_address_or_pointer_of_packed_member call.
1974
17ad43dd
TH
19752019-01-16 Tom Honermann <tom@honermann.net>
1976 Jason Merrill <jason@redhat.com>
1977
1978 * c-typeck.c (digest_init): Revised the error message produced for
1979 ill-formed cases of array initialization with a string literal.
1980 (error_init): Make variadic.
1981
5f07d78a
JJ
19822019-01-12 Jakub Jelinek <jakub@redhat.com>
1983
1984 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1985
c4581bbf
JJ
19862019-01-07 Jakub Jelinek <jakub@redhat.com>
1987
1988 PR c/88701
1989 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1990 if current_function_decl is non-NULL.
1991
65c5b1eb
JM
19922019-01-07 Joseph Myers <joseph@codesourcery.com>
1993
1994 PR c/88720
1995 PR c/88726
1996 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1997 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1998 functions declared but never defined only for external scope, not
1999 for other scopes.
2000
d8fcab68
JJ
20012019-01-07 Jakub Jelinek <jakub@redhat.com>
2002
2003 PR c++/85052
2004 * c-parser.c (c_parser_postfix_expression): Parse
2005 __builtin_convertvector.
2006
a5544970
JJ
20072019-01-01 Jakub Jelinek <jakub@redhat.com>
2008
2009 Update copyright years.
2010
da77eace
L
20112018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2012
2013 PR c/51628
2014 * c-typeck.c (convert_for_assignment): Call
2015 warn_for_address_or_pointer_of_packed_member.
2016
1edf8866
SB
20172018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2018
2019 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2020 a more specific error message (instead of just falling through).
2021
db4fd626
SB
20222018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2023
2024 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2025 asm qualifier is first seen; use that to give nicer "duplicate asm
2026 qualifier" messages. Delete 'quals" variable, instead pass the
2027 "is_volatile_ flag to build_asm_stmt directly.
2028 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2029 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2030
9c9cfcbb
SB
20312018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2032
2033 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2034 "done" boolean variable.
2035
a14feb3c
DM
20362018-12-19 David Malcolm <dmalcolm@redhat.com>
2037
2038 PR c++/87504
2039 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2040 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2041 (build_binary_op): Use struct op_location_t and
2042 class binary_op_rich_location.
2043
6d939173
JJ
20442018-12-11 Jakub Jelinek <jakub@redhat.com>
2045
2046 PR sanitizer/88426
2047 * c-convert.c (convert): Call c_fully_fold before calling
2048 ubsan_instrument_float_cast.
2049
b7055028
SB
20502018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2051
2052 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2053 setting "quals".
2054
5b76e75f
SB
20552018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2056
2057 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2058 after asm. Pass a flag for it to build_asm_expr.
2059 * c-tree.h (build_asm_expr): Update declaration.
2060 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2061 set ASM_INLINE_P.
2062
30bd42b9
SB
20632018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2064
2065 PR inline-asm/55681
2066 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2067 combination of volatile and goto, in any order, without repetitions.
2068
9df6c0e4
JB
20692018-12-04 James Norris <jnorris@codesourcery.com>
2070 Cesar Philippidis <cesar@codesourcery.com>
2071 Julian Brown <julian@codesourcery.com>
2072
2073 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2074 code.
2075
f44697b7
RB
20762018-11-30 Richard Biener <rguenther@suse.de>
2077
2078 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2079 _Literal (type) { ... } as empty aggregate or vector constructor.
2080
550dfbdc
MS
20812018-11-29 Martin Sebor <msebor@redhat.com>
2082
2083 PR c/88091
2084 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2085 (convert_arguments): Add comments. Pass additional argument to
2086 the function above.
2087
673670da
MS
20882018-11-29 Martin Sebor <msebor@redhat.com>
2089
2090 PR c/88172
2091 PR testsuite/88208
2092 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2093
db1d09b0
MS
20942018-11-23 Martin Sebor <msebor@redhat.com>
2095
2096 PR testsuite/88098
2097 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2098 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2099
98f08eb8
MS
21002018-11-20 Martin Sebor <msebor@redhat.com>
2101
2102 * c-parser.c (c_parser_has_attribute_expression): New function.
2103 (c_parser_attribute): New function.
2104 (c_parser_attributes): Move code into c_parser_attribute.
2105 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2106
cd5da983
MS
21072018-11-15 Martin Sebor <msebor@redhat.com>
2108
2109 PR c/83656
2110 * c-decl.c (header_for_builtin_fn): Declare.
2111 (diagnose_mismatched_decls): Diagnose declarations of built-in
2112 functions without a prototype.
2113 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2114 (convert_argument): Same.
2115 (convert_arguments): Factor code out into convert_argument.
2116 Detect mismatches between built-in formal arguments in calls
2117 to built-in without prototype.
2118 (build_conditional_expr): Same.
2119 (type_or_builtin_type): New function.
2120 (convert_for_assignment): Add argument. Conditionally issue
2121 warnings instead of errors for mismatches.
2122
620e594b
DM
21232018-11-13 David Malcolm <dmalcolm@redhat.com>
2124
2125 * c-decl.c: Replace "source_location" with "location_t".
2126 * c-tree.h: Likewise.
2127 * c-typeck.c: Likewise.
2128 * gimple-parser.c: Likewise.
2129
3179ebae
JJ
21302018-11-09 Jakub Jelinek <jakub@redhat.com>
2131
81a227c6
JJ
2132 * c-parser.c (c_parser_omp_clause_final): Use
2133 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2134 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2135 parsing instead of c_parser_paren_condition.
2136 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2137 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2138 c_fully_fold instead of c_parser_condition.
2139 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2140 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2141 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2142 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2143 c_parser_expr_no_commas instead of c_parser_expression.
2144
98c91c56
JJ
2145 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2146 reduction clause with inscan modifier.
2147
3179ebae
JJ
2148 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2149 clauses other than atomic_default_mem_order.
2150
28567c40
JJ
21512018-11-08 Jakub Jelinek <jakub@redhat.com>
2152
2153 * c-parser.c: Include memmode.h.
2154 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2155 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2156 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2157 task_reduction clauses.
2158 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2159 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2160 section, or lvalue assignment expression.
2161 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2162 (c_parser_omp_clause_lastprivate): Parse optional
2163 conditional: modifier.
2164 (c_parser_omp_clause_hint): Require constant integer expression rather
2165 than just integer expression.
2166 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2167 clause.
2168 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2169 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2170 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2171 functions.
2172 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2173 iterators. Parse mutexinoutset and depobj kinds.
2174 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2175 callers.
2176 (c_parser_omp_all_clauses): Likewise. Handle
2177 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2178 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2179 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2180 default memory order from requires directive if any. Adjust
2181 c_finish_omp_atomic caller.
2182 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2183 (c_parser_omp_flush): Parse flush with memory-order-clause.
2184 (c_parser_omp_for_loop): Allow NE_EXPR even in
2185 OpenMP loops, adjust c_finish_omp_for caller.
2186 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2187 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2188 Allow to be called while parsing combined parallel master.
2189 Parse combined master taskloop{, simd}.
2190 (c_parser_omp_parallel): Parse combined
2191 parallel master{, taskloop{, simd}} constructs.
2192 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2193 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2194 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2195 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2196 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2197 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2198 around teams body. Use SET_EXPR_LOCATION.
2199 (c_parser_omp_target_data): Allow target data
2200 with only use_device_ptr clauses.
2201 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2202 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2203 (c_parser_omp_requires): New function.
2204 (c_finish_taskloop_clauses): New function.
2205 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2206 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2207 declaration. Disallow in_reduction clause when combined with parallel
2208 master.
2209 (c_parser_omp_construct): Adjust c_parser_omp_master and
2210 c_parser_omp_taskgroup callers.
2211 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2212 other than cancel.
2213 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2214 like OMP_CLAUSE_REDUCTION.
2215 (handle_omp_array_sections): Likewise. Call save_expr on array
2216 reductions before calling build_index_type. Handle depend clauses
2217 with iterators.
2218 (struct c_find_omp_var_s): New type.
2219 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2220 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2221 with static, runtime or auto schedule kinds. Call save_expr for whole
2222 array reduction sizes. Diagnose reductions with zero sized elements
2223 or variable length structures. Diagnose nogroup clause used with
2224 reduction clause(s). Handle depend clause with
2225 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2226 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2227 some different type for other kinds. Use build_unary_op with
2228 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2229 Handle depend clauses with iterators. Remove no longer needed special
2230 case that predetermined const qualified vars may be specified in
2231 firstprivate clause. Complain if const qualified vars are mentioned
2232 in data-sharing clauses other than firstprivate or shared. Use
2233 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2234 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2235 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2236 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2237
7e2de6df
DM
22382018-10-29 David Malcolm <dmalcolm@redhat.com>
2239
2240 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2241 logic for change to name_hint::operator bool.
2242 (undeclared_variable): Likewise.
2243 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2244 (c_parser_parameter_declaration): Likewise.
2245
9f936c86
JM
22462018-10-17 Joseph Myers <joseph@codesourcery.com>
2247
2248 * c-errors.c (pedwarn_c11): New function.
2249 * c-parser.c (disable_extension_diagnostics): Save
2250 warn_c11_c2x_compat and set it to 0.
2251 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2252 (c_parser_static_assert_declaration_no_semi): Handle
2253 _Static_assert without string constant.
2254 * c-tree.h (pedwarn_c11): New prototype.
2255
033eb567
DM
22562018-10-17 David Malcolm <dmalcolm@redhat.com>
2257
2258 * Make-lang.in (selftest-c): New.
2259 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2260 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2261 from gcc/Makefile.in.
2262
0edf3afe
RB
22632018-10-02 Richard Biener <rguenther@suse.de>
2264
2265 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2266
8313a764
JM
22672018-09-26 Joseph Myers <joseph@codesourcery.com>
2268
2269 PR c/87390
2270 * c-typeck.c (build_binary_op): Use excess precision for
2271 comparisons of integers and floating-point for C11 and later.
2272
ce6f0888
MJ
22732018-09-26 Martin Jambor <mjambor@suse.cz>
2274
2275 PR c/87347
2276 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2277 comment.
ce6f0888 2278
9c4a4b3c
DM
22792018-09-17 David Malcolm <dmalcolm@redhat.com>
2280
2281 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2282 Update for new param.
2283 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2284 Likewise.
2285
80c6d1f4
MJ
22862018-09-17 Martin Jambor <mjambor@suse.cz>
2287
2288 PR c/63886
2289 * c-parser.c: (warn_for_abs): New function.
2290 (c_parser_postfix_expression_after_primary): Call it.
2291
4a426e36
BE
22922018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2293
2294 * c-typeck.c (digest_init): Shorten overlength strings.
2295
6d900107
BE
22962018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2297
2298 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2299
b5764229
BE
23002018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2301
2302 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2303 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2304
22eea6b2
AM
23052018-08-30 Alexander Monakov <amonakov@ispras.ru>
2306
2307 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2308 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2309
85204e23
DM
23102018-08-27 David Malcolm <dmalcolm@redhat.com>
2311
2312 PR 87091
2313 * c-decl.c (implicitly_declare): Update call to
2314 maybe_add_include_fixit to suggest overriding the location, as it
2315 is for a note.
2316 * c-objc-common.c (c_tree_printer): Update for conversion of
2317 show_caret_p to a tri-state.
2318
3d78e008
ML
23192018-08-27 Martin Liska <mliska@suse.cz>
2320
2321 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2322 fndecl_built_in_p and remove check for FUNCTION_DECL if
2323 possible.
3d78e008
ML
2324 (diagnose_mismatched_decls): Likewise.
2325 (merge_decls): Likewise.
2326 (warn_if_shadowing): Likewise.
2327 (pushdecl): Likewise.
2328 (implicitly_declare): Likewise.
2329 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2330 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2331 * c-typeck.c (build_function_call_vec): Likewise.
2332 (convert_arguments): Likewise.
2333
097f82ec
DM
23342018-08-20 David Malcolm <dmalcolm@redhat.com>
2335
2336 PR other/84889
2337 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2338 (diagnose_mismatched_decls): Likewise, in various places.
2339 (warn_if_shadowing): Likewise.
2340 (implicit_decl_warning): Likewise.
2341 (implicitly_declare): Likewise.
2342 (undeclared_variable): Likewise.
2343 (declare_label): Likewise.
2344 (grokdeclarator): Likewise.
2345 (start_function): Likewise.
2346 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2347 (c_parser_parameter_declaration): Likewise.
2348 (c_parser_binary_expression): Likewise.
2349 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2350 (parser_build_binary_op): Likewise.
2351 (build_unary_op): Likewise.
2352 (error_init): Likewise.
2353 (pedwarn_init): Likewise.
2354 (warning_init): Likewise.
2355 (convert_for_assignment): Likewise.
2356
96e6ae57
DM
23572018-08-15 David Malcolm <dmalcolm@redhat.com>
2358
2359 * c-objc-common.c: Include "gcc-rich-location.h".
2360 (c_tree_printer): Move implemenation of '%T' to...
2361 (print_type): ...this new function.
2362 (range_label_for_type_mismatch::get_text): New function.
2363 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2364 range for the various ic_argpass cases.
2365 (class maybe_range_label_for_tree_type_mismatch): New class.
2366 (build_binary_op): Use it when calling binary_op_error.
2367
0cd020ae 23682018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2369
0cd020ae
PK
2370 * c-decl.c (start_decl): Do not warn if variables is named as main
2371 and is a local variable.
2372
72733314
IS
23732018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2374
2375 PR c/19315
2376 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2377 objects of unknown size.
2378
23aa9f7c
MS
23792018-08-13 Martin Sebor <msebor@redhat.com>
2380
2381 PR tree-optimization/71625
2382 * c-parser.c (c_parser_declaration_or_fndef): Call
2383 braced_list_to_string.
2384
e5e7e50d
BH
23852018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2386
2387 PR c/86690
2388 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2389 errors.
2390
8a45b051
MS
23912018-08-01 Martin Sebor <msebor@redhat.com>
2392
2393 PR tree-optimization/86650
2394 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2395 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2396
5922dcb5
JJ
23972018-08-01 Jakub Jelinek <jakub@redhat.com>
2398
2399 PR c/85704
2400 * c-typeck.c (init_field_decl_cmp): New function.
2401 (output_pending_init_elements): Use it for field comparisons
2402 instead of pure bit_position comparisons.
2403
9b452033
JJ
24042018-07-12 Jakub Jelinek <jakub@redhat.com>
2405
2406 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2407 type here, instead add "omp declare target implicit" attribute.
2408 (finish_decl): Diagnose vars without mappable type here.
2409
ab20d992
JJ
24102018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2411 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2412 Cesar Philippidis <cesar@codesourcery.com>
2413
2414 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2415 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2416 to their non-present_or_* counterparts. Make 'self' an alias to
2417 PRAGMA_OACC_CLAUSE_HOST.
2418 (c_parser_oacc_data_clause): Update GOMP mappings for
2419 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2420 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2421 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2422 Remove support for present_or_* clauses.
2423 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2424 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2425 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2426 (OACC_DATA_CLAUSE_MASK): Likewise.
2427 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2428 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2429 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2430 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2431 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2432
e197e64e
KV
24332018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2434
2435 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2436 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2437 (c_parser_gimple_unary_expression): Likewise.
2438
487f2f61
JJ
24392018-06-15 Jakub Jelinek <jakub@redhat.com>
2440
2441 PR c/86093
2442 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2443 before doing POINTER_DIFF_EXPR.
2444
e4d44a37
MP
24452018-06-07 Marek Polacek <polacek@redhat.com>
2446
2447 PR c/85318
2448 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2449 for loop initial declarations.
2450
b67b9225
DP
24512018-05-30 David Pagan <dave.pagan@oracle.com>
2452
2453 PR c/55976
2454 * c-decl.c (grokdeclarator): Update check for return type warnings.
2455 (start_function): Likewise.
2456 (finish_function): Likewise.
2457 * c-typeck.c (c_finish_return): Update check for return type warnings.
2458 Pass OPT_Wreturn_type to pedwarn when appropriate.
2459
c566cc9f
RS
24602018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2461
2462 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2463 __FMA_EXPR handlng.
2464
e4f81565
RS
24652018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2466
2467 * gimple-parser.c: Include internal-fn.h.
2468 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2469 (c_parser_gimple_call_internal): New function.
2470 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2471 Fix typos in comment.
2472
79e7b1fe
JJ
24732018-05-10 Jakub Jelinek <jakub@redhat.com>
2474
2475 PR c++/85662
2476 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2477 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2478 fold_convert_loc.
2479 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2480 fold_offsetof_1, pass argtype as TYPE to it and drop the
2481 fold_convert_loc.
2482
f7584c81
DP
24832018-05-02 David Pagan <dave.pagan@oracle.com>
2484
2485 PR c/30552
2486 * c-decl.c (old_style_parameter_scope): New function.
2487 * c-parser.c (c_parser_postfix_expression): Check for statement
2488 expressions in old-style function parameter list declarations.
2489 * c-parser.h (old_style_parameter_scope): New extern declaration.
2490
b33a0cb3
JJ
24912018-04-25 Jakub Jelinek <jakub@redhat.com>
2492
2493 PR sanitizer/84307
2494 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2495 it is not TREE_STATIC.
2496 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2497 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2498 its COMPOUND_LITERAL_EXPR_DECL.
2499
c5c5822a
JM
25002018-03-21 Joseph Myers <joseph@codesourcery.com>
2501
2502 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2503 where all functions return the same _FloatN or _FloatNx type,
2504 treat integer types as _Float64 instead of double.
2505
aa1c9429
JJ
25062018-03-21 Jakub Jelinek <jakub@redhat.com>
2507
2508 PR c/84999
2509 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2510 building vector comparison, diagnose it and return error_mark_node.
2511
9bb45a95
JJ
25122018-03-15 Jakub Jelinek <jakub@redhat.com>
2513
2514 PR c/84853
2515 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2516 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2517 INTEGER_TYPE element type.
2518
ada6bad9
DP
25192018-03-13 David Pagan <dave.pagan@oracle.com>
2520
2521 PR c/46921
2522 * c-typeck.c (output_init_element): Ensure field initializer
2523 expression is always evaluated if there are side effects.
2524
849bbdb9
JJ
25252018-03-06 Jakub Jelinek <jakub@redhat.com>
2526
2527 PR c/84721
2528 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2529 !building_stmt_list_p ().
2530
d74641bd
RS
25312018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2532
2533 PR c/84305
2534 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2535 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2536 and include the BIND_EXPR in the list of things that need to be
2537 pre-evaluated.
2538
0444aa9c
NS
25392018-02-09 Nathan Sidwell <nathan@acm.org>
2540
2541 PR c/84293
2542 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2543 to strict_aliasing_warning.
2544
7c30b12a
PC
25452018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2546
2547 * c-typeck.c (really_start_incremental_init, push_init_level,
2548 set_nonincremental_init, output_init_element, process_init_element):
2549 Use DECL_UNNAMED_BIT_FIELD.
2550
2be4dfcb
MP
25512018-01-31 Marek Polacek <polacek@redhat.com>
2552
2553 PR c/81779
2554 * c-parser.c (c_parser_compound_statement_nostart): Call
2555 expansion_point_location_if_in_system_header.
2556
bb9869d5
DM
25572018-01-17 David Malcolm <dmalcolm@redhat.com>
2558
2559 PR c++/83814
2560 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2561 the C part.
2562
b4923738
JJ
25632018-01-13 Jakub Jelinek <jakub@redhat.com>
2564
2565 PR c/83801
2566 * c-tree.h (decl_constant_value_1): Add a bool argument.
2567 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2568 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2569 (decl_constant_value): Adjust caller.
2570 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2571 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2572 decl_constant_value returns initializer that has BLKmode or
2573 array type.
2574 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2575
928686b1
RS
25762018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2577 Alan Hayward <alan.hayward@arm.com>
2578 David Sherwood <david.sherwood@arm.com>
2579
2580 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2581 TYPE_VECTOR_SUBPARTS.
2582
85ec4feb
JJ
25832018-01-03 Jakub Jelinek <jakub@redhat.com>
2584
2585 Update copyright years.
2586
913884f7
JJ
25872018-01-01 Jakub Jelinek <jakub@redhat.com>
2588
2589 PR c/83595
2590 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2591 c_parser_conditional_expression, c_parser_cast_expression,
2592 c_parser_sizeof_expression, c_parser_alignof_expression,
2593 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2594 c_parser_transaction_expression): Use set_error () method instead
2595 of setting value member to error_mark_node.
2596
c6cfa2bf
MM
25972017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2598
2599 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2600 and _Float<N>X built-in functions.
2601
11d29d63
JJ
26022017-12-22 Jakub Jelinek <jakub@redhat.com>
2603
14ec014e
JJ
2604 PR debug/83550
2605 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2606 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2607 incomplete vars rather than after it.
2608
11d29d63
JJ
2609 PR debug/83547
2610 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2611 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2612 and consider empty ones if there are no other stmts. For
2613 -Wunused-value walk all statements before the one only followed by
2614 DEBUG_BEGIN_STMTs.
2615
170a8bd6 26162017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2617 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2618
2619 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2620 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2621 (c_parser_do_statement): Likewise.
2622 (c_parser_for_statement): Likewise.
2623 (c_parser_statement_after_labels): Adjust calls to above.
2624 (c_parse_pragma_ivdep): New static function.
2625 (c_parser_pragma_unroll): Likewise.
2626 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2627 <PRAGMA_UNROLL>: New case.
2628
01512446
JJ
26292017-12-19 Jakub Jelinek <jakub@redhat.com>
2630
2631 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2632 perform_integral_promotions, digest_init): Replace Yoda conditions
2633 with typical order conditions.
2634 * c-decl.c (check_bitfield_type_and_width): Likewise.
2635
c65e18d3
BE
26362017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2637
2638 * c-typeck.c (c_safe_arg_type_equiv_p,
2639 c_safe_function_type_cast_p): New function.
2640 (build_c_cast): Implement -Wcast-function-type.
2641
b7280579
RB
26422017-12-14 Richard Biener <rguenther@suse.de>
2643
2644 PR c/83415
2645 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2646 like REALPART_EXPR for the behavior of whether its operand
2647 is an lvalue.
2648
49e6a6c0
MP
26492017-12-12 Marek Polacek <polacek@redhat.com>
2650
2651 PR c/82679
2652 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2653
ab20d992 26542017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2655
2656 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2657 * c-parser.c (add_debug_begin_stmt): New.
2658 (c_parser_declaration_or_fndef): Call it.
2659 (c_parser_compound_statement_nostart): Likewise.
2660 (c_parser_statement_after_labels): Likewise.
2661 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2662
4b2b493f
JM
26632017-12-07 Joseph Myers <joseph@codesourcery.com>
2664
2665 * c-decl.c (build_compound_literal): Add parameter alignas_align
2666 and set alignment of decl if nonzero.
2667 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2668 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2669 qualifier.
2670 (c_parser_struct_declaration): Update syntax comment.
2671 (c_parser_type_name): Add alignas_ok argument and pass it to
2672 c_parser_declspecs.
2673 (c_parser_cast_expression): Pass true to c_parser_type_name and
2674 give error if a cast used an _Alignas specifier.
2675 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2676 give error if sizeof (type-name) used an _Alignas specifier.
2677 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2678 give error if _Alignof (type-name) used an _Alignas specifier.
2679 (c_parser_postfix_expression_after_paren_type): Check specified
2680 alignment for a compound literal and pass it to
2681 build_compound_literal.
2682 * c-parser.h (c_parser_type_name): Update prototype.
2683 * c-tree.h (build_compound_literal): Update prototype.
2684
5d9ae53d
MS
26852017-12-07 Martin Sebor <msebor@redhat.com>
2686
2687 PR c/81544
2688 * c-decl.c (c_decl_attributes): Look up existing declaration and
2689 pass it to decl_attributes.
2690
c79144f8
DM
26912017-12-06 David Malcolm <dmalcolm@redhat.com>
2692
2693 PR c/83236
2694 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2695 reserved for use by the implementation.
2696
613bc14f
DM
26972017-12-06 David Malcolm <dmalcolm@redhat.com>
2698
2699 * c-decl.c: Include "c-family/c-spellcheck.h".
2700
05abad4c
ML
27012017-12-05 Martin Liska <mliska@suse.cz>
2702 Jakub Jelinek <jakub@redhat.com>
2703
2704 * c-typeck.c (pointer_diff): Add new argument and instrument
2705 pointer subtraction.
2706 (build_binary_op): Similar for pointer comparison.
2707
cc6534d4
JJ
27082017-12-01 Jakub Jelinek <jakub@redhat.com>
2709
65791f42
JJ
2710 PR c/79153
2711 * c-parser.c: Include tree-iterator.h.
2712 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2713 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2714 on it.
2715
cc6534d4
JJ
2716 PR c/83222
2717 * c-tree.h (decl_constant_value_1): Declare.
2718 * c-typeck.c (decl_constant_value_1): New function.
2719 (decl_constant_value): Use it.
2720 * c-fold.c (c_fully_fold_internal): If in_init, use
2721 decl_constant_value_1 instead of decl_constant_value.
2722
5de73c05
JJ
27232017-11-30 Jakub Jelinek <jakub@redhat.com>
2724
2725 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2726
058f0b9e
JJ
27272017-11-28 Jakub Jelinek <jakub@redhat.com>
2728
2729 PR sanitizer/81275
2730 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2731 c_switch_covers_all_cases_p returns true.
2732
5e9d6aa4 27332017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2734 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2735
2736 * Make-lang.in (c/c-array-notation.o): Remove.
2737 * c-array-notation.c: Delete.
2738 * c-decl.c: Remove cilkplus condition.
2739 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2740 c_parser_cilk_verify_simd, c_parser_array_notation,
2741 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2742 c_parser_cilk_simd_fn_vector_attrs,
2743 c_finish_cilk_simd_fn_tokens): Delete.
2744 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2745 (c_parser_direct_declarator_inner): Ditto.
2746 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2747 (c_parser_attributes, c_parser_compound_statement,
2748 c_parser_statement_after_labels, c_parser_if_statement,
2749 c_parser_switch_statement, c_parser_while_statement,
2750 c_parser_do_statement, c_parser_for_statement,
2751 c_parser_unary_expression, c_parser_postfix_expression,
2752 c_parser_postfix_expression_after_primary,
2753 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2754 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2755 support.
2756 * c-typeck.c (build_array_ref, build_function_call_vec,
2757 convert_arguments,
2758 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2759 c_finish_loop, build_binary_op): Remove cilkplus support.
2760
9e851845
JJ
27612017-11-28 Jakub Jelinek <jakub@redhat.com>
2762
2763 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2764 of build3.
2765
ab20d992 27662017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2767
2768 * Make-lang.in (c.install-plugin): Install backend import library.
2769
41521dee
JJ
27702017-11-23 Jakub Jelinek <jakub@redhat.com>
2771
2772 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2773 pragma_stmt context.
2774
ac9effed
EB
27752017-11-23 Mike Stump <mikestump@comcast.net>
2776 Eric Botcazou <ebotcazou@adacore.com>
2777
2778 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2779 ANNOTATE_EXPR.
2780 (c_parser_do_statement): Likewise.
2781 (c_parser_for_statement): Likewise.
2782
ce95abc4
DM
27832017-11-22 David Malcolm <dmalcolm@redhat.com>
2784
2785 PR c++/62170
2786 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2787 bool to bool *. Within '%T' handling, if showing an "aka", use
2788 "quoted" param to add appropriate quoting.
2789
974aedcc
MP
27902017-11-22 Marek Polacek <polacek@redhat.com>
2791
2792 PR c++/60336
2793 PR middle-end/67239
2794 PR target/68355
2795 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2796
d4300cc6
DM
27972017-11-21 David Malcolm <dmalcolm@redhat.com>
2798
2799 PR c/83056
2800 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2801 earlier failed lookups.
2802
1af4ebf5
MG
28032017-11-21 Marc Glisse <marc.glisse@inria.fr>
2804
2805 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2806 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2807
26edace6
DM
28082017-11-20 David Malcolm <dmalcolm@redhat.com>
2809
2810 PR c/81404
2811 * c-decl.c: Include "c-family/known-headers.h".
2812 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2813 to known-headers.cc.
2814 (class suggest_missing_header): Move to known-header.h.
2815 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2816 than get_c_name_hint.
2817
b1212255
DM
28182017-11-20 David Malcolm <dmalcolm@redhat.com>
2819
2820 * c-decl.c (get_c_name_hint): New function.
2821 (class suggest_missing_header): New class.
2822 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2823 suggest missing headers to the user.
2824
6c7a259b
DM
28252017-11-20 David Malcolm <dmalcolm@redhat.com>
2826
2827 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2828 Include "c-family/name-hint.h"
2829 (implicit_decl_warning): Convert "hint" from
2830 const char * to name_hint. Pass location to
2831 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2832 warning was not printed.
2833 (undeclared_variable): Likewise for "guessed_id".
2834 (lookup_name_fuzzy): Convert return type from const char *
2835 to name_hint. Add location_t param.
2836 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2837 Include "c-family/name-hint.h"
2838 (c_parser_declaration_or_fndef): Convert "hint" from
2839 const char * to name_hint. Pass location to lookup_name_fuzzy.
2840 (c_parser_parameter_declaration): Likewise.
2841
f9c59f7e
JJ
28422017-11-19 Jakub Jelinek <jakub@redhat.com>
2843
2844 PR c/66618
2845 PR c/69960
2846 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2847 where needed.
2848 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2849 handle_omp_array_sections): Likewise.
2850 (digest_init): Don't call decl_constant_value_for_optimization.
2851 * c-tree.h (decl_constant_value_for_optimization): Removed.
2852 * c-fold.c (c_fold_array_ref): New function.
2853 (c_fully_fold_internal): Add LVAL argument, propagate it through
2854 recursive calls. For VAR_P call decl_constant_value and
2855 unshare if not LVAL and either optimizing or IN_INIT. Remove
2856 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2857 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2858 (c_fully_fold): Add LVAL argument, pass it through to
2859 c_fully_fold_internal.
2860 (decl_constant_value_for_optimization): Removed.
2861
3ca0dc60
JM
28622017-11-15 Joseph Myers <joseph@codesourcery.com>
2863
2864 PR c/81156
2865 * c-parser.c (check_tgmath_function): New function.
2866 (enum tgmath_parm_kind): New enum.
2867 (c_parser_postfix_expression): Handle __builtin_tgmath.
2868
64a5912c
DM
28692017-10-31 David Malcolm <dmalcolm@redhat.com>
2870
2871 * c-decl.c (implicit_decl_warning): Update for renaming of
2872 pedwarn_at_rich_loc and warning_at_rich_loc.
2873 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2874 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2875 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2876 (c_parser_struct_or_union_specifier): Likewise for renaming of
2877 pedwarn_at_rich_loc.
2878 (c_parser_parameter_declaration): Likewise for renaming of
2879 error_at_rich_loc.
2880 * c-typeck.c (build_component_ref): Likewise.
2881 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2882 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2883 (set_init_label): Likewise for renaming of error_at_rich_loc.
2884
c1136864
RB
28852017-10-30 Richard Biener <rguenther@suse.de>
2886
2887 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2888 stmts.
2889
ee5fd23a
MM
28902017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2891
2892 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2893 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2894
1a59ccf2
DM
28952017-10-25 David Malcolm <dmalcolm@redhat.com>
2896
2897 PR c/7356
2898 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2899 semicolons.
2900
bc1a75dd
JJ
29012017-10-25 Jakub Jelinek <jakub@redhat.com>
2902
2903 PR libstdc++/81706
2904 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2905 newdecl to corresponding __builtin_ if any.
2906
ff1ff960
PC
29072017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2908
2909 PR c++/82466
2910 * c-decl.c (diagnose_mismatched_decls): Use
2911 OPT_Wbuiltin_declaration_mismatch.
2912
62e1c678
DM
29132017-10-12 David Malcolm <dmalcolm@redhat.com>
2914
2915 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2916 use it to guard calls to maybe_suggest_missing_token_insertion.
2917 (c_parser_parms_list_declarator): Override default value of new
2918 "type_is_unique" param to c_parser_require.
2919 (c_parser_asm_statement): Likewise.
2920 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2921 defaulting to true.
2922
a92f6726
NS
29232017-10-11 Nathan Sidwell <nathan@acm.org>
2924
2925 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2926
8e6cdc90
RS
29272017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2928
2929 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2930 operating on trees as wide_ints.
2931 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2932 (c_tree_equal): Likewise.
2933
8139a48e
DM
29342017-10-04 David Malcolm <dmalcolm@redhat.com>
2935
2936 * c-decl.c (push_parm_decl): Store c_parm's location into the
2937 PARAM_DECL.
2938 (build_c_parm): Add "loc" param and store it within the c_parm.
2939 * c-parser.c (struct c_parser): Add "last_token_location" field.
2940 (c_parser_consume_token): Store location of the token into the
2941 new field.
2942 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2943 when handling a FUNCTION_DECL, if it doesn't already have them.
2944 (c_parser_parameter_declaration): Generate a location for the
2945 parameter, and pass it to the call to build_c_parm.
2946 * c-tree.h (struct c_parm): Add field "loc".
2947 (build_c_parm): Add location_t param.
2948 * c-typeck.c (get_fndecl_argument_location): New function.
2949 (inform_for_arg): New function.
2950 (convert_for_assignment): Use inform_for_arg when dealing with
2951 ic_argpass.
2952
2a389958
JJ
29532017-09-29 Jakub Jelinek <jakub@redhat.com>
2954
7d386d45
JJ
2955 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2956 width is non-NULL.
2957 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2958 don't SET_DECL_C_BIT_FIELD here.
2959
2a389958
JJ
2960 PR c/82340
2961 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2962 instead of trying to set just TREE_READONLY manually.
2963
ebc6a85e
TV
29642017-09-16 Tom de Vries <tom@codesourcery.com>
2965
2966 PR c/81875
2967 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2968 cond itself.
2969
bb75facd
JM
29702017-09-15 Joseph Myers <joseph@codesourcery.com>
2971
2972 PR c/82071
2973 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2974 for C11.
2975 (build_conditional_expr): For C11, generate result with excess
2976 precision when one argument is an integer and the other is of a
2977 type using excess precision.
2978
1d933576
BE
29792017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2980
2981 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2982
267bbb6f
MP
29832017-09-13 Marek Polacek <polacek@redhat.com>
2984
2985 PR c/82167
2986 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2987 than expr.original_type.
2988
6836632e
NS
29892017-09-12 Nathan Sidwell <nathan@acm.org>
2990
2991 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2992 resort_sorted_fields): Moved from c-family/c-common.c.
2993 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2994
e035be33
JM
29952017-09-01 Joseph Myers <joseph@codesourcery.com>
2996
2997 PR c/82071
2998 * c-typeck.c (build_atomic_assign): Handle argument with excess
2999 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3000 argument passed to build_binary_op and convert_for_assignment but
3001 not for call to c_fully_fold.
3002 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3003 Ensure build_binary_op is called with argument with original
3004 semantic type. Avoid calling c_fully_fold with an
3005 EXCESS_PRECISION_EXPR from build_binary_op.
3006
d2e05fcb
JJ
30072017-09-01 Jakub Jelinek <jakub@redhat.com>
3008
3009 PR c/81887
3010 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3011
b397965c
RS
30122017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3013 Alan Hayward <alan.hayward@arm.com>
3014 David Sherwood <david.sherwood@arm.com>
3015
3016 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3017 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3018 m1 and m2 to the signed equivalent of a fixed-point
3019 SCALAR_TYPE_MODE.
3020
14e18d71
DM
30212017-08-24 David Malcolm <dmalcolm@redhat.com>
3022
3023 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3024 than CAN_HAVE_LOCATION_P when determining whether to use the
3025 location_t value within "value".
3026
7f204c0f
DM
30272017-08-21 David Malcolm <dmalcolm@redhat.com>
3028
3029 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3030 rather than peeking the location of the first token.
3031 * c-tree.h (c_expr::get_location): New method.
3032
2f687306
DM
30332017-08-21 David Malcolm <dmalcolm@redhat.com>
3034
3035 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3036 to check_function_arguments.
3037
3e7b80d7
MP
30382017-08-18 Marek Polacek <polacek@redhat.com>
3039
3040 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3041 commentary.
3042
00aa1fa2
L
30432017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3044
3045 PR c/53037
3046 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3047 (check_bitfield_type_and_width): Don't allow bit-field with
3048 warn_if_not_aligned type.
3049
da67acb9
MS
30502017-08-14 Martin Sebor <msebor@redhat.com>
3051
3052 PR c/81117
3053 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3054
bb85aa74
MP
30552017-08-11 Marek Polacek <polacek@redhat.com>
3056
3057 PR c/81795
3058 * c-decl.c (pushtag): Only print inform if the warning was printed.
3059 (grokdeclarator): Likewise.
3060
32129a17
DM
30612017-08-10 David Malcolm <dmalcolm@redhat.com>
3062
3063 * c-parser.c (c_parser_error): Rename to...
3064 (c_parser_error_richloc): ...this, making static, and adding
3065 "richloc" parameter, passing it to the c_parse_error call,
3066 rather than calling c_parser_set_source_position_from_token.
3067 (c_parser_error): Reintroduce, reimplementing in terms of the
3068 above, converting return type from void to bool.
3069 (class token_pair): New class.
3070 (struct matching_paren_traits): New struct.
3071 (matching_parens): New typedef.
3072 (struct matching_brace_traits): New struct.
3073 (matching_braces): New typedef.
3074 (get_matching_symbol): New function.
3075 (c_parser_require): Add param MATCHING_LOCATION, using it to
3076 highlight matching "opening" tokens for missing "closing" tokens.
3077 (c_parser_skip_until_found): Likewise.
3078 (c_parser_static_assert_declaration_no_semi): Convert explicit
3079 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3080 class matching_parens, so that the pertinent open parenthesis is
3081 highlighted when there are problems locating the close
3082 parenthesis.
3083 (c_parser_struct_or_union_specifier): Likewise.
3084 (c_parser_typeof_specifier): Likewise.
3085 (c_parser_alignas_specifier): Likewise.
3086 (c_parser_simple_asm_expr): Likewise.
3087 (c_parser_braced_init): Likewise, for matching_braces.
3088 (c_parser_paren_condition): Likewise, for matching_parens.
3089 (c_parser_switch_statement): Likewise.
3090 (c_parser_for_statement): Likewise.
3091 (c_parser_asm_statement): Likewise.
3092 (c_parser_asm_operands): Likewise.
3093 (c_parser_cast_expression): Likewise.
3094 (c_parser_sizeof_expression): Likewise.
3095 (c_parser_alignof_expression): Likewise.
3096 (c_parser_generic_selection): Likewise.
3097 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3098 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3099 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3100 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3101 c_parser_skip_until_found call.
3102 (c_parser_objc_class_definition): Use class matching_parens as
3103 above.
3104 (c_parser_objc_method_decl): Likewise.
3105 (c_parser_objc_try_catch_finally_statement): Likewise.
3106 (c_parser_objc_synchronized_statement): Likewise.
3107 (c_parser_objc_at_property_declaration): Likewise.
3108 (c_parser_oacc_wait_list): Likewise.
3109 (c_parser_omp_var_list_parens): Likewise.
3110 (c_parser_omp_clause_collapse): Likewise.
3111 (c_parser_omp_clause_default): Likewise.
3112 (c_parser_omp_clause_if): Likewise.
3113 (c_parser_omp_clause_num_threads): Likewise.
3114 (c_parser_omp_clause_num_tasks): Likewise.
3115 (c_parser_omp_clause_grainsize): Likewise.
3116 (c_parser_omp_clause_priority): Likewise.
3117 (c_parser_omp_clause_hint): Likewise.
3118 (c_parser_omp_clause_defaultmap): Likewise.
3119 (c_parser_oacc_single_int_clause): Likewise.
3120 (c_parser_omp_clause_ordered): Likewise.
3121 (c_parser_omp_clause_reduction): Likewise.
3122 (c_parser_omp_clause_schedule): Likewise.
3123 (c_parser_omp_clause_num_teams): Likewise.
3124 (c_parser_omp_clause_thread_limit): Likewise.
3125 (c_parser_omp_clause_aligned): Likewise.
3126 (c_parser_omp_clause_linear): Likewise.
3127 (c_parser_omp_clause_safelen): Likewise.
3128 (c_parser_omp_clause_simdlen): Likewise.
3129 (c_parser_omp_clause_depend): Likewise.
3130 (c_parser_omp_clause_map): Likewise.
3131 (c_parser_omp_clause_device): Likewise.
3132 (c_parser_omp_clause_dist_schedule): Likewise.
3133 (c_parser_omp_clause_proc_bind): Likewise.
3134 (c_parser_omp_clause_uniform): Likewise.
3135 (c_parser_omp_for_loop): Likewise.
3136 (c_parser_cilk_clause_vectorlength): Likewise.
3137 (c_parser_cilk_clause_linear): Likewise.
3138 (c_parser_transaction_expression): Likewise.
3139 * c-parser.h (c_parser_require): Add param matching_location with
3140 default UNKNOWN_LOCATION.
3141 (c_parser_error): Convert return type from void to bool.
3142 (c_parser_skip_until_found): Add param matching_location with
3143 default UNKNOWN_LOCATION.
3144
30af3a2b
MP
31452017-08-09 Marek Polacek <polacek@redhat.com>
3146
3147 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3148 * c-tree.h (build_external_ref): Update declaration.
3149 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3150 (build_external_ref): Change the type of a parameter to bool.
3151 (parser_build_binary_op): Use true/false instead of 1/0.
3152 (pointer_diff): Likewise.
3153 (build_modify_expr): Likewise.
3154 (set_designator): Change the type of a parameter to bool.
3155 (set_init_index): Use true/false instead of 1/0.
3156 (set_init_label): Likewise.
3157 (output_init_element): Change the type of a parameter to bool.
3158 (output_pending_init_elements): Use true/false instead of 1/0.
3159 (process_init_element): Likewise.
3160 (build_binary_op): Change the type of a parameter to bool.
3161
296c53ac
MP
31622017-08-09 Marek Polacek <polacek@redhat.com>
3163
3164 PR c/81233
3165 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3166 Call emit_diagnostic_valist instead of pedwarn.
3167 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3168 Print the relevant types in diagnostics.
3169
a32c8316
MP
31702017-08-09 Marek Polacek <polacek@redhat.com>
3171
3172 PR c/81417
3173 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3174 build_conditional_expr.
a32c8316
MP
3175 * c-parser.c (c_parser_conditional_expression): Create locations for
3176 EXP1 and EXP2 from their source ranges. Pass the locations down to
3177 build_conditional_expr.
3178 * c-tree.h (build_conditional_expr): Update declaration.
3179 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3180 For -Wsign-compare, also print the types.
3181
314e6352
ML
31822017-08-08 Martin Liska <mliska@suse.cz>
3183
3184 * c-convert.c: Include header files.
3185 * c-typeck.c: Likewise.
3186
577eec56
ML
31872017-08-07 Martin Liska <mliska@suse.cz>
3188
3189 * c-parser.c (c_parser_attributes): Canonicalize name of an
3190 attribute.
3191
f7b6353a
MP
31922017-08-02 Marek Polacek <polacek@redhat.com>
3193
3194 PR c/81289
3195 * c-parser.c (c_parser_unary_expression): Use set_error.
3196
8a6eab34
MP
3197 PR c/81448
3198 PR c/81306
3199 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3200 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3201
ab20d992 32022017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3203 Martin Liska <mliska@suse.cz>
3204
3205 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3206 statement.
7fef86d3 3207
f34ebeb2
ML
32082017-07-31 Martin Liska <mliska@suse.cz>
3209
3210 PR sanitize/81530
3211 * c-convert.c (convert): Guard condition with flag_sanitize_p
3212 also with current_function_decl non-null equality.
3213 * c-decl.c (grokdeclarator): Likewise.
3214 * c-typeck.c (build_binary_op): Likewise.
3215
8595f67b
MP
32162017-07-25 Marek Polacek <polacek@redhat.com>
3217
3218 * c-decl.c (grokfield): Remove local variable.
3219
d49718d6
MP
32202017-07-25 Marek Polacek <polacek@redhat.com>
3221
3222 PR c/81364
3223 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3224 macro expansion if the body is in { }.
3225 (c_parser_while_statement): Likewise.
3226 (c_parser_for_statement): Likewise.
3227
ff22eb12
NS
32282017-07-18 Nathan Sidwell <nathan@acm.org>
3229
3230 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3231
eea77d1f
DM
32322017-07-14 David Malcolm <dmalcolm@redhat.com>
3233
3234 * c-decl.c (implicitly_declare): When suggesting a missing
3235 #include, provide a fix-it hint.
3236
b6f43128
DM
32372017-07-06 David Malcolm <dmalcolm@redhat.com>
3238
3239 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3240 and call that instead.
3241 * c-tree.h (selftest::run_c_tests): New decl.
3242
3e2becc4
MP
32432017-06-26 Marek Polacek <polacek@redhat.com>
3244
3245 PR c/80116
3246 * c-parser.c (c_parser_if_body): Set the location of the
3247 body of the conditional after parsing all the labels. Call
3248 warn_for_multistatement_macros.
3249 (c_parser_else_body): Likewise.
3250 (c_parser_switch_statement): Likewise.
3251 (c_parser_while_statement): Likewise.
3252 (c_parser_for_statement): Likewise.
3253 (c_parser_statement): Add a default argument. Save the location
3254 after labels have been parsed.
3255 (c_parser_c99_block_statement): Likewise.
3256
343ae898
RB
32572017-06-19 Richard Biener <rguenther@suse.de>
3258
3259 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3260 negated _Literals to parse _Literal (int) -1.
3261
45b2222a
ML
32622017-06-13 Martin Liska <mliska@suse.cz>
3263
3264 PR sanitize/78204
3265 * c-convert.c (convert): Use sanitize_flags_p.
3266 * c-decl.c (grokdeclarator): Likewise.
3267 * c-typeck.c (convert_for_assignment): Likewise.
3268 (c_finish_return): Likewise.
3269 (build_binary_op): Likewise.
3270
8ab7005b
JJ
32712017-06-08 Jakub Jelinek <jakub@redhat.com>
3272
3273 PR c/81006
3274 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3275 to sizetype before size_binop.
3276
363dc72c
JJ
32772017-06-07 Jakub Jelinek <jakub@redhat.com>
3278
3279 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3280 of TDI_generic.
3281
dc949728
MP
32822017-06-06 Marek Polacek <polacek@redhat.com>
3283
3284 PR c/79983
3285 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3286 ref.
3287 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3288
40ffd95f
BE
32892017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3290
3291 * c-parser.c (c_parser_binary_expression): Implement the
3292 -Wsizeof_pointer_div warning.
3293 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3294 from a parenthesized expression.
3295 (c_parser_expr_list): Use c_last_sizeof_loc.
3296 * c-tree.h (c_last_sizeof_loc): New external.
3297 * c-typeck.c (c_last_sizeof_loc): New variable.
3298 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3299
9fc5e7a4
MM
33002017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3301
3302 PR testsuite/80580
3303 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3304
f012c8ef
DM
33052017-05-30 David Malcolm <dmalcolm@redhat.com>
3306
3307 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3308 parameters.
3309
3cd211af
MS
33102017-05-24 Martin Sebor <msebor@redhat.com>
3311
3312 PR c/80731
3313 * c-fold.c (c_fully_fold_internal): Adjust.
3314 * c-typeck.c (parser_build_unary_op): Adjust.
3315
fd71a9a2
TS
33162017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3317
3318 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3319 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3320 "VECTOR_LENGTH".
3321
92fa0f9e
MP
33222017-05-23 Marek Polacek <polacek@redhat.com>
3323
3324 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3325 quotes.
3326
d11c168a
JJ
33272017-05-22 Jakub Jelinek <jakub@redhat.com>
3328
3329 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3330 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3331 it returned invariant. Call tree_invariant_p unconditionally
3332 afterwards to decide whether to return expr or op0.
3333
58aca9d9
NS
33342017-05-22 Nathan Sidwell <nathan@acm.org>
3335
3336 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3337
7fd549d2
TS
33382017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3339
3340 * c-parser.c (c_parser_omp_clause_default): Handle
3341 "OMP_CLAUSE_DEFAULT_PRESENT".
3342
6ecd2339
BE
33432017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3344
3345 * config-lang.in (gtfiles): Add c-family/c-format.c.
3346
8a57ecff
NS
33472017-05-18 Nathan Sidwell <nathan@acm.org>
3348
3349 * c-decl.c (pushdecl_top_level): Delete unused function.
3350
6574d78e
MP
33512017-05-18 Marek Polacek <polacek@redhat.com>
3352
3353 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3354 (check_earlier_gotos): Likewise.
3355 (define_label): Likewise.
3356 (pending_xref_error): Likewise.
3357 (smallest_type_quals_location): Likewise.
3358 (grokdeclarator): Likewise.
3359 (grokparms): Likewise.
3360 (identifier_global_value): Likewise.
3361 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3362 (find_init_member): Likewise.
3363
e3455240
MP
33642017-05-18 Marek Polacek <polacek@redhat.com>
3365
3366 * c-decl.c (start_decl): Use false/true instead of 0/1.
3367 (grokdeclarator): Likewise.
3368 (finish_struct): Likewise.
3369 (start_function): Change the return type to bool. Use false/true
3370 instead of 0/1.
3371 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3372 * c-tree.h (start_function): Update.
3373 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3374 (set_designator): Change the return type to bool. Use false/true
3375 instead of 0/1.
3376
3fa8871b
MP
33772017-05-17 Marek Polacek <polacek@redhat.com>
3378
3379 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3380 * c-typeck.c: Likewise.
3381
142473df
MP
33822017-05-17 Marek Polacek <polacek@redhat.com>
3383
3384 PR sanitizer/80659
3385 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3386 DECL_IGNORED_P even for non-static compound literals.
3387
1a817418
ML
33882017-05-17 Martin Liska <mliska@suse.cz>
3389
3390 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3391 use it instead of int type.
3392
b2fa0a8b
MP
33932017-05-17 Marek Polacek <polacek@redhat.com>
3394
3395 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3396 call c_fully_fold.
3397 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3398 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3399 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3400 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3401 save_expr.
3402 (c_parser_conditional_expression): Likewise.
3403 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3404 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3405 (process_init_element): Likewise.
3406 (build_binary_op): Likewise.
3407 (handle_omp_array_sections_1): Likewise.
3408
1e47f02b
TS
34092017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3410
3411 * c-parser.c (c_parser_omp_clause_num_gangs)
3412 (c_parser_omp_clause_num_workers)
3413 (c_parser_omp_clause_vector_length): Merge functions into...
3414 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3415 all users.
3416
c24e924f
NS
34172017-05-11 Nathan Sidwell <nathan@acm.org>
3418
3419 * gimple-parser.c: Don't #include tree-dump.h.
3420
c587104e
MM
34212017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3422
3423 PR testsuite/80580
3424 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3425
67ac9a9d
MM
34262017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3427
3428 PR testsuite/80580
3429 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3430 incorrect __MEM syntax.
3431
ac4eb40f
MM
34322017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3433
3434 PR testsuite/80580
3435 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3436 type of unary '*'.
3437
641da50a
NS
34382017-05-09 Nathan Sidwell <nathan@acm.org>
3439
3440 * c-tree.h (pushdecl): Declare.
3441
56d35585
DM
34422017-05-05 David Malcolm <dmalcolm@redhat.com>
3443
3444 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3445 with diagnostic_report_diagnostic.
3446 * c-errors.c (pedwarn_c99): Likewise.
3447 (pedwarn_c90): Likewise.
3448
815d9cc6
XR
34492017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3450
92a285c1 3451 PR c++/80038
815d9cc6
XR
3452 * c-gimplify.c (c_gimplify_expr): Remove calls to
3453 cilk_gimplifY_call_params_in_spawned_fn.
3454
1c4ea66f
DM
34552017-04-25 David Malcolm <dmalcolm@redhat.com>
3456
3457 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3458 hint for removing extra semicolon.
3459
666f7903
JJ
34602017-04-21 Jakub Jelinek <jakub@redhat.com>
3461
3462 PR c/80468
3463 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3464 enabled, set specs->type to integer_type_node.
3465
5764ee3c
JW
34662017-04-03 Jonathan Wakely <jwakely@redhat.com>
3467
3468 * c-array-notation.c: Fix typo in comment.
3469
10fa8dfb
MP
34702017-03-29 Marek Polacek <polacek@redhat.com>
3471
3472 PR c/79730
3473 * c-decl.c (finish_decl): Check VAR_P.
3474
a9e4a1a5
JJ
34752017-03-27 Jakub Jelinek <jakub@redhat.com>
3476
3477 PR middle-end/80162
3478 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3479 * c-typeck.c (c_mark_addressable): Likewise. Look through
3480 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3481 to ARRAY_TYPE.
3482 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3483
ee3ff394
MP
34842017-03-23 Marek Polacek <polacek@redhat.com>
3485
3486 * c-tree.h: Remove a C_RID_YYCODE reference.
3487
4d1b8e70
JJ
34882017-03-21 Jakub Jelinek <jakub@redhat.com>
3489
3490 PR c/80097
3491 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3492 optional COMPOUND_EXPR with ubsan instrumentation.
3493
31dc71a8
MP
34942017-03-17 Marek Polacek <polacek@redhat.com>
3495
3496 * c-parser.c: Add C11 references.
3497
d579c385
MP
34982017-03-15 Marek Polacek <polacek@redhat.com>
3499
3500 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3501
85059a38
MP
35022017-03-11 Marek Polacek <polacek@redhat.com>
3503
3504 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3505
2f6f187a
DM
35062017-03-10 David Malcolm <dmalcolm@redhat.com>
3507
3508 PR translation/79848
3509 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3510 "%qs".
3511 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3512
36618428
MP
35132017-03-09 Marek Polacek <polacek@redhat.com>
3514
3515 PR sanitizer/79757
3516 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3517 parameter declarations with initializers.
3518
01e5af5a
JJ
35192017-03-09 Jakub Jelinek <jakub@redhat.com>
3520
3521 PR c/79969
3522 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3523 TYPE_STUB_DECL.
3524
a71dbc63
JJ
35252017-03-07 Jakub Jelinek <jakub@redhat.com>
3526
3527 PR c/79834
3528 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3529 for "may only be used in compound statements" diagnostics, change it
3530 such that the same translatable string is used for all pragmas. For
3531 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3532 diagnostics.
3533 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3534 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3535 "may only be used in compound statements" diagnostics, such that the
3536 same translatable string is used for all pragmas.
3537
1ff4bae6
MP
35382017-03-04 Marek Polacek <polacek@redhat.com>
3539
3540 PR c/79847
3541 * c-decl.c (implicit_decl_warning): Add missing space.
3542
7f5a7d78
MP
35432017-03-03 Marek Polacek <polacek@redhat.com>
3544
3545 PR c/79758
3546 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3547 current_function_prototype_arg_types is error_mark_node. Fix
3548 formatting. Use TREE_VALUE instead of TREE_TYPE.
3549
883c8f06
JJ
35502017-03-03 Jakub Jelinek <jakub@redhat.com>
3551
79c9b7a8
JJ
3552 PR c/79837
3553 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3554 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3555 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3556 diagnostics.
3557
883c8f06
JJ
3558 PR c/79836
3559 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3560 instead of %<_Generic>.
3561 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3562 (c_parser_omp_target_exit_data): Use %<release%> instead of
3563 %<release>.
3564
324ff1a0
JJ
35652017-02-28 Jakub Jelinek <jakub@redhat.com>
3566
3567 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3568 instead of just cond ? "..." : "...".
3569 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3570 for "enter"/"exit" keyword.
3571 (c_finish_oacc_routine): Don't use %s to supply portions of the
3572 message.
3573
4227c9ad
JJ
35742017-02-24 Jakub Jelinek <jakub@redhat.com>
3575
3576 PR c++/79588
3577 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3578 handle -Wrestrict here.
3579 * c-typeck.c (build_function_call_vec): Adjust
3580 check_function_arguments caller.
3581
5d972e66
RB
35822017-02-23 Richard Biener <rguenther@suse.de>
3583
3584 PR c/79684
3585 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3586 to initialize c_exprs to return.
3587 (c_parser_gimple_binary_expression): Likewise.
3588 (c_parser_gimple_unary_expression): Likewise.
3589 (c_parser_gimple_postfix_expression): Likewise.
3590
61ac5ebe
MP
35912017-02-22 Marek Polacek <polacek@redhat.com>
3592
3593 PR c/79662
3594 * c-typeck.c (convert_arguments): Handle error_mark_node.
3595
41d1b0b1
PK
35962017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3597
3598 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3599 value of c_parser_parse_ssa_name against error_mark_node and emit
3600 error if ssa name is anonymous and written as default definition.
3601
eab1f169
PK
36022017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3603
3604 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3605 FMA_EXPR.
3606
bcac0b4d
JJ
36072017-02-16 Jakub Jelinek <jakub@redhat.com>
3608
3609 PR c++/79512
3610 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3611 ignore #pragma omp target even when not followed by identifier.
3612
1be33173
PK
36132017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3614
3615 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3616 (c_parser_gimple_unary_expression): Likewise.
3617
aa326bfb
JJ
36182017-02-13 Jakub Jelinek <jakub@redhat.com>
3619
3620 * c-parser.c (c_parser_oacc_declare): Add missing space in
3621 diagnostics.
3622
8a398bc5
PK
36232017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3624
3625 PR c/79478
3626 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3627 set_c_expr_source_range when parsing ssa-name.
3628
3dcde5ef 36292017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3630 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3631
3632 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3633 building IL when arguments are error_mark_node.
3634 (c_parser_gimple_unary_expression): Likewise.
3635 (c_parser_gimple_if_stmt): Likewise.
3636 (c_parser_gimple_switch_stmt): Likewise.
3637 (c_parser_gimple_return_stmt): Likewise.
3638 (c_parser_parse_ssa_name): When name lookup fails do not build
3639 an SSA name. Use undeclared rather than not declared in error
3640 reporting.
3641
192b048b
MP
36422017-02-09 Marek Polacek <polacek@redhat.com>
3643
3644 PR c/79428
3645 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3646 instead of c_parser_skip_until_found.
3647
56f71478
JJ
36482017-02-09 Jakub Jelinek <jakub@redhat.com>
3649
3650 PR c/79431
3651 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3652 symtab_node::get on automatic variables.
3653
02889d23
CLT
36542016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3655 Chung-Lin Tang <cltang@codesourcery.com>
3656
3657 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3658 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3659 semantic checking.
3660 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3661
7af4b20d
RB
36622017-02-07 Richard Biener <rguenther@suse.de>
3663
3664 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3665 (c_parser_gimple_postfix_expression_after_primary):
3666 Do not use c_build_function_call_vec to avoid folding and promotion.
3667 Simplify.
3668
e5e391d6
MO
36692017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3670
3671 PR lto/79061
3672 * c-decl.c (pop_scope): Pass main_input_filename to
3673 build_translation_unit_decl.
3674
c2e84327
DM
36752017-01-24 David Malcolm <dmalcolm@redhat.com>
3676
3677 * c-parser.c: Include "read-rtl-function.h" and
3678 "run-rtl-passes.h".
3679 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3680 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3681 production. Update for renaming of field "gimple_pass" to
3682 "gimple_or_rtl_pass". If __RTL was seen, call
3683 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3684 to an auto_timevar, to cope with early exit.
3685 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3686 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3687 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3688 Handle RID_RTL.
3689 (c_parser_parse_rtl_body): New function.
3690 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3691 (struct c_declspecs): Rename field "gimple_pass" to
3692 "gimple_or_rtl_pass". Add field "rtl_p".
3693 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3694 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3695 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3696 (c_parser_gimple_or_rtl_pass_list): ...this.
3697
2ebd93e1
MP
36982017-01-20 Marek Polacek <polacek@redhat.com>
3699
3700 PR c/64279
3701 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3702
b1c95bb5
RB
37032017-01-13 Richard Biener <rguenther@suse.de>
3704
3705 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3706 nops.
3707
25329913
RB
37082017-01-13 Richard Biener <rguenther@suse.de>
3709
3710 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3711 _Literal ( type-name ) number.
3712
6bb4ea5c
RB
37132017-01-12 Richard Biener <rguenther@suse.de>
3714
3715 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3716 __MEM.
3717
6b5b4e9c
JJ
37182017-01-11 Jakub Jelinek <jakub@redhat.com>
3719
3720 PR c++/72813
3721 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3722 PCH file.
3723
e3252775
RB
37242017-01-11 Richard Biener <rguenther@suse.de>
3725
3726 PR bootstrap/79052
3727 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3728 returns on parse errors.
3729
a9342885
MP
37302017-01-04 Marek Polacek <polacek@redhat.com>
3731
3732 PR c++/64767
3733 * c-parser.c (c_parser_postfix_expression): Mark zero character
3734 constants by setting original_type in c_expr.
3735 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3736 with a zero character constant.
3737 (char_type_p): New function.
3738
5dd9a9d0
DM
37392017-01-04 David Malcolm <dmalcolm@redhat.com>
3740
3741 * c-parser.c (c_parser_declaration_or_fndef): Create a
3742 rich_location at init_loc and parse it to start_init.
3743 (last_init_list_comma): New global.
3744 (c_parser_braced_init): Update last_init_list_comma when parsing
3745 commas. Pass it to pop_init_level. Pass location of closing
3746 brace to pop_init_level.
3747 (c_parser_postfix_expression_after_paren_type): Create a
3748 rich_location at type_loc and parse it to start_init.
3749 (c_parser_omp_declare_reduction): Likewise for loc.
3750 * c-tree.h (start_init): Add rich_location * param.
3751 (pop_init_level): Add location_t param.
3752 * c-typeck.c (struct initializer_stack): Add field
3753 "missing_brace_richloc".
3754 (start_init): Add richloc param, use it to initialize
3755 the stack node's missing_brace_richloc.
3756 (last_init_list_comma): New decl.
3757 (finish_implicit_inits): Pass last_init_list_comma to
3758 pop_init_level.
3759 (push_init_level): When finding missing open braces, add fix-it
3760 hints to the richloc.
3761 (pop_init_level): Add "insert_before" param and pass it
3762 when calling pop_init_level. Add fixits about missing
3763 close braces to any richloc. Use the richloc for the
3764 -Wmissing-braces warning.
3765 (set_designator): Pass last_init_list_comma to pop_init_level.
3766 (process_init_element): Likewise.
3767
cbe34bb5
JJ
37682017-01-01 Jakub Jelinek <jakub@redhat.com>
3769
3770 Update copyright years.
3771
d17680f3
JJ
37722016-12-21 Jakub Jelinek <jakub@redhat.com>
3773
0dba7960
JJ
3774 PR bootstrap/78817
3775 * c-typeck.c (build_function_call_vec): If check_function_arguments
3776 returns true, set TREE_NO_WARNING on CALL_EXPR.
3777
d17680f3
JJ
3778 PR c/77767
3779 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3780 to *expr instead of overwriting it.
3781
aa90531e
RB
37822016-12-20 Richard Biener <rguenther@suse.de>
3783
3784 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3785 error recovery.
3786 (c_parser_gimple_statement): Only build assigns for non-error
3787 stmts.
3788 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3789
629b3d75
MJ
37902016-12-14 Martin Jambor <mjambor@suse.cz>
3791
3792 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3793 omp-low.h.
3794 (c_finish_oacc_routine): Adjusted call to
3795 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3796 to use their new names.
3797 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3798 use its new name.
3799 (c_parser_oacc_update): Likewise.
3800 (c_parser_omp_simd): Likewise.
3801 (c_parser_omp_target_update): Likewise.
3802 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3803 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3804 name.
3805 (c_finish_omp_cancellation_point): Likewise.
3806 * gimple-parser.c: Do not include omp-low.h
3807
c5af52eb
CP
38082016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3809 James Norris <jnorris@codesourcery.com>
3810
3811 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3812 EXIT_DATA,WAIT} are not used in compound statements.
3813 (c_parser_oacc_enter_exit_data): Update diagnostics.
3814
48330c93
BE
38152016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3816
3817 PR c++/71973
3818 * c-decl.c (diagnose_mismatched_decls): Use
3819 OPT_Wbuiltin_declaration_mismatch here too.
3820
899ca90e 38212016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3822 Alan Hayward <alan.hayward@arm.com>
3823 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3824
3825 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3826 (make_label, finish_struct): Likewise.
3827
1ee62b92 38282016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3829 Richard Biener <rguenther@suse.de>
22b15758 3830
8e745a17
JJ
3831 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3832 * config-lang.in (gtfiles): Add c/c-parser.h.
3833 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3834 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3835 * c-parser.c (enum c_id_kind, struct c_token,
3836 c_parser_next_token_is, c_parser_next_token_is_not,
3837 c_parser_next_token_is_keyword,
3838 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3839 Split out to ...
3840 * c-parser.h: ... new header.
3841 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3842 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3843 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3844 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3845 c_parser_error, c_parser_require, c_parser_skip_until_found,
3846 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3847 c_parser_type_name): Export.
3848 (c_parser_tokens_buf): New function.
3849 (c_parser_error): Likewise.
3850 (c_parser_set_error): Likewise.
3851 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3852 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3853 via c_parser_parse_gimple_body.
8e745a17
JJ
3854 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3855 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3856 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3857 c_parser_error, c_parser_require, c_parser_skip_until_found,
3858 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3859 c_parser_type_name): Declare.
1ee62b92
PG
3860 (struct c_parser): Declare forward.
3861 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3862 (c_parser_error): Likewise.
3863 (c_parser_set_error): Likewise.
3864 * gimple-parser.c: New file.
3865 * gimple-parser.h: Likewise.
1ee62b92 3866
22b15758
UB
38672016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3868
3869 PR c/35503
3870 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3871 warn_for_restrict.
3872
84ff4775
LCW
38732016-09-11 Le-Chun Wu <lcwu@google.com>
3874 Mark Wielaard <mjw@redhat.com>
3875
3876 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3877 to the given -Wshadow= variant.
3878
4d0cdd0c
TP
38792016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3880
3881 * c-typeck.c: Include memmodel.h.
3882
1202f33e
JJ
38832016-10-13 Jakub Jelinek <jakub@redhat.com>
3884
3885 PR target/77957
3886 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3887 instead of lhd_return_null_tree_v.
3888
8a14afd0
BS
38892016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3890
3891 PR c++/69733
3892 * c-decl.c (smallest_type_quals_location): New static function.
3893 (grokdeclarator): Try to find the correct location for an ignored
3894 qualifier.
3895
81fea426
MP
38962016-09-26 Marek Polacek <polacek@redhat.com>
3897
3898 PR c/7652
3899 * c-decl.c (pop_scope): Add gcc_fallthrough.
3900
39012016-09-26 Marek Polacek <polacek@redhat.com>
3902
3903 PR c/7652
3904 * c-parser.c (struct c_token): Add flags field.
3905 (c_lex_one_token): Pass it to c_lex_with_flags.
3906 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3907 into IFN_FALLTHROUGH.
3908 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3909 attribute fallthrough after a case label or default label.
3910 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3911
9a2300e9
MP
39122016-09-24 Marek Polacek <polacek@redhat.com>
3913
3914 PR c/77490
3915 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3916 have boolean value. Warn about ++/-- on booleans.
3917
7de76362
JJ
39182016-09-23 Jakub Jelinek <jakub@redhat.com>
3919
3920 * c-parser.c (incomplete_record_decls): Remove unnecessary
3921 = vNULL initialization of file scope vec.
3922
5b73d2ab
MP
39232016-09-16 Marek Polacek <polacek@redhat.com>
3924
3925 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3926
e51fbec3
MP
39272016-09-14 Marek Polacek <polacek@redhat.com>
3928
3929 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3930 (fix_array_notation_expr): Likewise.
3931 * c-decl.c (finish_decl): Likewise.
3932 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3933 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3934 (function_to_pointer_conversion): Use false instead of 0.
3935 (convert_lvalue_to_rvalue): Likewise.
3936 (parser_build_unary_op): Likewise.
3937 (build_atomic_assign): Likewise.
3938 (build_unary_op): Change nonconvert parameter type to bool, use
3939 true/false instead of 1/0.
3940 (build_binary_op): Use true instead of 1.
3941
254830ba
DM
39422016-09-13 David Malcolm <dmalcolm@redhat.com>
3943
3944 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3945 of add_fixit_insert to add_fixit_insert_before.
3946
4c13ba17
MP
39472016-09-13 Marek Polacek <polacek@redhat.com>
3948
3949 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3950 it.
3951
54dcdb88
BE
39522016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3953
3954 PR c++/77496
3955 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3956 COMPOUND_EXPR to warn_for_omitted_condop.
3957
e5106e27
DM
39582016-09-07 David Malcolm <dmalcolm@redhat.com>
3959
3960 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3961 c_get_substring_location for this new langhook.
3962
9dc5773f
JJ
39632016-09-02 Jakub Jelinek <jakub@redhat.com>
3964
3965 PR c/65467
3966 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3967 flag_openmp.
3968 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3969 instead of mark_exp_read on low_bound/length expression.
3970 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3971 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3972 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3973 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3974 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3975 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3976 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3977 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3978 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3979 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3980 instead of mark_expr_read.
3981 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3982 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3983 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3984 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3985 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3986 array section bases outside of depend clause, for depend clause
3987 use convert_lvalue_to_rvalue on the base.
3988 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3989 linear, aligned, map, to and from clauses.
3990 (c_omp_clause_copy_ctor): New function.
3991
295844f6
MP
39922016-09-01 Marek Polacek <polacek@redhat.com>
3993
3994 PR c/7652
3995 * c-typeck.c (composite_type): Add FALLTHRU comment.
3996
089af25c
DM
39972016-08-31 David Malcolm <dmalcolm@redhat.com>
3998
3999 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4000 to the insertion fixits for "struct", "union", and "enum".
4001
f9087798
DM
40022016-08-30 David Malcolm <dmalcolm@redhat.com>
4003
4004 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4005 rather than add_fixit_misspelled_id.
4006 (undeclared_variable): Likewise.
4007 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4008 now-redundant "here" params from add_fixit_insert method calls.
4009 (c_parser_parameter_declaration): Likewise.
4010 * c-typeck.c (build_component_ref): Remove now-redundant range
4011 param from add_fixit_replace method calls.
4012
ebef225f
MP
40132016-08-25 Marek Polacek <polacek@redhat.com>
4014
4015 * c-typeck.c (parser_build_binary_op): Pass LHS to
4016 warn_logical_not_parentheses.
4017
fe377a48
MP
40182016-08-25 Marek Polacek <polacek@redhat.com>
4019
4020 PR c/77323
4021 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4022 or _FloatN or _FloatNx is not supported.
4023 (finish_declspecs): Set type to integer_type_node when _FloatN or
4024 _FloatNx is not supported.
4025
c65699ef
JM
40262016-08-19 Joseph Myers <joseph@codesourcery.com>
4027
4028 PR c/32187
4029 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4030 (struct c_declspecs): Add field floatn_nx_idx.
4031 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4032 and _FloatNx type specifiers.
4033 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4034 (c_parser_declspecs, c_parser_attribute_any_word)
4035 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4036 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4037 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4038 narrower than double.
4039
2f1364c2
JJ
40402016-08-12 Jakub Jelinek <jakub@redhat.com>
4041 Martin Liska <mliska@suse.cz>
4042
4043 PR c/67410
4044 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4045 % to determine val element to change. Assert that
4046 wchar_bytes * charwidth fits into val array.
4047
191816a3
MP
40482016-08-12 Marek Polacek <polacek@redhat.com>
4049
4050 PR c/7652
4051 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4052 (c_parser_postfix_expression): Likewise.
4053 * c-typeck.c (build_unary_op): Adjust fall through comment.
4054 (c_mark_addressable): Likewise.
4055
b95a64bb
JJ
40562016-08-11 Jakub Jelinek <jakub@redhat.com>
4057
4058 PR c/72816
4059 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4060 array member through typedef, for orig_qual_indirect == 0 clear
4061 orig_qual_type.
4062
895aa8e1
DM
40632016-08-08 David Malcolm <dmalcolm@redhat.com>
4064
4065 PR c/64955
4066 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4067 this up to selftest::run_c_tests.
4068 (selftest::run_c_tests): New function.
4069
0b212d8c
TS
40702016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4071
ae9281fc
TS
4072 * c-parser.c (struct oacc_routine_data): Add error_seen and
4073 fndecl_seen members.
4074 (c_finish_oacc_routine): Use these.
4075 (c_parser_declaration_or_fndef): Adjust.
4076 (c_parser_oacc_routine): Likewise. Support more C language
4077 constructs, and improve diagnostics. Move pragma context
4078 checking...
4079 (c_parser_pragma): ... here.
4080
0b212d8c
TS
4081 * c-parser.c (struct oacc_routine_data): New.
4082 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4083 Simplify code.
4084 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4085 declare target" attribute.
4086
76e2c821
JB
40872016-08-01 Jan Beulich <jbeulich@suse.com>
4088
4089 * c-fold.c (c_fully_fold_internal): Also emit shift count
4090 warnings for vector types.
4091 * c-typeck.c (build_binary_op): Likewise.
4092
f618a472
MP
40932016-07-29 Marek Polacek <polacek@redhat.com>
4094
4095 PR c/71742
4096 * c-decl.c (finish_struct): Rephrase an error message.
4097
efd0786f
MP
4098 PR c/71853
4099 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4100 to error node for invalid code.
4101
e00dceaf
MP
4102 PR c/71573
4103 * c-decl.c (implicitly_declare): Return decl early not only for
4104 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4105
673a107a
JJ
41062016-07-29 Jakub Jelinek <jakub@redhat.com>
4107
4108 PR c/71969
4109 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4110 on GNU extern inline functions.
4111
a5b5c8b6
MP
41122016-07-29 Marek Polacek <polacek@redhat.com>
4113
4114 PR c/71583
4115 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4116 check expr.value.
4117
e3fe09c1
UB
41182016-07-22 Uros Bizjak <ubizjak@gmail.com>
4119
4120 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4121
7c8f7eaa
DM
41222016-07-20 David Malcolm <dmalcolm@redhat.com>
4123
4124 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4125 spellcheck-tree.h
4126 (best_macro_match): Likewise, converting from a typedef to a
4127 subclass.
4128 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4129 (lookup_name_fuzzy): Update for change of best_macro_match to a
4130 subclass with a ctor that calls cpp_forall_identifiers.
4131
de6a69ee
DM
41322016-07-20 David Malcolm <dmalcolm@redhat.com>
4133
4134 * c-decl.c (implicit_decl_warning): Update for conversion of
4135 return type of lookup_name_fuzzy to const char *.
4136 (undeclared_variable): Likewise.
4137 (lookup_name_fuzzy): Convert return type from tree to
4138 const char *.
4139 * c-parser.c (c_parser_declaration_or_fndef): Update for
4140 conversion of return type of lookup_name_fuzzy to const char *.
4141 (c_parser_parameter_declaration): Likewise.
4142
b1c9c068
CP
41432016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4144
4145 * c-parser.c (c_parser_oacc_declare): Don't scan for
4146 GOMP_MAP_POINTER.
4147 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4148 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4149 zero-length subarrays.
4150
ddbbcb19
JJ
41512016-07-15 Jakub Jelinek <jakub@redhat.com>
4152
4153 PR c/71858
4154 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4155 instead of FUZZY_LOOKUP_NAME.
4156 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4157 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4158
dd36b877
JJ
41592016-07-14 Jakub Jelinek <jakub@redhat.com>
4160
4161 PR c/71858
4162 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4163
8c681247
TS
41642016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4165
4166 * c-parser.c (c_parser_generic_selection): Make type of variable
4167 auto_vec.
4168 (c_parser_omp_declare_simd): Likewise.
4169
bf4fa671
TS
41702016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4171
4172 * c-decl.c (struct c_struct_parse_info): Change member types
4173 from vec to auto_vec.
4174 (start_struct): Adjust.
4175 (finish_struct): Likewise.
4176
557e8c49
JJ
41772016-07-02 Jakub Jelinek <jakub@redhat.com>
4178
4179 PR c/71719
4180 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4181
54d19c3b
TS
41822016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4183
4184 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4185 Move pragma context checking into...
4186 (c_parser_omp_cancellation_point): ... here, and improve
4187 diagnostic messages.
4188 * c-typeck.c (c_finish_omp_cancel)
4189 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4190
152ef731
JJ
41912016-06-29 Jakub Jelinek <jakub@redhat.com>
4192
4193 PR c/71685
4194 * c-typeck.c (c_build_qualified_type): Don't clear
4195 C_TYPE_INCOMPLETE_VARS for the main variant.
4196
41972016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4198
4199 PR c/71552
4200 * c-typeck.c (output_init_element): Diagnose incompatible types
4201 before non-constant initializers.
4202
e9ac1f86
JJ
42032016-06-28 Jakub Jelinek <jakub@redhat.com>
4204
4205 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4206
277d7ee0
AK
42072016-06-23 Andi Kleen <ak@linux.intel.com>
4208
4209 * Make-lang.in: Add support for autofdo.
4210
1a4f11c8
DM
42112016-06-22 David Malcolm <dmalcolm@redhat.com>
4212
4213 PR c/70339
4214 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4215 (implicit_decl_warning): When issuing warnings for implicit
4216 declarations, attempt to provide a suggestion via
4217 lookup_name_fuzzy.
4218 (undeclared_variable): Likewise when issuing errors.
4219 (lookup_name_in_scope): Likewise.
4220 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4221 (best_macro_match): New typedef.
4222 (find_closest_macro_cpp_cb): New function.
4223 (lookup_name_fuzzy): New function.
4224 * c-parser.c: Include gcc-rich-location.h.
4225 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4226 (c_keyword_starts_typename): ...this new function.
4227 (c_parser_declaration_or_fndef): When issuing errors about
4228 missing "struct" etc, add a fixit. For other kinds of errors,
4229 attempt to provide a suggestion via lookup_name_fuzzy.
4230 (c_parser_parms_declarator): When looking ahead to detect typos in
4231 type names, also reject CPP_KEYWORD.
4232 (c_parser_parameter_declaration): When issuing errors about
4233 unknown type names, attempt to provide a suggestion via
4234 lookup_name_fuzzy.
4235 * c-tree.h (c_keyword_starts_typename): New prototype.
4236
5a578671
JM
42372016-06-20 Joseph Myers <joseph@codesourcery.com>
4238
4239 PR c/71601
4240 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4241 c_common_type returns error_mark_node.
4242
3f8257db 42432016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4244
4245 PR c/69507
4246 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4247 __alignof__ (expression).
4248
6a3f203c
DM
42492016-06-14 David Malcolm <dmalcolm@redhat.com>
4250
4251 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4252
264757fb
DM
42532016-06-14 David Malcolm <dmalcolm@redhat.com>
4254
4255 * c-typeck.c (build_component_ref): Simplify fixit code by
4256 using gcc_rich_location::add_fixit_misspelled_id.
4257 (set_init_label): Likewise.
4258
f7e4f2e3
DM
42592016-06-13 David Malcolm <dmalcolm@redhat.com>
4260
4261 * c-parser.c (c_parser_initelt): Provide location of name for new
4262 location_t param of set_init_label.
4263 * c-tree.h (set_init_label): Add location_t param.
4264 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4265 param and use it when issuing error messages about unrecognized
4266 field names. Attempt to provide a fixit hint if appropriate,
4267 otherwise update the error message to provide the type name.
4268
4b1ffdb1
TS
42692016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4270
4271 PR c/71381
4272 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4273 Loosen checking.
4274
44a845ca
MS
42752016-06-08 Martin Sebor <msebor@redhat.com>
4276 Jakub Jelinek <jakub@redhat.com>
4277
4278 PR c++/70507
4279 PR c/68120
4280 * c-typeck.c (convert_arguments): Don't promote last argument
4281 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4282
92a5f2ba
MP
42832016-06-08 Marek Polacek <polacek@redhat.com>
4284
4285 PR c/71418
4286 * c-decl.c (grokdeclarator): Check TYPE_P.
4287
08203f73
MP
4288 PR c/71426
4289 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4290 code.
4291
6ffd47b7
DM
42922016-06-07 David Malcolm <dmalcolm@redhat.com>
4293
4294 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4295 and structure element reference, capture the location of the
4296 element name token and pass it to build_component_ref.
4297 (c_parser_postfix_expression_after_primary): Likewise for
4298 structure element dereference.
4299 (c_parser_omp_variable_list): Likewise for
4300 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4301 * c-tree.h (build_component_ref): Add location_t param.
4302 * c-typeck.c (build_component_ref): Add location_t param
4303 COMPONENT_LOC. Use it, if available, when issuing hints about
4304 mispelled member names to provide a fixit replacement hint.
4305
1f40cff3
MP
43062016-06-06 Marek Polacek <polacek@redhat.com>
4307
4308 PR c/71362
4309 * c-parser.c (c_parser_direct_declarator): Set location.
4310
5545a907
MP
43112016-06-06 Marek Polacek <polacek@redhat.com>
4312
4313 * c-typeck.c (comptypes_internal): Handle comparisons of
4314 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4315 TYPE_REF_CAN_ALIAS_ALL.
4316
b605f663
CLT
43172016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4318
4319 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4320 arguments as addressable when async clause exists.
4321
00631022
JJ
43222016-05-30 Jakub Jelinek <jakub@redhat.com>
4323
4324 PR c++/71349
4325 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4326 when combined with target construct.
4327
7211a097
JJ
43282016-05-26 Jakub Jelinek <jakub@redhat.com>
4329
4330 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4331 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4332
95efe6b6
MP
43332016-05-25 Marek Polacek <polacek@redhat.com>
4334
4335 PR c/71265
4336 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4337
a23faf7a
MP
4338 PR c/71266
4339 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4340
e46c7770
CP
43412016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4342
4343 * c-parser.c (c_parser_oacc_declare): Add support for
4344 GOMP_MAP_FIRSTPRIVATE_POINTER.
4345 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4346 argument with enum c_omp_region_type ort.
4347 (handle_omp_array_sections): Likewise. Update call to
4348 handle_omp_array_sections_1.
4349 (c_finish_omp_clauses): Add specific errors and warning messages for
4350 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4351 call to handle_omp_array_sections.
4352
a04e69c0
TS
43532016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4354
4355 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4356
f17a223d
RB
43572016-05-24 Richard Biener <rguenther@suse.de>
4358
4359 PR middle-end/70434
4360 PR c/69504
4361 * c-typeck.c (build_array_ref): Do not complain about indexing
4362 non-lvalue vectors. Adjust for function name change.
4363
79063edd
MS
43642016-05-20 Martin Sebor <msebor@redhat.com>
4365
4366 PR c/71115
4367 * c-typeck.c (error_init): Use
4368 expansion_point_location_if_in_system_header.
4369 (warning_init): Same.
4370
8a40fef3
DM
43712016-05-19 David Malcolm <dmalcolm@redhat.com>
4372
4373 PR c/71171
4374 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4375 in error-handling.
4376 (c_parser_postfix_expression): Likewise.
4377 * c-tree.h (c_expr::set_error): New method.
4378 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4379 that result's range is initialized.
4380
e9892350
JG
43812016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4382
4383 * c-typeck.c (parser_build_unary_op): Fix formatting.
4384
8fad45f5
MW
43852016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4386
4387 * c-decl.c (grokdeclarator): Remove errmsg and use of
4388 targetm.invalid_return_type.
4389 (grokparms): Remove errmsg and use of
4390 targetm.invalid_parameter_type.
4391
aa4b467b
JM
43922016-05-13 Joseph Myers <joseph@codesourcery.com>
4393
4394 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4395 function return type.
4396
4f2e1536
MP
43972016-05-12 Marek Polacek <polacek@redhat.com>
4398
4399 PR c/70756
4400 * c-decl.c (build_compound_literal): Pass LOC down to
4401 c_incomplete_type_error.
4402 * c-tree.h (require_complete_type): Adjust declaration.
4403 (c_incomplete_type_error): Likewise.
4404 * c-typeck.c (require_complete_type): Add location parameter, pass it
4405 down to c_incomplete_type_error.
4406 (c_incomplete_type_error): Add location parameter, pass it down to
4407 error_at.
4408 (build_component_ref): Pass location down to c_incomplete_type_error.
4409 (default_conversion): Pass location down to require_complete_type.
4410 (build_array_ref): Likewise.
4411 (build_function_call_vec): Likewise.
4412 (convert_arguments): Likewise.
4413 (build_unary_op): Likewise.
4414 (build_c_cast): Likewise.
4415 (build_modify_expr): Likewise.
4416 (convert_for_assignment): Likewise.
4417 (c_finish_omp_clauses): Likewise.
4418
d6e83a8d
MM
44192016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4420
4421 PR c/43651
4422 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4423 is enabled.
4424 * c-errors.c (pedwarn_c90): Return true if warned.
4425 * c-tree.h (pedwarn_c90): Change return type to bool.
4426 (enum c_declspec_word): Add new enumerator cdw_atomic.
4427
5c3a10fb
MP
44282016-05-11 Marek Polacek <polacek@redhat.com>
4429
4430 PR c++/71024
4431 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4432 diagnose_mismatched_attributes and call it.
4433
cf68d92c
MP
44342016-05-10 Marek Polacek <polacek@redhat.com>
4435
4436 PR c/70255
4437 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4438 on a declaration following the definition.
4439
351f85c5
JJ
44402016-05-05 Jakub Jelinek <jakub@redhat.com>
4441
4442 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4443 parse it through to c_parser_c99_block_statement.
4444 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4445 caller.
4446
deef7113
MP
44472016-05-04 Marek Polacek <polacek@redhat.com>
4448
4449 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4450 OPT_Wdangling_else.
4451
de55efd5
MP
44522016-05-04 Marek Polacek <polacek@redhat.com>
4453
4454 PR c/48778
4455 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4456 for macro expansions.
4457
79ce98bc
MP
44582016-05-03 Marek Polacek <polacek@redhat.com>
4459
4460 PR c/70859
4461 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4462 check_builtin_function_arguments.
4463
fb2647aa
RB
44642016-05-03 Richard Biener <rguenther@suse.de>
4465
4466 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4467 the checksum from the previous stage.
4468
77886428
CP
44692016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4470
4471 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4472 c_finish_omp_clauses.
4473 (c_parser_omp_all_clauses): Likewise.
4474 (c_parser_oacc_cache): Likewise.
4475 (c_parser_oacc_loop): Likewise.
4476 (omp_split_clauses): Likewise.
4477 (c_parser_omp_declare_target): Likewise.
4478 (c_parser_cilk_all_clauses): Likewise.
4479 (c_parser_cilk_for): Likewise.
4480 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4481 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4482
7176a4a0
MP
44832016-05-02 Marek Polacek <polacek@redhat.com>
4484
4485 PR c/70851
4486 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4487 incomplete type.
4488
e7ff0319
CP
44892016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4490
4491 PR middle-end/70626
4492 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4493 OACC_LOOP_CLAUSE_MASK.
4494 (c_parser_oacc_kernels_parallel): Update call to
4495 c_oacc_split_loop_clauses.
4496
9f405ce1
AM
44972016-04-28 Andrew MacLeod <amacleod@redhat.com>
4498
4499 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4500 argument to build_modify_expr in two cases.
4501
c1e1f433
BS
45022016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4503
4504 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4505 warn_for_memset instead of warning directly here.
4506
2448a956
MP
45072016-04-26 Marek Polacek <polacek@redhat.com>
4508
4509 PR c/67784
4510 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4511 out of ...
4512 (c_parser_for_statement): ... here.
4513 (c_parser_if_statement): Use it.
4514 (c_parser_switch_statement): Use it.
4515 (c_parser_while_statement): Use it.
4516
b02a5e26
MP
4517 PR c/70791
4518 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4519
477d4906
IV
45202016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4521
4522 PR c++/69363
4523 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4524 instead of c_finish_cilk_clauses.
4525 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4526 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4527 floating-point variables in the linear clause for Cilk Plus.
4528
fe37c7af
MM
45292016-04-18 Michael Matz <matz@suse.de>
4530
4531 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4532 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4533
949505a9
MP
45342016-04-15 Marek Polacek <polacek@redhat.com>
4535
4536 PR c/70671
4537 * c-typeck.c (build_unary_op): Pass location down to error and
4538 warning call.
4539
dda1bf61
JJ
45402016-04-15 Jakub Jelinek <jakub@redhat.com>
4541
4542 PR c/70436
4543 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4544 where needed.
4545 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4546 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4547 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4548 Adjust c_parser_pragma callers.
4549 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4550 caller.
4551 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4552 c_parser_statement.
4553 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4554 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4555 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4556 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4557 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4558 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4559 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4560 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4561 down where needed.
4562 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4563 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4564 calls.
4565
99cd9857
MP
45662016-04-13 Marek Polacek <polacek@redhat.com>
4567
4568 PR c/70436
4569 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4570 adjust callers.
4571 (c_parser_statement): Likewise.
4572 (c_parser_c99_block_statement): Likewise.
4573 (c_parser_while_statement): Likewise.
4574 (c_parser_for_statement): Likewise.
4575 (c_parser_if_body): Don't set IF_P here.
4576 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4577 about dangling else here.
4578 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4579 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4580 warn about dangling else here.
4581
f13355da
MP
45822016-04-04 Marek Polacek <polacek@redhat.com>
4583
4584 PR c/70307
4585 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4586
5fde6a45
MP
45872016-03-31 Marek Polacek <polacek@redhat.com>
4588
4589 PR c/70297
4590 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4591
4bbf545b
DM
45922016-03-18 David Malcolm <dmalcolm@redhat.com>
4593
4594 PR c/70281
4595 * c-parser.c (c_parser_postfix_expression): Set the source range
4596 for uses of "__builtin_types_compatible_p".
4597
fcc2b74f
JJ
45982016-03-17 Jakub Jelinek <jakub@redhat.com>
4599
4600 PR c/70280
4601 * c-typeck.c (composite_type): Don't count void_list_node
4602 into len, if the list is terminated by void_list_node, start
4603 with void_list_node instead of NULL for newargs. Stop
4604 at void_list_node.
4605
ab4c578f
MP
46062016-03-16 Marek Polacek <polacek@redhat.com>
4607
4608 PR c/70093
4609 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4610 nested functions returning VM types.
4611
96b3c82d
CP
46122016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4613
4614 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4615 when calling c_finish_omp_clauses.
4616
29b9828f
BS
46172016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4618
4619 PR c/69824
4620 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4621 for later.
4622
7ff6ca38
MP
46232016-03-04 Marek Polacek <polacek@redhat.com>
4624
4625 PR c/69798
4626 * c-parser.c (c_parser_postfix_expression): Call
4627 c_parser_cast_expression rather than c_parser_postfix_expression.
4628
686e2237
JJ
46292016-03-01 Jakub Jelinek <jakub@redhat.com>
4630
4631 PR c/69796
4632 PR c/69974
4633 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4634 of incomplete decls to error_mark_node.
4635
0b05329b
MP
46362016-02-24 Marek Polacek <polacek@redhat.com>
4637
4638 PR c/69819
4639 * c-decl.c (finish_decl): Don't update the copy of the type of a
4640 different decl type.
4641
067fbd8b
JJ
46422016-02-23 Jakub Jelinek <jakub@redhat.com>
4643
4644 PR objc/69844
4645 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4646 in id_kind reclassification.
4647
bf14eba2
JJ
46482016-02-16 Jakub Jelinek <jakub@redhat.com>
4649
4650 PR c/69835
4651 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4652
ba539195
JN
46532016-02-16 James Norris <jnorris@codesourcery.com>
4654
4655 PR c/64748
4656 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4657
16595a1f
BS
46582016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4659
f48dfe98
BS
4660 * c-decl.c (build_null_declspecs): Zero the entire struct.
4661
16595a1f
BS
4662 PR c/69522
4663 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4664 callers changed. If nested_p is true, use it to call
4665 finish_implicit_inits.
4666 * c-tree.h (finish_implicit_inits): Declare.
4667 * c-typeck.c (finish_implicit_inits): New function. Move code
4668 from ...
4669 (push_init_level): ... here.
4670 (set_designator, process_init_element): Call finish_implicit_inits.
4671
66756373
JJ
46722016-02-11 Jakub Jelinek <jakub@redhat.com>
4673
4674 PR c/69768
4675 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4676 arguments for -Waddress warning.
4677
1066e9b5
JJ
46782016-02-04 Jakub Jelinek <jakub@redhat.com>
4679
4680 PR c/69669
4681 * c-decl.c (finish_enum): When honoring mode attribute,
4682 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4683
3a5d2ba4
JJ
46842016-01-29 Jakub Jelinek <jakub@redhat.com>
4685
4686 PR debug/69518
4687 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4688 all type variants, not just TYPE_MAIN_VARIANT.
4689
cbdd8ae0
JJ
46902016-01-27 Jakub Jelinek <jakub@redhat.com>
4691
4692 PR debug/66869
4693 * c-decl.c (c_write_global_declarations_1): Warn with
4694 warn_unused_function if static prototype without definition
4695 is not C_DECL_USED.
4696
fa74a4bc
MP
46972016-01-27 Marek Polacek <polacek@redhat.com>
4698
4699 PR c/68062
4700 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4701 to unsigned, if needed. Add -Wsign-compare warning.
4702
13f92e8d
JJ
47032016-01-26 Jakub Jelinek <jakub@redhat.com>
4704
4705 PR tree-optimization/69483
4706 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4707
cd8e73dc 47082016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4709
4710 PR c/24293
4711 * c-tree.h (incomplete_record_decls): Declare.
4712 * c-parser.c (incomplete_record_decls): Define.
4713 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4714 report error if any decl has zero size.
4715 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4716 or enum type to incomplete_record_decls.
4717
e6d6ec9e
TV
47182016-01-14 Tom de Vries <tom@codesourcery.com>
4719
4720 PR tree-optimization/68773
4721 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4722 set force_output.
4723
00083992
MP
47242016-01-14 Marek Polacek <polacek@redhat.com>
4725
4726 PR c/69262
4727 * c-decl.c (grokdeclarator): Provide more information for invalid
4728 array declarations.
4729
7443cf13
DM
47302016-01-06 David Malcolm <dmalcolm@redhat.com>
4731
4732 * c-parser.c (c_parser_unary_expression): For dereferences, build
4733 a combined location before calling build_indirect_ref, so that
4734 error reports cover the full range, manually updating the c_expr
4735 src_range.
4736
6b131d5b
MP
47372016-01-06 Marek Polacek <polacek@redhat.com>
4738
4739 PR sanitizer/69099
4740 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4741 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4742 NULL.
4743
818ab71a
JJ
47442016-01-04 Jakub Jelinek <jakub@redhat.com>
4745
4746 Update copyright years.
4747
2fe0a208
MP
47482016-01-04 Marek Polacek <polacek@redhat.com>
4749
4750 PR c/68908
4751 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4752 optimization to use __atomic_fetch_* built-in if possible.
4753
c7b48c8a
TS
47542015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4755
4756 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4757 into...
4758 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4759 all users.
4760
fda5652f
MP
47612015-12-22 Marek Polacek <polacek@redhat.com>
4762
4763 PR c/69002
4764 * c-typeck.c (build_component_ref): Warn when acessing elements of
4765 atomic structures or unions.
4766
745e411d
DM
47672015-12-21 David Malcolm <dmalcolm@redhat.com>
4768
4769 * c-typeck.c: Include "gcc-rich-location.h".
4770 (build_binary_op): In the two places that call binary_op_error,
4771 create a gcc_rich_location and populate it with the location of
4772 the binary op and its two operands.
4773
94c40e19
DM
47742015-12-16 David Malcolm <dmalcolm@redhat.com>
4775
4776 * c-parser.c (c_parser_statement_after_labels): When calling
4777 c_finish_return, Use the return expression's location if it has
4778 one, falling back to the location of the first token within it.
4779 * c-typeck.c (c_finish_return): When issuing warnings about
4780 the incorrect presence/absence of a return value, issue a note
4781 showing the declaration of the function.
4782
de67c4c3
DM
47832015-12-16 David Malcolm <dmalcolm@redhat.com>
4784
4785 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4786 to 4.
4787 (c_parser_peek_nth_token): New function.
4788 (c_parser_peek_conflict_marker): New function.
4789 (c_parser_error): Detect conflict markers and report them as such.
4790
a10704e1
DM
47912015-12-16 David Malcolm <dmalcolm@redhat.com>
4792
4793 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4794 to preserve range information for the primary expression
4795 in the call to c_parser_postfix_expression_after_primary.
4796
8062bca6
DM
47972015-12-16 David Malcolm <dmalcolm@redhat.com>
4798
4799 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4800 expression location, falling back on the first token location,
4801 rather than always using the latter.
4802
d06f8b75
MP
48032015-12-16 Marek Polacek <polacek@redhat.com>
4804
4805 PR c/64637
4806 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4807 available.
4808
2994fb91
MP
48092015-12-15 Marek Polacek <polacek@redhat.com>
4810
4811 PR c/68907
4812 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4813 artificial decl.
4814
a1b93f8d
DM
48152015-12-08 David Malcolm <dmalcolm@redhat.com>
4816
4817 * c-parser.c (c_parser_alignof_expression): Capture location of
4818 closing parenthesis (if any), or of end of unary expression, and
4819 use it to build a src_range for the expression.
4820
46c6e1e2
DM
48212015-12-08 David Malcolm <dmalcolm@redhat.com>
4822
4823 PR c/68757
4824 * c-parser.c (c_parser_get_builtin_args): Add
4825 "out_close_paren_loc" param, and write back to it.
4826 (c_parser_postfix_expression): Capture the closing
4827 parenthesis location for RID_CHOOSE_EXPR,
4828 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4829 RID_BUILTIN_SHUFFLE and use it to set the source range
4830 for such expressions; within RID_BUILTIN_COMPLEX set
4831 the underlying location.
4832
66189108
MP
48332015-12-07 Marek Polacek <polacek@redhat.com>
4834
4835 PR c/68668
4836 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4837 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4838
f187980b
EB
48392015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4840
4841 * c-tree.h (c_build_va_arg): Adjust prototype.
4842 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4843 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4844 parameter, adjust throughout and issue an error if EXPR is a component
4845 with reverse storage order.
4846
4250754e
JM
48472015-12-02 Jason Merrill <jason@redhat.com>
4848
4849 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4850 (c_fully_fold_internal, decl_constant_value_for_optimization):
4851 Move from c-common.c.
4852 * c-tree.h: Declare decl_constant_value_for_optimization.
4853 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4854
e9e32ee6
JM
48552015-12-02 Joseph Myers <joseph@codesourcery.com>
4856
4857 PR c/68162
4858 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4859 following link from declarator to next declarator. Track original
4860 qualified type and pass it to c_build_qualified_type.
4861 * c-typeck.c (c_build_qualified_type): Add arguments
4862 orig_qual_type and orig_qual_indirect.
4863
ff7a55bf
TS
48642015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4865
4866 * c-parser.c (c_parser_omp_clause_name)
4867 (c_parser_oacc_all_clauses): Alphabetical sorting.
4868
657e4e47
JJ
48692015-12-02 Jakub Jelinek <jakub@redhat.com>
4870
4871 PR c/68533
4872 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4873 for diagnostics.
4874
37d5ad46
JB
48752015-12-01 Julian Brown <julian@codesourcery.com>
4876 Cesar Philippidis <cesar@codesourcery.com>
4877 James Norris <James_Norris@mentor.com>
4878
4879 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4880 (c_parser_oacc_clause_use_device): New function.
4881 (c_parser_oacc_all_clauses): Add use_device support.
4882 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4883 (c_parser_oacc_host_data): New function.
4884 (c_parser_omp_construct): Add host_data support.
4885 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4886 * c-typeck.c (c_finish_oacc_host_data): New function.
4887 (c_finish_omp_clauses): Add use_device support.
4888
a4850ce9
JH
48892015-11-29 Jan Hubicka <hubicka@ucw.cz>
4890
4891 PR c/67106
4892 * c-decl.c: Set TYPE_PACKED in variants.
4893
b58d3df2
ML
48942015-11-27 Martin Liska <mliska@suse.cz>
4895
4896 PR c++/68312
4897 * c-array-notation.c (fix_builtin_array_notation_fn):
4898 Use release_vec_vec instead of vec::release.
4899 (build_array_notation_expr): Likewise.
4900 (fix_conditional_array_notations_1): Likewise.
4901 (fix_array_notation_expr): Likewise.
4902 (fix_array_notation_call_expr): Likewise.
4903
aec17bfe
JJ
49042015-11-27 Jakub Jelinek <jakub@redhat.com>
4905
4906 PR c/63326
4907 * c-parser.c (c_parser_compound_statement_nostart): If
4908 last_label is true, use pragma_stmt instead of pragma_compound
4909 as second c_parser_pragma argument.
4910 (c_parser_omp_ordered, c_parser_omp_target_update,
4911 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4912 false as second argument to c_parser_skip_to_pragma_eol after
4913 diagnosing standalone directives used in pragma_stmt context.
4914
688c4de0
IV
49152015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4916
4917 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4918 with "if (ENABLE_OFFLOADING)".
4919
cbd03aee
DM
49202015-11-23 David Malcolm <dmalcolm@redhat.com>
4921
4922 PR objc/68438
4923 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4924 for various Objective-C constructs: Class.name syntax,
4925 @selector(), @protocol(), @encode(), and [] message syntax.
4926
a87a86e1
DM
49272015-11-20 David Malcolm <dmalcolm@redhat.com>
4928
4929 PR 62314
4930 * c-typeck.c (should_suggest_deref_p): New function.
4931 (build_component_ref): Special-case POINTER_TYPE when
4932 generating a "not a structure of union" error message, and
4933 suggest a "->" rather than a ".", providing a fix-it hint.
4934
8ece8dfb
DM
49352015-11-19 David Malcolm <dmalcolm@redhat.com>
4936
4937 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4938 candidate into a new function, find_closest_identifier.
4939
433068cc
MP
49402015-11-19 Marek Polacek <polacek@redhat.com>
4941
4942 PR c/68412
4943 * c-typeck.c (parser_build_binary_op): Properly handle
4944 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4945
bef08b71
DM
49462015-11-17 David Malcolm <dmalcolm@redhat.com>
4947
4948 * c-parser.c (set_c_expr_source_range): Bulletproof both
4949 overloaded implementations against NULL expr->value.
4950 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4951 values.
4952 (c_parser_unary_expression): Likewise when handling addresses of
4953 labels.
4954 (c_parser_postfix_expression): Likewise for statement expressions,
4955 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4956 __builtin_va_arg, and for __builtin_offset_of.
4957 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4958 src_range using the range of the braced initializer.
4959 (c_parser_transaction_expression): Set src_range for "ret" to a
4960 sane pair of values.
4961
fff77217
KY
49622015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4963
4964 * c-parser.c (c_finish_omp_declare_simd): Look for
4965 "simd" attribute as well. Update error message.
4966
1d899da2
TS
49672015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4968
4969 * c-parser.c (c_parser_omp_declare_target): Adjust.
4970
e4606348
JJ
49712015-11-14 Jakub Jelinek <jakub@redhat.com>
4972
4973 * c-typeck.c (c_finish_omp_clauses): Don't mark
4974 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4975
3e636daf
MP
49762015-11-14 Marek Polacek <polacek@redhat.com>
4977
4978 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4979 * c-typeck.c: Likewise.
4980
ebedc9a3
DM
49812015-11-13 David Malcolm <dmalcolm@redhat.com>
4982
4983 * c-decl.c (warn_defaults_to): Pass line_table to
4984 rich_location ctor.
4985 * c-errors.c (pedwarn_c99): Likewise.
4986 (pedwarn_c90): Likewise.
4987 * c-parser.c (set_c_expr_source_range): New functions.
4988 (c_token::get_range): New method.
4989 (c_token::get_finish): New method.
4990 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4991 based on the range from the start of the LHS to the end of the
4992 RHS.
4993 (c_parser_conditional_expression): Likewise, based on the range
4994 from the start of the cond.value to the end of exp2.value.
4995 (c_parser_binary_expression): Call set_c_expr_source_range on
4996 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4997 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4998 based on the cast_loc through to the end of the expr.
4999 (c_parser_unary_expression): Likewise, based on the
5000 op_loc through to the end of op.
5001 (c_parser_sizeof_expression) Likewise, based on the start of the
5002 sizeof token through to either the closing paren or the end of
5003 expr.
5004 (c_parser_postfix_expression): Likewise, using the token range,
5005 or from the open paren through to the close paren for
5006 parenthesized expressions.
5007 (c_parser_postfix_expression_after_primary): Likewise, for
5008 various kinds of expression.
5009 * c-tree.h (struct c_expr): Add field "src_range".
5010 (c_expr::get_start): New method.
5011 (c_expr::get_finish): New method.
5012 (set_c_expr_source_range): New decls.
5013 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5014 on ret for prefix unary ops.
5015 (parser_build_binary_op): Likewise, running from the start of
5016 arg1.value through to the end of arg2.value.
5017
ec8b536f
MP
50182015-11-13 Marek Polacek <polacek@redhat.com>
5019
5020 PR c/68320
5021 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5022
277fe616
DM
50232015-11-13 David Malcolm <dmalcolm@redhat.com>
5024
5025 * c-typeck.c: Include spellcheck.h.
5026 (lookup_field_fuzzy_find_candidates): New function.
5027 (lookup_field_fuzzy): New function.
5028 (build_component_ref): If the field was not found, try using
5029 lookup_field_fuzzy and potentially offer a suggestion.
5030
6e232ba4
JN
50312015-11-12 James Norris <jnorris@codesourcery.com>
5032 Joseph Myers <joseph@codesourcery.com>
5033
5034 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5035 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5036 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5037 and PRAGMA_OMP_CLAUSE_LINK.
5038 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5039 and PRAGMA_OACC_CLAUSE_LINK.
5040 (OACC_DECLARE_CLAUSE_MASK): New definition.
5041 (c_parser_oacc_declare): New function.
5042
9be4f715
MP
50432015-11-12 Marek Polacek <polacek@redhat.com>
5044
5045 PR c/67784
5046 * c-parser.c (c_parser_for_statement): Reclassify the token in
5047 a correct scope.
5048
e78bede6
MP
50492015-11-11 Marek Polacek <polacek@redhat.com>
5050
5051 PR c/68107
5052 PR c++/68266
5053 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5054 checking the size of an array.
5055
69f293c9
AM
50562015-11-11 Andrew MacLeod <amacleod@redhat.com>
5057
5058 * c-array-notation.c: Remove unused header files.
5059 * c-aux-info.c: Likewise.
5060 * c-convert.c: Likewise.
5061 * c-decl.c: Likewise.
5062 * c-errors.c: Likewise.
5063 * c-lang.c: Likewise.
5064 * c-objc-common.c: Likewise.
5065 * c-parser.c: Likewise.
5066 * c-typeck.c: Likewise.
5067 * gccspec.c: Likewise.
5068
3a40d81d
NS
50692015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5070 Cesar Philippidis <cesar@codesourcery.com>
5071 James Norris <jnorris@codesourcery.com>
5072 Julian Brown <julian@codesourcery.com>
5073 Nathan Sidwell <nathan@codesourcery.com>
5074
3a40d81d
NS
5075 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5076 routine arg.
5077 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5078 (c_parser_pragma): Parse 'acc routine'.
5079 (OACC_ROUTINE_CLAUSE_MARK): Define.
5080 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5081
fc402eec
AA
50822015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5083
5084 PR debug/67192
5085 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5086 location of the backward-goto to the start of the loop body.
5087
f6b0b3db
AA
50882015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5089
5090 PR debug/67192
5091 * c-parser.c (c_parser_while_statement): Finish the loop before
5092 parsing ahead for misleading indentation.
5093 (c_parser_for_statement): Likewise.
5094
ee45a32d
EB
50952015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5096
5097 * c-decl.c (finish_struct): If the structure has reverse storage
5098 order, rewrite the type of array fields with scalar component. Call
5099 maybe_apply_pragma_scalar_storage_order on entry.
5100 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5101 errors on bit-fields and reverse SSO here and not...
5102 (c_mark_addressable): ...here.
5103 (output_init_element): Adjust call to initializer_constant_valid_p.
5104 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5105
8a645150
DM
51062015-11-06 David Malcolm <dmalcolm@redhat.com>
5107
5108 * c-decl.c (warn_defaults_to): Update for change in signature
5109 of diagnostic_set_info.
5110 * c-errors.c (pedwarn_c99): Likewise.
5111 (pedwarn_c90): Likewise.
5112 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5113 for textinfo::set_location.
5114
7a5e4956
CP
51152015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5116 Thomas Schwinge <thomas@codesourcery.com>
5117 James Norris <jnorris@codesourcery.com>
5118
5119 * c-parser.c (c_parser_omp_clause_name): Add support for
5120 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5121 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5122 default(none) in OpenACC.
5123 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5124 arguments.
5125 (c_parser_oacc_clause_tile): New function.
5126 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5127 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5128 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5129 TILE}.
5130 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5131 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5132 FIRSTPRIVATE}.
5133 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5134 (c_parser_oacc_update): Update the error message for missing clauses.
5135 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5136 and OMP_CLAUSE_INDEPENDENT.
5137
bfcfbfa0
MP
51382015-11-05 Marek Polacek <polacek@redhat.com>
5139
5140 PR c/68090
5141 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5142 deal with pre-evaluation on invalid types.
5143
e01d41e5
JJ
51442015-11-05 Jakub Jelinek <jakub@redhat.com>
5145 Ilya Verbin <ilya.verbin@intel.com>
5146
5147 * c-parser.c: Include context.h and gimple-expr.h.
5148 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5149 monotonic together with nonmonotonic.
5150 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5151 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5152 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5153 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5154 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5155 expressions on combined target teams before the target.
5156 (c_parser_omp_declare_target): If decl has "omp declare target" or
5157 "omp declare target link" attribute, and cgraph or varpool node already
5158 exists, then set corresponding flags. Call c_finish_omp_clauses
5159 in the parenthesized extended-list syntax case.
5160 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5161 declare target.
5162 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5163 on OMP_CLAUSE_REDUCTION array sections.
5164 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5165 into the constant offset, or for variable low-bound using
5166 POINTER_PLUS_EXPR. For structure element based array sections use
5167 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5168 (c_finish_omp_clauses): Drop generic_field_head, structure
5169 elements are now always mapped even as array section bases,
5170 diagnose same var in data sharing and mapping clauses. Diagnose if
5171 linear step on declare simd is neither a constant nor a uniform
5172 parameter. Look through POINTER_PLUS_EXPR for array section
5173 reductions. Diagnose the same var or function appearing multiple
5174 times on the same directive. Fix up wording for the to clause if t
5175 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5176 modifier on kinds other than dynamic or guided or nonmonotonic
5177 modifier together with ordered clause.
5178
4bf9e5a8
TS
51792015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5180 Chung-Lin Tang <cltang@codesourcery.com>
5181
5182 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5183
2adfab87
AM
51842015-10-29 Andrew MacLeod <amacleod@redhat.com>
5185
5186 * c-array-notation.c: Reorder #include's and remove duplicates.
5187 * c-aux-info.c: Likewise.
5188 * c-convert.c: Likewise.
5189 * c-decl.c: Likewise.
5190 * c-errors.c: Likewise.
5191 * c-lang.c: Likewise.
5192 * c-objc-common.c: Likewise.
5193 * c-parser.c: Likewise.
5194 * c-typeck.c: Likewise.
5195
e922069e
JW
51962015-10-26 Jim Wilson <jim.wilson@linaro.org>
5197
5198 PR debug/66068
5199 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5200 after calling build_qualified_type.
5201
765dd391
CP
52022015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5203 Thomas Schwinge <thomas@codesourcery.com>
5204 James Norris <jnorris@codesourcery.com>
5205 Joseph Myers <joseph@codesourcery.com>
5206 Julian Brown <julian@codesourcery.com>
5207 Bernd Schmidt <bschmidt@redhat.com>
5208
5209 * c-parser.c (c_parser_oacc_shape_clause): New.
5210 (c_parser_oacc_simple_clause): New.
5211 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5212 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5213
88bae6f4
TS
52142015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5215 James Norris <jnorris@codesourcery.com>
5216 Cesar Philippidis <cesar@codesourcery.com>
5217
5218 PR c/64765
5219 PR c/64880
5220 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5221 parameters, and handle these. Adjust all users.
5222 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5223 into...
5224 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5225 all users.
5226 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5227 declare functions.
5228 (c_finish_omp_construct): Declare function.
5229 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5230 Merge functions into...
5231 (c_finish_omp_construct): ... this new function.
5232
a8fc2579
RB
52332015-10-22 Richard Biener <rguenther@suse.de>
5234
5235 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5236 before folding a MINUS_EXPR.
5237
e9122ef6
MP
52382015-10-21 Marek Polacek <polacek@redhat.com>
5239
5240 PR c/68024
5241 * c-decl.c (start_function): Warn about vararg functions without
5242 a prototype.
5243
9f47c7e5
IE
52442015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5245
5246 * c-typeck.c (build_conditional_expr): Use boolean vector
5247 type for vector comparison.
5248 (build_vec_cmp): New.
5249 (build_binary_op): Use build_vec_cmp for comparison.
5250
fa60eeb9
MP
52512015-10-20 Marek Polacek <polacek@redhat.com>
5252
5253 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5254
2c7020eb
MP
52552015-10-20 Marek Polacek <polacek@redhat.com>
5256
5257 PR c/67964
5258 * c-parser.c (c_parser_attributes): Break out of the loop if the
5259 token after an attribute isn't a comma.
5260
d9a6bd32
JJ
52612015-10-13 Jakub Jelinek <jakub@redhat.com>
5262 Aldy Hernandez <aldyh@redhat.com>
5263
5264 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5265 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5266 (c_parser_omp_variable_list): Handle structure elements for
5267 map, to and from clauses. Handle array sections in reduction
5268 clause. Formatting fixes.
5269 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5270 if clause modifiers.
5271 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5272 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5273 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5274 c_parser_omp_clause_is_device_ptr): New functions.
5275 (c_parser_omp_clause_ordered): Parse optional parameter.
5276 (c_parser_omp_clause_reduction): Handle array reductions.
5277 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5278 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5279 functions.
5280 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5281 (c_parser_omp_clause_depend_sink): New function.
5282 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5283 (c_parser_omp_clause_map): Parse release/delete map kinds and
5284 optional always modifier.
5285 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5286 and c_finish_omp_clauses callers.
5287 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5288 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5289 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5290 (OMP_CRITICAL_CLAUSE_MASK): Define.
5291 (c_parser_omp_critical): Parse critical clauses.
5292 (c_parser_omp_for_loop): Handle doacross loops, adjust
5293 c_finish_omp_for and c_finish_omp_clauses callers.
5294 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5295 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5296 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5297 (c_parser_omp_for): Disallow ordered clause when combined with
5298 distribute. Disallow linear clause when combined with distribute
5299 and not combined with simd.
5300 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5301 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5302 parse clauses and if depend clause is found, don't parse a body.
5303 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5304 Allow target parallel without for after it.
5305 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5306 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5307 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5308 invalid kinds.
5309 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5310 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5311 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5312 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5313 functions.
5314 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5315 defaultmap and is_device_ptr clauses.
5316 (c_parser_omp_target): Parse target parallel and target simd. Set
5317 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5318 and target exit data. Diagnose invalid map kinds.
5319 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5320 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5321 construct.
5322 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5323 &omp_priv.
5324 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5325 (c_parser_omp_taskloop): New function.
5326 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5327 handle PRAGMA_OMP_TASKLOOP.
5328 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5329 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5330 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5331 Add IS_OMP argument, handle structure element bases, diagnose
5332 bitfields, pass IS_OMP recursively, diagnose known zero length
5333 array sections in depend clauses, handle array sections in reduction
5334 clause, diagnose negative length even for pointers.
5335 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5336 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5337 array sections in reduction clause, set
5338 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5339 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5340 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5341 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5342
21ba0cea
MP
53432015-10-06 Marek Polacek <polacek@redhat.com>
5344
5345 * c-parser.c (c_parser_statement_after_labels): Use
5346 protected_set_expr_location.
5347 (c_parser_omp_clause_num_gangs): Likewise.
5348 (c_parser_omp_clause_num_threads): Likewise.
5349 (c_parser_omp_clause_num_workers): Likewise.
5350 (c_parser_omp_clause_vector_length): Likewise.
5351 (c_parser_omp_clause_num_teams): Likewise.
5352 (c_parser_omp_clause_thread_limit): Likewise.
5353 * c-typeck.c (build_c_cast): Likewise.
5354 (c_cast_expr): Likewise.
5355
624d31fe
RS
53562015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5357
5358 * c-typeck.c (c_tree_equal): Use real_equal instead of
5359 REAL_VALUES_EQUAL.
5360
b8fd7909
JM
53612015-10-04 Jason Merrill <jason@redhat.com>
5362
5363 * c-parser.c (c_lex_one_token): Handle @synchronized.
5364 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5365 can change whether the function is transaction_safe.
5366
1c7485af
MP
53672015-10-02 Marek Polacek <polacek@redhat.com>
5368
5369 PR c/67730
5370 * c-typeck.c (convert_for_assignment): Use the expansion point
5371 location throughout.
5372
3e3b8d63
MP
53732015-10-02 Marek Polacek <polacek@redhat.com>
5374
5375 PR c/64249
5376 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5377 and pass it down to c_parser_if_statement.
5378 (c_parser_else_body): Add CHAIN parameter and pass it down to
5379 c_parser_statement_after_labels.
5380 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5381 duplicated if-else-if conditions.
5382
aabef2de
MP
53832015-10-01 Marek Polacek <polacek@redhat.com>
5384
5385 * c-typeck.c (convert_for_assignment): Improve commentary.
5386
de8ddd5f
MP
53872015-09-30 Marek Polacek <polacek@redhat.com>
5388
5389 PR c/67730
5390 * c-typeck.c (c_finish_return): Use the expansion point location for
5391 certain "return with value" warnings.
5392
c4914de6
MLI
53932015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5394
5395 * c-parser.c (pragma_lex): Add loc argument.
5396
0e36f5c7
MP
53972015-09-15 Marek Polacek <polacek@redhat.com>
5398
5399 PR c/67580
5400 * c-decl.c (tag_exists_p): New function.
5401 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5402 struct/union/enum keywords are missing.
5403 * c-tree.h (tag_exists_p): Declare.
5404
2f3bb934
MP
54052015-09-15 Marek Polacek <polacek@redhat.com>
5406
5407 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5408 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5409 Return NULL_TREE instead of 0.
5410 (lookup_name): Return NULL_TREE instead of 0.
5411 (lookup_name_in_scope): Likewise.
5412 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5413 (parser_xref_tag): Use false instead of 0.
5414 (start_struct): Use true instead of 1.
5415 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5416
aa256c4a
MP
54172015-09-14 Marek Polacek <polacek@redhat.com>
5418
5419 * c-typeck.c (set_nonincremental_init_from_string): Use
5420 HOST_WIDE_INT_M1U when shifting a negative value.
5421
dbb68221
MW
54222015-09-09 Mark Wielaard <mjw@redhat.com>
5423
5424 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5425 parm against NULL.
5426
a8a098ac
JJ
54272015-09-10 Jakub Jelinek <jakub@redhat.com>
5428
5429 PR c/67502
5430 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5431 into OMP_FOR_PRE_BODY rather than before the loop.
5432
f4b189d5
JJ
54332015-09-09 Jakub Jelinek <jakub@redhat.com>
5434
0bb99c11
JJ
5435 PR c/67501
5436 * c-parser.c (c_parser_oacc_all_clauses,
5437 c_parser_omp_all_clauses): Remove invalid clause from
5438 list of clauses even if parser->error is set.
5439
fce5e5e3
JJ
5440 PR c/67500
5441 * c-parser.c (c_parser_omp_clause_aligned,
5442 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5443 test for errors.
5444 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5445 error_mark_node.
5446
f4b189d5
JJ
5447 PR c/67495
5448 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5449 instead of c_parser_unary_expression. If the result is !lvalue_p,
5450 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5451
b2aaf235
MP
54522015-09-04 Marek Polacek <polacek@redhat.com>
5453
5454 PR sanitizer/67279
5455 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5456
1807ffc1
MS
54572015-09-03 Martin Sebor <msebor@redhat.com>
5458
5459 PR c/66516
8b652e65
JJ
5460 * c-typeck.c (convert_arguments, parser_build_unary_op,
5461 build_conditional_expr, c_cast_expr, convert_for_assignment,
5462 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5463 reject_gcc_builtin.
5464 (c_decl_implicit): Define.
5465
d04ff417
MP
54662015-09-02 Marek Polacek <polacek@redhat.com>
5467
5468 PR c/67432
5469 * c-parser.c (c_parser_enum_specifier): Give a better error for
5470 an empty enum.
5471
a79683d5
TS
54722015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5473
5474 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5475
191a6b94
MP
54762015-08-12 Marek Polacek <polacek@redhat.com>
5477
5478 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5479 LOC to it.
5480
420a9d9b
MP
54812015-08-03 Marek Polacek <polacek@redhat.com>
5482
5483 PR c/67088
5484 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5485 Use it.
5486 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5487
992118a1
PP
54882015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5489
5490 * c-parser.c (c_parser_if_body): Take token_indent_info
5491 argument. Call warn_for_misleading_indentation even when the
5492 body is a semicolon. Extract token_indent_infos corresponding
5493 to the guard, body and next tokens. Adjust call to
5494 warn_for_misleading_indentation accordingly.
5495 (c_parser_else_body): Likewise.
5496 (c_parser_if_statement): Likewise.
5497 (c_parser_while_statement): Likewise.
5498 (c_parser_for_statement): Likewise.
5499
46308474
LFSM
55002015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5501 Manuel López-Ibáñez <manu@gcc.gnu.org>
5502
5503 * c-decl.c (get_parm_info): Remove static var. Update warning
5504 message.
5505
05b28fd6
MP
55062015-07-27 Marek Polacek <polacek@redhat.com>
5507
5508 PR c++/66555
5509 PR c/54979
5510 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5511
451b5e48
MP
55122015-07-20 Marek Polacek <polacek@redhat.com>
5513
5514 PR c++/55095
5515 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5516 (build_binary_op): Warn about left shift overflows.
5517
1916bcb5
AM
55182015-07-09 Andrew MacLeod <amacleod@redhat.com>
5519
5520 * c-array-notation.c: Adjust includes for flags.h changes.
5521 * c-objc-common.c: Likewise.
5522
c7131fb2
AM
55232015-07-07 Andrew MacLeod <amacleod@redhat.com>
5524
5525 * c-array-notation.c: Adjust includes.
5526 * c-aux-info.c: Likewise.
5527 * c-convert.c: Likewise.
5528 * c-decl.c: Likewise.
5529 * c-errors.c: Likewise.
5530 * c-lang.c: Likewise.
5531 * c-objc-common.c: Likewise.
5532 * c-parser.c: Likewise.
5533 * c-typeck.c: Likewise.
5534
da2e71c9
MLI
55352015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5536
5537 PR fortran/66605
5538 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5539
b155cfd9
MP
55402015-06-29 Marek Polacek <polacek@redhat.com>
5541
5542 PR c/66322
5543 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5544 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5545 about -Wswitch-bool here.
5546 (do_case): Update c_add_case_label call.
5547 (c_finish_case): Update c_do_switch_warnings call.
5548
31521951
MP
55492015-06-27 Marek Polacek <polacek@redhat.com>
5550
5551 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5552
22d03525
MP
55532015-06-26 Marek Polacek <polacek@redhat.com>
5554
5555 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5556 INDIRECT_REF_P.
5557 * c-typeck.c (array_to_pointer_conversion): Likewise.
5558 (build_unary_op): Likewise.
5559 (c_finish_return): Likewise.
5560
f0889939
AM
55612015-06-25 Andrew MacLeod <amacleod@redhat.com>
5562
5563 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5564 * c-parser.c: Likewise.
5565
8d67ee55
RS
55662015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5567
5568 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5569 instead of pointer_hash.
5570 (detect_field_duplicates): Likewise.
5571
0ae9bd27
MP
55722015-06-25 Marek Polacek <polacek@redhat.com>
5573
5574 * c-array-notation.c: Use VAR_P throughout.
5575 * c-decl.c: Likewise.
5576 * c-objc-common.c: Likewise.
5577 * c-parser.c: Likewise.
5578 * c-typeck.c: Likewise.
5579
62f9079a
MP
55802015-06-25 Marek Polacek <polacek@redhat.com>
5581
5582 * c-decl.c: Use is_global_var throughout.
5583 * c-parser.c: Likewise.
5584 * c-typeck.c: Likewise.
5585
abb226c9
AM
55862015-06-17 Andrew MacLeod <amacleod@redhat.com>
5587
5588 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5589 * c-aux-info.c: Likewise.
5590 * c-convert.c: Likewise.
5591 * c-decl.c: Likewise.
5592 * c-errors.c: Likewise.
5593 * c-lang.c: Likewise.
5594 * c-objc-common.c: Likewise.
5595 * c-parser.c: Likewise.
5596 * c-typeck.c: Likewise.
5597
8cbababc
JH
55982015-06-11 Jan Hubicka <hubicka@ucw.cz>
5599
5600 PR middle-end/66325
5601 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5602 variants.
5603
a0349665
PMR
56042015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5605
5606 * c-decl.c (pop_scope): Register the main translation unit
5607 through the new debug hook.
5608
13fdf2e2
AM
56092015-06-08 Andrew MacLeod <amacleod@redhat.com>
5610
5611 * c-array-notation.c : Adjust include files.
5612 * c-aux-info.c : Likewise.
5613 * c-convert.c : Likewise.
5614 * c-decl.c : Likewise.
5615 * c-errors.c : Likewise.
5616 * c-lang.c : Likewise.
5617 * c-lang.h : Likewise.
5618 * c-objc-common.c : Likewise.
5619 * c-parser.c : Likewise.
5620 * c-typeck.c : Likewise.
5621
d7438551
AH
56222015-06-05 Aldy Hernandez <aldyh@redhat.com>
5623
5624 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5625 immediately clobber it.
5626 (c_write_global_declarations_1): Remove call to
5627 check_global_declaration_1.
5628 (c_write_global_declarations_2): Remove.
5629 (c_write_final_cleanups): Rename from c_write_global_declarations.
5630 Remove call to finalize_compilation_unit.
5631 Remove calls to debugging hooks.
5632 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5633 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5634 * c-tree.h: Remove c_write_global_declarations.
5635
ecb9f223
AM
56362015-06-04 Andrew MacLeod <amacleod@redhat.com>
5637
5638 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5639 * c-aux-info.c: Likewise.
5640 * c-convert.c: Likewise.
5641 * c-decl.c: Likewise.
5642 * c-errors.c: Likewise.
5643 * c-lang.c: Likewise.
5644 * c-objc-common.c: Likewise.
5645 * c-parser.c: Likewise.
5646 * c-typeck.c: Likewise.
5647
9482b620
MP
56482015-06-04 Marek Polacek <polacek@redhat.com>
5649
5650 PR c/66341
5651 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5652 it is a lvalue.
5653
bc51ace3
PK
56542015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5655
5656 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5657 Warn for empty struct.
5658 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5659
ea5b45b6
AT
56602015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5661
5662 * c-decl.c (start_function): Call plugin before parsing.
5663 (finish_function): Call plugin after parsing.
5664
c2d47482
PK
56652015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5666
5667 PR c/49551
5668 * c-decl.c (merge_decls): Merge DECL_COMMON.
5669
a95492ab
JW
56702015-05-22 Jim Wilson <jim.wilson@linaro.org>
5671
5672 * Make-lang.in (check_gcc_pallelize): Define.
5673
fd5c817a
MP
56742015-05-22 Marek Polacek <polacek@redhat.com>
5675
5676 PR c/47043
5677 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5678 attributes.
5679
c7b70a3c
MP
56802015-05-21 Marek Polacek <polacek@redhat.com>
5681
5682 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5683 DECL_BUILT_IN.
5684
21b634ae
MP
56852015-05-20 Marek Polacek <polacek@redhat.com>
5686
5687 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5688 * c-typeck.c: Likewise.
5689
296a8c2f
MP
56902015-05-19 Marek Polacek <polacek@redhat.com>
5691
5692 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5693
41b37d5e
JJ
56942015-05-19 Jakub Jelinek <jakub@redhat.com>
5695
5696 PR middle-end/66199
5697 * c-parser.c (c_parser_omp_for_loop): Don't add
5698 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5699 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5700 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5701 constructs.
5702
fab27f52
MM
57032015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5704
5705 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5706 swaps.
fab27f52 5707
40de31cf
MLI
57082015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5709
5710 PR fortran/44054
5711 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5712 accessor function.
5713
3aa3c9fc
MP
57142015-05-14 Marek Polacek <polacek@redhat.com>
5715
5716 PR c/66066
5717 PR c/66127
5718 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5719 rather than with 0.
5720
c3388e62
DM
57212015-05-12 David Malcolm <dmalcolm@redhat.com>
5722
5723 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5724 to add a call to warn_for_misleading_indentation.
5725 (c_parser_else_body): Likewise, adding param "else_loc".
5726 (c_parser_if_statement): Check for misleading indentation.
5727 (c_parser_while_statement): Likewise.
5728 (c_parser_for_statement): Likewise.
5729
755e528f
MP
57302015-05-08 Marek Polacek <polacek@redhat.com>
5731
5732 PR c/64918
5733 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5734 (output_init_element): Likewise.
5735
0173bd2a
MP
57362015-05-07 Marek Polacek <polacek@redhat.com>
5737
5738 PR c/65179
5739 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5740 value.
5741
9babc352
MP
57422015-04-30 Marek Polacek <polacek@redhat.com>
5743
5744 * c-typeck.c (set_init_label): Call error_at instead of error and
5745 pass LOC to it.
5746
ac9f18db
MP
5747 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5748 the type of a decl.
5749
ec3fba51
MP
5750 * c-typeck.c (c_build_va_arg): Clarify the error message.
5751
b811915d
TS
57522015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5753
5754 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5755 OMP_STANDALONE_CLAUSES.
5756
f3075008
MP
57572015-04-28 Marek Polacek <polacek@redhat.com>
5758
5759 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5760
4e81b788
MP
57612015-04-28 Marek Polacek <polacek@redhat.com>
5762
5763 PR c/65901
5764 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5765
6c1db78e
MP
57662015-04-25 Marek Polacek <polacek@redhat.com>
5767
5768 PR c/52085
5769 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5770 attribute.
5771
5c4abbb8
MP
57722015-04-23 Marek Polacek <polacek@redhat.com>
5773
5774 PR c/65345
5775 * c-decl.c (set_labels_context_r): New function.
5776 (store_parm_decls): Call it via walk_tree_without_duplicates.
5777 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5778 instead of create_tmp_var. Build TARGET_EXPR instead of
5779 COMPOUND_EXPR.
5780 (build_atomic_assign): Use create_tmp_var_raw instead of
5781 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5782
06aca1d5
IV
57832015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5784
5785 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5786 (c_parser_omp_target_update): Add missed %> to error_at ().
5787
8fba1830
BRF
57882015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5789
5790 PR target/55143
5791 * c-decl.c (c_default_pointer_mode): Remove definition.
5792 * c-tree.h (c_default_pointer_mode): Remove declaration.
5793
62021f64
TB
57942015-03-27 Tobias Burnus <burnus@net-b.de>
5795
5796 PR c/65586
5797 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5798 error out.
5799 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5800 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5801 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5802
9b65e171
JJ
58032015-03-19 Jakub Jelinek <jakub@redhat.com>
5804
5805 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5806 attribute for DECL_EXTERNAL VAR_DECLs.
5807
17958621
JJ
58082015-03-11 Jakub Jelinek <jakub@redhat.com>
5809
5810 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5811 argument.
5812
7ccb1a11
JJ
58132015-03-10 Jakub Jelinek <jakub@redhat.com>
5814
5815 PR c/65120
5816 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5817 before preparing arguments to warn_logical_not_parentheses.
5818
01177669
JJ
58192015-03-09 Jakub Jelinek <jakub@redhat.com>
5820
5821 PR c/65120
5822 * c-typeck.c (parser_build_binary_op): Don't warn for
5823 !!x == y or !b == y where b is _Bool.
5824
802ac282
MP
58252015-03-09 Marek Polacek <polacek@redhat.com>
5826
5827 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5828 * c-decl.c (grokdeclarator): Likewise.
5829 * c-typeck.c (build_binary_op): Likewise.
5830
e5165b60
MP
58312015-02-27 Marek Polacek <polacek@redhat.com>
5832
5833 PR c/65228
5834 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5835
065d214c
MP
58362015-02-14 Marek Polacek <polacek@redhat.com>
5837
5838 PR c/64768
5839 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5840 declared through a typedef name.
5841
e5d9235b
MP
58422015-02-13 Marek Polacek <polacek@redhat.com>
5843
5844 PR c/65050
5845 * c-decl.c (grokdeclarator): Print also the type when giving
5846 the error message about array's incomplete element type.
5847
fa01ffcc
JJ
58482015-02-11 Jakub Jelinek <jakub@redhat.com>
5849
5850 PR c/64824
5851 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5852 check in the POP macro.
5853
c3e38a03
MP
58542015-02-09 Marek Polacek <polacek@redhat.com>
5855
5856 PR c/64856
5857 * c-typeck.c (process_init_element): Don't always wrap
5858 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5859 initializing a range of elements.
5860
4886ec8e
JJ
58612015-02-04 Jakub Jelinek <jakub@redhat.com>
5862
5863 PR c/64824
5864 PR c/64868
5865 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5866
c3e38a03 58672015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5868
5869 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5870 processing enum declaration.
5871
7b33f0c8
MP
58722015-01-29 Marek Polacek <polacek@redhat.com>
5873
5874 PR c/64709
5875 * c-typeck.c (pop_init_level): If constructor_elements has
5876 exactly one element with integer_zerop value, set constructor_zeroinit
5877 to 1. Remove braces around warning_init call.
5878
dea63e49
JJ
58792015-01-27 Jakub Jelinek <jakub@redhat.com>
5880
5881 PR c/64766
5882 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5883 of FUNCTION_DECLs with error_mark_node.
5884
d38f7dce
JJ
58852015-01-26 Jakub Jelinek <jakub@redhat.com>
5886
5887 PR c/64778
5888 * c-typeck.c (convert_arguments): Return -1 if there are
5889 error_args, even if we've diagnosed too many arguments.
5890
cbf5d0e7
RB
58912015-01-21 Richard Biener <rguenther@suse.de>
5892
5893 PR middle-end/64313
5894 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5895 for builtins the user declared correctly.
5896
41dbbb37
TS
58972015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5898 Bernd Schmidt <bernds@codesourcery.com>
5899 Cesar Philippidis <cesar@codesourcery.com>
5900 James Norris <jnorris@codesourcery.com>
5901 Jakub Jelinek <jakub@redhat.com>
5902 Ilmir Usmanov <i.usmanov@samsung.com>
5903
5904 * c-parser.c: Include "gomp-constants.h".
5905 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5906 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5907 Use OMP_CLAUSE_SET_MAP_KIND.
5908 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5909 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5910 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5911 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5912 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5913 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5914 "copyout", "create", "delete", "deviceptr", "gang", "host",
5915 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5916 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5917 "present_or_create", "pcreate", "seq", "self", "vector",
5918 "vector_length", "wait", "worker".
5919 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5920 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5921 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5922 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5923 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5924 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5925 (c_parser_oacc_data_clause_deviceptr)
5926 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5927 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5928 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5929 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5930 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5931 (c_parser_oacc_parallel, c_parser_oacc_update)
5932 (c_parser_oacc_wait): New functions.
5933 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5934 (c_finish_oacc_data): New prototypes.
5935 * c-typeck.c: Include "gomp-constants.h".
5936 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5937 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5938 OMP_CLAUSE_SET_MAP_KIND.
5939 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5940 (c_finish_oacc_data): New functions.
5941 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5942 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5943 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5944 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5945 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5946 GOMP_MAP_FORCE_DEVICEPTR.
5947
adfac8df
JJ
59482015-01-09 Michael Collison <michael.collison@linaro.org>
5949
5950 * c-array-notation.c: Include hash-set.h, machmode.h,
5951 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5952 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5953 * c-aux-info.c: Ditto.
5954 * c-convert.c: Ditto.
5955 * c-decl.c: Ditto.
5956 * c-errors.c: Ditto.
5957 * c-lang.c: Dittoxs.
5958 * c-objc-common.c: Ditto.
5959 * c-parser.c: Ditto.
5960 * c-typeck.c: Include hash-set.h, machmode.h,
5961 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5962 fold-const.h, wide-int.h, inchash.h, real.h and
5963 fixed-value.h due to flattening of tree.h.
5964
2cc901dc
MP
59652015-01-07 Marek Polacek <polacek@redhat.com>
5966
5967 PR c/64417
5968 * c-typeck.c (process_init_element): Disallow initialization of
5969 a flexible array member with a string constant if the structure
5970 is in an array.
5971
5624e564
JJ
59722015-01-05 Jakub Jelinek <jakub@redhat.com>
5973
e5341100
JJ
5974 PR sanitizer/64344
5975 * c-typeck.c (convert_for_assignment, c_finish_return): For
5976 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5977 types also set in_late_binary_op around convert call.
5978 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5979 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5980 result on expr as last argument to ubsan_instrument_float_cast,
5981 if in_late_binary_op, don't use c_save_expr but save_expr.
5982
5624e564
JJ
5983 Update copyright years.
5984
5bd012f8
MP
59852015-01-05 Marek Polacek <polacek@redhat.com>
5986
5987 PR c/64423
5988 * c-typeck.c (build_array_ref): Pass loc down to
5989 warn_array_subscript_with_type_char.
5990
3f8257db 59912014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5992
5993 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5994 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5995 element type.
8e745a17 5996 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5997 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5998 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5999 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6000 to PEDWARN_FOR_QUALIFIERS.
768952be 6001
8f94a8c4
JJ
60022014-12-17 Jakub Jelinek <jakub@redhat.com>
6003
6004 PR sanitizer/64289
6005 * c-convert.c: Include ubsan.h.
6006 (convert): For real -> integral casts and
6007 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6008 instead instrument the float cast directly.
6009
b731b390
JJ
60102014-11-29 Jakub Jelinek <jakub@redhat.com>
6011
6012 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6013 c_finish_stmt_expr): Remove NULL last argument from
6014 create_tmp_var_raw and create_tmp_var calls.
6015 * c-array-notation.c (fix_builtin_array_notation_fn,
6016 build_array_notation_expr, fix_conditional_array_notations_1,
6017 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6018
541e35a6
MP
60192014-11-28 Marek Polacek <polacek@redhat.com>
6020
6021 PR c/63862
6022 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6023 convert the right operand to integer type.
6024
b286be94
MP
60252014-11-25 Marek Polacek <polacek@redhat.com>
6026
6027 PR c/63877
6028 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6029 for inline functions.
6030
aa7da51a
JJ
60312014-11-21 Jakub Jelinek <jakub@redhat.com>
6032
6033 PR target/63764
6034 * c-typeck.c (build_array_ref): Adjust
6035 convert_vector_to_pointer_for_subscript caller. If it returns true,
6036 call non_lvalue_loc on the result.
6037
d876207f
RB
60382014-11-11 Richard Biener <rguenther@suse.de>
6039
6040 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6041 to true.
6042
e5e44252
AK
60432014-11-10 Andi Kleen <ak@linux.intel.com>
6044
6045 PR c/60804
6046 * c-parser.c (c_parser_statement_after_labels): Call
6047 check_no_cilk.
6048 (c_parser_if_statement): Dito.
6049 (c_parser_switch_statement): Dito.
6050 (c_parser_while_statement): Dito.
6051 (c_parser_do_statement): Dito.
6052 (c_parser_for_statement): Dito.
6053 * c-typeck.c (c_finish_loop): Dito.
6054
13c21655
PC
60552014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6056
6057 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6058 OPT_Wshift_count_overflow in the warnings.
6059
2d51fcef
MP
60602014-10-30 Marek Polacek <polacek@redhat.com>
6061
6062 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6063 print the stripped version as well, if they're not the same.
6064
ef4bddc2
RS
60652014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6066
6067 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6068 machine_mode.
6069
c582198b
AM
60702014-10-28 Andrew MacLeod <amacleod@redhat.com>
6071
6072 * c-decl.c: Adjust include files.
6073 * c-parser.c: Ditto.
6074
ddc8de03
PM
60752014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6076 Tom Tromey <tromey@redhat.com>
6077
6078 * c-tree.h (enum c_oracle_request): New.
6079 (c_binding_oracle_function): New typedef.
6080 (c_binding_oracle, c_pushtag, c_bind): Declare.
6081 * c-decl.c (c_binding_oracle): New global.
6082 (I_SYMBOL_CHECKED): New macro.
6083 (i_symbol_binding): New function.
6084 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6085 (I_TAG_CHECKED): New macro.
6086 (i_tag_binding): New function.
6087 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6088 (I_LABEL_CHECKED): New macro.
6089 (i_label_binding): New function.
6090 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6091 (c_print_identifier): Save and restore c_binding_oracle.
6092 (c_pushtag, c_bind): New functions.
6093
60393bbc
AM
60942014-10-27 Andrew MacLeod <amacleod@redhat.com>
6095
6096 * c-typeck.c: Adjust include files.
6097
d723bb7c
MLI
60982014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6099
6100 PR c++/53061
6101 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6102 initialization here...
6103 (c_initialize_diagnostics): ... but here. Set defaults after
6104 building pretty-printer.
6105
1bc5a451
MP
61062014-10-23 Marek Polacek <polacek@redhat.com>
6107
6108 PR c/63626
6109 * c-decl.c (pop_scope): Don't print warning in external_scope.
6110
4435bb92
MP
61112014-10-19 Marek Polacek <polacek@redhat.com>
6112
6113 PR c/63567
6114 * c-typeck.c (output_init_element): Allow initializing objects with
6115 static storage duration with compound literals even in C99 and add
6116 pedwarn for it.
6117
7278465e
MP
61182014-10-17 Marek Polacek <polacek@redhat.com>
6119
6120 PR c/63567
6121 * c-typeck.c (digest_init): Allow initializing objects with static
6122 storage duration with compound literals even in C99 and add pedwarn
6123 for it.
6124
d9b7be2e
MP
61252014-10-17 Marek Polacek <polacek@redhat.com>
6126
6127 PR c/63543
6128 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6129 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6130 error multiple times. Print the type.
6131
f406ae1f
MP
61322014-10-17 Marek Polacek <polacek@redhat.com>
6133
6134 PR c/63549
6135 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6136 type.
6137
92574c7c
MP
61382014-10-17 Marek Polacek <polacek@redhat.com>
6139
6140 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6141 (start_function): Use OPT_Wimplicit_int instead of 0.
6142 (store_parm_decls_oldstyle): Likewise.
6143
1bc4a978
MT
61442014-10-17 Alan Modra <amodra@gmail.com>
6145
6146 PR middle-end/61848
6147 * c-decl.c (merge_decls): Don't merge section name or tls model
6148 to newdecl symtab node, instead merge to olddecl. Override
6149 existing olddecl section name. Set tls_model for all thread-local
6150 vars, not just OMP thread-private ones. Remove incorrect comment.
6151
83685514
AM
61522014-10-16 Andrew MacLeod <amacleod@redhat.com>
6153
6154 * c-decl.c: Adjust include files.
6155
78a7c317
DD
61562014-10-14 DJ Delorie <dj@redhat.com>
6157
6158 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6159 (c_token_starts_typename): Check all __intN, not just __int128.
6160 (c_token_starts_declspecs): Likewise.
6161 (c_parser_declspecs): Likewise.
6162 (c_parser_attribute_any_word): Likewise.
6163 (c_parser_objc_selector): Likewise.
6164 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6165 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6166 is specified.
6167 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6168 __int128.
6169 (finish_declspecs): Likewise.
6170
74d98c1e
AB
61712014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6172
8e745a17 6173 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6174 the duplicate code.
8e745a17 6175 (c_parser_statement): Call the new function.
74d98c1e 6176
84937de2
MP
61772014-10-09 Marek Polacek <polacek@redhat.com>
6178
6179 PR c/63480
6180 * c-typeck.c (pop_init_level): Don't warn about initializing
6181 with { }.
6182
0382aaa0
MP
61832014-10-07 Marek Polacek <polacek@redhat.com>
6184
6185 PR c/59717
6186 * c-decl.c (header_for_builtin_fn): New function.
6187 (implicitly_declare): Suggest which header to include.
6188
7a0ca710
MP
61892014-10-07 Marek Polacek <polacek@redhat.com>
6190
6191 * c-convert.c (convert): Use error_operand_p.
6192 * c-typeck.c (require_complete_type): Likewise.
6193 (really_atomic_lvalue): Likewise.
6194 (digest_init): Likewise.
6195 (handle_omp_array_sections_1): Likewise.
6196
6bc8a126
MP
61972014-10-03 Marek Polacek <polacek@redhat.com>
6198
6199 PR c/63453
6200 * c-decl.c (pop_scope): Don't warn about "inline function declared
6201 but never defined" for functions marked with gnu_inline attribute.
6202
d90c0a59
JJ
62032014-09-25 Jakub Jelinek <jakub@redhat.com>
6204
6205 PR c++/63249
6206 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6207 on low_bound and length.
6208
083e891e
MP
62092014-09-24 Marek Polacek <polacek@redhat.com>
6210
6211 PR c/61405
6212 PR c/53874
6213 * c-parser.c: Don't define CPP_KEYWORD.
6214 (c_parser_switch_statement): Pass original type to c_finish_case.
6215 * c-tree.h (c_finish_case): Update declaration.
6216 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6217 conditionally to c_do_switch_warnings.
6218
8d95fe25
MP
62192014-09-03 Marek Polacek <polacek@redhat.com>
6220
6221 PR c/62024
6222 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6223 conversions.
6224
9a771876
JJ
62252014-09-02 Jakub Jelinek <jakub@redhat.com>
6226 Balaji V. Iyer <balaji.v.iyer@intel.com>
6227 Igor Zamyatin <igor.zamyatin@intel.com>
6228
6229 * c-parser.c (c_parser_cilk_for): New function.
6230 (c_parser_cilk_grainsize): Likewise.
6231 (c_get_temp_regvar): Likewise.
6232 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6233 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6234 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6235 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6236 case.
6237
b7679d96
CG
62382014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6239
6240 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6241 with using HOST_WIDE_INT without truncation to 'int'
6242
59ea0364
MP
62432014-08-22 Marek Polacek <polacek@redhat.com>
6244
6245 PR c++/62199
6246 * c-typeck.c (parser_build_binary_op): Adjust call to
6247 warn_logical_not_parentheses.
6248
671a475e
IZ
62492014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6250
6251 PR other/62008
6252 * c-parser.c (c_parser_array_notation): Check for correct
6253 type of an array added.
6254
04159acf
MP
62552014-08-19 Marek Polacek <polacek@redhat.com>
6256
6257 PR c++/62153
6258 * c-typeck.c (build_binary_op): If either operand of a comparison
6259 is a boolean expression, call maybe_warn_bool_compare.
6260
c77935ee
PP
62612014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6262
6263 PR c/45584
6264 * c-typeck.c (build_c_cast): Do a conversion even when the
6265 TYPE_MAIN_VARIANTs are the same.
6266
35aff4fb
MP
62672014-08-19 Marek Polacek <polacek@redhat.com>
6268
6269 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6270 pedwarn_c99 instead of pedwarn.
6271 (grokfield): Likewise.
6272 (warn_defaults_to): New function.
6273 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6274 Unconditionally call pedwarn_c99 instead of pedwarn.
6275 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6276 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6277 check flag_isoc11 before.
6278 * c-errors.c (pedwarn_c99): Change the return type to bool.
6279 Handle -Wc99-c11-compat.
6280 * c-parser.c (disable_extension_diagnostics): Handle
6281 warn_c99_c11_compat.
6282 (restore_extension_diagnostics): Likewise.
6283 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6284 instead of pedwarn, don't check flag_isoc11 before.
6285 (c_parser_declspecs): Likewise.
6286 (c_parser_alignas_specifier): Likewise.
6287 (c_parser_alignof_expression): Likewise.
6288 (c_parser_generic_selection): Likewise.
6289 * c-tree.h (pedwarn_c99): Update declaration.
6290 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6291 of pedwarn_c99.
6292
177cce46
MP
62932014-08-19 Marek Polacek <polacek@redhat.com>
6294
6295 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6296 to pedwarn_c90.
6297 * c-errors.c: Include "opts.h".
6298 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6299 * c-parser.c (disable_extension_diagnostics): Handle negative value
6300 of warn_c90_c99_compat, too.
6301 (restore_extension_diagnostics): Likewise.
6302 (c_parser_compound_statement_nostart): Pass
6303 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6304
6dc99c33
MP
63052014-08-12 Marek Polacek <polacek@redhat.com>
6306
6307 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6308 Add pedwarn.
6309 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6310 Likewise.
6311 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6312
3f8257db 63132014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6314
6315 PR c/51849
6316 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6317 Call pedwarn_c90 instead of pedwarn.
6318 (check_bitfield_type_and_width): Likewise.
6319 (declspecs_add_qual): Likewise.
6320 (declspecs_add_type): Likewise.
6321 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6322 Adjust to only call pedwarn_c90.
6323 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6324 pedwarn_c90 instead of pedwarn.
6325 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6326 * c-parser.c (disable_extension_diagnostics): Handle
6327 warn_c90_c99_compat.
6328 (restore_extension_diagnostics): Likewise.
6329 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6330 pedwarn_c90 instead of pedwarn.
6331 (c_parser_initelt): Likewise.
6332 (c_parser_postfix_expression): Likewise.
6333 (c_parser_postfix_expression_after_paren_type): Likewise.
6334 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6335 * c-tree.h: Fix formatting.
6336 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6337 pedwarn_c90 instead of pedwarn.
6338
9f25a338
TS
63392014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6340
6341 * c-typeck.c: Remove include of pointer-set.h.
6342
044331a8
MP
63432014-08-07 Marek Polacek <polacek@redhat.com>
6344
6345 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6346
b787e7a2
TS
63472014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6348
6349 * c-typeck.c: Use hash_map instead of pointer_map.
6350
6e2830c3
TS
63512014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6352
6353 * c-decl.c: Use hash_set instead of pointer_set.
6354
a7ee52fb
IZ
63552014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6356
6357 PR middle-end/61455
6358 * c-array-notation.c (expand_array_notations): Handling
6359 of DECL_EXPR added.
6360
b4dfdc11
MG
63612014-07-31 Marc Glisse <marc.glisse@inria.fr>
6362
6363 PR c++/60517
6364 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6365 a local variable.
6366
976d5a22
TT
63672014-07-30 Tom Tromey <tromey@redhat.com>
6368
6369 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6370 field.
6371 (really_start_incremental_init, push_init_level): Initialize
6372 designator_depth.
6373 (pop_init_level): Set global designator_depth.
6374 (process_init_element): Check for designated_init attribute.
6375
30281de2
MP
63762014-07-20 Marek Polacek <polacek@redhat.com>
6377
6378 PR c/61852
6379 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6380 (implicitly_declare): Pass location to implicit_decl_warning.
6381
b108f48f
JJ
63822014-07-14 Jakub Jelinek <jakub@redhat.com>
6383
6384 PR middle-end/61294
6385 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6386 If non-NULL, call c_parser_check_literal_zero.
6387 (c_parser_check_literal_zero): New function.
6388 (c_parser_postfix_expression_after_primary): Adjust
6389 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6390
773ec47f
MP
63912014-07-06 Marek Polacek <polacek@redhat.com>
6392
6393 PR c/6940
6394 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6395 * c-tree.h (C_ARRAY_PARAMETER): Define.
6396 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6397 function parameter.
6398
22e1cf1c 63992014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6400 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6401
6402 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6403 releasing symbol.
6404
52ec0ea3
MP
64052014-07-01 Marek Polacek <polacek@redhat.com>
6406
6407 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6408 instead of 0 to WARN_FOR_ASSIGNMENT.
6409
d5c3d343
MP
64102014-07-01 Marek Polacek <polacek@redhat.com>
6411
6412 PR c/58286
6413 * c-typeck.c (convert_for_assignment): Pass
6414 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6415
6a7253a4
MP
64162014-06-30 Marek Polacek <polacek@redhat.com>
6417
6418 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6419 has no_sanitize_undefined attribute.
6420
5e88a8f4
IZ
64212014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6422
6423 PR middle-end/57541
6424 * c-array-notation.c (fix_builtin_array_notation_fn):
6425 Check for 0 arguments in builtin call. Check that bultin argument is
6426 correct.
6427 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6428 index.
6429
9698b078
SH
64302014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6431
6432 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6433 qualifiers in __auto_type for atomic types.
6434 (c_parser_typeof_specifier): Discard all type qualifiers in
6435 __typeof__ for atomic types.
6436
6e07c515
MP
64372014-06-25 Marek Polacek <polacek@redhat.com>
6438
6439 PR c/61162
6440 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6441 the return expression to c_finish_return.
6442
da6f124d
JJ
64432014-06-25 Jakub Jelinek <jakub@redhat.com>
6444
6445 * c-typeck.c (c_finish_omp_clauses): Make sure
6446 OMP_CLAUSE_LINEAR_STEP has correct type.
6447
c203e8a7
TS
64482014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6449
6450 * c-decl.c: Adjust.
6451
56ad0e38
JJ
64522014-06-24 Jakub Jelinek <jakub@redhat.com>
6453
6454 * c-parser.c (c_parser_omp_for_loop): For
6455 #pragma omp parallel for simd move lastprivate clause from parallel
6456 to for rather than simd.
6457
47c2554f
MP
64582014-06-23 Marek Polacek <polacek@redhat.com>
6459
6460 * c-typeck.c (parser_build_binary_op): Don't call
6461 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6462
56363ffd
JH
64632014-06-15 Jan Hubicka <hubicka@ucw.cz>
6464
6465 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6466 * c-decl.c (merge_decls): Likewise.
6467
d7ff7ae5
MP
64682014-06-09 Marek Polacek <polacek@redhat.com>
6469
6470 PR c/36446
6471 * c-typeck.c (error_init): Call inform instead of error_at.
6472 (pedwarn_init): Call inform instead of pedwarn.
6473 (warning_init): Call inform instead of warning_at.
6474
24d047a3
JH
64752014-06-07 Jan Hubicka <hubicka@ucw.cz>
6476
6477 * c-decl.c (merge_decls): Use set_decl_section_name.
6478 (duplicate_decls): Remove node if it exists.
6479
9bac5cbb
G
64802014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6481
6482 PR c/53119
6483 * c-typeck.c (push_init_level, process_init_element,
6484 pop_init_level): Correct check for zero initialization, move
6485 missing brace warning to respect zero initialization.
6486
8ffcdea8
MP
64872014-06-05 Marek Polacek <polacek@redhat.com>
6488
6489 PR c/56724
6490 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6491
742938c9
MP
64922014-06-05 Marek Polacek <polacek@redhat.com>
6493
6494 PR c/49706
6495 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6496 on the left hand side operand of a comparison.
742938c9 6497
6447c55d
MP
64982014-06-05 Marek Polacek <polacek@redhat.com>
6499
6500 PR c/48062
6501 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6502 Print note only if the warning was printed.
6503
9dc7743c
IZ
65042014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6505
6506 PR c/58942
6507 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6508 with a pointer.
6509
fedfecef
MP
65102014-06-03 Marek Polacek <polacek@redhat.com>
6511
6512 PR c/60439
6513 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6514 c_start_case.
6515 * c-tree.h (c_start_case): Update.
6516 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6517 switch condition has boolean value.
6518
9b2b7279
AM
65192014-06-02 Andrew MacLeod <amacleod@redhat.com>
6520
6521 * c-decl.c: Include builtins.h.
6522 * c-parser.c: Likewise.
6523
5c1bc275
MP
65242014-05-27 Marek Polacek <polacek@redhat.com>
6525
6526 PR c/56724
6527 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6528 error and warning calls to error_at and warning_at. Pass location of
6529 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6530 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6531 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6532
97563bc8
IZ
65332014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6534
6535 PR c/61191
6536 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6537 function parameters.
6538
aede2c10
JH
65392014-05-23 Jan Hubicka <hubicka@ucw.cz>
6540
6541 * c-decl.c (merge_decls): Preserve symtab node pointers.
6542 (duplicate_decls): Free new decl.
6543
edbba2ce
TS
65442014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6545
f3316c6d
TS
6546 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6547 initialization.
6548
edbba2ce
TS
6549 * c-parser.c (c_parser_omp_target): Return bool values.
6550
68c81f24
TS
65512014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6552
6553 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6554 num_teams_loc variable to num_thread_limit_loc.
6555
632f2871
RS
65562014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6557
6558 * c-array-notation.c (expand_array_notations): Use void_node
6559 instead of void_zero_node.
6560
766090c2
TS
65612014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6562
6563 * c-decl.c (finish_struct): Adjust.
6564 (finish_enum): Likewise.
6565 (bind): Adjust.
6566 (record_inline_static): Likewise.
6567 (push_scope): Likewise.
6568 (make_label): Likewise.
6569 (lookup_label_for_goto): Likewise.
6570 (finish_struct): Likewise.
6571 (finish_enum): Likewise.
6572 (store_parm_decls): Likewise.
6573 (c_push_function_context): Likewise.
6574 * c-lang.h: Remove usage of variable_size gty attribute.
6575 * c-parser.c (c_parse_init): Adjust.
6576 (c_parse_file): Likewise.
6577
2b107f6b
MP
65782014-05-13 Marek Polacek <polacek@redhat.com>
6579
6580 PR c/61162
6581 * c-typeck.c (convert_for_assignment): Pass location to
6582 WARN_FOR_ASSIGNMENT instead of input_location.
6583
d033409e
MP
65842014-05-10 Marek Polacek <polacek@redhat.com>
6585
6586 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6587 maybe_warn_string_init.
6588 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6589 maybe_warn_string_init.
6590 * c-tree.h (maybe_warn_string_init): Update declaration.
6591 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6592 Call pedwarn_init with loc instead of with input_location.
6593 (digest_init): Pass init_loc to maybe_warn_string_init.
6594 (pop_init_level): Call pedwarn_init with loc instead of with
6595 input_location.
6596 (set_init_index): Likewise.
6597 (process_init_element): Likewise.
6598
ea58ef42
MP
65992014-05-09 Marek Polacek <polacek@redhat.com>
6600
6601 PR c/61096
6602 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6603 (c_parser_initelt): Pass location to set_init_label. Pass array index
6604 location to set_init_index.
6605 * c-tree.h (push_init_level): Update declaration.
6606 (pop_init_level): Likewise.
6607 (set_init_index): Likewise.
6608 (set_init_label): Likewise.
6609 * c-typeck.c (error_init): Add location parameter. Call error_at
6610 instead of error.
6611 (digest_init): Pass init_loc to error_init.
6612 (really_start_incremental_init):
6613 (push_init_level): Add location parameter. Pass loc to pop_init_level
6614 and error_init.
6615 (pop_init_level): Likewise.
6616 (set_designator): Add location parameter. Pass loc to pop_init_level,
6617 push_init_level, and error_init.
6618 (set_init_index): Add location parameter. Pass loc to error_init and
6619 set_designator.
6620 (set_init_label): Likewise.
6621 (output_init_element): Pass loc to error_init.
6622 (process_init_element): Pass loc to error_init, pop_init_level,
6623 pedwarn_init, and push_init_level.
6624
661a0813
MP
66252014-05-09 Marek Polacek <polacek@redhat.com>
6626
6627 PR c/50459
6628 * c-parser.c (c_parser_attributes): Parse the arguments as an
6629 expression-list if the attribute takes identifier.
6630
2793eeab
MP
66312014-05-08 Marek Polacek <polacek@redhat.com>
6632
6633 PR c/61053
6634 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6635 TYPE_ALIGN_UNIT.
6636
f827930a
MP
66372014-05-08 Marek Polacek <polacek@redhat.com>
6638
6639 PR c/61077
6640 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6641 of main.
6642
1d60af08
KZ
66432014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6644 Mike Stump <mikestump@comcast.net>
6645 Richard Sandiford <rdsandiford@googlemail.com>
6646
6647 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6648 (finish_enum): Use wide-int interfaces.
6649 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6650 * c-typeck.c (build_c_cast): Likewise.
6651 (set_nonincremental_init_from_string): Likewise.
6652 (c_tree_equal): Likewise.
6653
a0e24419
MP
66542014-05-02 Marek Polacek <polacek@redhat.com>
6655
6656 PR c/25801
6657 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6658 Return size_one_node when the type is not complete.
6659 (pointer_diff): Remove comment.
6660 (build_unary_op): Improve error messages.
6661
19fc9faa
MP
66622014-05-02 Marek Polacek <polacek@redhat.com>
6663
6664 * c-typeck.c (c_finish_return): Separate warning_at calls.
6665
63bc4e87
MP
66662014-05-02 Marek Polacek <polacek@redhat.com>
6667
6668 * c-tree.h (error_init): Remove declaration.
6669 (pedwarn_init): Likewise.
6670 * c-typeck.c (error_init): Make static and move above.
6671 (pedwarn_init): Likewise.
6672 (warning_init): Move above.
6673 (maybe_warn_string_init): Likewise.
6674
4bd2511b
JL
66752014-05-01 Jeff Law <law@redhat.com>
6676
6677 Revert:
6678
6679 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6680 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6681 avoid goto.
6682
6a358dcb
MP
66832014-05-02 Marek Polacek <polacek@redhat.com>
6684
6685 PR c/60784
6686 * c-typeck.c (push_init_level): Set constructor_designated to
6687 p->designated for structures.
6688
ae5ebda4
MP
66892014-05-01 Marek Polacek <polacek@redhat.com>
6690
6691 PR c/60915
6692 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6693 function-definition has an attribute after the declarator.
6694
96b40f8d
MP
66952014-05-01 Marek Polacek <polacek@redhat.com>
6696
6697 PR c/60257
6698 * c-typeck.c (warning_init): Add location_t parameter. Call
6699 warning_at instead of warning.
6700 (push_init_level): Pass input_location to warning_init.
6701 (add_pending_init): Add location_t parameter. Pass loc to
6702 warning_init.
6703 (set_nonincremental_init): Pass input_location to add_pending_init.
6704 (set_nonincremental_init_from_string): Likewise.
6705 (output_init_element): Pass loc to warning_init and to
6706 add_pending_init.
6707
32e00768
MP
67082014-05-01 Marek Polacek <polacek@redhat.com>
6709
6710 PR c/43395
6711 * c-typeck.c (c_finish_return): Distinguish between label and variable
6712 when warning about returning local address.
6713
c9379ce2
MP
67142014-05-01 Marek Polacek <polacek@redhat.com>
6715
6716 PR c/29467
6717 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6718 in C89 mode.
6719
d00887e8
MP
67202014-05-01 Marek Polacek <polacek@redhat.com>
6721
6722 PR c/43245
6723 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6724 instead of 0 to WARN_FOR_QUALIFIERS.
6725
5436fa2e
MP
67262014-05-01 Marek Polacek <polacek@redhat.com>
6727
6728 PR c/56989
6729 * c-typeck.c (default_conversion): Use better location for
6730 error call.
6731
f8ed5150
MP
67322014-04-30 Marek Polacek <polacek@redhat.com>
6733
6734 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6735 also when SANITIZE_FLOAT_DIVIDE is on.
6736
8337d1db
MP
67372014-04-30 Marek Polacek <polacek@redhat.com>
6738
6739 PR c/60139
6740 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6741 and pedwarn_init. Use loc insted of input_location.
6742
c4bdc42f
MP
67432014-04-30 Marek Polacek <polacek@redhat.com>
6744
6745 PR c/60351
6746 * c-typeck.c (build_binary_op): Use location when warning about
6747 shift count.
6748
45484dcf
MP
67492014-04-25 Marek Polacek <polacek@redhat.com>
6750
6751 PR c/18079
6752 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6753 always_inline/noinline and hot/cold attributes.
6754
34cf811f
MP
67552014-04-25 Marek Polacek <polacek@redhat.com>
6756
6757 PR c/60114
6758 * c-parser.c (c_parser_initelt): Pass input_location to
6759 process_init_element.
6760 (c_parser_initval): Pass loc to process_init_element.
6761 * c-tree.h (process_init_element): Adjust declaration.
6762 * c-typeck.c (push_init_level): Pass input_location to
6763 process_init_element.
6764 (pop_init_level): Likewise.
6765 (set_designator): Likewise.
6766 (output_init_element): Add location_t parameter. Pass loc to
6767 digest_init.
6768 (output_pending_init_elements): Pass input_location to
6769 output_init_element.
6770 (process_init_element): Add location_t parameter. Pass loc to
6771 output_init_element.
6772
42056eac
JJ
67732014-04-24 Jakub Jelinek <jakub@redhat.com>
6774
6775 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6776 atomic-clause, allow comma in between atomic-clause and
6777 seq_cst.
6778
e162a134
JJ
67792014-04-22 Jakub Jelinek <jakub@redhat.com>
6780
6781 PR c/59073
6782 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6783 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6784
2f6babac
IZ
67852014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6786
6787 PR middle-end/60469
6788 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6789 create_tmp_var instead build_decl for creating temps.
6790 (build_array_notation_expr): Likewise.
6791 (fix_conditional_array_notations_1): Likewise.
6792 (fix_array_notation_expr): Likewise.
6793 (fix_array_notation_call_expr): Likewise.
6794
8edbfaa6
JJ
67952014-03-28 Jakub Jelinek <jakub@redhat.com>
6796
6797 PR c++/60689
6798 * c-tree.h (c_build_function_call_vec): New prototype.
6799 * c-typeck.c (build_function_call_vec): Don't call
6800 resolve_overloaded_builtin here.
6801 (c_build_function_call_vec): New wrapper function around
6802 build_function_call_vec. Call resolve_overloaded_builtin here.
6803 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6804 Call c_build_function_call_vec instead of build_function_call_vec.
6805 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6806 * c-decl.c (finish_decl): Likewise.
6807
7485aeea
MLI
68082014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6809
6810 PR c/55383
6811 * c-typeck.c: Use correct format string in cast-qual warning
6812
b17a8b07
TS
68132014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6814
6815 * c-decl.c (c_decl_attributes): Use
6816 lang_hooks.types.omp_mappable_type.
6817 * c-typeck.c (c_finish_omp_clauses): Likewise.
6818
3af9c5e9
MP
68192014-03-06 Marek Polacek <polacek@redhat.com>
6820
6821 PR c/60197
6822 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6823 of checking tree code.
6824
1c9f5f33
PK
68252014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6826
6827 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6828 (c_parser_parameter_declaration): Likewise.
6829
cc28fc7f
MP
68302014-02-19 Marek Polacek <polacek@redhat.com>
6831
6832 PR c/60195
6833 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6834 Call mark_exp_read on exp.value.
6835 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6836 TREE_ADDRESSABLE on old instead of val.
6837 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6838
b581c05c
PK
68392014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6840
6841 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6842 C_EXPR_APPEND by vec_safe_push.
6843 * c-tree.h (C_EXPR_APPEND): Remove.
6844
81e5eca8
MP
68452014-01-31 Marek Polacek <polacek@redhat.com>
6846
6847 PR c/59963
6848 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6849 build_function_call_vec.
6850 (build_function_call): Likewise.
6851 (build_atomic_assign): Likewise.
6852 (build_function_call_vec): Add arg_loc parameter. Use it.
6853 (convert_arguments): Likewise.
6854 (convert_for_assignment): Rename rhs_loc to expr_loc.
6855 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6856 (c_parser_objc_keywordexpr): Likewise.
6857 (c_parser_postfix_expression_after_primary): Call
6858 build_function_call_vec with expr_loc rather than op_loc.
6859 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6860 build_function_call_vec.
6861 (c_parser_expr_list): Add locations parameter. Fill it with locations
6862 of function arguments.
6863 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6864
68fca595
MP
68652014-01-30 Marek Polacek <polacek@redhat.com>
6866
6867 PR c/59940
6868 * c-typeck.c (build_function_call_vec): Use loc parameter.
6869 (convert_arguments): Add location parameter. Use it.
6870 (ep_convert_and_check): Likewise.
6871 (build_atomic_assign): Adjust convert_for_assignment call.
6872 (build_modify_expr): Likewise.
6873 (digest_init): Likewise.
6874 (c_finish_return): Likewise.
6875 (build_conditional_expr): Adjust ep_convert_and_check calls.
6876 (convert_for_assignment): Add rhs_loc parameter. Use it.
6877 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6878 calls.
6879
fa337f3a
RB
68802014-01-30 Richard Biener <rguenther@suse.de>
6881
6882 PR c/59905
6883 * c-typeck.c (build_function_call_vec): Do not replace calls
6884 to a function via an incompatible type with a runtime abort.
6885
b72271b9
BI
68862014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6887
6888 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6889 flag_enable_cilkplus with flag_cilkplus.
6890 (c_parser_direct_declarator_inner): Likewise.
6891 (c_parser_attribute_any_word): Likewise.
6892 (c_parser_attributes): Likewise.
6893 (c_parser_compound_statement): Likewise.
6894 (c_parser_statement_after_labels): Likewise.
6895 (c_parser_if_statement): Likewise.
6896 (c_parser_switch_statement): Likewise.
6897 (c_parser_do_statement): Likewise.
6898 (c_parser_for_statement): Likewise.
6899 (c_parser_unary_expression): Likewise.
6900 (c_parser_postfix_expression): Likewise.
6901 (c_parser_postfix_expression_after_primary): Likewise.
6902 (c_parser_postfix_expression_after_primary): Likewise.
6903 (c_parser_omp_clause_name): Likewise.
6904 (c_finish_omp_declare_simd): Likewise.
6905 (c_parser_cilk_verify_simd): Likewise.
6906 * c-typeck.c (build_array_ref): Likewise.
6907 (build_function_call_vec): Likewise.
6908 (convert_arguments): Likewise.
6909 (build_compound_expr): Likewise.
6910 (c_finish_return): Likewise.
6911 (c_finish_if_stmt): Likewise.
6912 (c_finish_loop): Likewise.
6913 (build_binary_op): Likewise.
6914
393e8e8b
MP
69152014-01-23 Marek Polacek <polacek@redhat.com>
6916
6917 PR c/59846
6918 * c-typeck.c (parser_build_binary_op): Use location instead of
6919 input_location.
6920 (build_binary_op): Pass location to shorten_compare.
6921
f04dda30
MP
69222014-01-23 Marek Polacek <polacek@redhat.com>
6923
6924 PR c/58346
6925 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6926 an empty aggregate.
6927
789eadcd
MP
69282014-01-23 Marek Polacek <polacek@redhat.com>
6929
6930 PR c/59871
6931 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6932 of a comma expression.
6933 (emit_side_effect_warnings): Likewise.
6934
40f14e9f
BI
69352014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6936
6937 PR c/59825
6938 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6939 function to use walk_tree and moved a lot of its functionality to
6940 expand_array_notations.
6941 (expand_array_notations): New function.
6942
74558dd9
BI
69432014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6944
6945 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6946 attribute an attribute without value.
6947
652fea39
JJ
69482014-01-23 Jakub Jelinek <jakub@redhat.com>
6949
6950 PR middle-end/58809
6951 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6952 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6953
f34f1c87
MP
69542014-01-22 Marek Polacek <polacek@redhat.com>
6955
6956 PR c/59891
6957 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6958 of remove_c_maybe_const_expr on op1 and op2.
6959
241f845a
JJ
69602014-01-15 Jakub Jelinek <jakub@redhat.com>
6961
6962 PR c/58943
6963 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6964 effects, preevaluate rhs using SAVE_EXPR first.
6965
9a74f20c
BI
69662014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6967
6968 PR c++/59631
6969 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6970 statements with if-elseif statements.
6971
96066ce1
MP
69722014-01-06 Marek Polacek <polacek@redhat.com>
6973
6974 PR c/57773
6975 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6976 defined bit-field types only in ISO C.
6977
23a5b65a
RS
69782014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6979
6980 Update copyright years
6981
f9030485
RS
69822014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6983
6984 * c-array-notation.c: Use the standard form for the copyright notice.
6985
41958c28
BI
69862013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6987
6988 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6989 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6990 field in parser is not empty. If not-empty, call the function
6991 c_parser_finish_omp_declare_simd.
6992 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6993 between SIMD-enabled functions and #pragma simd. Added new parameter.
6994 (c_parser_cilk_all_clauses): Modified the usage of the function
6995 c_parser_cilk_clause_vectorlength as mentioned above.
6996 (c_parser_cilk_simd_fn_vector_attrs): New function.
6997 (c_finish_cilk_simd_fn_tokens): Likewise.
6998 (is_cilkplus_vector_p): Likewise.
6999 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7000 "nomask," and "mask" strings in clause name.
7001 (c_parser_omp_all_clauses): Added 3 new case statements:
7002 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7003 PRAGMA_CILK_CLAUSE_NOMASK.
7004 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7005 check for vector attribute and if so call the function
7006 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7007 called the function c_finish_cilk_simd_fn_tokens.
7008 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7009 parser field is non-empty. If so, parse them as you would parse
7010 the omp declare simd pragma.
7011 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7012 Added a check when step is a parameter and flag it as error.
7013 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7014 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7015 pragma_omp_clause.
7016
cef0fd0e
TS
70172013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7018
7019 * c-parser.c (c_parser_omp_parallel): Fix description.
7020
12893402
BI
70212013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7022
7023 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7024 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7025 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7026 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7027
296674db
JM
70282013-12-04 Joseph Myers <joseph@codesourcery.com>
7029
7030 PR c/52023
7031 * c-parser.c (c_parser_alignas_specifier): Use
7032 c_sizeof_or_alignof_type instead of c_alignof.
7033 (c_parser_alignof_expression): Likewise, with min_alignof
7034 parameter depending on alignof spelling used.
7035
edd28054
MP
70362013-12-04 Marek Polacek <polacek@redhat.com>
7037
7038 PR c/54113
7039 * c-decl.c (start_function): Don't warn for missing prototype for
7040 inline functions.
7041
da0fc454
MP
70422013-12-03 Marek Polacek <polacek@redhat.com>
7043
7044 PR c/59351
7045 * c-decl.c (build_compound_literal): Allow compound literals with
7046 empty initial value.
7047
4c2ecab0
JM
70482013-12-02 Joseph Myers <joseph@codesourcery.com>
7049
7050 PR c/58235
7051 * c-typeck.c (build_modify_expr): Diagnose assignment to
7052 expression with array type.
7053
340baef7
JM
70542013-11-29 Joseph Myers <joseph@codesourcery.com>
7055
7056 PR c/42262
7057 * c-typeck.c (process_init_element): Do not treat a string as
7058 initializing a whole array when used with a designator for an
7059 individual element.
7060
6763b9f7
JM
70612013-11-29 Joseph Myers <joseph@codesourcery.com>
7062
7063 PR c/57574
7064 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7065 an inline function following a static declaration.
7066
e7bd1de1
JJ
70672013-11-28 Jakub Jelinek <jakub@redhat.com>
7068
7069 PR c/59310
7070 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7071 to p_name before calling c_parser_omp_teams instead of after.
7072 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7073 argument. Remove unused p_name variable.
7074
0136f8f0
AH
70752013-11-27 Aldy Hernandez <aldyh@redhat.com>
7076 Jakub Jelinek <jakub@redhat.com>
7077
7078 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7079 external_scope is NULL.
7080
241b71bb
TV
70812013-11-27 Tom de Vries <tom@codesourcery.com>
7082 Marc Glisse <marc.glisse@inria.fr>
7083
7084 PR c++/59032
7085 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7086
2fb9a547
AM
70872013-11-22 Andrew MacLeod <amacleod@redhat.com>
7088
7089 * c-typeck.c: Add required include files from gimple.h.
7090
8400e75e
DM
70912013-11-22 David Malcolm <dmalcolm@redhat.com>
7092
7093 * c-decl.c (define_label, shadow_tag_warned)
7094 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7095 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7096 (declspecs_add_type): Remove use of in_system_header macro.
7097 * c-parser.c (c_parser_unary_expression): Likewise.
7098 * c-typeck.c (store_init_value, process_init_element)
7099 (c_start_case): Likewise.
7100
7101 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7102 macro.
7103
7104 * c-parser.c (c_parser_set_source_position_from_token): Remove
7105 reference to in_system_header from comment.
7106
386b1f1f
RS
71072013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7108
7109 * c-decl.c (grokdeclarator): Update comment to refer to
7110 tree_to_[su]hwi rather than tree_low_cst.
7111
ae7e9ddd
RS
71122013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7113
7114 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7115 tree_to_uhwi throughout.
7116
9439e9a1
RS
71172013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7118
7119 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7120 throughout.
7121
9541ffee
RS
71222013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7123
7124 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7125 throughout.
7126
c02065fc
AH
71272013-11-15 Aldy Hernandez <aldyh@redhat.com>
7128
7129 * c-parser.c (c_parser_cilk_simd): New.
7130 (c_parser_cilk_verify_simd): New.
7131 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7132 (c_parser_omp_for_loop): Add case for NE_EXPR.
7133 Set c_break_label for CILK_SIMD.
7134 (c_parser_cilk_clause_vectorlength): New.
7135 (c_parser_cilk_clause_linear): New.
7136 (c_parser_cilk_clause_name): New.
7137 (c_parser_cilk_all_clauses): New.
7138 * c-typeck.c (build_unary_op): Pass location argument to
7139 readonly_error.
7140 (build_modify_expr): Same.
7141 (build_asm_expr): Same.
7142 (c_finish_bc_stmt): Error on break/continue in loops.
7143
18f429e2
AM
71442013-11-14 Andrew MacLeod <amacleod@redhat.com>
7145
7146 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7147
d8a2d370
DN
71482013-11-14 Diego Novillo <dnovillo@google.com>
7149
7150 * c-decl.c: Include print-tree.h.
7151 Include stor-layout.h.
7152 Include varasm.h.
7153 Include attribs.h.
7154 Include stringpool.h.
7155 * c-lang.c: Include fold-const.h.
7156 * c-parser.c: Include stringpool.h.
7157 Include attribs.h.
7158 Include stor-layout.h.
7159 Include varasm.h.
7160 Include trans-mem.h.
7161 * c-typeck.c: Include stor-layout.h.
7162 Include trans-mem.h.
7163 Include varasm.h.
7164 Include stmt.h.
7165
38b7bc7f
JM
71662013-11-13 Joseph Myers <joseph@codesourcery.com>
7167
7168 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7169 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7170 __auto_type.
7171 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7172 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7173 RID_AUTO_TYPE.
7174 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7175 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7176 (c_parser_declarator, c_parser_direct_declarator_inner)
7177 (c_parser_parameter_declaration, c_parser_type_name): All callers
7178 changed.
7179 (c_parser_declaration_or_fndef): Handle declarations with type
7180 determined from the initializer.
7181
45b0be94
AM
71822013-11-12 Andrew MacLeod <amacleod@redhat.com>
7183
18f429e2 7184 * c-typeck.c: Include gimplify.h.
45b0be94 7185
582d9b50
JM
71862013-11-12 Joseph Myers <joseph@codesourcery.com>
7187
7188 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7189 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7190 comment.
7191 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7192 or _Thread_local as appropriate in diagnostics.
7193 (build_null_declspecs): Initialize ret->thread_gnu_p.
7194 (declspecs_add_scspec): Handle either __thread or _Thread_local
7195 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7196 pedantic. Do not disallow _Thread_local extern and _Thread_local
7197 static.
7198
267bac10
JM
71992013-11-07 Joseph Myers <joseph@codesourcery.com>
7200 Andrew MacLeod <amacleod@redhat.com>
7201
7202 * c-aux-info.c (gen_type): Handle atomic qualifier.
7203 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7204 qualifiers when compating types.
7205 (shadow_tag_warned): Handle atomic_p in declspecs.
7206 (quals_from_declspecs): Likewise.
7207 (start_decl): Use c_type_promotes_to when promoting argument
7208 types.
7209 (grokdeclarator): Handle _Atomic.
7210 (get_parm_info): Diagnose any qualifier on "void" as only
7211 parameter.
7212 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7213 comparing types. Use c_type_promotes_to when promoting argument
7214 types.
7215 (finish_function): Use c_type_promotes_to when promoting argument
7216 types.
7217 (build_null_declspecs): Handle atomic_p in declspecs.
7218 (declspecs_add_qual): Handle RID_ATOMIC.
7219 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7220 (c_token_starts_declspecs): Handle RID_ATOMIC.
7221 (c_parser_declspecs): Handle atomic type specifiers and
7222 qualifiers.
7223 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7224 from types of expressions with atomic type.
7225 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7226 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7227 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7228 (c_parser_statement_after_labels, c_parser_switch_statement)
7229 (c_parser_for_statement, c_parser_expr_no_commas)
7230 (c_parser_conditional_expression, c_parser_binary_expression)
7231 (c_parser_cast_expression, c_parser_unary_expression)
7232 (c_parser_postfix_expression)
7233 (c_parser_postfix_expression_after_primary, c_parser_expression):
7234 Use convert_lvalue_to_rvalue.
7235 (c_parser_expression_conv, c_parser_expr_list): Document
7236 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7237 (c_parser_objc_synchronized_statement): Use
7238 convert_lvalue_to_rvalue.
7239 (c_parser_objc_selector): Handle RID_ATOMIC.
7240 (c_parser_objc_receiver, c_parser_array_notation): Use
7241 convert_lvalue_to_rvalue.
7242 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7243 _Atomic (type-name).
7244 (struct c_declspecs): Add atomic_p field.
7245 (convert_lvalue_to_rvalue): Declare.
7246 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7247 corresponding atomic types.
7248 (qualify_type): Don't add _Atomic qualifiers from second argument.
7249 (comp_target_types): Do not allow _Atomic mismatches.
7250 (type_lists_compatible_p): Do not remove atomic qualifiers when
7251 comparing types.
7252 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7253 (build_atomic_assign): New functions.
7254 (build_unary_op): Use build_atomic_assign for atomic increment and
7255 decrement.
7256 (build_conditional_expr): Do not treat _Atomic void as a qualified
7257 version of void.
7258 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7259 (find_anonymous_field_with_type, convert_to_anonymous_field)
7260 (convert_for_assignment): Do not remove atomic qualifiers when
7261 comparing types.
7262 (digest_init): Do not accept initialization of arrays of atomic
7263 elements by string constants.
7264 (build_asm_expr): Use convert_lvalue_to_rvalue.
7265 (build_binary_op): Do not treat _Atomic void as a qualified
7266 version of void.
7267
0c249d4b
DD
72682013-11-06 DJ Delorie <dj@redhat.com>
7269
7270 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7271 both explicit and builtin, print the location of the explicit one.
7272
6d7f7e0a
TB
72732013-11-05 Tobias Burnus <burnus@net-b.de>
7274
7275 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7276 c_parser_omp_distribute, c_parser_omp_teams,
7277 c_parser_omp_target, c_parser_omp_declare): Handle
7278 -fopenmp-simd.
7279
b906f4ca
MP
72802013-11-03 Marek Polacek <polacek@redhat.com>
7281
7282 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7283
ee1d5a02
JJ
72842013-11-01 Jakub Jelinek <jakub@redhat.com>
7285
7286 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7287 check_dup_generic at the end, unless remove is true.
7288 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7289 remove = true;.
7290 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7291
5a9785fb
JJ
72922013-10-31 Jakub Jelinek <jakub@redhat.com>
7293
7294 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7295 with decl that is not pointer nor array.
7296
939b37da
BI
72972013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7298
7299 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7300 a spawning function is found.
7301 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7302 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7303 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7304 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7305 case.
7306 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7307 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7308 expr.
7309 (c_finish_return): Added a check to reject _Cilk_spawn in return
7310 expression.
7311 (build_cilk_spawn): New function.
7312 (build_cilk_sync): Likewise.
7313 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7314
d4af74d4
TB
73152013-10-27 Tobias Burnus <burnus@net-b.de>
7316
7317 PR other/33426
7318 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7319 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7320 (c_parser_statement_after_labels): Update calls.
7321
d73749df 73222013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7323
7324 PR other/33426
7325 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7326 Handle PRAGMA_IVDEP.
7327 (c_parser_statement_after_labels): Update call.
7328
f28aa681
MP
73292013-10-24 Marek Polacek <polacek@redhat.com>
7330
7331 * c-parser.c (c_parser_struct_declaration): Add a comment.
7332 (c_parser_declarator): Don't allow _Alignas here.
7333
0645c1a2
AM
73342013-10-17 Andrew MacLeod <amacleod@redhat.com>
7335
7336 * c-parser.c: Include omp-low.h.
7337 * c-typeck.c: Likewise.
7338
568a31f2
MP
73392013-10-17 Marek Polacek <polacek@redhat.com>
7340
7341 PR c/58267
7342 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7343 Document syntax of the array-declarator.
7344 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7345 are not permitted.
7346 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7347 (c_parser_struct_declaration): Likewise.
7348 (c_parser_declarator): Likewise.
7349 (c_parser_direct_declarator_inner): Likewise.
7350 (c_parser_parameter_declaration): Likewise.
7351 (c_parser_type_name): Likewise.
7352
acf0174b
JJ
73532013-10-11 Jakub Jelinek <jakub@redhat.com>
7354
7355 * c-lang.h (current_omp_declare_target_attribute): New extern
7356 decl.
7357 * c-parser.c: Include c-lang.h.
7358 (struct c_parser): Change tokens to c_token *.
7359 Add tokens_buf field. Change tokens_avail type to unsigned int.
7360 (c_parser_consume_token): If parser->tokens isn't
7361 &parser->tokens_buf[0], increment parser->tokens.
7362 (c_parser_consume_pragma): Likewise.
7363 (enum pragma_context): Add pragma_struct and pragma_param.
7364 (c_parser_external_declaration): Adjust
7365 c_parser_declaration_or_fndef caller.
7366 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7367 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7368 Adjust recursive call.
7369 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7370 of pragma_external.
7371 (c_parser_parameter_declaration): Use pragma_param instead of
7372 pragma_external.
7373 (c_parser_compound_statement_nostart, c_parser_label,
7374 c_parser_for_statement): Adjust
7375 c_parser_declaration_or_fndef callers.
7376 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7377 it through to c_parser_conditional_expression.
7378 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7379 pass it through to c_parser_binary_expression. Adjust recursive
7380 call.
7381 (c_parser_binary_expression): Remove prec argument, add
7382 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7383 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7384 binop matches it, use build2 instead of parser_build_binary_op.
7385 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7386 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7387 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7388 Handle pragma_struct and pragma_param the same as pragma_external.
7389 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7390 (c_parser_omp_variable_list): Parse array sections for
7391 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7392 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7393 (c_parser_omp_clause_reduction): Handle user defined reductions.
7394 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7395 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7396 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7397 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7398 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7399 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7400 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7401 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7402 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7403 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7404 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7405 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7406 (c_parser_omp_for_loop): Add CODE argument, pass it through
7407 to c_finish_omp_for. Change last argument to cclauses,
7408 and adjust uses to grab parallel clauses from the array of all
7409 the split clauses. Adjust c_parser_binary_expression,
7410 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7411 (omp_split_clauses): New function.
7412 (c_parser_omp_simd): New function.
7413 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7414 Allow the function to be called also when parsing combined constructs,
7415 and call c_parser_omp_simd when parsing for simd.
7416 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7417 #pragma omp section, require exactly one structured-block instead of
7418 sequence of statements.
7419 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7420 Allow the function to be called also when parsing combined constructs.
7421 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7422 Allow the function to be called also when parsing combined
7423 constructs.
7424 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7425 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7426 c_parser_omp_teams, c_parser_omp_target_data,
7427 c_parser_omp_target_update, c_parser_omp_target,
7428 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7429 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7430 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7431 (c_parser_omp_construct): Add p_name and mask vars. Handle
7432 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7433 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7434 and c_parser_omp_sections callers.
7435 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7436 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7437 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7438 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7439 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7440 OMP_CLAUSE_DEPEND.
7441 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7442 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7443 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7444 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7445 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7446 * c-typeck.c: Include tree-inline.h.
7447 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7448 handle_omp_array_sections_1, handle_omp_array_sections,
7449 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7450 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7451 user defined reductions.
7452 (c_tree_equal): New function.
7453 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7454 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7455 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7456 c_check_omp_declare_reduction_r): New prototypes.
7457 * c-decl.c (current_omp_declare_target_attribute): New variable.
7458 (c_decl_attributes): New function.
7459 (start_decl, start_function): Use it instead of decl_attributes.
7460 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7461 c_omp_reduction_decl, c_omp_reduction_lookup,
7462 c_check_omp_declare_reduction_r): New functions.
7463
0a6c2227
TT
74642013-09-25 Tom Tromey <tromey@redhat.com>
7465
7466 * Make-lang.in (c/gccspec.o): Remove.
7467 (CFLAGS-c/gccspec.o): New variable.
7468 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7469 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7470 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7471
f3bc55f0
TT
74722013-09-25 Tom Tromey <tromey@redhat.com>
7473
7474 * Make-lang.in (c/gccspec.o): Don't use subshell.
7475
a24d975c
MP
74762013-09-18 Marek Polacek <polacek@redhat.com>
7477
7478 PR sanitize/58443
7479 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7480 Remove unnecessary check.
7481
ce6923c5
MP
74822013-09-18 Marek Polacek <polacek@redhat.com>
7483
7484 PR sanitizer/58411
7485 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7486 no_sanitize_undefined attribute.
7487
a1e51df9
KT
74882013-09-13 Kai Tietz <ktietz@redhat.com>
7489
7490 PR target/57848
7491 * c-decl.c (c_builtin_function_ext_scope): Remove
7492 wrong assumption that it is never called on prexisting
7493 symbol.
7494
0af94e6f
JR
74952013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7496
7497 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7498
20059c8b
GDR
74992013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7500
7501 * c-objc-common.c (c_tree_printer): Tidy.
7502
de5a5fa1
MP
75032013-08-30 Marek Polacek <polacek@redhat.com>
7504
7505 * c-typeck.c (build_binary_op): Add division by zero and shift
7506 instrumentation.
7507
2531a1d9 75082013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7509 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7510
6e2bcc98 7511 PR c/35649
2531a1d9
JR
7512 * c-typeck.c (c_common_type): Prefer double_type_node over
7513 other REAL_TYPE types with the same precision.
7514 (convert_arguments): Likewise.
7515
025311c4
GDR
75162013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7517
7518 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7519 (c_initialize_diagnostics): Call a destructor for the early printer.
7520
da6ca2b5
GDR
75212013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7522
7523 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7524 printer initialization.
7525
318cda85 75262013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7527
318cda85
BI
7528 PR c/57490
7529 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7530 check for truth values.
7531 (expand_array_notation_exprs): Added truth values case. Removed an
7532 unwanted else. Added for-loop to walk through subtrees in default
7533 case.
7534
b066401f
GDR
75352013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7536
7537 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7538
fb48aadc
JM
75392013-07-23 Joseph Myers <joseph@codesourcery.com>
7540
7541 * c-parser.c (struct c_generic_association): Fix typo.
7542
433cc7b0
TT
75432013-07-23 Tom Tromey <tromey@redhat.com>
7544 Joseph Myers <joseph@codesourcery.com>
7545
7546 * c-parser.c (struct c_generic_association): New.
7547 (c_generic_association_d): New typedef.
7548 (c_parser_generic_selection): New function.
7549 (c_parser_postfix_expression): Handle RID_GENERIC.
7550
26d40c3d
JM
75512013-07-13 Jason Merrill <jason@redhat.com>
7552
7553 PR c++/57793
7554 * c-decl.c (finish_struct): Check for too-large class.
7555
ecdbd01a 75562013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7557
7558 PR c/57821
7559 * c-typeck.c (set_init_index): When folding, check for index overflow.
7560
1141ed3f
BI
75612013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7562
7563 * c-parser.c (c_parser_array_notation): Removed rejection of array
7564 notations in an array of function pointers.
7565
713b46fa
BI
75662013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7567
7568 * c-array-notation.c (make_triplet_val_inv): New function.
7569 (create_cmp_incr): Likewise.
7570 (create_array_refs): Likewise.
7571 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7572 Also modularized common parts between functions and called the function.
7573 (build_array_notation_expr): Likewise.
7574 (fix_conditional_array_notations_1): Likewise.
7575 (fix_array_notation_expr): Likewise.
7576 (fix_array_notation_call_expr): Likewise.
7577
92f20202
MP
75782013-06-18 Marek Polacek <polacek@redhat.com>
7579
7580 PR c/57630
7581 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7582
73a23b06
BI
75832013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7584
7585 * c-array-notation.c (build_array_notation_expr): Reject array notation
7586 mismatch between LHS and RHS even inside a call_expr. Also, removed
7587 a couple while statements that were dead code.
7588
00b8517d
BI
75892013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7590
7591 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7592 excessive precision expressions in function parameters. Also removed
7593 couple unwanted while statements.
7594
1509bdda
BI
75952013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7596
7597 * c-array-notation.c (expand_array_notation_exprs): Added
7598 ARRAY_NOTATION_REF case.
ab20d992 7599
d60f1706
BI
76002013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7601
7602 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7603 function to c-family/array-notation-common.c.
7604 (is_cilkplus_reduce_builtin): Likewise.
7605 (find_rank): Likewise.
7606 (extract_array_notation_exprs): Likewise.
7607 (replace_array_notations): Likewise.
7608 (find_inv_trees): Likewise.
7609 (replace_inv_trees): Likewise.
7610 (contains_array_notation_expr): Likewise.
7611 (find_correct_array_notation_type): Likewise.
7612 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7613 (struct inv_list): Moved this to c-family/array-notation-common.c.
7614 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7615
6d6efbb3
BI
76162013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7617
7618 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7619 reduction functions outside the for-loop. Added a check if the fundecl
7620 is non-NULL. Finally, removed an unwanted if-statement, and made the
7621 body unconditional.
7622
25c22937
BI
76232013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7624
7625 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7626 condition of the if-statement matches the rank of else-block and then-
7627 block when array notations are used.
7628 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7629 expression after the entire function body is parsed.
7630 (c_parser_expr_no_commas): Delayed creating array notation expressions
7631 to the end of function parsing.
7632 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7633 whole if-statement instead of just the condition.
ab20d992 7634 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7635
edd25645
BI
76362013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7637
7638 PR c/57474
7639 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7640 array to NULL_TREE if they are unused. Also added a check for the
7641 field to be NULL before its fields are used in future.
ab20d992 7642
065ce7f1
RO
76432013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7644
7645 PR bootstrap/57450
7646 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7647 (build_array_notation_expr): Likewise.
7648
36536d79
BI
76492013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7650
7651 * c-typeck.c (build_array_ref): Added a check to see if array's
7652 index is greater than one. If true, then emit an error.
7653 (build_function_call_vec): Exclude error reporting and checking
7654 for builtin array-notation functions.
7655 (convert_arguments): Likewise.
7656 (c_finish_return): Added a check for array notations as a return
7657 expression. If true, then emit an error.
7658 (c_finish_loop): Added a check for array notations in a loop
7659 condition. If true then emit an error.
7660 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7661 (build_binary_op): Added a check for array notation expr inside
7662 op1 and op0. If present, we call another function to find correct
7663 type.
7664 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7665 * c-parser.c (c_parser_compound_statement): Check if array
7666 notation code is used in tree, if so, then transform them into
7667 appropriate C code.
7668 (c_parser_expr_no_commas): Check if array notation is used in LHS
7669 or RHS, if so, then build array notation expression instead of
7670 regular modify.
7671 (c_parser_postfix_expression_after_primary): Added a check for
7672 colon(s) after square braces, if so then handle it like an array
7673 notation. Also, break up array notations in unary op if found.
7674 (c_parser_direct_declarator_inner): Added a check for array
7675 notation.
7676 (c_parser_compound_statement): Added a check for array notation in
7677 a stmt. If one is present, then expand array notation expr.
7678 (c_parser_if_statement): Likewise.
7679 (c_parser_switch_statement): Added a check for array notations in
7680 a switch statement's condition. If true, then output an error.
7681 (c_parser_while_statement): Similarly, but for a while.
7682 (c_parser_do_statement): Similarly, but for a do-while.
7683 (c_parser_for_statement): Similarly, but for a for-loop.
7684 (c_parser_unary_expression): Check if array notation is used in a
7685 pre-increment or pre-decrement expression. If true, then expand
7686 them.
7687 (c_parser_array_notation): New function.
7688 * c-array-notation.c: New file.
7689 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7690
cd192ccc
MS
76912013-05-23 Mike Stump <mikestump@comcast.net>
7692
7693 * c-typeck.c (convert_for_assignment): Handle references to memory
7694 spaces better.
7695
427b248d
JM
76962013-05-16 Jason Merrill <jason@redhat.com>
7697
7698 * Make-lang.in (cc1$(exeext)): Use link mutex.
7699
44d90fe1
PC
77002013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7701
7702 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7703 to simply use OPT_Wpointer_arith.
7704 (build_unary_op): Likewise.
7705
4e7d7b3d
JJ
77062013-04-03 Jakub Jelinek <jakub@redhat.com>
7707
7708 PR c/19449
7709 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7710 argument. If set, or it temporarily for parsing of the first
7711 argument into force_folding_builtin_constant_p.
7712 (c_parser_postfix_expression): Adjust callers.
7713
839b422f
RB
77142013-03-21 Richard Biener <rguenther@suse.de>
7715
7716 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7717 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7718
2ee028f1
MP
77192013-02-12 Marek Polacek <polacek@redhat.com>
7720
7721 PR c/44938
7722 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7723 origtypes to NULL.
7724
8824edff
JJ
77252013-01-24 Jakub Jelinek <jakub@redhat.com>
7726
7727 PR c/56078
7728 * c-typeck.c (set_nonincremental_init_from_string): If
7729 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7730 returned false.
7731 (process_init_element): Likewise.
7732
eadd3d0d
JJ
77332012-12-20 Jakub Jelinek <jakub@redhat.com>
7734
7735 PR c++/55619
7736 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7737 argument, don't call default_function_array_conversion
7738 nor c_fully_fold here.
7739 (c_parser_asm_statement): Adjust callers.
7740 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7741 and outputs here, and call default_function_array_conversion
7742 on inputs that don't need to be addressable.
7743
f8a93a2e
JJ
77442012-12-18 Jakub Jelinek <jakub@redhat.com>
7745
7746 PR c/39464
7747 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7748 warning require that both c_common_unsigned_type as well as
7749 c_common_signed_type is the same for both mvl and mvr types.
7750
9771b263
DN
77512012-11-16 Diego Novillo <dnovillo@google.com>
7752
7753 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7754
7755 * c-common.c: Use new vec API in vec.h.
7756 * c-common.h: Likewise.
7757 * c-gimplify.c: Likewise.
7758 * c-pragma.c: Likewise.
7759 * c-pretty-print.c: Likewise.
7760 * c-pretty-print.h: Likewise.
7761 * c-semantics.c: Likewise.
7762 * c-decl.c: Likewise.
7763 * c-parser.c: Likewise.
7764 * c-tree.h: Likewise.
7765 * c-typeck.c: Likewise.
7766
880661a4
JW
77672012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7768
7769 PR c++/54930
7770 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7771
077d1abe
MLI
77722012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7773
7774 PR c/53066
7775 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7776 shadows a function, unless the variable is a function or a
7777 pointer-to-function.
7778
3a785c97
JJ
77792012-10-12 Jakub Jelinek <jakub@redhat.com>
7780
7781 PR c/54381
7782 * c-parser.c (struct c_tree_loc_pair): Removed.
7783 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7784 add location_t * and tree * arguments, fill in array of 3
7785 sizeof_arg trees and corresponding locs.
7786 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7787 c_parser_expr_list callers.
7788 (c_parser_postfix_expression_after_primary): Likewise. Pass
7789 array of 3 sizeof_arg trees and locs (corresponding to first
7790 3 arguments) to sizeof_pointer_memaccess_warning.
7791
703c8606
LC
77922012-10-09 Lawrence Crowl <crowl@google.com>
7793
7794 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7795 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7796 hash table.
7797
5d9de0d0
PC
77982012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7799
7800 PR c++/54194
7801 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7802 call.
7803
a212e43f
MG
78042012-10-09 Marc Glisse <marc.glisse@inria.fr>
7805
7806 PR c++/54427
7807 * c-typeck.c: Include c-common.h.
7808 (enum stv_conv): Moved to c-common.h.
7809 (scalar_to_vector): Moved to c-common.c.
7810 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7811 * Make-lang.in: c-typeck.c depends on c-common.h.
7812
3b78de56
AC
78132012-10-04 Arnaud Charlet <charlet@adacore.com>
7814
7815 * c-decl.c (c_write_global_declarations): Fix handling of
7816 -fdump-ada-spec*.
7817
78c60e3d
SS
78182012-09-30 Sharad Singhai <singhai@google.com>
7819
7820 * c-decl.c (c_write_global_declarations): Use a different method
7821 to determine if the dump has ben initialized.
7822
9f33203d
JM
78232012-09-14 Joseph Myers <joseph@codesourcery.com>
7824
7825 PR c/54552
7826 * c-typeck.c (c_cast_expr): When casting to a type requiring
7827 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7828 c_fully_fold first.
7829
a27d595d
JM
78302012-09-14 Joseph Myers <joseph@codesourcery.com>
7831
7832 PR c/54103
7833 * c-typeck.c (build_unary_op): Pass original argument of
7834 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7835 any C_MAYBE_CONST_EXPR, if it has integer operands.
7836 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7837 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7838 to c_objc_common_truthvalue_conversion, then remove any
7839 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7840 c_objc_common_truthvalue_conversion not
7841 c_common_truthvalue_conversion.
7842 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7843 call note_integer_operands for arguments with integer operands
7844 that are not integer constants.
7845
9feb29df
JJ
78462012-09-13 Jakub Jelinek <jakub@redhat.com>
7847
7848 PR c/54559
7849 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7850 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7851
d409320c
JJ
78522012-08-31 Jakub Jelinek <jakub@redhat.com>
7853
7854 PR c/54428
7855 * c-convert.c (convert): Don't call fold_convert_loc if
7856 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7857 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7858 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7859
6265d07c
JJ
78602012-08-24 Jakub Jelinek <jakub@redhat.com>
7861
7862 PR c/54355
7863 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7864 for nested and empty_ok arguments in the call to
7865 c_parser_declaration_or_fndef.
7866
1a4049e7
JJ
78672012-08-17 Jakub Jelinek <jakub@redhat.com>
7868
7869 * c-tree.h (c_last_sizeof_arg): Declare.
7870 * c-parser.c (struct c_tree_loc_pair): New type.
7871 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7872 non-NULL.
7873 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7874 (c_parser_postfix_expression_after_primary): Likewise. Call
7875 sizeof_pointer_memaccess_warning if needed.
7876 (sizeof_ptr_memacc_comptypes): New function.
7877 * c-typeck.c (c_last_sizeof_arg): New global variable.
7878 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7879
0229aee9
UB
78802012-07-24 Uros Bizjak <ubizjak@gmail.com>
7881
7882 * c-lang.h (lang_decl): Add variable_size GTY option.
7883
7ee2468b
SB
78842012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7885
7886 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7887 * Make-lang.in: Fix dependencies.
7888
d4a10d0a
SB
78892012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7890
7891 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7892 and add language Makefile hooks.
7893 * config-lang.in: New file.
7894 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7895 add the required "normal" config-lang.in rules.
7896 * c-lang.h: Moved from gcc/ to here.
7897 * c-tree.h: Likewise.
7898 * c-objc-common.c: Likewise.
7899 * c-objc-common.h: Likewise.
7900 * c-typeck.c: Likewise.
7901 * c-convert.c: Likewise.
7902 * c-lang.c: Likewise.
7903 * c-aux-info.c: Likewise.
7904 * c-errors.c: Likewise.
7905 * gccspec.c: Likewise.
7906 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7907 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7908\f
c48514be 7909Copyright (C) 2012-2021 Free Software Foundation, Inc.
d4a10d0a
SB
7910
7911Copying and distribution of this file, with or without modification,
7912are permitted in any medium without royalty provided the copyright
7913notice and this notice are preserved.