]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
RISC-V: Pattern name fix mul*3_highpart -> smul*3_highpart.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
e4777439
GA
12021-09-22 Jakub Jelinek <jakub@redhat.com>
2
3 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
4 modifiers.
5
cf74e7b5
GA
62021-09-18 Jakub Jelinek <jakub@redhat.com>
7
8 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
9 and reproducible modifiers.
10 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
11
122021-09-18 Jakub Jelinek <jakub@redhat.com>
13
14 * c-parser.c (c_parser_omp_clause_default): Handle private and
15 firstprivate arguments, adjust diagnostics on unknown argument.
16
0a4cb439
GA
172021-09-17 Jakub Jelinek <jakub@redhat.com>
18
19 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
20 is true.
21
a26206ec
GA
222021-09-10 Jakub Jelinek <jakub@redhat.com>
23
24 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
25 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
26 don't call build_conditional_expr, instead build a COND_EXPR directly.
27 (c_parser_binary_expression): Avoid calling parser_build_binary_op
28 if omp_atomic_lhs even in more cases for >, < or ==.
29 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
30 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
31 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
32 * c-typeck.c (build_binary_op): For flag_openmp only handle
33 MIN_EXPR/MAX_EXPR.
34
b2748138
GA
352021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
36
37 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
38 directive.
39
e11c6046
GA
402021-09-01 Iain Sandoe <iain@sandoe.co.uk>
41
42 * c-decl.c (enum deprecated_states): Add unavailable state.
43 (merge_decls): Copy unavailability.
44 (quals_from_declspecs): Handle unavailable case.
45 (start_decl): Amend the logic handling suppression of nested
46 deprecation states to include unavailability.
47 (smallest_type_quals_location): Amend comment.
48 (grokdeclarator): Handle the unavailable deprecation state.
49 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
50 * c-tree.h (struct c_declspecs): Add unavailable_p.
51 * c-typeck.c (build_component_ref): Handle unavailability.
52 (build_external_ref): Likewise.
53
542021-09-01 Roger Sayle <roger@nextmovesoftware.com>
55 Joseph Myers <joseph@codesourcery.com>
56
57 PR c/79412
58 * c-decl.c (duplicate_decls): On significant mismatches, mark the
59 types of both (non-function) decls as error_mark_node, so that the
60 middle-end can see the code is malformed.
61 (free_attr_access_data): Don't process if the type has been set to
62 error_mark_node.
63
6d51ee43
GA
642021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
65
66 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
67 and 'ancestor' in 'target device' clauses.
68
38b19c5b
GA
692021-08-23 Jakub Jelinek <jakub@redhat.com>
70
71 * c-parser.c (c_parser_omp_clause_num_tasks,
72 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
73
5b2876f9
GA
742021-08-22 Martin Uecker <muecker@gwdg.de>
75
76 PR c/98397
77 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
78 for pointers to arrays with qualifiers.
79 (build_conditional_expr): For C23 don't lose qualifiers for pointers
80 to arrays when the other pointer is a void pointer. Update warnings.
81 (convert_for_assignment): Update warnings for C2X when converting from
82 void* with qualifiers to a pointer to array with the same qualifiers.
83
7c9e1645
GA
842021-08-20 Jakub Jelinek <jakub@redhat.com>
85
86 * c-parser.c (c_parser_omp_error): New function.
87 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
88
892021-08-20 Jakub Jelinek <jakub@redhat.com>
90
91 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
92 comma at the end of list.
93 (c_parser_omp_requires): Likewise.
94
b57fba5e
GA
952021-08-19 Jakub Jelinek <jakub@redhat.com>
96
97 * c-parser.c (c_parser_omp_requires): Don't call
98 c_parser_peek_2nd_token and optionally consume token if current
99 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
100
6e529985
GA
1012021-08-18 Jakub Jelinek <jakub@redhat.com>
102
103 * c-parser.c (c_parser_omp_nothing): New function.
104 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
105
1062021-08-18 Jakub Jelinek <jakub@redhat.com>
107
108 * c-parser.c (c_parser_statement_after_labels): Add restart label
109 near the start of the function. If c_parser_pragma returns false,
110 goto restart.
111 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
112 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
113 return what c_parser_omp_declare returned. Return true instead of
114 false after emitting errors that the directive is not allowed in
115 pragma_stmt context.
116 (c_parser_omp_ordered): Return true instead of
117 false after emitting errors that the directive is not allowed in
118 pragma_stmt context.
119 (c_parser_omp_target_update): Likewise.
120 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
121 Change return type from tree to bool, return false if the
122 directive should be ignored in pragma_stmt contexts.
123 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
124 return their result directly.
125 (c_parser_omp_cancellation_point): Change return type from void to
126 bool, return false if the directive should be ignored in pragma_stmt
127 contexts.
128 (c_parser_omp_declare): Likewise.
129
2d14d64b
GA
1302021-08-17 Jakub Jelinek <jakub@redhat.com>
131
132 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
133 (c_parser_omp_scope): New function.
134 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
135
72be20e2
GA
1362021-08-12 Jakub Jelinek <jakub@redhat.com>
137
138 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
139 (c_parser_omp_clause_filter): New function.
140 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
141 (OMP_MASKED_CLAUSE_MASK): Define.
142 (c_parser_omp_masked): New function.
143 (c_parser_omp_parallel): Handle parallel masked.
144 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
145 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
146
1472021-08-12 Martin Uecker <muecker@gwdg.de>
148
149 PR c/101838
150 PR c/29970
151 * c-typeck.c (c_expr_sizeof_type): Evaluate
152 size expressions for structs of variable size.
153
1542021-08-12 Tobias Burnus <tobias@codesourcery.com>
155
156 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
157 'primary' as alias for 'master'.
158
3ae564ea
GA
1592021-08-10 Martin Uecker <muecker@gwdg.de>
160
161 PR c/29970
162 * c-typeck.c (c_expr_sizeof_expr): Evaluate
163 size expressions for structs of variable size.
164
f92f4778
GA
1652021-08-06 Tamar Christina <tamar.christina@arm.com>
166
167 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
168 * c-tree.h (c_simulate_enum_decl): Likewise.
169
1702021-08-06 Martin Sebor <msebor@redhat.com>
171
172 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
173 vec arguments to by-reference.
174 (c_finish_omp_declare_simd): Same.
175 (c_parser_compound_statement_nostart): Same.
176 (c_parser_for_statement): Same.
177 (c_parser_objc_methodprotolist): Same.
178 (c_parser_oacc_routine): Same.
179 (c_parser_omp_for_loop): Same.
180 (c_parser_omp_declare_simd): Same.
181
419c6c68
GA
1822021-07-21 Thomas Schwinge <thomas@codesourcery.com>
183 Joseph Myers <joseph@codesourcery.com>
184 Cesar Philippidis <cesar@codesourcery.com>
185
186 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
187 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
188 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
189 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
190
92d45509
GA
1912021-07-20 Martin Sebor <msebor@redhat.com>
192
193 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
194 by-const-reference.
195 * c-typeck.c (c_build_function_call_vec): Same.
196
d97d71a1
GA
1972021-07-15 Martin Sebor <msebor@redhat.com>
198
199 PR c/101289
200 PR c/97548
201 * c-decl.c (get_parm_array_spec): Strip nops.
202
6fba0eea
GA
2032021-07-06 Martin Sebor <msebor@redhat.com>
204
205 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
206
7a60a6e8
GA
2072021-07-02 Jakub Jelinek <jakub@redhat.com>
208
209 PR c/101297
210 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
211 appears before a CPP_NAME.
212
90708f87
GA
2132021-06-25 Martin Sebor <msebor@redhat.com>
214
215 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
216 warning_suppressed_p, suppress_warning, and copy_no_warning.
217 (diagnose_mismatched_decls): Same.
218 (duplicate_decls): Same.
219 (grokdeclarator): Same.
220 (finish_function): Same.
221 (c_write_global_declarations_1): Same.
222 * c-fold.c (c_fully_fold_internal): Same.
223 * c-parser.c (c_parser_expr_no_commas): Same.
224 (c_parser_postfix_expression): Same.
225 * c-typeck.c (array_to_pointer_conversion): Same.
226 (function_to_pointer_conversion): Same.
227 (default_function_array_conversion): Same.
228 (convert_lvalue_to_rvalue): Same.
229 (default_conversion): Same.
230 (build_indirect_ref): Same.
231 (build_function_call_vec): Same.
232 (build_atomic_assign): Same.
233 (build_unary_op): Same.
234 (c_finish_return): Same.
235 (emit_side_effect_warnings): Same.
236 (c_finish_stmt_expr): Same.
237 (c_omp_clause_copy_ctor): Same.
238
9aa8327e
GA
2392021-06-24 Jakub Jelinek <jakub@redhat.com>
240
241 PR c/101176
242 * c-parser.c (c_parser_has_attribute_expression): Set source range for
243 the result.
244
2452021-06-24 Jakub Jelinek <jakub@redhat.com>
246
247 PR c/101171
248 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
249 error_mark_node.
250
2512021-06-24 Jakub Jelinek <jakub@redhat.com>
252
253 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
254 C_ORT_OMP for clauses on target construct.
255 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
256 (c_parser_omp_target): For non-combined target add
257 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
258 C_ORT_OMP_TARGET to c_finish_omp_clauses.
259 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
260 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
261 never present on C_ORT_*DECLARE_SIMD.
262 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
263 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
264 corresponding map clauses.
265
2f080224
GA
2662021-06-21 Jakub Jelinek <jakub@redhat.com>
267
268 PR inline-asm/100785
269 * c-typeck.c (c_mark_addressable): Diagnose trying to make
270 bit-fields addressable.
271
ede6c356
GA
2722021-06-15 Robin Dapp <rdapp@linux.ibm.com>
273
274 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
275 similar.
276
8dc48181
GA
2772021-06-14 Tobias Burnus <tobias@codesourcery.com>
278
279 PR c/100913
280 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
281 var in the error case.
282
438aac59
GA
2832021-06-07 Eric Botcazou <ebotcazou@adacore.com>
284
285 PR c/100920
286 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
287 spot built-in functions.
288
7d6987e9
GA
2892021-06-06 Jakub Jelinek <jakub@redhat.com>
290
291 PR c/100902
292 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
293 even when target is combined with other constructs.
294
2952021-06-06 Eric Botcazou <ebotcazou@adacore.com>
296
297 PR c/100920
298 * c-decl.c (finish_struct): Fix thinko in previous change.
299 * c-typeck.c (convert_for_assignment): Do not warn on pointer
300 assignment and initialization for storage order purposes if the
301 RHS is a call to a DECL_IS_MALLOC function.
302
600f90cb
GA
3032021-06-04 Martin Sebor <msebor@redhat.com>
304
305 PR c/100783
306 * c-objc-common.c (print_type): Handle erroneous types.
307
440c8a0a
GA
3082021-06-03 Jakub Jelinek <jakub@redhat.com>
309
310 PR c++/100859
311 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
312 after depend only cases.
313
ee682192
GA
3142021-05-31 Richard Biener <rguenther@suse.de>
315
316 PR c++/88601
317 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
318 * c-parser.c (c_parser_postfix_expression): Likewise.
319
48166757
GA
3202021-05-28 Richard Biener <rguenther@suse.de>
321
322 PR c/100803
323 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
324 invalid if conditions.
325
3262021-05-28 Jakub Jelinek <jakub@redhat.com>
327
328 PR middle-end/99928
329 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
330 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
331 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
332 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
333 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
334 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
335 if present in map_head, map_field_head or map_firstprivate_head
336 bitmaps.
337
3382021-05-28 Tobias Burnus <tobias@codesourcery.com>
339
340 * c-parser.c (c_parser_omp_clause_affinity): New.
341 (c_parser_omp_clause_name, c_parser_omp_variable_list,
342 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
343 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
344 c_finish_omp_clauses): Likewise.
345
01c59ef2
GA
3462021-05-26 Eric Botcazou <ebotcazou@adacore.com>
347
348 PR c/100653
349 * c-decl.c (finish_struct): Warn for a union containing an aggregate
350 field with a differing scalar storage order.
351
2832d51b
GA
3522021-05-21 Jakub Jelinek <jakub@redhat.com>
353
354 PR middle-end/99928
355 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
356 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
357 if a decl is mentioned both in map clause and in such firstprivate
358 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
359
65f32e5d
GA
3602021-05-19 Jakub Jelinek <jakub@redhat.com>
361
362 PR middle-end/99928
363 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
364 master when combined with taskloop.
365 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
366 parallel master when not combined with taskloop.
367
a8daf9a1
GA
3682021-05-18 Richard Biener <rguenther@suse.de>
369
370 PR c/100522
371 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
372 Diagnose calls to non-functions.
373 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
374
a7ffc1ef
GA
3752021-05-17 Richard Biener <rguenther@suse.de>
376
377 PR c/100625
378 * gimple-parser.c (c_parser_gimple_label): Avoid building
379 a GIMPLE label with NULL label decl.
380
f9af11c7
GA
3812021-05-13 Martin Sebor <msebor@redhat.com>
382
383 PR c/100550
384 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
385
0ff3a0f2
GA
3862021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
387
388 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
389 'close'.
390
aa891c56
GA
3912021-05-10 Martin Liska <mliska@suse.cz>
392
393 * c-aux-info.c (affix_data_type): Use startswith
394 function instead of strncmp.
395 * c-typeck.c (build_function_call_vec): Likewise.
396 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
397
62d87a32
GA
3982021-05-07 Eric Botcazou <ebotcazou@adacore.com>
399
400 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
401 on the address of a pointer field in a record with reverse SSO.
402
99e8df7a
GA
4032021-05-04 Tobias Burnus <tobias@codesourcery.com>
404
405 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
406 for || and && reductions.
407
3c8e539d
GA
4082021-04-29 Joseph Myers <joseph@codesourcery.com>
409
410 * c-typeck.c (function_types_compatible_p): For C2X, treat
411 unprototyped function as compatible with non-variadic prototyped
412 function even if some argument types are changed by the default
413 argument promotions.
414
ee351f7f
GA
4152021-04-15 Martin Sebor <msebor@redhat.com>
416
417 PR c/99420
418 PR c/99972
419 * c-decl.c (pushdecl): Always propagate type attribute.
420
4212021-04-15 Richard Sandiford <richard.sandiford@arm.com>
422
423 PR c/98852
424 * c-typeck.c (c_common_type): Do not drop attributes that
425 affect type identity.
426
1d54b138
GA
4272021-04-10 Jakub Jelinek <jakub@redhat.com>
428
429 PR c/99990
430 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
431 error_mark_node.
432
4493b1c1
GA
4332021-03-25 Jakub Jelinek <jakub@redhat.com>
434
435 PR c++/99565
436 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
437 to operand_equal_p.
438
5f256a70
GA
4392021-03-19 Jakub Jelinek <jakub@redhat.com>
440
441 PR c/99588
442 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
443 with modifycode NOP_EXPR produces and mark the _Atomic var as read
444 if found.
445 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
446 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
447 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
448
3c5b6d24
GA
4492021-03-15 Tobias Burnus <tobias@codesourcery.com>
450
451 PR c++/99509
452 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
453 ensure that the varpool node is marked as offloadable.
454
ceae9533
GA
4552021-03-05 Tobias Burnus <tobias@codesourcery.com>
456
457 PR c/99137
458 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
459
4028d01a
GA
4602021-02-24 Martin Sebor <msebor@redhat.com>
461
462 PR middle-end/97172
463 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
464
bf81237e
GA
4652021-02-18 Jakub Jelinek <jakub@redhat.com>
466
467 PR c/99136
468 * c-typeck.c (c_finish_return): Don't wrap retval into
469 EXCESS_PRECISION_EXPR in functions that return void.
470
0c5cdb31
GA
4712021-02-11 Marek Polacek <polacek@redhat.com>
472
473 * c-parser.c (c_parser_if_statement): Use vec_free.
474
a19dd5e6
GA
4752021-02-04 Martin Sebor <msebor@redhat.com>
476
477 PR c/97882
478 * c-decl.c (locate_old_decl): Add type to diagnostic output.
479 (diagnose_mismatched_decls): Same.
480 (start_function): Introduce temporaries for better readability.
481 * c-typeck.c (comptypes_internal): Only consider complete enum
482 types in comparisons with integers.
483
f7884fb1
GA
4842021-02-01 Martin Sebor <msebor@redhat.com>
485
486 PR middle-end/97172
487 * c-decl.c (free_attr_access_data): New function.
488 (c_parse_final_cleanups): Call free_attr_access_data.
489
59cf67d1
GA
4902021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
491
492 * c-parser.c (c_parser_omp_clause_detach): New.
493 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
494 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
495 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
496 clause. Prevent use of detach with mergeable and overriding the
497 data sharing mode of the event handle.
498
2f7f0d32
GA
4992021-01-15 Jakub Jelinek <jakub@redhat.com>
500
501 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
502 unqualified element type and then call c_build_qualified_type on the
503 ARRAY_TYPE.
504
7d187e4f
GA
5052021-01-07 Richard Biener <rguenther@suse.de>
506
507 * gimple-parser.c (c_parser_gimple_compound_statement): Only
508 reallocate loop array if it is too small.
509
eefe499f
GA
5102020-12-16 Martin Uecker <muecker@gwdg.de>
511
512 PR c/98047
513 * c-typeck.c (build_modify_expr): Drop qualifiers.
514
5152020-12-16 Martin Uecker <muecker@gwdg.de>
516
517 PR c/98260
518 * c-parser.c (c_parser_expression): Look into
519 nop expression when marking expressions as read.
520
d52945ce
GA
5212020-12-14 Martin Liska <mliska@suse.cz>
522
523 PR sanitizer/98204
524 * c-typeck.c (pointer_diff): Do not emit a top-level
525 sanitization.
526 (build_binary_op): Likewise.
527
ca2bd949
GA
5282020-12-09 Tobias Burnus <tobias@codesourcery.com>
529
530 * c-parser.c (c_parser_omp_allocate): New.
531 (c_parser_omp_construct): Call it.
532
5332020-12-09 Richard Biener <rguenther@suse.de>
534
535 PR c/98200
536 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
537 early on error.
538
bc8a7013
GA
5392020-12-07 Martin Uecker <muecker@gwdg.de>
540
541 PR c/97981
542 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
543 that drops qualifiers to the end of the function.
544
d48df6f2
GA
5452020-11-26 Martin Uecker <muecker@gwdg.de>
546
547 PR c/65455
548 PR c/92935
549 * c-parser.c (c_parser_declaration_or_fndef): Remove
550 redundant code to drop qualifiers of _Atomic types for __auto_type.
551 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
552 types for __typeof__.
553
1e2c9a27
GA
5542020-11-24 Jakub Jelinek <jakub@redhat.com>
555
556 PR c/97958
557 * c-parser.c (c_parser_binary_expression): For omp atomic binary
558 expressions, use make_node instead of build2 to avoid checking build2
559 performs.
560
8e6198d0
GA
5612020-11-23 Joseph Myers <joseph@codesourcery.com>
562
563 PR c/95630
564 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
565 for comparisons of complete and incomplete pointers.
566
7a97e2fc
GA
5672020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
568
569 * c-aux-info.c (gen_type): Support opaque types.
570
82e5048e
GA
5712020-11-20 Martin Sebor <msebor@redhat.com>
572
573 PR middle-end/97879
574 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
575
5762020-11-20 Jakub Jelinek <jakub@redhat.com>
577
578 PR other/97911
579 * Make-lang.in (c.serial): Change from goal to a variable.
580 (.PHONY): Drop c.serial.
581
5822020-11-20 Martin Uecker <muecker@gwdg.de>
583
584 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
585
d62586ee
GA
5862020-11-19 Jakub Jelinek <jakub@redhat.com>
587
588 PR c/97860
589 * c-decl.c (get_parm_array_spec): Bail out of nelts is
590 error_operand_p.
591
25bb75f8
GA
5922020-11-18 Jakub Jelinek <jakub@redhat.com>
593
594 * Make-lang.in (c.serial): New goal.
595 (.PHONY): Add c.serial c.prev.
596 (cc1$(exeext)): Call LINK_PROGRESS.
597
77f67db2
GA
5982020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
599
600 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
601 goto too.
602 * c-typeck.c (build_asm_expr): Remove an assert checking output
603 absence for asm goto.
604
6052020-11-13 Jakub Jelinek <jakub@redhat.com>
606
607 * c-typeck.c (c_finish_omp_clauses): Don't clear
608 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
609
6102020-11-13 Iain Sandoe <iain@sandoe.co.uk>
611
612 PR objc/77404
613 * c-parser.c (c_parser_objc_class_definition): Pass the
614 location of the class name to the interface declaration.
615
bb622641
GA
6162020-11-10 Strager Neds <strager.nds@gmail.com>
617
618 * c-decl.c (merge_decls): Use new overload of
619 set_decl_section_name.
620
6212020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
622
623 * c-parser.c (c_parser_omp_target_data): Add use of
624 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
625 handled map clause kind.
626 (c_parser_omp_target_enter_data): Likewise.
627 (c_parser_omp_target_exit_data): Likewise.
628 (c_parser_omp_target): Likewise.
629 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
630 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
631 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
632 same struct field access to co-exist on OpenMP construct.
633
2da7ee05
GA
6342020-11-07 Martin Uecker <muecker@gwdg.de>
635
636 * c-parser.c (c_parser_label): Implement mixing of labels and code.
637 (c_parser_all_labels): Likewise.
638
44cab2d8
GA
6392020-11-06 Iain Sandoe <iain@sandoe.co.uk>
640
641 * c-parser.c (c_parser_objc_at_property_declaration):
642 Improve parsing fidelity. Associate better location info
643 with @property attributes. Clean up the interface to
644 objc_add_property_declaration ().
645
6462020-11-06 Nathan Sidwell <nathan@acm.org>
647
648 * c-decl.c (diagnose_mismatched_decls): Rename
649 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
650 (warn_if_shadowing, implicitly_declare, names_builtin_p)
651 (collect_source_refs): Likewise.
652 * c-typeck.c (inform_declaration, inform_for_arg)
653 (convert_for_assignment): Likewise.
654
6552020-11-06 Tobias Burnus <tobias@codesourcery.com>
656
657 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
658 OpenACC matching.
659 (c_parser_omp_construct): Update call.
660
35c125cb
GA
6612020-11-04 Jakub Jelinek <jakub@redhat.com>
662
663 PR c++/97670
664 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
665 find underlying decl to clear in the aligned_head bitmap.
666
6672020-11-04 Joseph Myers <joseph@codesourcery.com>
668
669 * c-decl.c (handle_nodiscard_attribute): New.
670 (std_attribute_table): Add nodiscard.
671 * c-parser.c (c_parser_std_attribute): Expect argument to
672 nodiscard attribute to be a string. Do not special-case ignoring
673 nodiscard.
674 * c-typeck.c (maybe_warn_nodiscard): New.
675 (build_compound_expr, emit_side_effect_warnings): Call
676 maybe_warn_nodiscard.
677 (c_process_expr_stmt, c_finish_stmt_expr): Also call
678 emit_side_effect_warnings if warn_unused_result.
679
4f0606fe
GA
6802020-10-29 Asher Gordon <AsDaGo@posteo.net>
681
682 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
683 with XDELETE.
684 (finish_init): Likewise.
685 (pop_init_level): Likewise.
686
e93aae4a
GA
6872020-10-28 Joseph Myers <joseph@codesourcery.com>
688
689 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
690 error_at for omitted parameter name.
691
6922020-10-28 Jakub Jelinek <jakub@redhat.com>
693
694 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
695 (c_parser_omp_clause_allocate): New function.
696 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
697 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
698 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
699 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
700 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
701 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
702 PRAGMA_OMP_CLAUSE_ALLOCATE.
703 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
704
89bb01e7
GA
7052020-10-27 Joseph Myers <joseph@codesourcery.com>
706
707 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
708 standard attributes.
709
efe71fcc
GA
7102020-10-23 Marek Polacek <polacek@redhat.com>
711
712 PR c++/91741
713 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
714 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
715 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
716 * c-tree.h (char_type_p): Declare.
717 * c-typeck.c (char_type_p): No longer static.
718
7192020-10-23 Martin Sebor <msebor@redhat.com>
720
721 PR middle-end/97552
722 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
723
2fe5b7d1
GA
7242020-09-19 Martin Sebor <msebor@redhat.com>
725
726 PR c/50584
727 * c-decl.c (lookup_last_decl): Define new function.
728 (c_decl_attributes): Call it.
729 (start_decl): Add argument and use it.
730 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
731 (get_parm_array_spec): Define new function.
732 (push_parm_decl): Call get_parm_array_spec.
733 (start_function): Call warn_parm_array_mismatch. Build attribute
734 access and add it to current function.
735 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
736 in forms of array parameters.
737 * c-tree.h (start_decl): Add argument.
738
7392020-09-19 Sandra Loosemore <sandra@codesourcery.com>
740
741 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
742 with...
743 (in_statement): New.
744 (start_function): Adjust for above change.
745 (c_push_function_context, c_pop_function_context): Likewise.
746 * c-lang.h (struct language_function): Likewise.
747 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
748 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
749 New.
750 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
751 (c_parser_switch_statement): Adjust break/switch context handling
752 and calls to renamed functions.
753 (c_parser_while_statement): Adjust break/switch context handling and
754 build a WHILE_STMT.
755 (c_parser_do_statement): Ditto, with DO_STMT respectively.
756 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
757 (c_parser_omp_for_loop): Adjust break/switch context handling.
758 * c-tree.h (c_break_label, c_cont_label): Delete.
759 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
760 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
761 (in_statement, switch_statement_break_seen_p): Declare.
762 (c_start_case, c_finish_case): Renamed to...
763 (c_start_switch, c_finish_switch).
764 (c_finish_bc_stmt): Adjust arguments.
765 * c-typeck.c (build_function_call_vec): Don't try to print
766 statements with %qE format.
767 (struct c_switch): Rename switch_expr field to switch_stmt.
768 Add break_stmt_seen_p field.
769 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
770 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
771 (do_case): Update for changes to struct c_switch.
772 (c_finish_case): Rename to c_finish_switch. Update for changes to
773 struct c_switch and change of representation from SWITCH_EXPR to
774 SWITCH_STMT.
775 (c_finish_loop): Delete.
776 (c_finish_bc_stmt): Update to reflect changes to break/continue
777 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
778 of a GOTO_EXPR except for objc foreach loops.
779
e1a4a8a0
GA
7802020-09-01 Jakub Jelinek <jakub@redhat.com>
781
782 PR c++/96867
783 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
784 only on PARM_DECLs.
785
8f7ea26a
GA
7862020-08-28 Martin Sebor <msebor@redhat.com>
787
788 PR c/96596
789 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
790 argument type.
791
8b394f01
GA
7922020-08-27 Martin Liska <mliska@suse.cz>
793
794 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
795 growth function to true.
796
db0f6efe
GA
7972020-08-25 Tobias Burnus <tobias@codesourcery.com>
798
799 PR c/96678
800 * c-typeck.c (handle_omp_array_sections_1): Talk about
801 array function parameter in the error message.
802
5c265693
GA
8032020-08-18 Jakub Jelinek <jakub@redhat.com>
804
805 PR c/96571
806 * c-parser.c (c_parser_generic_selection): Change match_found from bool
807 to int, holding index of the match. Call mark_exp_read on the selector
808 expression and on expressions other than the selected one.
809
4967ca2f
GA
8102020-08-01 Richard Sandiford <richard.sandiford@arm.com>
811
812 PR c/96377
813 * c-typeck.c (process_init_element): Split test for whether to
814 recurse into a record, union or array into...
815 (initialize_elementwise_p): ...this new function. Don't recurse
816 into a vector type if the initialization value is also a vector.
817
48cc2e46
GA
8182020-07-31 Richard Biener <rguenther@suse.de>
819
820 PR debug/96383
821 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
822 Define to c_common_finalize_early_debug.
823
3ea9abca
GA
8242020-07-22 Tobias Burnus <tobias@codesourcery.com>
825
826 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
827 (c_parser_omp_critical): Permit hint(0) clause without named critical.
828 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
829
30430061
GA
8302020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
831
832 PR target/95237
833 * c-decl.c (finish_decl): Call target hook
834 lower_local_decl_alignment to lower local decl alignment.
835
3f8ca9cb
GA
8362020-07-09 Julian Brown <julian@codesourcery.com>
837 Thomas Schwinge <thomas@codesourcery.com>
838
839 PR middle-end/95270
840 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
841 for standalone attach/detach clauses.
842
a82c4c4c 8432020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
844
845 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
846 set, warn for conversion between pointers that point to incompatible
847 scalar storage orders.
848
f60ee68d
GA
8492020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
850
851 * c-parser.c (c_parser_statement_after_labels): Pass correct
852 parameters to c_parser_do_statement.
853
56638b9b
GA
8542020-06-16 Jakub Jelinek <jakub@redhat.com>
855
856 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
857 c_in_omp_for.
858 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
859 premature c_fully_fold. Defer explicit c_fully_fold calls to after
860 c_finish_omp_for.
861 * c-tree.h (c_in_omp_for): Declare.
862 * c-typeck.c (c_in_omp_for): Define.
863 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
864 (digest_init): Likewise.
865 (build_binary_op): Likewise.
866
8672020-06-16 Jakub Jelinek <jakub@redhat.com>
868
869 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
870 from kind by comma rather than colon.
871
1a59f3db
GA
8722020-06-05 Mark Wielaard <mark@klomp.org>
873
874 * c-decl.c (implicit_decl_warning): When warned and olddecl is
875 an undeclared builtin, then add a fixit header hint, if found.
876 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
877 warning_at about implicit builtin declaration type mismatch.
878
9a5b7438
GA
8792020-06-03 Mark Wielaard <mark@klomp.org>
880
881 * c-parser.c (struct c_parser): Add seen_string_literal
882 bitfield.
883 (c_parser_consume_token): Reset seen_string_literal.
884 (c_parser_error_richloc): Add name_hint if seen_string_literal
885 and next token is a CPP_NAME and we have a missing header
886 suggestion for the name.
887 (c_parser_string_literal): Set seen_string_literal.
888
8892020-06-03 Mark Wielaard <mark@klomp.org>
890
891 * c-parser.c (c_parser_postfix_expression_after_primary): Add
892 scope with matching_parens after CPP_OPEN_PAREN.
893
8942020-06-03 Tobias Burnus <tobias@codesourcery.com>
895
896 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
897
53ffb43a
GA
8982020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
899
900 * Make-lang.in: Remove extra slash.
901
8f66f175
ML
9022020-05-19 Martin Liska <mliska@suse.cz>
903
904 * c-parser.c: Fix typo.
905
49ddde69
JJ
9062020-05-14 Jakub Jelinek <jakub@redhat.com>
907
908 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
909
eb72dc66
RB
9102020-05-07 Richard Biener <rguenther@suse.de>
911
912 PR middle-end/94703
913 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
914 DECL_GIMPLE_REG_P.
915
bf915591
JJ
9162020-04-30 Jakub Jelinek <jakub@redhat.com>
917
918 PR c/94842
919 * c-decl.c (set_labels_context_r): In addition to context-less
920 LABEL_DECLs adjust also LABEL_DECLs with context equal to
921 parent function if any.
922 (store_parm_decls): Adjust comment.
923
e1113ffb
JJ
9242020-04-19 Jakub Jelinek <jakub@redhat.com>
925
926 PR objc/94637
927 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
928 two CPP_COLON tokens.
929
2e389749
JJ
9302020-04-17 Jakub Jelinek <jakub@redhat.com>
931
932 PR other/94629
933 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
934 to data.clauses.
935
2dc9294c
JJ
9362020-04-15 Jakub Jelinek <jakub@redhat.com>
937
938 PR c/94593
939 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
940 requires directive when not at file scope.
941
13e41d8b
TB
9422020-04-08 Tobias Burnus <tobias@codesourcery.com>
943
944 PR middle-end/94120
945 * c-decl.c (c_check_in_current_scope): New function.
946 * c-tree.h (c_check_in_current_scope): Declare it.
947 * c-parser.c (c_parser_oacc_declare): Add check that variables
948 are declared in the same scope as the directive. Fix handling
949 of namespace vars.
950
4df50a05
JJ
9512020-04-07 Jakub Jelinek <jakub@redhat.com>
952
953 PR c++/94512
954 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
955 if c_parser_omp_master succeeded.
956
5db9e893
JJ
9572020-03-23 Jakub Jelinek <jakub@redhat.com>
958
959 PR gcov-profile/94029
960 PR c/94239
961 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
962 the function_start_locus location. Don't do that afterwards for the
963 __GIMPLE body parsing.
964
9def91e9
JJ
9652020-03-19 Jakub Jelinek <jakub@redhat.com>
966
967 PR gcov-profile/94029
968 * c-tree.h (finish_function): Add location_t argument defaulted to
969 input_location.
970 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
971 set it to the locus of closing } if non-NULL.
972 (c_parser_compound_statement_nostart): Return locus of closing }.
973 (c_parser_parse_rtl_body): Likewise.
974 (c_parser_declaration_or_fndef): Propagate locus of closing } to
975 finish_function.
976 * c-decl.c (finish_function): Add end_loc argument, use it instead of
977 input_location to set function_end_locus.
978
046c5890
JJ
9792020-03-17 Jakub Jelinek <jakub@redhat.com>
980
981 PR c/94172
982 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
983 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
984 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
985 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
986 ENUMERAL_TYPEs.
987 (finish_incomplete_vars): New function, moved from finish_struct. Use
988 relayout_decl instead of layout_decl.
989 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
990 being TYPE_VFIELD. Use finish_incomplete_vars.
991 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
992 finish_incomplete_vars.
993 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
994 also on ENUMERAL_TYPEs.
995
c015ff8c
JJ
9962020-03-16 Jakub Jelinek <jakub@redhat.com>
997
998 PR c/94179
999 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1000
f2e9fe5f
MS
10012020-03-13 Martin Sebor <msebor@redhat.com>
1002
1003 PR c/94040
1004 * c-decl.c (builtin_structptr_type_count): New constant.
1005 (match_builtin_function_types): Reject decls that are incompatible
1006 in types pointed to by pointers.
1007 (diagnose_mismatched_decls): Adjust comments.
1008
c9d70946
JM
10092020-03-05 Joseph Myers <joseph@codesourcery.com>
1010
1011 PR c/93577
1012 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1013 empty when initialized type is error_mark_node.
1014 (set_designator, process_init_element): Ignore initializers for
1015 elements of a variable-size type or of error_mark_node.
1016
726e292d
MS
10172020-03-01 Martin Sebor <msebor@redhat.com>
1018
1019 PR middle-end/93926
1020 * c-decl.c (types_close_enough_to_match): New function.
1021 (match_builtin_function_types):
1022 (diagnose_mismatched_decls): Add missing inform call to a warning.
1023
a499c2f8
MS
10242020-03-01 Martin Sebor <msebor@redhat.com>
1025
1026 PR c/93812
1027 * c-typeck.c (build_functype_attribute_variant): New function.
1028 (composite_type): Call it.
1029
9c3da8cc
JJ
10302020-02-25 Jakub Jelinek <jakub@redhat.com>
1031
1032 PR other/93912
1033 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1034 Rename last argument from probablity to probability.
1035
bacdd5e9
JJ
10362020-02-13 Jakub Jelinek <jakub@redhat.com>
1037
1038 PR c/93576
1039 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1040 *expr if it has side effects.
1041
f9eb0973
JL
10422020-01-30 Jeff Law <law@redhat.com>
1043
1044 PR c/88660
1045 * c-parser.c (c_parser_switch_statement): Make sure to request
1046 marking the switch expr as used.
1047
ac68e287
JM
10482020-01-22 Joseph Myers <joseph@codesourcery.com>
1049
1050 PR c/93348
1051 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1052 argument with integer operands.
1053
852f0ae8
KK
10542020-01-16 Kerem Kat <keremkat@gmail.com>
1055
1056 PR c/92833
1057 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1058 to support 4 available tokens.
1059
e2346a33
JM
10602020-01-15 Joseph Myers <joseph@codesourcery.com>
1061
1062 PR c/93072
1063 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1064 determine whether to set DECL_CONTEXT.
1065
3d77686d
JM
10662020-01-13 Joseph Myers <joseph@codesourcery.com>
1067
1068 PR c/93241
1069 * c-typeck.c (build_c_cast): Check for expressions with integer
1070 operands that can occur in an unevaluated part of an integer
1071 constant expression and call note_integer_operands as needed.
1072
f74c4b2c
RB
10732019-01-08 Richard Biener <rguenther@suse.de>
1074
1075 PR middle-end/93199
1076 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1077 permanently.
1078
8d9254fc
JJ
10792020-01-01 Jakub Jelinek <jakub@redhat.com>
1080
1081 Update copyright years.
1082
39292e25
EB
10832019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1084
1085 * c-decl.c (collect_source_ref_cb): Delete.
1086 (for_each_global_decl): Rename into...
1087 (collect_source_refs): ...this. Call collect_source_ref directly.
1088 (c_parse_final_cleanups): Always call collect_source_ref on the main
1089 input filename.
1090
519d7496
JB
10912019-12-19 Julian Brown <julian@codesourcery.com>
1092 Cesar Philippidis <cesar@codesourcery.com>
1093
1094 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1095 detach clauses.
1096 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1097 Allow deref (->) in variable lists if true.
1098 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1099 Pass to c_parser_omp_variable_list.
1100 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1101 call to c_parser_omp_variable_list.
1102 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1103 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1104 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1105 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1106 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1107 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1108 and detach. Support deref.
1109 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1110 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1111 (c_oacc_check_attachments): New function.
1112 (c_finish_omp_clauses): Check attach/detach arguments for being
1113 pointers using above. Support deref.
1114
a6163563
JB
11152019-12-19 Julian Brown <julian@codesourcery.com>
1116 Maciej W. Rozycki <macro@codesourcery.com>
1117 Tobias Burnus <tobias@codesourcery.com>
1118 Thomas Schwinge <thomas@codesourcery.com>
1119
1120 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1121 (c_parser_oacc_data_clause): Likewise.
1122 (c_parser_oacc_all_clauses): Likewise.
1123 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1124 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1125 PRAGMA_OACC_CLAUSE_NO_CREATE.
1126 * c-typeck.c (handle_omp_array_sections): Support
1127 GOMP_MAP_NO_ALLOC.
1128
d68f5d45
DM
11292019-12-09 David Malcolm <dmalcolm@redhat.com>
1130
1131 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1132 Replace label_text ctor calls.
1133
4691bf46
JM
11342019-12-04 Joseph Myers <joseph@codesourcery.com>
1135
1136 PR c/36941
1137 PR c/88827
1138 * c-typeck.c (convert_lvalue_to_rvalue): Call
1139 require_complete_type for arguments not of void types.
1140 (build_indirect_ref): Do not diagnose dereferencing pointers to
1141 incomplete types.
1142 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1143
85d11957
JM
11442019-12-03 Joseph Myers <joseph@codesourcery.com>
1145
1146 PR c/88704
1147 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1148 old-style parameter definitions.
1149
4569f8b3
SL
11502019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1151
1152 PR target/92499
1153
1154 * c-decl.c (flexible_array_type_p): Move to common code.
1155
65ef05d0
RS
11562019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1157
1158 * c-decl.c (start_decl): Allow initialization of variables whose
1159 size is a POLY_INT_CST.
1160 (finish_decl): Use verify_type_context to check whether the target
1161 allows variables with a particular type to have static or thread-local
1162 storage duration. Don't raise a second error if such variables do
1163 not have a constant size.
1164 (grokdeclarator): Use verify_type_context to check whether the
1165 target allows fields or array elements to have a particular type.
1166 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1167 the target allows pointer difference for the types involved.
1168 (build_unary_op): Likewise for pointer increment and decrement.
1169
34b43828
JM
11702019-11-29 Joseph Myers <joseph@codesourcery.com>
1171
1172 * c-parser.c (struct c_parser): Add members raw_tokens and
1173 raw_tokens_used.
1174 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1175 using previously-lexed raw tokens.
1176 (c_parser_peek_nth_token_raw)
1177 (c_parser_check_balanced_raw_token_sequence): New functions.
1178 (c_parser_nth_token_starts_std_attributes): Use
1179 c_parser_check_balanced_raw_token_sequence for Objective-C.
1180
5b8d9367
JM
11812019-11-25 Joseph Myers <joseph@codesourcery.com>
1182
1183 PR c/91985
1184 * c-decl.c (finish_declspecs): Use int instead of decimal
1185 floating-point types if decimal floating-point not supported.
1186
1723e1be
JM
11872019-11-25 Joseph Myers <joseph@codesourcery.com>
1188
1189 * c-tree.h (struct c_declarator): Use a structure for id member.
1190 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1191 declarators at the start, not when handling individual declarators
1192 later. Use u.id.id instead of u.id.
1193 (grokfield): Use u.id.id instead of u.id.
1194 (build_id_declarator): Set u.id.id and u.id.attrs.
1195 (finish_declspecs): Handle postfix attributes in case of typedef
1196 name or typeof used.
1197 * c-parser.c (c_parser_direct_declarator)
1198 (c_parser_direct_declarator_inner): Place declarator for
1199 attributes inside that for function or array, not outside. Set
1200 u.id.attrs for identifiers.
1201 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1202 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1203 instead of u.id.
1204
bdaf8be1
JJ
12052019-11-22 Jakub Jelinek <jakub@redhat.com>
1206
1207 PR c/90677
1208 * c-decl.c (identifier_global_tag): Define.
1209
3e00ba47
RB
12102019-11-20 Richard Biener <rguenther@suse.de>
1211
1212 PR c/92088
1213 * c-decl.c (grokdeclarator): Prevent inlining of nested
1214 function with VLA arguments.
1215
8c5b727a
JM
12162019-11-20 Joseph Myers <joseph@codesourcery.com>
1217
1218 * c-decl.c (c_warn_type_attributes): New function.
1219 (groktypename, grokdeclarator, finish_declspecs): Call
1220 c_warn_type_attributes before applying attributes to types.
1221 * c-tree.h (c_warn_type_attributes): Declare.
1222
192961ff
JM
12232019-11-19 Joseph Myers <joseph@codesourcery.com>
1224
1225 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1226 standard attributes.
1227 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1228 pedwarn for unknown standard attributes and return error_mark_node
1229 for them.
1230
20a38017
MM
12312019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1232
1233 * c-parser.c (c_parser_parse_rtl_body): Always call
1234 run_rtl_passes, even if startwith pass is not provided.
1235
d5fbe5e0
JM
12362019-11-15 Joseph Myers <joseph@codesourcery.com>
1237
1238 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1239 duplicate standard attributes.
1240
97cc1187
JM
12412019-11-15 Joseph Myers <joseph@codesourcery.com>
1242
1243 * c-decl.c (std_attribute_table): Add maybe_unused.
1244
f8aea5e3
JM
12452019-11-15 Joseph Myers <joseph@codesourcery.com>
1246
1247 * c-decl.c (std_attribute_table): Add fallthrough.
1248 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1249 attribute at top level.
1250
2cc94aa8
JM
12512019-11-15 Joseph Myers <joseph@codesourcery.com>
1252
1253 * c-decl.c (std_attribute_table): New.
1254 (c_init_decl_processing): Register attributes from
1255 std_attribute_table.
1256 * c-parser.c (c_parser_attribute_arguments): Add arguments
1257 require_string and allow_empty_args. All callers changed.
1258 (c_parser_std_attribute): Set require_string argument for
1259 "deprecated" attribute.
1260
7c5890cc
JM
12612019-11-14 Joseph Myers <joseph@codesourcery.com>
1262
1263 * c-parser.c (c_parser_postfix_expression)
1264 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1265 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1266
e8738f4e
RS
12672019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1268
1269 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1270 of build_same_sized_truth_vector_type.
1271 (build_vec_cmp): Likewise.
1272
b2417b59
JJ
12732019-11-14 Jakub Jelinek <jakub@redhat.com>
1274
bedb7f04
JJ
1275 * c-parser.c (c_parser_omp_context_selector): Don't require score
1276 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1277 negative score.
1278
b2417b59
JJ
1279 * c-parser.c (c_parser_omp_context_selector): Rename
1280 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1281 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1282 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1283 and string literals.
1284
4e03c3a7
JM
12852019-11-14 Joseph Myers <joseph@codesourcery.com>
1286
1287 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1288 ctsk_tagfirstref_attrs.
1289 (struct c_declspecs): Update description of attrs. Add
1290 postfix_attrs and non_std_attrs_seen_p. Increase size of
1291 typespec_kind bit-field.
1292 (c_warn_unused_attributes): New declaration.
1293 (parser_xref_tag): Update prototype.
1294 * c-decl.c (c_warn_unused_attributes): New function.
1295 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1296 ctsk_tagref_attrs. Handle attribute declarations.
1297 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1298 (grokdeclarator): Handle standard attributes.
1299 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1300 attributes to incomplete type reference.
1301 (xref_tag): Update call to parser_xref_tag.
1302 (declspecs_add_addrspace, declspecs_add_type)
1303 (declspecs_add_scspec, declspecs_add_attrs): Set
1304 non_std_attrs_seen_p.
1305 (finish_declspecs): Apply postfix standard attributes to type.
1306 * c-parser.c (c_token_starts_declspecs)
1307 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1308 (c_parser_next_tokens_start_declaration): Update comments.
1309 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1310 parser->tokens[2] to parser->tokens[1].
1311 (c_parser_nth_token_starts_std_attributes)
1312 (c_parser_std_attribute_specifier_sequence): New functions.
1313 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1314 attrs. All callers changed. Handle standard attributes.
1315 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1316 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1317 All callers changed.
1318 (c_parser_declspecs): Add arguments start_std_attr_ok and
1319 end_std_attr_ok. All callers changed. Handle standard
1320 attributes.
1321 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1322 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1323 (c_parser_compound_statement_nostart, c_parser_all_labels)
1324 (c_parser_label, c_parser_statement, c_parser_for_statement):
1325 Handle standard attributes.
1326 * c-parser.h (c_parser_declspecs): Update prototype.
1327 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1328 c_parser_declspecs.
1329
0c29cac4
ML
13302019-11-12 Martin Liska <mliska@suse.cz>
1331
1332 * gimple-parser.c: Do not include params.h.
1333
028d4092
ML
13342019-11-12 Martin Liska <mliska@suse.cz>
1335
1336 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1337 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1338 macro.
1339
62aee289
MR
13402019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1341 Frederik Harwath <frederik@codesourcery.com>
1342
1343 gcc/c/
1344 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1345 (c_parser_oacc_kernels_parallel): Rename function to...
1346 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1347 (c_parser_omp_construct): Update accordingly.
1348
1349
7cec9588
JJ
13502019-11-11 Jakub Jelinek <jakub@redhat.com>
1351
1352 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1353 without corresponding end declare target.
1354
f486280c
RS
13552019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1356
1357 * c-convert.c (convert): Only handle vector conversions if one of
1358 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1359 allows it.
1360 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1361 vectors satisfy gnu_vector_type_p.
1362 (build_unary_op): Only allow unary operators to be applied to
1363 vectors if they satisfy gnu_vector_type_p.
1364 (digest_init): Only allow by-element initialization of vectors
1365 if they satisfy gnu_vector_type_p.
1366 (really_start_incremental_init): Likewise.
1367 (push_init_level): Likewise.
1368 (pop_init_level): Likewise.
1369 (process_init_element): Likewise.
1370 (build_binary_op): Only allow binary operators to be applied to
1371 vectors if they satisfy gnu_vector_type_p.
1372
017c6491
JM
13732019-11-08 Joseph Myers <joseph@codesourcery.com>
1374
1375 * c-decl.c (grokparms): Convert () in a function definition to
1376 (void) for C2x.
1377 (store_parm_decls_oldstyle): Pedwarn for C2x.
1378 (store_parm_decls): Update comment about () not generating a
1379 prototype.
1380
c01bd174
JM
13812019-11-07 Joseph Myers <joseph@codesourcery.com>
1382
1383 * c-parser.c (c_parser_attribute_arguments): New function.
1384 Factored out of c_parser_gnu_attribute.
1385 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1386 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1387 (c_parser_std_attribute_specifier): New functions.
1388 (c_parser_transaction_attributes): Use
1389 c_parser_std_attribute_specifier.
1390
471c5330
JM
13912019-11-07 Joseph Myers <joseph@codesourcery.com>
1392
1393 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1394 lex_joined_string and translate_strings_p.
1395 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1396 c_lex_with_flags.
1397 (c_parser_string_literal): New function.
1398 (c_parser_static_assert_declaration_no_semi): Use
1399 c_parser_string_literal. Do not set lex_untranslated_string.
1400 (c_parser_asm_string_literal): Use c_parser_string_literal.
1401 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1402 (c_parser_gnu_attributes): Set and restore translate_strings_p
1403 instead of lex_untranslated_string.
1404 (c_parser_asm_statement): Do not set lex_untranslated_string.
1405 (c_parser_asm_operands): Likewise.
1406 (c_parser_has_attribute_expression): Set and restore
1407 translate_strings_p instead of lex_untranslated_string.
1408 (c_parser_postfix_expression): Use c_parser_string_literal.
1409 (pragma_lex): Likewise.
1410 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1411 (c_parse_file): Set translate_strings_p.
1412 * gimple-parser.c (c_parser_gimple_postfix_expression)
1413 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1414 * c-parser.c (c_parser_string_literal): Declare function.
1415
d0c464d2
JJ
14162019-11-02 Jakub Jelinek <jakub@redhat.com>
1417
1418 * c-parser.c (c_finish_omp_declare_variant): Use
1419 omp_get_context_selector instead of c_omp_get_context_selector.
1420
ac2cfa6c
RS
14212019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1422
1423 * c-tree.h (c_simulate_enum_decl): Declare.
1424 * c-decl.c (c_simulate_enum_decl): New function.
1425 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1426
74078538
RS
14272019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1428
1429 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1430 * c-decl.c (c_simulate_builtin_function_decl): New function.
1431 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1432 to the above.
1433
ad1539d5
MS
14342019-10-28 Martin Sebor <msebor@redhat.com>
1435
1436 PR c/66970
1437 * c-decl.c (names_builtin_p): Define a new function.
1438
cb73e4e7
RB
14392019-10-28 Richard Biener <rguenther@suse.de>
1440
1441 PR c/92249
1442 * gimple-parser.c (c_parser_parse_gimple_body): Make
1443 current_bb the entry block initially to easier recover
1444 from errors.
1445 (c_parser_gimple_compound_statement): Adjust.
1446
135df52c
JJ
14472019-10-24 Jakub Jelinek <jakub@redhat.com>
1448
1449 * c-parser.c (c_finish_omp_declare_variant): Use
1450 omp_context_selector_matches instead of
1451 c_omp_context_selector_matches.
1452 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1453 attribute in between declare target and end declare target
1454 pragmas.
1455
783bfe5e
JM
14562019-10-15 Joseph Myers <joseph@codesourcery.com>
1457
1458 * c-parser.c (c_parser_attribute_any_word): Rename to
1459 c_parser_gnu_attribute_any_word. All callers changed.
1460 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1461 callers changed.
1462 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1463 callers changed.
1464 (c_parser_declaration_or_fndef, c_parser_declspecs)
1465 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1466 (c_parser_struct_declaration, c_parser_declarator)
1467 (c_parser_gnu_attribute, c_parser_compound_statement)
1468 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1469 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1470 attribute-related syntax productions.
1471
56898e43
RS
14722019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1473
1474 * c-objc-common.c (useful_aka_type_p): Replace with...
1475 (get_aka_type): ...this new function. Given the original type,
1476 decide which aka type to print (if any). Only look through typedefs
1477 if user_facing_original_type_p.
1478 (print_type): Update accordingly.
1479
b9424661
JJ
14802019-10-14 Jakub Jelinek <jakub@redhat.com>
1481
1482 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1483 into int NESTED, if it is 2, diagnose missing commas in between
1484 clauses.
1485 (c_parser_omp_context_selector): Pass 2 as last argument to
1486 c_parser_omp_all_clauses.
1487
20de9568
JJ
14882019-10-12 Jakub Jelinek <jakub@redhat.com>
1489
1490 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1491 For simd properties, put them directly into TREE_VALUE.
1492 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1493 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1494 add "omp declare variant base" attribute rather than
1495 "omp declare variant".
1496
fe2bc27c
JM
14972019-10-11 Joseph Myers <joseph@codesourcery.com>
1498
1499 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1500
94e7f906
JJ
15012019-10-10 Jakub Jelinek <jakub@redhat.com>
1502
1503 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1504 true, terminate processing on closing paren and don't skip to end of
1505 pragma line.
1506 (c_parser_omp_declare_simd): Handle also declare variant.
1507 (omp_construct_selectors, omp_device_selectors,
1508 omp_implementation_selectors, omp_user_selectors): New variables.
1509 (c_parser_omp_context_selector,
1510 c_parser_omp_context_selector_specification,
1511 c_finish_omp_declare_variant): New functions.
1512 (c_finish_omp_declare_simd): Handle both declare simd and
1513 declare variant.
1514 (c_parser_omp_declare): Handle declare variant.
1515
93313b94
JM
15162019-10-02 Joseph Myers <joseph@codesourcery.com>
1517
1518 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1519 CPP_COLON tokens.
1520
55879815
RS
15212019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1522
1523 * c-objc-common.c (useful_aka_type_p): New function.
1524 (print_type): Use it to decide whether an aka type is worth printing.
1525
59bc434a
JJ
15262019-09-27 Jakub Jelinek <jakub@redhat.com>
1527
1528 PR c++/88203
1529 * c-parser.c (c_parser_predefined_identifier): New function.
1530 (c_parser_postfix_expression): Use it.
1531 (c_parser_omp_variable_list): Parse predefined identifiers.
1532 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1533 in shared and firstprivate clauses, even when they are predetermined
1534 shared.
1535
c6447c20
RS
15362019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1537
1538 * c-typeck.c (build_function_call_vec): Take the original function
1539 decl as an optional final parameter. Pass all built-in calls to
1540 check_builtin_function_arguments.
1541
522da4c2
EB
15422019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1543
1544 PR c/91815
1545 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1546 of identifiers in the external scope only for variables and functions.
1547
68e2c199
PK
15482019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1549
1550 PR c/78736
1551 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1552
22f8849d
IS
15532019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1554
1555 PR pch/61250
1556 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1557 after determining that the first token is not
1558 PRAGMA_GCC_PCH_PREPROCESS.
1559
db376f45
EB
15602019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1561
1562 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1563 FUNCTION_DECL to the right value in the presence of nested declarators.
1564
4d732405
RS
15652019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1566
1567 PR middle-end/91421
1568 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1569
cb1180d5
RS
15702019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1571
1572 PR middle-end/91421
1573 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1574 of a built_in_function.
1575 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1576
77eb117f
JJ
15772019-08-10 Jakub Jelinek <jakub@redhat.com>
1578
1579 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1580 (c_parser_omp_clause_device_type): New function.
1581 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1582 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1583 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1584 diagnostics for declare target with clauses nested in clause-less
1585 declare target declaration-definition-seq.
1586 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1587
2c3b8bad
JJ
15882019-08-09 Jakub Jelinek <jakub@redhat.com>
1589
bb522e2e
JJ
1590 * c-parser.c (check_no_duplicate_clause): Simplify using
1591 omp_find_clause.
1592 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1593 directive name modifiers.
1594 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1595
2c3b8bad
JJ
1596 PR c/91401
1597 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1598 check_no_duplicate_clause call. Comment it out, instead emit a
1599 warning for duplicate dist_schedule clauses.
1600
99769e7f
RS
16012019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1602
1603 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1604
8860d270
JJ
16052019-08-08 Jakub Jelinek <jakub@redhat.com>
1606
1607 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1608 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1609 instead of generic_head to track duplicates.
1610
398e3feb
JJ
16112019-08-07 Jakub Jelinek <jakub@redhat.com>
1612
1613 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1614 (c_parser_omp_clause_use_device_addr): New function.
1615 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1616 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1617 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1618 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1619 map or use_device_* clauses.
1620 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1621 in OpenMP, require pointer type rather than pointer or array type.
1622 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1623
a28351e7
JJ
16242019-07-31 Jakub Jelinek <jakub@redhat.com>
1625
1626 PR c/91192
1627 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1628 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1629 case.
1630
6343b6bf
ML
16312019-07-25 Martin Liska <mliska@suse.cz>
1632 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1633
1634 PR c++/23383
1635 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1636
cb50701e
ML
16372019-07-25 Martin Liska <mliska@suse.cz>
1638
1639 * c-decl.c (merge_decls): Use new macros
1640 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1641
62e3e66f
RB
16422019-07-23 Richard Biener <rguenther@suse.de>
1643
1644 PR tree-optimization/83518
1645 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1646 a CFG also rebuild cgraph edges.
1647
554a530f
JJ
16482019-07-20 Jakub Jelinek <jakub@redhat.com>
1649
1650 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1651 (c_parser_omp_clause_bind): New function.
1652 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1653 (OMP_LOOP_CLAUSE_MASK): Define.
1654 (c_parser_omp_loop): New function.
1655 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1656 loop combined with parallel or teams.
1657 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1658 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1659
d119bf79
RS
16602019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1661
1662 PR c/53633
1663 * c-decl.c (finish_function): Check targetm.warn_func_return
1664 before issuing a -Wreturn-type warning.
1665
ab20d992 16662019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1667
1668 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1669 (c_parser_compound_statement): Call it.
1670
1fdd6f04
JJ
16712019-07-12 Jakub Jelinek <jakub@redhat.com>
1672
1673 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1674 (c_parser_omp_clause_order): New function.
1675 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1676 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1677 PRAGMA_OMP_CLAUSE_ORDER.
1678 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1679
8389386c
RB
16802019-07-10 Richard Biener <rguenther@suse.de>
1681
1682 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1683 _Literal (int *) &x for address literals.
1684
99b1c316
MS
16852019-07-09 Martin Sebor <msebor@redhat.com>
1686
1687 PR c++/61339
1688 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1689 to class.
1690 (field_decl_cmp): Same.
1691 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1692 * c-tree.h: Same.
1693 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1694
6c1dae73
MS
16952019-07-09 Martin Sebor <msebor@redhat.com>
1696
1697 PR c++/61339
1698 * c-decl.c: Change class-key from class to struct and vice versa
1699 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1700 * gimple-parser.c: Same.
1701
69b5279e
RB
17022019-07-01 Richard Biener <rguenther@suse.de>
1703
1704 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1705 _Literal (char *) &"foo" for address literals pointing to
1706 STRING_CSTs.
1707
ab20d992
JJ
17082019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1709
1710 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1711 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1712 C incompatibility if alternate "__intN__" form is used.
1713
1e3d475e
MS
17142019-06-24 Martin Sebor <msebor@redhat.com>
1715
1716 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1717
bf38f7e9
JJ
17182019-06-10 Jakub Jelinek <jakub@redhat.com>
1719
1720 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1721 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1722 (c_parser_omp_scan_loop_body): New function.
1723 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1724 inscan reduction clauses.
1725 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1726 non-inscan reductions on the same construct, or inscan reductions with
1727 ordered or schedule clauses, or inscan array reductions.
1728
65985d78
MS
17292019-06-05 Martin Sebor <msebor@redhat.com>
1730
1731 PR c/90737
1732 * c-typeck.c (c_finish_return): Only consider functions returning
1733 pointers as candidates for -Wreturn-local-addr.
1734
0ecf545c
MS
17352019-06-05 Martin Sebor <msebor@redhat.com>
1736
1737 * c-decl.c (start_decl): Adjust quoting and hyphenation
1738 in diagnostics.
1739 (finish_decl): Same.
1740 (finish_enum): Same.
1741 (start_function): Same.
1742 (declspecs_add_type): Same.
1743 * c-parser.c (warn_for_abs): Same.
1744 * c-typeck.c (build_binary_op): Same.
1745
e03436e7
TS
17462019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1747
b48f44bf
TS
1748 PR c/89433
1749 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1750 marked with an OpenACC 'routine' directive.
1751
5bf04509
TS
1752 PR c/89433
1753 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1754 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1755
e03436e7
TS
1756 PR c/89433
1757 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1758 clauses from "omp declare target" attribute.
1759
a9c697b8
MS
17602019-05-16 Martin Sebor <msebor@redhat.com>
1761
ab20d992
JJ
1762 * c-decl.c (start_decl): Quote keywords, operators, and
1763 types in diagnostics.
1764 (finish_decl): Same.
1765 * c-parser.c (c_parser_asm_statement): Same.
1766 (c_parser_conditional_expression): Same.
1767 (c_parser_transaction_cancel): Same.
1768 * c-typeck.c (c_common_type): Same.
1769 (build_conditional_expr): Same.
1770 (digest_init): Same.
1771 (process_init_element): Same.
1772 (build_binary_op): Same.
a9c697b8 1773
c4499192
RB
17742019-05-17 Richard Biener <rguenther@suse.de>
1775
1776 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1777 (c_parser_gimple_unary_expression): Likewise.
1778 (c_parser_gimple_parentized_ternary_expression): New function.
1779
adfe6e4b
RB
17802019-05-16 Richard Biener <rguenther@suse.de>
1781
1782 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1783 (c_parser_gimple_unary_expression): Likewise.
1784
186dabf2
RB
17852019-05-15 Richard Biener <rguenther@suse.de>
1786
1787 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1788 __BIT_FIELD_REF.
1789
1158c5b4
RB
17902019-05-14 Richard Biener <rguenther@suse.de>
1791
1792 * gimple-parser.c (c_parser_gimple_statement): Remove
1793 questionable auto-promotion to VIEW_CONVERT_EXPR.
1794 (c_parser_gimple_typespec): Split out from __MEM parsing.
1795 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1796 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1797 as __VIEW_CONVERT with -gimple.
1798
fd4485aa
ML
17992019-05-09 Martin Liska <mliska@suse.cz>
1800
1801 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1802 __MAX.
1803 (c_parser_gimple_unary_expression): Parse also binary expression
1804 __MIN and __MAX.
1805 (c_parser_gimple_parentized_binary_expression): New function.
1806
d276406a
ML
18072019-05-09 Martin Liska <mliska@suse.cz>
1808
1809 * gimple-parser.c (struct gimple_parser): Add probability.
1810 for gimple_parser_edge.
1811 (gimple_parser::push_edge): Add new argument probability.
1812 (c_parser_gimple_parse_bb_spec): Parse also probability
1813 if present.
1814 (c_parser_parse_gimple_body): Set edge probability.
1815 (c_parser_gimple_compound_statement): Consume token
1816 before calling c_parser_gimple_goto_stmt.
1817 Parse BB counts.
1818 (c_parser_gimple_statement): Pass new argument.
1819 (c_parser_gimple_goto_stmt): Likewise.
1820 (c_parser_gimple_if_stmt): Likewise.
1821 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1822 * c-parser.c (c_parser_declaration_or_fndef): Pass
1823 hot_bb_threshold argument.
1824 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1825 field.
1826 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1827
f179b64e
JJ
18282019-04-26 Jakub Jelinek <jakub@redhat.com>
1829
1830 PR debug/90197
1831 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1832 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1833 (c_parser_do_statement): Likewise.
1834 (c_parser_for_statement): Likewise. Formatting fixes.
1835 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1836 emit DEBUG_BEGIN_STMTs if needed.
1837
e7178413
JJ
18382019-04-19 Jakub Jelinek <jakub@redhat.com>
1839
c280b7ee
JJ
1840 PR c/89888
1841 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1842 (c_start_case): Don't clear it.
1843 (do_case): Adjust c_add_case_label caller.
1844 (c_finish_case): Adjust c_do_switch_warnings caller.
1845
e7178413
JJ
1846 PR c++/90108
1847 * c-decl.c (merge_decls): If remove is main variant and
1848 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1849 variant that has newdecl as TYPE_NAME if any.
1850
60a2c645
JJ
18512019-04-12 Jakub Jelinek <jakub@redhat.com>
1852
1853 PR c/89933
1854 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1855 don't try to remove it from the variant list, but instead assert
1856 it has no variants.
1857
2a82beaa
RB
18582019-04-01 Richard Biener <rguenther@suse.de>
1859
1860 PR c/71598
1861 * c-tree.h (c_get_alias_set): Declare.
1862 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1863 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1864 as the underlying integer type.
1865
bec1da64
MS
18662019-03-19 Martin Sebor <msebor@redhat.com>
1867
1868 PR tree-optimization/89688
1869 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1870 kinds of initializers.
1871
855cd9b1
JJ
18722019-03-19 Jakub Jelinek <jakub@redhat.com>
1873
1874 PR c/89734
1875 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1876 return type even if quals_used is 0. Formatting fixes.
1877
baa09dc5
RB
18782019-03-14 Richard Biener <rguenther@suse.de>
1879
1880 * c-tree.h (enum c_declspec_il): New.
1881 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1882 enum bitfield.
1883 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1884 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1885 (c_parser_declspecs): Adjust.
1886 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1887 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1888 and bitmap.h.
1889 (struct gimple_parser): New.
1890 (gimple_parser::push_edge): New method.
1891 (c_parser_gimple_parse_bb_spec): New helper.
1892 (c_parser_parse_gimple_body): Get start pass and IL specification.
1893 Initialize SSA and CFG.
1894 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1895 Build a gimple_parser parsing state and pass it along.
1896 (c_parser_gimple_statement): Change intermittend __PHI internal
1897 function argument for the edge.
1898 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1899 (c_parser_gimple_goto_stmt): Record edges to build.
1900 (c_parser_gimple_if_stmt): Likewise.
1901 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1902 (c_parser_gimple_or_rtl_pass_list): Likewise.
1903
a3f9f006
ML
19042019-03-11 Martin Liska <mliska@suse.cz>
1905
1906 * c-decl.c (check_for_loop_decls): Wrap an option name
1907 in a string format message and fix GNU coding style.
1908 * c-parser.c (c_parser_declspecs): Likewise.
1909
1db01ff9
JJ
19102019-03-08 Jakub Jelinek <jakub@redhat.com>
1911
1912 PR tree-optimization/89550
1913 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1914 returned true.
1915 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1916 or warning returned true.
1917
66dcb747
JJ
19182019-02-28 Jakub Jelinek <jakub@redhat.com>
1919
1920 PR c/89525
1921 * c-typeck.c (convert_arguments): Call inform_declaration only if
1922 the previous warning_at call returned true.
1923
2263c9f2
TS
19242019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1925
1926 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1927 parameter. Adjust all users.
1928 (c_parser_oacc_simple_clause): Replace parser with loc formal
1929 parameter. Adjust all users.
1930
ab20d992 19312019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1932
1933 PR c/87924
1934 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1935 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1936
5f88ba10
JJ
19372019-02-15 Jakub Jelinek <jakub@redhat.com>
1938
1939 PR c/89340
1940 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1941 before c_decl_attributes rather than after it.
1942
cfc30fd1
JJ
19432019-02-06 Jakub Jelinek <jakub@redhat.com>
1944
1945 PR c/89211
1946 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1947 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1948 instead of 3 nested ifs.
1949
fbe83e6b
JM
19502019-02-06 Joseph Myers <joseph@codesourcery.com>
1951
1952 PR c/88584
1953 * c-decl.c (finish_decl): Do not complete array types for arrays
1954 with external linkage not at file scope.
1955
f461f938
RB
19562019-02-05 Richard Biener <rguenther@suse.de>
1957
1958 PR c/88606
1959 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1960 all type variants when not supported.
1961
fe509359
JJ
19622019-01-30 Jakub Jelinek <jakub@redhat.com>
1963
1964 PR c/89061
1965 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1966 * c-decl.c (decl_jump_unsafe): Return false for
1967 C_DECL_COMPOUND_LITERAL_P decls.
1968 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1969
6a335b96
JJ
19702019-01-29 Jakub Jelinek <jakub@redhat.com>
1971
f4b7e754
JJ
1972 PR c/89045
1973 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1974 scope.
1975
6a335b96
JJ
1976 PR c/86125
1977 * c-decl.c (last_fileptr_type): Remove.
1978 (last_structptr_types): New variable.
1979 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1980 {old,new}rettype instead of the types themselves. Assert
1981 last_structptr_types array has the same number of elements
1982 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1983 argument oldtype and newtype. Instead of handling
1984 just fileptr_type_node specially, handle all builtin_structptr_types
1985 pointer nodes. Formatting fix.
1986
d8b5a1a0
MS
19872019-01-24 Martin Sebor <msebor@redhat.com>
1988
1989 PR c/86125
1990 PR c/88886
1991 PR middle-end/86308
1992 * c-decl.c (match_builtin_function_types): Add arguments.
1993 (diagnose_mismatched_decls): Diagnose mismatched declarations
1994 of built-ins more strictly.
1995
e21c4491
JJ
19962019-01-24 Jakub Jelinek <jakub@redhat.com>
1997
1998 PR c++/88976
1999 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2000 on #pragma omp cancel with different modifiers.
2001
420183d9
L
20022019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2003
2004 PR c/51628
2005 PR c/88664
2006 * c-typeck.c (convert_for_assignment): Upate the
2007 warn_for_address_or_pointer_of_packed_member call.
2008
17ad43dd
TH
20092019-01-16 Tom Honermann <tom@honermann.net>
2010 Jason Merrill <jason@redhat.com>
2011
2012 * c-typeck.c (digest_init): Revised the error message produced for
2013 ill-formed cases of array initialization with a string literal.
2014 (error_init): Make variadic.
2015
5f07d78a
JJ
20162019-01-12 Jakub Jelinek <jakub@redhat.com>
2017
2018 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2019
c4581bbf
JJ
20202019-01-07 Jakub Jelinek <jakub@redhat.com>
2021
2022 PR c/88701
2023 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2024 if current_function_decl is non-NULL.
2025
65c5b1eb
JM
20262019-01-07 Joseph Myers <joseph@codesourcery.com>
2027
2028 PR c/88720
2029 PR c/88726
2030 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2031 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2032 functions declared but never defined only for external scope, not
2033 for other scopes.
2034
d8fcab68
JJ
20352019-01-07 Jakub Jelinek <jakub@redhat.com>
2036
2037 PR c++/85052
2038 * c-parser.c (c_parser_postfix_expression): Parse
2039 __builtin_convertvector.
2040
a5544970
JJ
20412019-01-01 Jakub Jelinek <jakub@redhat.com>
2042
2043 Update copyright years.
2044
da77eace
L
20452018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2046
2047 PR c/51628
2048 * c-typeck.c (convert_for_assignment): Call
2049 warn_for_address_or_pointer_of_packed_member.
2050
1edf8866
SB
20512018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2052
2053 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2054 a more specific error message (instead of just falling through).
2055
db4fd626
SB
20562018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2057
2058 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2059 asm qualifier is first seen; use that to give nicer "duplicate asm
2060 qualifier" messages. Delete 'quals" variable, instead pass the
2061 "is_volatile_ flag to build_asm_stmt directly.
2062 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2063 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2064
9c9cfcbb
SB
20652018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2066
2067 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2068 "done" boolean variable.
2069
a14feb3c
DM
20702018-12-19 David Malcolm <dmalcolm@redhat.com>
2071
2072 PR c++/87504
2073 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2074 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2075 (build_binary_op): Use struct op_location_t and
2076 class binary_op_rich_location.
2077
6d939173
JJ
20782018-12-11 Jakub Jelinek <jakub@redhat.com>
2079
2080 PR sanitizer/88426
2081 * c-convert.c (convert): Call c_fully_fold before calling
2082 ubsan_instrument_float_cast.
2083
b7055028
SB
20842018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2085
2086 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2087 setting "quals".
2088
5b76e75f
SB
20892018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2090
2091 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2092 after asm. Pass a flag for it to build_asm_expr.
2093 * c-tree.h (build_asm_expr): Update declaration.
2094 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2095 set ASM_INLINE_P.
2096
30bd42b9
SB
20972018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2098
2099 PR inline-asm/55681
2100 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2101 combination of volatile and goto, in any order, without repetitions.
2102
9df6c0e4
JB
21032018-12-04 James Norris <jnorris@codesourcery.com>
2104 Cesar Philippidis <cesar@codesourcery.com>
2105 Julian Brown <julian@codesourcery.com>
2106
2107 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2108 code.
2109
f44697b7
RB
21102018-11-30 Richard Biener <rguenther@suse.de>
2111
2112 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2113 _Literal (type) { ... } as empty aggregate or vector constructor.
2114
550dfbdc
MS
21152018-11-29 Martin Sebor <msebor@redhat.com>
2116
2117 PR c/88091
2118 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2119 (convert_arguments): Add comments. Pass additional argument to
2120 the function above.
2121
673670da
MS
21222018-11-29 Martin Sebor <msebor@redhat.com>
2123
2124 PR c/88172
2125 PR testsuite/88208
2126 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2127
db1d09b0
MS
21282018-11-23 Martin Sebor <msebor@redhat.com>
2129
2130 PR testsuite/88098
2131 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2132 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2133
98f08eb8
MS
21342018-11-20 Martin Sebor <msebor@redhat.com>
2135
2136 * c-parser.c (c_parser_has_attribute_expression): New function.
2137 (c_parser_attribute): New function.
2138 (c_parser_attributes): Move code into c_parser_attribute.
2139 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2140
cd5da983
MS
21412018-11-15 Martin Sebor <msebor@redhat.com>
2142
2143 PR c/83656
2144 * c-decl.c (header_for_builtin_fn): Declare.
2145 (diagnose_mismatched_decls): Diagnose declarations of built-in
2146 functions without a prototype.
2147 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2148 (convert_argument): Same.
2149 (convert_arguments): Factor code out into convert_argument.
2150 Detect mismatches between built-in formal arguments in calls
2151 to built-in without prototype.
2152 (build_conditional_expr): Same.
2153 (type_or_builtin_type): New function.
2154 (convert_for_assignment): Add argument. Conditionally issue
2155 warnings instead of errors for mismatches.
2156
620e594b
DM
21572018-11-13 David Malcolm <dmalcolm@redhat.com>
2158
2159 * c-decl.c: Replace "source_location" with "location_t".
2160 * c-tree.h: Likewise.
2161 * c-typeck.c: Likewise.
2162 * gimple-parser.c: Likewise.
2163
3179ebae
JJ
21642018-11-09 Jakub Jelinek <jakub@redhat.com>
2165
81a227c6
JJ
2166 * c-parser.c (c_parser_omp_clause_final): Use
2167 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2168 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2169 parsing instead of c_parser_paren_condition.
2170 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2171 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2172 c_fully_fold instead of c_parser_condition.
2173 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2174 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2175 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2176 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2177 c_parser_expr_no_commas instead of c_parser_expression.
2178
98c91c56
JJ
2179 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2180 reduction clause with inscan modifier.
2181
3179ebae
JJ
2182 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2183 clauses other than atomic_default_mem_order.
2184
28567c40
JJ
21852018-11-08 Jakub Jelinek <jakub@redhat.com>
2186
2187 * c-parser.c: Include memmode.h.
2188 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2189 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2190 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2191 task_reduction clauses.
2192 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2193 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2194 section, or lvalue assignment expression.
2195 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2196 (c_parser_omp_clause_lastprivate): Parse optional
2197 conditional: modifier.
2198 (c_parser_omp_clause_hint): Require constant integer expression rather
2199 than just integer expression.
2200 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2201 clause.
2202 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2203 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2204 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2205 functions.
2206 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2207 iterators. Parse mutexinoutset and depobj kinds.
2208 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2209 callers.
2210 (c_parser_omp_all_clauses): Likewise. Handle
2211 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2212 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2213 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2214 default memory order from requires directive if any. Adjust
2215 c_finish_omp_atomic caller.
2216 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2217 (c_parser_omp_flush): Parse flush with memory-order-clause.
2218 (c_parser_omp_for_loop): Allow NE_EXPR even in
2219 OpenMP loops, adjust c_finish_omp_for caller.
2220 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2221 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2222 Allow to be called while parsing combined parallel master.
2223 Parse combined master taskloop{, simd}.
2224 (c_parser_omp_parallel): Parse combined
2225 parallel master{, taskloop{, simd}} constructs.
2226 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2227 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2228 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2229 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2230 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2231 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2232 around teams body. Use SET_EXPR_LOCATION.
2233 (c_parser_omp_target_data): Allow target data
2234 with only use_device_ptr clauses.
2235 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2236 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2237 (c_parser_omp_requires): New function.
2238 (c_finish_taskloop_clauses): New function.
2239 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2240 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2241 declaration. Disallow in_reduction clause when combined with parallel
2242 master.
2243 (c_parser_omp_construct): Adjust c_parser_omp_master and
2244 c_parser_omp_taskgroup callers.
2245 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2246 other than cancel.
2247 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2248 like OMP_CLAUSE_REDUCTION.
2249 (handle_omp_array_sections): Likewise. Call save_expr on array
2250 reductions before calling build_index_type. Handle depend clauses
2251 with iterators.
2252 (struct c_find_omp_var_s): New type.
2253 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2254 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2255 with static, runtime or auto schedule kinds. Call save_expr for whole
2256 array reduction sizes. Diagnose reductions with zero sized elements
2257 or variable length structures. Diagnose nogroup clause used with
2258 reduction clause(s). Handle depend clause with
2259 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2260 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2261 some different type for other kinds. Use build_unary_op with
2262 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2263 Handle depend clauses with iterators. Remove no longer needed special
2264 case that predetermined const qualified vars may be specified in
2265 firstprivate clause. Complain if const qualified vars are mentioned
2266 in data-sharing clauses other than firstprivate or shared. Use
2267 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2268 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2269 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2270 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2271
7e2de6df
DM
22722018-10-29 David Malcolm <dmalcolm@redhat.com>
2273
2274 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2275 logic for change to name_hint::operator bool.
2276 (undeclared_variable): Likewise.
2277 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2278 (c_parser_parameter_declaration): Likewise.
2279
9f936c86
JM
22802018-10-17 Joseph Myers <joseph@codesourcery.com>
2281
2282 * c-errors.c (pedwarn_c11): New function.
2283 * c-parser.c (disable_extension_diagnostics): Save
2284 warn_c11_c2x_compat and set it to 0.
2285 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2286 (c_parser_static_assert_declaration_no_semi): Handle
2287 _Static_assert without string constant.
2288 * c-tree.h (pedwarn_c11): New prototype.
2289
033eb567
DM
22902018-10-17 David Malcolm <dmalcolm@redhat.com>
2291
2292 * Make-lang.in (selftest-c): New.
2293 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2294 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2295 from gcc/Makefile.in.
2296
0edf3afe
RB
22972018-10-02 Richard Biener <rguenther@suse.de>
2298
2299 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2300
8313a764
JM
23012018-09-26 Joseph Myers <joseph@codesourcery.com>
2302
2303 PR c/87390
2304 * c-typeck.c (build_binary_op): Use excess precision for
2305 comparisons of integers and floating-point for C11 and later.
2306
ce6f0888
MJ
23072018-09-26 Martin Jambor <mjambor@suse.cz>
2308
2309 PR c/87347
2310 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2311 comment.
ce6f0888 2312
9c4a4b3c
DM
23132018-09-17 David Malcolm <dmalcolm@redhat.com>
2314
2315 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2316 Update for new param.
2317 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2318 Likewise.
2319
80c6d1f4
MJ
23202018-09-17 Martin Jambor <mjambor@suse.cz>
2321
2322 PR c/63886
2323 * c-parser.c: (warn_for_abs): New function.
2324 (c_parser_postfix_expression_after_primary): Call it.
2325
4a426e36
BE
23262018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2327
2328 * c-typeck.c (digest_init): Shorten overlength strings.
2329
6d900107
BE
23302018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2331
2332 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2333
b5764229
BE
23342018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2335
2336 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2337 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2338
22eea6b2
AM
23392018-08-30 Alexander Monakov <amonakov@ispras.ru>
2340
2341 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2342 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2343
85204e23
DM
23442018-08-27 David Malcolm <dmalcolm@redhat.com>
2345
2346 PR 87091
2347 * c-decl.c (implicitly_declare): Update call to
2348 maybe_add_include_fixit to suggest overriding the location, as it
2349 is for a note.
2350 * c-objc-common.c (c_tree_printer): Update for conversion of
2351 show_caret_p to a tri-state.
2352
3d78e008
ML
23532018-08-27 Martin Liska <mliska@suse.cz>
2354
2355 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2356 fndecl_built_in_p and remove check for FUNCTION_DECL if
2357 possible.
3d78e008
ML
2358 (diagnose_mismatched_decls): Likewise.
2359 (merge_decls): Likewise.
2360 (warn_if_shadowing): Likewise.
2361 (pushdecl): Likewise.
2362 (implicitly_declare): Likewise.
2363 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2364 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2365 * c-typeck.c (build_function_call_vec): Likewise.
2366 (convert_arguments): Likewise.
2367
097f82ec
DM
23682018-08-20 David Malcolm <dmalcolm@redhat.com>
2369
2370 PR other/84889
2371 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2372 (diagnose_mismatched_decls): Likewise, in various places.
2373 (warn_if_shadowing): Likewise.
2374 (implicit_decl_warning): Likewise.
2375 (implicitly_declare): Likewise.
2376 (undeclared_variable): Likewise.
2377 (declare_label): Likewise.
2378 (grokdeclarator): Likewise.
2379 (start_function): Likewise.
2380 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2381 (c_parser_parameter_declaration): Likewise.
2382 (c_parser_binary_expression): Likewise.
2383 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2384 (parser_build_binary_op): Likewise.
2385 (build_unary_op): Likewise.
2386 (error_init): Likewise.
2387 (pedwarn_init): Likewise.
2388 (warning_init): Likewise.
2389 (convert_for_assignment): Likewise.
2390
96e6ae57
DM
23912018-08-15 David Malcolm <dmalcolm@redhat.com>
2392
2393 * c-objc-common.c: Include "gcc-rich-location.h".
2394 (c_tree_printer): Move implemenation of '%T' to...
2395 (print_type): ...this new function.
2396 (range_label_for_type_mismatch::get_text): New function.
2397 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2398 range for the various ic_argpass cases.
2399 (class maybe_range_label_for_tree_type_mismatch): New class.
2400 (build_binary_op): Use it when calling binary_op_error.
2401
0cd020ae 24022018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2403
0cd020ae
PK
2404 * c-decl.c (start_decl): Do not warn if variables is named as main
2405 and is a local variable.
2406
72733314
IS
24072018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2408
2409 PR c/19315
2410 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2411 objects of unknown size.
2412
23aa9f7c
MS
24132018-08-13 Martin Sebor <msebor@redhat.com>
2414
2415 PR tree-optimization/71625
2416 * c-parser.c (c_parser_declaration_or_fndef): Call
2417 braced_list_to_string.
2418
e5e7e50d
BH
24192018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2420
2421 PR c/86690
2422 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2423 errors.
2424
8a45b051
MS
24252018-08-01 Martin Sebor <msebor@redhat.com>
2426
2427 PR tree-optimization/86650
2428 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2429 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2430
5922dcb5
JJ
24312018-08-01 Jakub Jelinek <jakub@redhat.com>
2432
2433 PR c/85704
2434 * c-typeck.c (init_field_decl_cmp): New function.
2435 (output_pending_init_elements): Use it for field comparisons
2436 instead of pure bit_position comparisons.
2437
9b452033
JJ
24382018-07-12 Jakub Jelinek <jakub@redhat.com>
2439
2440 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2441 type here, instead add "omp declare target implicit" attribute.
2442 (finish_decl): Diagnose vars without mappable type here.
2443
ab20d992
JJ
24442018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2445 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2446 Cesar Philippidis <cesar@codesourcery.com>
2447
2448 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2449 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2450 to their non-present_or_* counterparts. Make 'self' an alias to
2451 PRAGMA_OACC_CLAUSE_HOST.
2452 (c_parser_oacc_data_clause): Update GOMP mappings for
2453 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2454 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2455 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2456 Remove support for present_or_* clauses.
2457 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2458 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2459 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2460 (OACC_DATA_CLAUSE_MASK): Likewise.
2461 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2462 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2463 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2464 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2465 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2466
e197e64e
KV
24672018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2468
2469 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2470 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2471 (c_parser_gimple_unary_expression): Likewise.
2472
487f2f61
JJ
24732018-06-15 Jakub Jelinek <jakub@redhat.com>
2474
2475 PR c/86093
2476 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2477 before doing POINTER_DIFF_EXPR.
2478
e4d44a37
MP
24792018-06-07 Marek Polacek <polacek@redhat.com>
2480
2481 PR c/85318
2482 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2483 for loop initial declarations.
2484
b67b9225
DP
24852018-05-30 David Pagan <dave.pagan@oracle.com>
2486
2487 PR c/55976
2488 * c-decl.c (grokdeclarator): Update check for return type warnings.
2489 (start_function): Likewise.
2490 (finish_function): Likewise.
2491 * c-typeck.c (c_finish_return): Update check for return type warnings.
2492 Pass OPT_Wreturn_type to pedwarn when appropriate.
2493
c566cc9f
RS
24942018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2495
2496 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2497 __FMA_EXPR handlng.
2498
e4f81565
RS
24992018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2500
2501 * gimple-parser.c: Include internal-fn.h.
2502 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2503 (c_parser_gimple_call_internal): New function.
2504 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2505 Fix typos in comment.
2506
79e7b1fe
JJ
25072018-05-10 Jakub Jelinek <jakub@redhat.com>
2508
2509 PR c++/85662
2510 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2511 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2512 fold_convert_loc.
2513 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2514 fold_offsetof_1, pass argtype as TYPE to it and drop the
2515 fold_convert_loc.
2516
f7584c81
DP
25172018-05-02 David Pagan <dave.pagan@oracle.com>
2518
2519 PR c/30552
2520 * c-decl.c (old_style_parameter_scope): New function.
2521 * c-parser.c (c_parser_postfix_expression): Check for statement
2522 expressions in old-style function parameter list declarations.
2523 * c-parser.h (old_style_parameter_scope): New extern declaration.
2524
b33a0cb3
JJ
25252018-04-25 Jakub Jelinek <jakub@redhat.com>
2526
2527 PR sanitizer/84307
2528 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2529 it is not TREE_STATIC.
2530 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2531 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2532 its COMPOUND_LITERAL_EXPR_DECL.
2533
c5c5822a
JM
25342018-03-21 Joseph Myers <joseph@codesourcery.com>
2535
2536 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2537 where all functions return the same _FloatN or _FloatNx type,
2538 treat integer types as _Float64 instead of double.
2539
aa1c9429
JJ
25402018-03-21 Jakub Jelinek <jakub@redhat.com>
2541
2542 PR c/84999
2543 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2544 building vector comparison, diagnose it and return error_mark_node.
2545
9bb45a95
JJ
25462018-03-15 Jakub Jelinek <jakub@redhat.com>
2547
2548 PR c/84853
2549 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2550 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2551 INTEGER_TYPE element type.
2552
ada6bad9
DP
25532018-03-13 David Pagan <dave.pagan@oracle.com>
2554
2555 PR c/46921
2556 * c-typeck.c (output_init_element): Ensure field initializer
2557 expression is always evaluated if there are side effects.
2558
849bbdb9
JJ
25592018-03-06 Jakub Jelinek <jakub@redhat.com>
2560
2561 PR c/84721
2562 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2563 !building_stmt_list_p ().
2564
d74641bd
RS
25652018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2566
2567 PR c/84305
2568 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2569 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2570 and include the BIND_EXPR in the list of things that need to be
2571 pre-evaluated.
2572
0444aa9c
NS
25732018-02-09 Nathan Sidwell <nathan@acm.org>
2574
2575 PR c/84293
2576 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2577 to strict_aliasing_warning.
2578
7c30b12a
PC
25792018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2580
2581 * c-typeck.c (really_start_incremental_init, push_init_level,
2582 set_nonincremental_init, output_init_element, process_init_element):
2583 Use DECL_UNNAMED_BIT_FIELD.
2584
2be4dfcb
MP
25852018-01-31 Marek Polacek <polacek@redhat.com>
2586
2587 PR c/81779
2588 * c-parser.c (c_parser_compound_statement_nostart): Call
2589 expansion_point_location_if_in_system_header.
2590
bb9869d5
DM
25912018-01-17 David Malcolm <dmalcolm@redhat.com>
2592
2593 PR c++/83814
2594 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2595 the C part.
2596
b4923738
JJ
25972018-01-13 Jakub Jelinek <jakub@redhat.com>
2598
2599 PR c/83801
2600 * c-tree.h (decl_constant_value_1): Add a bool argument.
2601 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2602 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2603 (decl_constant_value): Adjust caller.
2604 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2605 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2606 decl_constant_value returns initializer that has BLKmode or
2607 array type.
2608 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2609
928686b1
RS
26102018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2611 Alan Hayward <alan.hayward@arm.com>
2612 David Sherwood <david.sherwood@arm.com>
2613
2614 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2615 TYPE_VECTOR_SUBPARTS.
2616
85ec4feb
JJ
26172018-01-03 Jakub Jelinek <jakub@redhat.com>
2618
2619 Update copyright years.
2620
913884f7
JJ
26212018-01-01 Jakub Jelinek <jakub@redhat.com>
2622
2623 PR c/83595
2624 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2625 c_parser_conditional_expression, c_parser_cast_expression,
2626 c_parser_sizeof_expression, c_parser_alignof_expression,
2627 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2628 c_parser_transaction_expression): Use set_error () method instead
2629 of setting value member to error_mark_node.
2630
c6cfa2bf
MM
26312017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2632
2633 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2634 and _Float<N>X built-in functions.
2635
11d29d63
JJ
26362017-12-22 Jakub Jelinek <jakub@redhat.com>
2637
14ec014e
JJ
2638 PR debug/83550
2639 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2640 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2641 incomplete vars rather than after it.
2642
11d29d63
JJ
2643 PR debug/83547
2644 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2645 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2646 and consider empty ones if there are no other stmts. For
2647 -Wunused-value walk all statements before the one only followed by
2648 DEBUG_BEGIN_STMTs.
2649
170a8bd6 26502017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2651 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2652
2653 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2654 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2655 (c_parser_do_statement): Likewise.
2656 (c_parser_for_statement): Likewise.
2657 (c_parser_statement_after_labels): Adjust calls to above.
2658 (c_parse_pragma_ivdep): New static function.
2659 (c_parser_pragma_unroll): Likewise.
2660 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2661 <PRAGMA_UNROLL>: New case.
2662
01512446
JJ
26632017-12-19 Jakub Jelinek <jakub@redhat.com>
2664
2665 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2666 perform_integral_promotions, digest_init): Replace Yoda conditions
2667 with typical order conditions.
2668 * c-decl.c (check_bitfield_type_and_width): Likewise.
2669
c65e18d3
BE
26702017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2671
2672 * c-typeck.c (c_safe_arg_type_equiv_p,
2673 c_safe_function_type_cast_p): New function.
2674 (build_c_cast): Implement -Wcast-function-type.
2675
b7280579
RB
26762017-12-14 Richard Biener <rguenther@suse.de>
2677
2678 PR c/83415
2679 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2680 like REALPART_EXPR for the behavior of whether its operand
2681 is an lvalue.
2682
49e6a6c0
MP
26832017-12-12 Marek Polacek <polacek@redhat.com>
2684
2685 PR c/82679
2686 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2687
ab20d992 26882017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2689
2690 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2691 * c-parser.c (add_debug_begin_stmt): New.
2692 (c_parser_declaration_or_fndef): Call it.
2693 (c_parser_compound_statement_nostart): Likewise.
2694 (c_parser_statement_after_labels): Likewise.
2695 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2696
4b2b493f
JM
26972017-12-07 Joseph Myers <joseph@codesourcery.com>
2698
2699 * c-decl.c (build_compound_literal): Add parameter alignas_align
2700 and set alignment of decl if nonzero.
2701 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2702 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2703 qualifier.
2704 (c_parser_struct_declaration): Update syntax comment.
2705 (c_parser_type_name): Add alignas_ok argument and pass it to
2706 c_parser_declspecs.
2707 (c_parser_cast_expression): Pass true to c_parser_type_name and
2708 give error if a cast used an _Alignas specifier.
2709 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2710 give error if sizeof (type-name) used an _Alignas specifier.
2711 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2712 give error if _Alignof (type-name) used an _Alignas specifier.
2713 (c_parser_postfix_expression_after_paren_type): Check specified
2714 alignment for a compound literal and pass it to
2715 build_compound_literal.
2716 * c-parser.h (c_parser_type_name): Update prototype.
2717 * c-tree.h (build_compound_literal): Update prototype.
2718
5d9ae53d
MS
27192017-12-07 Martin Sebor <msebor@redhat.com>
2720
2721 PR c/81544
2722 * c-decl.c (c_decl_attributes): Look up existing declaration and
2723 pass it to decl_attributes.
2724
c79144f8
DM
27252017-12-06 David Malcolm <dmalcolm@redhat.com>
2726
2727 PR c/83236
2728 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2729 reserved for use by the implementation.
2730
613bc14f
DM
27312017-12-06 David Malcolm <dmalcolm@redhat.com>
2732
2733 * c-decl.c: Include "c-family/c-spellcheck.h".
2734
05abad4c
ML
27352017-12-05 Martin Liska <mliska@suse.cz>
2736 Jakub Jelinek <jakub@redhat.com>
2737
2738 * c-typeck.c (pointer_diff): Add new argument and instrument
2739 pointer subtraction.
2740 (build_binary_op): Similar for pointer comparison.
2741
cc6534d4
JJ
27422017-12-01 Jakub Jelinek <jakub@redhat.com>
2743
65791f42
JJ
2744 PR c/79153
2745 * c-parser.c: Include tree-iterator.h.
2746 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2747 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2748 on it.
2749
cc6534d4
JJ
2750 PR c/83222
2751 * c-tree.h (decl_constant_value_1): Declare.
2752 * c-typeck.c (decl_constant_value_1): New function.
2753 (decl_constant_value): Use it.
2754 * c-fold.c (c_fully_fold_internal): If in_init, use
2755 decl_constant_value_1 instead of decl_constant_value.
2756
5de73c05
JJ
27572017-11-30 Jakub Jelinek <jakub@redhat.com>
2758
2759 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2760
058f0b9e
JJ
27612017-11-28 Jakub Jelinek <jakub@redhat.com>
2762
2763 PR sanitizer/81275
2764 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2765 c_switch_covers_all_cases_p returns true.
2766
5e9d6aa4 27672017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2768 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2769
2770 * Make-lang.in (c/c-array-notation.o): Remove.
2771 * c-array-notation.c: Delete.
2772 * c-decl.c: Remove cilkplus condition.
2773 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2774 c_parser_cilk_verify_simd, c_parser_array_notation,
2775 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2776 c_parser_cilk_simd_fn_vector_attrs,
2777 c_finish_cilk_simd_fn_tokens): Delete.
2778 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2779 (c_parser_direct_declarator_inner): Ditto.
2780 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2781 (c_parser_attributes, c_parser_compound_statement,
2782 c_parser_statement_after_labels, c_parser_if_statement,
2783 c_parser_switch_statement, c_parser_while_statement,
2784 c_parser_do_statement, c_parser_for_statement,
2785 c_parser_unary_expression, c_parser_postfix_expression,
2786 c_parser_postfix_expression_after_primary,
2787 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2788 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2789 support.
2790 * c-typeck.c (build_array_ref, build_function_call_vec,
2791 convert_arguments,
2792 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2793 c_finish_loop, build_binary_op): Remove cilkplus support.
2794
9e851845
JJ
27952017-11-28 Jakub Jelinek <jakub@redhat.com>
2796
2797 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2798 of build3.
2799
ab20d992 28002017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2801
2802 * Make-lang.in (c.install-plugin): Install backend import library.
2803
41521dee
JJ
28042017-11-23 Jakub Jelinek <jakub@redhat.com>
2805
2806 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2807 pragma_stmt context.
2808
ac9effed
EB
28092017-11-23 Mike Stump <mikestump@comcast.net>
2810 Eric Botcazou <ebotcazou@adacore.com>
2811
2812 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2813 ANNOTATE_EXPR.
2814 (c_parser_do_statement): Likewise.
2815 (c_parser_for_statement): Likewise.
2816
ce95abc4
DM
28172017-11-22 David Malcolm <dmalcolm@redhat.com>
2818
2819 PR c++/62170
2820 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2821 bool to bool *. Within '%T' handling, if showing an "aka", use
2822 "quoted" param to add appropriate quoting.
2823
974aedcc
MP
28242017-11-22 Marek Polacek <polacek@redhat.com>
2825
2826 PR c++/60336
2827 PR middle-end/67239
2828 PR target/68355
2829 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2830
d4300cc6
DM
28312017-11-21 David Malcolm <dmalcolm@redhat.com>
2832
2833 PR c/83056
2834 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2835 earlier failed lookups.
2836
1af4ebf5
MG
28372017-11-21 Marc Glisse <marc.glisse@inria.fr>
2838
2839 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2840 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2841
26edace6
DM
28422017-11-20 David Malcolm <dmalcolm@redhat.com>
2843
2844 PR c/81404
2845 * c-decl.c: Include "c-family/known-headers.h".
2846 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2847 to known-headers.cc.
2848 (class suggest_missing_header): Move to known-header.h.
2849 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2850 than get_c_name_hint.
2851
b1212255
DM
28522017-11-20 David Malcolm <dmalcolm@redhat.com>
2853
2854 * c-decl.c (get_c_name_hint): New function.
2855 (class suggest_missing_header): New class.
2856 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2857 suggest missing headers to the user.
2858
6c7a259b
DM
28592017-11-20 David Malcolm <dmalcolm@redhat.com>
2860
2861 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2862 Include "c-family/name-hint.h"
2863 (implicit_decl_warning): Convert "hint" from
2864 const char * to name_hint. Pass location to
2865 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2866 warning was not printed.
2867 (undeclared_variable): Likewise for "guessed_id".
2868 (lookup_name_fuzzy): Convert return type from const char *
2869 to name_hint. Add location_t param.
2870 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2871 Include "c-family/name-hint.h"
2872 (c_parser_declaration_or_fndef): Convert "hint" from
2873 const char * to name_hint. Pass location to lookup_name_fuzzy.
2874 (c_parser_parameter_declaration): Likewise.
2875
f9c59f7e
JJ
28762017-11-19 Jakub Jelinek <jakub@redhat.com>
2877
2878 PR c/66618
2879 PR c/69960
2880 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2881 where needed.
2882 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2883 handle_omp_array_sections): Likewise.
2884 (digest_init): Don't call decl_constant_value_for_optimization.
2885 * c-tree.h (decl_constant_value_for_optimization): Removed.
2886 * c-fold.c (c_fold_array_ref): New function.
2887 (c_fully_fold_internal): Add LVAL argument, propagate it through
2888 recursive calls. For VAR_P call decl_constant_value and
2889 unshare if not LVAL and either optimizing or IN_INIT. Remove
2890 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2891 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2892 (c_fully_fold): Add LVAL argument, pass it through to
2893 c_fully_fold_internal.
2894 (decl_constant_value_for_optimization): Removed.
2895
3ca0dc60
JM
28962017-11-15 Joseph Myers <joseph@codesourcery.com>
2897
2898 PR c/81156
2899 * c-parser.c (check_tgmath_function): New function.
2900 (enum tgmath_parm_kind): New enum.
2901 (c_parser_postfix_expression): Handle __builtin_tgmath.
2902
64a5912c
DM
29032017-10-31 David Malcolm <dmalcolm@redhat.com>
2904
2905 * c-decl.c (implicit_decl_warning): Update for renaming of
2906 pedwarn_at_rich_loc and warning_at_rich_loc.
2907 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2908 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2909 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2910 (c_parser_struct_or_union_specifier): Likewise for renaming of
2911 pedwarn_at_rich_loc.
2912 (c_parser_parameter_declaration): Likewise for renaming of
2913 error_at_rich_loc.
2914 * c-typeck.c (build_component_ref): Likewise.
2915 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2916 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2917 (set_init_label): Likewise for renaming of error_at_rich_loc.
2918
c1136864
RB
29192017-10-30 Richard Biener <rguenther@suse.de>
2920
2921 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2922 stmts.
2923
ee5fd23a
MM
29242017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2925
2926 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2927 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2928
1a59ccf2
DM
29292017-10-25 David Malcolm <dmalcolm@redhat.com>
2930
2931 PR c/7356
2932 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2933 semicolons.
2934
bc1a75dd
JJ
29352017-10-25 Jakub Jelinek <jakub@redhat.com>
2936
2937 PR libstdc++/81706
2938 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2939 newdecl to corresponding __builtin_ if any.
2940
ff1ff960
PC
29412017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2942
2943 PR c++/82466
2944 * c-decl.c (diagnose_mismatched_decls): Use
2945 OPT_Wbuiltin_declaration_mismatch.
2946
62e1c678
DM
29472017-10-12 David Malcolm <dmalcolm@redhat.com>
2948
2949 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2950 use it to guard calls to maybe_suggest_missing_token_insertion.
2951 (c_parser_parms_list_declarator): Override default value of new
2952 "type_is_unique" param to c_parser_require.
2953 (c_parser_asm_statement): Likewise.
2954 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2955 defaulting to true.
2956
a92f6726
NS
29572017-10-11 Nathan Sidwell <nathan@acm.org>
2958
2959 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2960
8e6cdc90
RS
29612017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2962
2963 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2964 operating on trees as wide_ints.
2965 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2966 (c_tree_equal): Likewise.
2967
8139a48e
DM
29682017-10-04 David Malcolm <dmalcolm@redhat.com>
2969
2970 * c-decl.c (push_parm_decl): Store c_parm's location into the
2971 PARAM_DECL.
2972 (build_c_parm): Add "loc" param and store it within the c_parm.
2973 * c-parser.c (struct c_parser): Add "last_token_location" field.
2974 (c_parser_consume_token): Store location of the token into the
2975 new field.
2976 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2977 when handling a FUNCTION_DECL, if it doesn't already have them.
2978 (c_parser_parameter_declaration): Generate a location for the
2979 parameter, and pass it to the call to build_c_parm.
2980 * c-tree.h (struct c_parm): Add field "loc".
2981 (build_c_parm): Add location_t param.
2982 * c-typeck.c (get_fndecl_argument_location): New function.
2983 (inform_for_arg): New function.
2984 (convert_for_assignment): Use inform_for_arg when dealing with
2985 ic_argpass.
2986
2a389958
JJ
29872017-09-29 Jakub Jelinek <jakub@redhat.com>
2988
7d386d45
JJ
2989 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2990 width is non-NULL.
2991 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2992 don't SET_DECL_C_BIT_FIELD here.
2993
2a389958
JJ
2994 PR c/82340
2995 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2996 instead of trying to set just TREE_READONLY manually.
2997
ebc6a85e
TV
29982017-09-16 Tom de Vries <tom@codesourcery.com>
2999
3000 PR c/81875
3001 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3002 cond itself.
3003
bb75facd
JM
30042017-09-15 Joseph Myers <joseph@codesourcery.com>
3005
3006 PR c/82071
3007 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3008 for C11.
3009 (build_conditional_expr): For C11, generate result with excess
3010 precision when one argument is an integer and the other is of a
3011 type using excess precision.
3012
1d933576
BE
30132017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3014
3015 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3016
267bbb6f
MP
30172017-09-13 Marek Polacek <polacek@redhat.com>
3018
3019 PR c/82167
3020 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3021 than expr.original_type.
3022
6836632e
NS
30232017-09-12 Nathan Sidwell <nathan@acm.org>
3024
3025 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3026 resort_sorted_fields): Moved from c-family/c-common.c.
3027 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3028
e035be33
JM
30292017-09-01 Joseph Myers <joseph@codesourcery.com>
3030
3031 PR c/82071
3032 * c-typeck.c (build_atomic_assign): Handle argument with excess
3033 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3034 argument passed to build_binary_op and convert_for_assignment but
3035 not for call to c_fully_fold.
3036 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3037 Ensure build_binary_op is called with argument with original
3038 semantic type. Avoid calling c_fully_fold with an
3039 EXCESS_PRECISION_EXPR from build_binary_op.
3040
d2e05fcb
JJ
30412017-09-01 Jakub Jelinek <jakub@redhat.com>
3042
3043 PR c/81887
3044 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3045
b397965c
RS
30462017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3047 Alan Hayward <alan.hayward@arm.com>
3048 David Sherwood <david.sherwood@arm.com>
3049
3050 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3051 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3052 m1 and m2 to the signed equivalent of a fixed-point
3053 SCALAR_TYPE_MODE.
3054
14e18d71
DM
30552017-08-24 David Malcolm <dmalcolm@redhat.com>
3056
3057 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3058 than CAN_HAVE_LOCATION_P when determining whether to use the
3059 location_t value within "value".
3060
7f204c0f
DM
30612017-08-21 David Malcolm <dmalcolm@redhat.com>
3062
3063 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3064 rather than peeking the location of the first token.
3065 * c-tree.h (c_expr::get_location): New method.
3066
2f687306
DM
30672017-08-21 David Malcolm <dmalcolm@redhat.com>
3068
3069 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3070 to check_function_arguments.
3071
3e7b80d7
MP
30722017-08-18 Marek Polacek <polacek@redhat.com>
3073
3074 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3075 commentary.
3076
00aa1fa2
L
30772017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3078
3079 PR c/53037
3080 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3081 (check_bitfield_type_and_width): Don't allow bit-field with
3082 warn_if_not_aligned type.
3083
da67acb9
MS
30842017-08-14 Martin Sebor <msebor@redhat.com>
3085
3086 PR c/81117
3087 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3088
bb85aa74
MP
30892017-08-11 Marek Polacek <polacek@redhat.com>
3090
3091 PR c/81795
3092 * c-decl.c (pushtag): Only print inform if the warning was printed.
3093 (grokdeclarator): Likewise.
3094
32129a17
DM
30952017-08-10 David Malcolm <dmalcolm@redhat.com>
3096
3097 * c-parser.c (c_parser_error): Rename to...
3098 (c_parser_error_richloc): ...this, making static, and adding
3099 "richloc" parameter, passing it to the c_parse_error call,
3100 rather than calling c_parser_set_source_position_from_token.
3101 (c_parser_error): Reintroduce, reimplementing in terms of the
3102 above, converting return type from void to bool.
3103 (class token_pair): New class.
3104 (struct matching_paren_traits): New struct.
3105 (matching_parens): New typedef.
3106 (struct matching_brace_traits): New struct.
3107 (matching_braces): New typedef.
3108 (get_matching_symbol): New function.
3109 (c_parser_require): Add param MATCHING_LOCATION, using it to
3110 highlight matching "opening" tokens for missing "closing" tokens.
3111 (c_parser_skip_until_found): Likewise.
3112 (c_parser_static_assert_declaration_no_semi): Convert explicit
3113 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3114 class matching_parens, so that the pertinent open parenthesis is
3115 highlighted when there are problems locating the close
3116 parenthesis.
3117 (c_parser_struct_or_union_specifier): Likewise.
3118 (c_parser_typeof_specifier): Likewise.
3119 (c_parser_alignas_specifier): Likewise.
3120 (c_parser_simple_asm_expr): Likewise.
3121 (c_parser_braced_init): Likewise, for matching_braces.
3122 (c_parser_paren_condition): Likewise, for matching_parens.
3123 (c_parser_switch_statement): Likewise.
3124 (c_parser_for_statement): Likewise.
3125 (c_parser_asm_statement): Likewise.
3126 (c_parser_asm_operands): Likewise.
3127 (c_parser_cast_expression): Likewise.
3128 (c_parser_sizeof_expression): Likewise.
3129 (c_parser_alignof_expression): Likewise.
3130 (c_parser_generic_selection): Likewise.
3131 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3132 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3133 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3134 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3135 c_parser_skip_until_found call.
3136 (c_parser_objc_class_definition): Use class matching_parens as
3137 above.
3138 (c_parser_objc_method_decl): Likewise.
3139 (c_parser_objc_try_catch_finally_statement): Likewise.
3140 (c_parser_objc_synchronized_statement): Likewise.
3141 (c_parser_objc_at_property_declaration): Likewise.
3142 (c_parser_oacc_wait_list): Likewise.
3143 (c_parser_omp_var_list_parens): Likewise.
3144 (c_parser_omp_clause_collapse): Likewise.
3145 (c_parser_omp_clause_default): Likewise.
3146 (c_parser_omp_clause_if): Likewise.
3147 (c_parser_omp_clause_num_threads): Likewise.
3148 (c_parser_omp_clause_num_tasks): Likewise.
3149 (c_parser_omp_clause_grainsize): Likewise.
3150 (c_parser_omp_clause_priority): Likewise.
3151 (c_parser_omp_clause_hint): Likewise.
3152 (c_parser_omp_clause_defaultmap): Likewise.
3153 (c_parser_oacc_single_int_clause): Likewise.
3154 (c_parser_omp_clause_ordered): Likewise.
3155 (c_parser_omp_clause_reduction): Likewise.
3156 (c_parser_omp_clause_schedule): Likewise.
3157 (c_parser_omp_clause_num_teams): Likewise.
3158 (c_parser_omp_clause_thread_limit): Likewise.
3159 (c_parser_omp_clause_aligned): Likewise.
3160 (c_parser_omp_clause_linear): Likewise.
3161 (c_parser_omp_clause_safelen): Likewise.
3162 (c_parser_omp_clause_simdlen): Likewise.
3163 (c_parser_omp_clause_depend): Likewise.
3164 (c_parser_omp_clause_map): Likewise.
3165 (c_parser_omp_clause_device): Likewise.
3166 (c_parser_omp_clause_dist_schedule): Likewise.
3167 (c_parser_omp_clause_proc_bind): Likewise.
3168 (c_parser_omp_clause_uniform): Likewise.
3169 (c_parser_omp_for_loop): Likewise.
3170 (c_parser_cilk_clause_vectorlength): Likewise.
3171 (c_parser_cilk_clause_linear): Likewise.
3172 (c_parser_transaction_expression): Likewise.
3173 * c-parser.h (c_parser_require): Add param matching_location with
3174 default UNKNOWN_LOCATION.
3175 (c_parser_error): Convert return type from void to bool.
3176 (c_parser_skip_until_found): Add param matching_location with
3177 default UNKNOWN_LOCATION.
3178
30af3a2b
MP
31792017-08-09 Marek Polacek <polacek@redhat.com>
3180
3181 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3182 * c-tree.h (build_external_ref): Update declaration.
3183 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3184 (build_external_ref): Change the type of a parameter to bool.
3185 (parser_build_binary_op): Use true/false instead of 1/0.
3186 (pointer_diff): Likewise.
3187 (build_modify_expr): Likewise.
3188 (set_designator): Change the type of a parameter to bool.
3189 (set_init_index): Use true/false instead of 1/0.
3190 (set_init_label): Likewise.
3191 (output_init_element): Change the type of a parameter to bool.
3192 (output_pending_init_elements): Use true/false instead of 1/0.
3193 (process_init_element): Likewise.
3194 (build_binary_op): Change the type of a parameter to bool.
3195
296c53ac
MP
31962017-08-09 Marek Polacek <polacek@redhat.com>
3197
3198 PR c/81233
3199 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3200 Call emit_diagnostic_valist instead of pedwarn.
3201 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3202 Print the relevant types in diagnostics.
3203
a32c8316
MP
32042017-08-09 Marek Polacek <polacek@redhat.com>
3205
3206 PR c/81417
3207 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3208 build_conditional_expr.
a32c8316
MP
3209 * c-parser.c (c_parser_conditional_expression): Create locations for
3210 EXP1 and EXP2 from their source ranges. Pass the locations down to
3211 build_conditional_expr.
3212 * c-tree.h (build_conditional_expr): Update declaration.
3213 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3214 For -Wsign-compare, also print the types.
3215
314e6352
ML
32162017-08-08 Martin Liska <mliska@suse.cz>
3217
3218 * c-convert.c: Include header files.
3219 * c-typeck.c: Likewise.
3220
577eec56
ML
32212017-08-07 Martin Liska <mliska@suse.cz>
3222
3223 * c-parser.c (c_parser_attributes): Canonicalize name of an
3224 attribute.
3225
f7b6353a
MP
32262017-08-02 Marek Polacek <polacek@redhat.com>
3227
3228 PR c/81289
3229 * c-parser.c (c_parser_unary_expression): Use set_error.
3230
8a6eab34
MP
3231 PR c/81448
3232 PR c/81306
3233 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3234 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3235
ab20d992 32362017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3237 Martin Liska <mliska@suse.cz>
3238
3239 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3240 statement.
7fef86d3 3241
f34ebeb2
ML
32422017-07-31 Martin Liska <mliska@suse.cz>
3243
3244 PR sanitize/81530
3245 * c-convert.c (convert): Guard condition with flag_sanitize_p
3246 also with current_function_decl non-null equality.
3247 * c-decl.c (grokdeclarator): Likewise.
3248 * c-typeck.c (build_binary_op): Likewise.
3249
8595f67b
MP
32502017-07-25 Marek Polacek <polacek@redhat.com>
3251
3252 * c-decl.c (grokfield): Remove local variable.
3253
d49718d6
MP
32542017-07-25 Marek Polacek <polacek@redhat.com>
3255
3256 PR c/81364
3257 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3258 macro expansion if the body is in { }.
3259 (c_parser_while_statement): Likewise.
3260 (c_parser_for_statement): Likewise.
3261
ff22eb12
NS
32622017-07-18 Nathan Sidwell <nathan@acm.org>
3263
3264 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3265
eea77d1f
DM
32662017-07-14 David Malcolm <dmalcolm@redhat.com>
3267
3268 * c-decl.c (implicitly_declare): When suggesting a missing
3269 #include, provide a fix-it hint.
3270
b6f43128
DM
32712017-07-06 David Malcolm <dmalcolm@redhat.com>
3272
3273 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3274 and call that instead.
3275 * c-tree.h (selftest::run_c_tests): New decl.
3276
3e2becc4
MP
32772017-06-26 Marek Polacek <polacek@redhat.com>
3278
3279 PR c/80116
3280 * c-parser.c (c_parser_if_body): Set the location of the
3281 body of the conditional after parsing all the labels. Call
3282 warn_for_multistatement_macros.
3283 (c_parser_else_body): Likewise.
3284 (c_parser_switch_statement): Likewise.
3285 (c_parser_while_statement): Likewise.
3286 (c_parser_for_statement): Likewise.
3287 (c_parser_statement): Add a default argument. Save the location
3288 after labels have been parsed.
3289 (c_parser_c99_block_statement): Likewise.
3290
343ae898
RB
32912017-06-19 Richard Biener <rguenther@suse.de>
3292
3293 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3294 negated _Literals to parse _Literal (int) -1.
3295
45b2222a
ML
32962017-06-13 Martin Liska <mliska@suse.cz>
3297
3298 PR sanitize/78204
3299 * c-convert.c (convert): Use sanitize_flags_p.
3300 * c-decl.c (grokdeclarator): Likewise.
3301 * c-typeck.c (convert_for_assignment): Likewise.
3302 (c_finish_return): Likewise.
3303 (build_binary_op): Likewise.
3304
8ab7005b
JJ
33052017-06-08 Jakub Jelinek <jakub@redhat.com>
3306
3307 PR c/81006
3308 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3309 to sizetype before size_binop.
3310
363dc72c
JJ
33112017-06-07 Jakub Jelinek <jakub@redhat.com>
3312
3313 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3314 of TDI_generic.
3315
dc949728
MP
33162017-06-06 Marek Polacek <polacek@redhat.com>
3317
3318 PR c/79983
3319 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3320 ref.
3321 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3322
40ffd95f
BE
33232017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3324
3325 * c-parser.c (c_parser_binary_expression): Implement the
3326 -Wsizeof_pointer_div warning.
3327 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3328 from a parenthesized expression.
3329 (c_parser_expr_list): Use c_last_sizeof_loc.
3330 * c-tree.h (c_last_sizeof_loc): New external.
3331 * c-typeck.c (c_last_sizeof_loc): New variable.
3332 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3333
9fc5e7a4
MM
33342017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3335
3336 PR testsuite/80580
3337 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3338
f012c8ef
DM
33392017-05-30 David Malcolm <dmalcolm@redhat.com>
3340
3341 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3342 parameters.
3343
3cd211af
MS
33442017-05-24 Martin Sebor <msebor@redhat.com>
3345
3346 PR c/80731
3347 * c-fold.c (c_fully_fold_internal): Adjust.
3348 * c-typeck.c (parser_build_unary_op): Adjust.
3349
fd71a9a2
TS
33502017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3351
3352 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3353 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3354 "VECTOR_LENGTH".
3355
92fa0f9e
MP
33562017-05-23 Marek Polacek <polacek@redhat.com>
3357
3358 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3359 quotes.
3360
d11c168a
JJ
33612017-05-22 Jakub Jelinek <jakub@redhat.com>
3362
3363 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3364 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3365 it returned invariant. Call tree_invariant_p unconditionally
3366 afterwards to decide whether to return expr or op0.
3367
58aca9d9
NS
33682017-05-22 Nathan Sidwell <nathan@acm.org>
3369
3370 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3371
7fd549d2
TS
33722017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3373
3374 * c-parser.c (c_parser_omp_clause_default): Handle
3375 "OMP_CLAUSE_DEFAULT_PRESENT".
3376
6ecd2339
BE
33772017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3378
3379 * config-lang.in (gtfiles): Add c-family/c-format.c.
3380
8a57ecff
NS
33812017-05-18 Nathan Sidwell <nathan@acm.org>
3382
3383 * c-decl.c (pushdecl_top_level): Delete unused function.
3384
6574d78e
MP
33852017-05-18 Marek Polacek <polacek@redhat.com>
3386
3387 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3388 (check_earlier_gotos): Likewise.
3389 (define_label): Likewise.
3390 (pending_xref_error): Likewise.
3391 (smallest_type_quals_location): Likewise.
3392 (grokdeclarator): Likewise.
3393 (grokparms): Likewise.
3394 (identifier_global_value): Likewise.
3395 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3396 (find_init_member): Likewise.
3397
e3455240
MP
33982017-05-18 Marek Polacek <polacek@redhat.com>
3399
3400 * c-decl.c (start_decl): Use false/true instead of 0/1.
3401 (grokdeclarator): Likewise.
3402 (finish_struct): Likewise.
3403 (start_function): Change the return type to bool. Use false/true
3404 instead of 0/1.
3405 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3406 * c-tree.h (start_function): Update.
3407 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3408 (set_designator): Change the return type to bool. Use false/true
3409 instead of 0/1.
3410
3fa8871b
MP
34112017-05-17 Marek Polacek <polacek@redhat.com>
3412
3413 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3414 * c-typeck.c: Likewise.
3415
142473df
MP
34162017-05-17 Marek Polacek <polacek@redhat.com>
3417
3418 PR sanitizer/80659
3419 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3420 DECL_IGNORED_P even for non-static compound literals.
3421
1a817418
ML
34222017-05-17 Martin Liska <mliska@suse.cz>
3423
3424 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3425 use it instead of int type.
3426
b2fa0a8b
MP
34272017-05-17 Marek Polacek <polacek@redhat.com>
3428
3429 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3430 call c_fully_fold.
3431 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3432 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3433 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3434 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3435 save_expr.
3436 (c_parser_conditional_expression): Likewise.
3437 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3438 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3439 (process_init_element): Likewise.
3440 (build_binary_op): Likewise.
3441 (handle_omp_array_sections_1): Likewise.
3442
1e47f02b
TS
34432017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3444
3445 * c-parser.c (c_parser_omp_clause_num_gangs)
3446 (c_parser_omp_clause_num_workers)
3447 (c_parser_omp_clause_vector_length): Merge functions into...
3448 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3449 all users.
3450
c24e924f
NS
34512017-05-11 Nathan Sidwell <nathan@acm.org>
3452
3453 * gimple-parser.c: Don't #include tree-dump.h.
3454
c587104e
MM
34552017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3456
3457 PR testsuite/80580
3458 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3459
67ac9a9d
MM
34602017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3461
3462 PR testsuite/80580
3463 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3464 incorrect __MEM syntax.
3465
ac4eb40f
MM
34662017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3467
3468 PR testsuite/80580
3469 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3470 type of unary '*'.
3471
641da50a
NS
34722017-05-09 Nathan Sidwell <nathan@acm.org>
3473
3474 * c-tree.h (pushdecl): Declare.
3475
56d35585
DM
34762017-05-05 David Malcolm <dmalcolm@redhat.com>
3477
3478 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3479 with diagnostic_report_diagnostic.
3480 * c-errors.c (pedwarn_c99): Likewise.
3481 (pedwarn_c90): Likewise.
3482
815d9cc6
XR
34832017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3484
92a285c1 3485 PR c++/80038
815d9cc6
XR
3486 * c-gimplify.c (c_gimplify_expr): Remove calls to
3487 cilk_gimplifY_call_params_in_spawned_fn.
3488
1c4ea66f
DM
34892017-04-25 David Malcolm <dmalcolm@redhat.com>
3490
3491 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3492 hint for removing extra semicolon.
3493
666f7903
JJ
34942017-04-21 Jakub Jelinek <jakub@redhat.com>
3495
3496 PR c/80468
3497 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3498 enabled, set specs->type to integer_type_node.
3499
5764ee3c
JW
35002017-04-03 Jonathan Wakely <jwakely@redhat.com>
3501
3502 * c-array-notation.c: Fix typo in comment.
3503
10fa8dfb
MP
35042017-03-29 Marek Polacek <polacek@redhat.com>
3505
3506 PR c/79730
3507 * c-decl.c (finish_decl): Check VAR_P.
3508
a9e4a1a5
JJ
35092017-03-27 Jakub Jelinek <jakub@redhat.com>
3510
3511 PR middle-end/80162
3512 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3513 * c-typeck.c (c_mark_addressable): Likewise. Look through
3514 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3515 to ARRAY_TYPE.
3516 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3517
ee3ff394
MP
35182017-03-23 Marek Polacek <polacek@redhat.com>
3519
3520 * c-tree.h: Remove a C_RID_YYCODE reference.
3521
4d1b8e70
JJ
35222017-03-21 Jakub Jelinek <jakub@redhat.com>
3523
3524 PR c/80097
3525 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3526 optional COMPOUND_EXPR with ubsan instrumentation.
3527
31dc71a8
MP
35282017-03-17 Marek Polacek <polacek@redhat.com>
3529
3530 * c-parser.c: Add C11 references.
3531
d579c385
MP
35322017-03-15 Marek Polacek <polacek@redhat.com>
3533
3534 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3535
85059a38
MP
35362017-03-11 Marek Polacek <polacek@redhat.com>
3537
3538 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3539
2f6f187a
DM
35402017-03-10 David Malcolm <dmalcolm@redhat.com>
3541
3542 PR translation/79848
3543 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3544 "%qs".
3545 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3546
36618428
MP
35472017-03-09 Marek Polacek <polacek@redhat.com>
3548
3549 PR sanitizer/79757
3550 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3551 parameter declarations with initializers.
3552
01e5af5a
JJ
35532017-03-09 Jakub Jelinek <jakub@redhat.com>
3554
3555 PR c/79969
3556 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3557 TYPE_STUB_DECL.
3558
a71dbc63
JJ
35592017-03-07 Jakub Jelinek <jakub@redhat.com>
3560
3561 PR c/79834
3562 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3563 for "may only be used in compound statements" diagnostics, change it
3564 such that the same translatable string is used for all pragmas. For
3565 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3566 diagnostics.
3567 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3568 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3569 "may only be used in compound statements" diagnostics, such that the
3570 same translatable string is used for all pragmas.
3571
1ff4bae6
MP
35722017-03-04 Marek Polacek <polacek@redhat.com>
3573
3574 PR c/79847
3575 * c-decl.c (implicit_decl_warning): Add missing space.
3576
7f5a7d78
MP
35772017-03-03 Marek Polacek <polacek@redhat.com>
3578
3579 PR c/79758
3580 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3581 current_function_prototype_arg_types is error_mark_node. Fix
3582 formatting. Use TREE_VALUE instead of TREE_TYPE.
3583
883c8f06
JJ
35842017-03-03 Jakub Jelinek <jakub@redhat.com>
3585
79c9b7a8
JJ
3586 PR c/79837
3587 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3588 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3589 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3590 diagnostics.
3591
883c8f06
JJ
3592 PR c/79836
3593 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3594 instead of %<_Generic>.
3595 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3596 (c_parser_omp_target_exit_data): Use %<release%> instead of
3597 %<release>.
3598
324ff1a0
JJ
35992017-02-28 Jakub Jelinek <jakub@redhat.com>
3600
3601 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3602 instead of just cond ? "..." : "...".
3603 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3604 for "enter"/"exit" keyword.
3605 (c_finish_oacc_routine): Don't use %s to supply portions of the
3606 message.
3607
4227c9ad
JJ
36082017-02-24 Jakub Jelinek <jakub@redhat.com>
3609
3610 PR c++/79588
3611 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3612 handle -Wrestrict here.
3613 * c-typeck.c (build_function_call_vec): Adjust
3614 check_function_arguments caller.
3615
5d972e66
RB
36162017-02-23 Richard Biener <rguenther@suse.de>
3617
3618 PR c/79684
3619 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3620 to initialize c_exprs to return.
3621 (c_parser_gimple_binary_expression): Likewise.
3622 (c_parser_gimple_unary_expression): Likewise.
3623 (c_parser_gimple_postfix_expression): Likewise.
3624
61ac5ebe
MP
36252017-02-22 Marek Polacek <polacek@redhat.com>
3626
3627 PR c/79662
3628 * c-typeck.c (convert_arguments): Handle error_mark_node.
3629
41d1b0b1
PK
36302017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3631
3632 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3633 value of c_parser_parse_ssa_name against error_mark_node and emit
3634 error if ssa name is anonymous and written as default definition.
3635
eab1f169
PK
36362017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3637
3638 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3639 FMA_EXPR.
3640
bcac0b4d
JJ
36412017-02-16 Jakub Jelinek <jakub@redhat.com>
3642
3643 PR c++/79512
3644 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3645 ignore #pragma omp target even when not followed by identifier.
3646
1be33173
PK
36472017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3648
3649 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3650 (c_parser_gimple_unary_expression): Likewise.
3651
aa326bfb
JJ
36522017-02-13 Jakub Jelinek <jakub@redhat.com>
3653
3654 * c-parser.c (c_parser_oacc_declare): Add missing space in
3655 diagnostics.
3656
8a398bc5
PK
36572017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3658
3659 PR c/79478
3660 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3661 set_c_expr_source_range when parsing ssa-name.
3662
3dcde5ef 36632017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3664 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3665
3666 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3667 building IL when arguments are error_mark_node.
3668 (c_parser_gimple_unary_expression): Likewise.
3669 (c_parser_gimple_if_stmt): Likewise.
3670 (c_parser_gimple_switch_stmt): Likewise.
3671 (c_parser_gimple_return_stmt): Likewise.
3672 (c_parser_parse_ssa_name): When name lookup fails do not build
3673 an SSA name. Use undeclared rather than not declared in error
3674 reporting.
3675
192b048b
MP
36762017-02-09 Marek Polacek <polacek@redhat.com>
3677
3678 PR c/79428
3679 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3680 instead of c_parser_skip_until_found.
3681
56f71478
JJ
36822017-02-09 Jakub Jelinek <jakub@redhat.com>
3683
3684 PR c/79431
3685 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3686 symtab_node::get on automatic variables.
3687
02889d23
CLT
36882016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3689 Chung-Lin Tang <cltang@codesourcery.com>
3690
3691 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3692 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3693 semantic checking.
3694 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3695
7af4b20d
RB
36962017-02-07 Richard Biener <rguenther@suse.de>
3697
3698 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3699 (c_parser_gimple_postfix_expression_after_primary):
3700 Do not use c_build_function_call_vec to avoid folding and promotion.
3701 Simplify.
3702
e5e391d6
MO
37032017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3704
3705 PR lto/79061
3706 * c-decl.c (pop_scope): Pass main_input_filename to
3707 build_translation_unit_decl.
3708
c2e84327
DM
37092017-01-24 David Malcolm <dmalcolm@redhat.com>
3710
3711 * c-parser.c: Include "read-rtl-function.h" and
3712 "run-rtl-passes.h".
3713 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3714 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3715 production. Update for renaming of field "gimple_pass" to
3716 "gimple_or_rtl_pass". If __RTL was seen, call
3717 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3718 to an auto_timevar, to cope with early exit.
3719 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3720 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3721 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3722 Handle RID_RTL.
3723 (c_parser_parse_rtl_body): New function.
3724 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3725 (struct c_declspecs): Rename field "gimple_pass" to
3726 "gimple_or_rtl_pass". Add field "rtl_p".
3727 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3728 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3729 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3730 (c_parser_gimple_or_rtl_pass_list): ...this.
3731
2ebd93e1
MP
37322017-01-20 Marek Polacek <polacek@redhat.com>
3733
3734 PR c/64279
3735 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3736
b1c95bb5
RB
37372017-01-13 Richard Biener <rguenther@suse.de>
3738
3739 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3740 nops.
3741
25329913
RB
37422017-01-13 Richard Biener <rguenther@suse.de>
3743
3744 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3745 _Literal ( type-name ) number.
3746
6bb4ea5c
RB
37472017-01-12 Richard Biener <rguenther@suse.de>
3748
3749 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3750 __MEM.
3751
6b5b4e9c
JJ
37522017-01-11 Jakub Jelinek <jakub@redhat.com>
3753
3754 PR c++/72813
3755 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3756 PCH file.
3757
e3252775
RB
37582017-01-11 Richard Biener <rguenther@suse.de>
3759
3760 PR bootstrap/79052
3761 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3762 returns on parse errors.
3763
a9342885
MP
37642017-01-04 Marek Polacek <polacek@redhat.com>
3765
3766 PR c++/64767
3767 * c-parser.c (c_parser_postfix_expression): Mark zero character
3768 constants by setting original_type in c_expr.
3769 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3770 with a zero character constant.
3771 (char_type_p): New function.
3772
5dd9a9d0
DM
37732017-01-04 David Malcolm <dmalcolm@redhat.com>
3774
3775 * c-parser.c (c_parser_declaration_or_fndef): Create a
3776 rich_location at init_loc and parse it to start_init.
3777 (last_init_list_comma): New global.
3778 (c_parser_braced_init): Update last_init_list_comma when parsing
3779 commas. Pass it to pop_init_level. Pass location of closing
3780 brace to pop_init_level.
3781 (c_parser_postfix_expression_after_paren_type): Create a
3782 rich_location at type_loc and parse it to start_init.
3783 (c_parser_omp_declare_reduction): Likewise for loc.
3784 * c-tree.h (start_init): Add rich_location * param.
3785 (pop_init_level): Add location_t param.
3786 * c-typeck.c (struct initializer_stack): Add field
3787 "missing_brace_richloc".
3788 (start_init): Add richloc param, use it to initialize
3789 the stack node's missing_brace_richloc.
3790 (last_init_list_comma): New decl.
3791 (finish_implicit_inits): Pass last_init_list_comma to
3792 pop_init_level.
3793 (push_init_level): When finding missing open braces, add fix-it
3794 hints to the richloc.
3795 (pop_init_level): Add "insert_before" param and pass it
3796 when calling pop_init_level. Add fixits about missing
3797 close braces to any richloc. Use the richloc for the
3798 -Wmissing-braces warning.
3799 (set_designator): Pass last_init_list_comma to pop_init_level.
3800 (process_init_element): Likewise.
3801
cbe34bb5
JJ
38022017-01-01 Jakub Jelinek <jakub@redhat.com>
3803
3804 Update copyright years.
3805
d17680f3
JJ
38062016-12-21 Jakub Jelinek <jakub@redhat.com>
3807
0dba7960
JJ
3808 PR bootstrap/78817
3809 * c-typeck.c (build_function_call_vec): If check_function_arguments
3810 returns true, set TREE_NO_WARNING on CALL_EXPR.
3811
d17680f3
JJ
3812 PR c/77767
3813 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3814 to *expr instead of overwriting it.
3815
aa90531e
RB
38162016-12-20 Richard Biener <rguenther@suse.de>
3817
3818 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3819 error recovery.
3820 (c_parser_gimple_statement): Only build assigns for non-error
3821 stmts.
3822 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3823
629b3d75
MJ
38242016-12-14 Martin Jambor <mjambor@suse.cz>
3825
3826 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3827 omp-low.h.
3828 (c_finish_oacc_routine): Adjusted call to
3829 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3830 to use their new names.
3831 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3832 use its new name.
3833 (c_parser_oacc_update): Likewise.
3834 (c_parser_omp_simd): Likewise.
3835 (c_parser_omp_target_update): Likewise.
3836 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3837 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3838 name.
3839 (c_finish_omp_cancellation_point): Likewise.
3840 * gimple-parser.c: Do not include omp-low.h
3841
c5af52eb
CP
38422016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3843 James Norris <jnorris@codesourcery.com>
3844
3845 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3846 EXIT_DATA,WAIT} are not used in compound statements.
3847 (c_parser_oacc_enter_exit_data): Update diagnostics.
3848
48330c93
BE
38492016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3850
3851 PR c++/71973
3852 * c-decl.c (diagnose_mismatched_decls): Use
3853 OPT_Wbuiltin_declaration_mismatch here too.
3854
899ca90e 38552016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3856 Alan Hayward <alan.hayward@arm.com>
3857 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3858
3859 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3860 (make_label, finish_struct): Likewise.
3861
1ee62b92 38622016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3863 Richard Biener <rguenther@suse.de>
22b15758 3864
8e745a17
JJ
3865 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3866 * config-lang.in (gtfiles): Add c/c-parser.h.
3867 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3868 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3869 * c-parser.c (enum c_id_kind, struct c_token,
3870 c_parser_next_token_is, c_parser_next_token_is_not,
3871 c_parser_next_token_is_keyword,
3872 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3873 Split out to ...
3874 * c-parser.h: ... new header.
3875 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3876 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3877 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3878 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3879 c_parser_error, c_parser_require, c_parser_skip_until_found,
3880 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3881 c_parser_type_name): Export.
3882 (c_parser_tokens_buf): New function.
3883 (c_parser_error): Likewise.
3884 (c_parser_set_error): Likewise.
3885 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3886 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3887 via c_parser_parse_gimple_body.
8e745a17
JJ
3888 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3889 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3890 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3891 c_parser_error, c_parser_require, c_parser_skip_until_found,
3892 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3893 c_parser_type_name): Declare.
1ee62b92
PG
3894 (struct c_parser): Declare forward.
3895 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3896 (c_parser_error): Likewise.
3897 (c_parser_set_error): Likewise.
3898 * gimple-parser.c: New file.
3899 * gimple-parser.h: Likewise.
1ee62b92 3900
22b15758
UB
39012016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3902
3903 PR c/35503
3904 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3905 warn_for_restrict.
3906
84ff4775
LCW
39072016-09-11 Le-Chun Wu <lcwu@google.com>
3908 Mark Wielaard <mjw@redhat.com>
3909
3910 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3911 to the given -Wshadow= variant.
3912
4d0cdd0c
TP
39132016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3914
3915 * c-typeck.c: Include memmodel.h.
3916
1202f33e
JJ
39172016-10-13 Jakub Jelinek <jakub@redhat.com>
3918
3919 PR target/77957
3920 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3921 instead of lhd_return_null_tree_v.
3922
8a14afd0
BS
39232016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3924
3925 PR c++/69733
3926 * c-decl.c (smallest_type_quals_location): New static function.
3927 (grokdeclarator): Try to find the correct location for an ignored
3928 qualifier.
3929
81fea426
MP
39302016-09-26 Marek Polacek <polacek@redhat.com>
3931
3932 PR c/7652
3933 * c-decl.c (pop_scope): Add gcc_fallthrough.
3934
39352016-09-26 Marek Polacek <polacek@redhat.com>
3936
3937 PR c/7652
3938 * c-parser.c (struct c_token): Add flags field.
3939 (c_lex_one_token): Pass it to c_lex_with_flags.
3940 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3941 into IFN_FALLTHROUGH.
3942 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3943 attribute fallthrough after a case label or default label.
3944 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3945
9a2300e9
MP
39462016-09-24 Marek Polacek <polacek@redhat.com>
3947
3948 PR c/77490
3949 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3950 have boolean value. Warn about ++/-- on booleans.
3951
7de76362
JJ
39522016-09-23 Jakub Jelinek <jakub@redhat.com>
3953
3954 * c-parser.c (incomplete_record_decls): Remove unnecessary
3955 = vNULL initialization of file scope vec.
3956
5b73d2ab
MP
39572016-09-16 Marek Polacek <polacek@redhat.com>
3958
3959 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3960
e51fbec3
MP
39612016-09-14 Marek Polacek <polacek@redhat.com>
3962
3963 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3964 (fix_array_notation_expr): Likewise.
3965 * c-decl.c (finish_decl): Likewise.
3966 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3967 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3968 (function_to_pointer_conversion): Use false instead of 0.
3969 (convert_lvalue_to_rvalue): Likewise.
3970 (parser_build_unary_op): Likewise.
3971 (build_atomic_assign): Likewise.
3972 (build_unary_op): Change nonconvert parameter type to bool, use
3973 true/false instead of 1/0.
3974 (build_binary_op): Use true instead of 1.
3975
254830ba
DM
39762016-09-13 David Malcolm <dmalcolm@redhat.com>
3977
3978 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3979 of add_fixit_insert to add_fixit_insert_before.
3980
4c13ba17
MP
39812016-09-13 Marek Polacek <polacek@redhat.com>
3982
3983 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3984 it.
3985
54dcdb88
BE
39862016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3987
3988 PR c++/77496
3989 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3990 COMPOUND_EXPR to warn_for_omitted_condop.
3991
e5106e27
DM
39922016-09-07 David Malcolm <dmalcolm@redhat.com>
3993
3994 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3995 c_get_substring_location for this new langhook.
3996
9dc5773f
JJ
39972016-09-02 Jakub Jelinek <jakub@redhat.com>
3998
3999 PR c/65467
4000 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4001 flag_openmp.
4002 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4003 instead of mark_exp_read on low_bound/length expression.
4004 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4005 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4006 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4007 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4008 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4009 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4010 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4011 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4012 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4013 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4014 instead of mark_expr_read.
4015 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4016 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4017 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4018 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4019 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4020 array section bases outside of depend clause, for depend clause
4021 use convert_lvalue_to_rvalue on the base.
4022 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4023 linear, aligned, map, to and from clauses.
4024 (c_omp_clause_copy_ctor): New function.
4025
295844f6
MP
40262016-09-01 Marek Polacek <polacek@redhat.com>
4027
4028 PR c/7652
4029 * c-typeck.c (composite_type): Add FALLTHRU comment.
4030
089af25c
DM
40312016-08-31 David Malcolm <dmalcolm@redhat.com>
4032
4033 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4034 to the insertion fixits for "struct", "union", and "enum".
4035
f9087798
DM
40362016-08-30 David Malcolm <dmalcolm@redhat.com>
4037
4038 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4039 rather than add_fixit_misspelled_id.
4040 (undeclared_variable): Likewise.
4041 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4042 now-redundant "here" params from add_fixit_insert method calls.
4043 (c_parser_parameter_declaration): Likewise.
4044 * c-typeck.c (build_component_ref): Remove now-redundant range
4045 param from add_fixit_replace method calls.
4046
ebef225f
MP
40472016-08-25 Marek Polacek <polacek@redhat.com>
4048
4049 * c-typeck.c (parser_build_binary_op): Pass LHS to
4050 warn_logical_not_parentheses.
4051
fe377a48
MP
40522016-08-25 Marek Polacek <polacek@redhat.com>
4053
4054 PR c/77323
4055 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4056 or _FloatN or _FloatNx is not supported.
4057 (finish_declspecs): Set type to integer_type_node when _FloatN or
4058 _FloatNx is not supported.
4059
c65699ef
JM
40602016-08-19 Joseph Myers <joseph@codesourcery.com>
4061
4062 PR c/32187
4063 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4064 (struct c_declspecs): Add field floatn_nx_idx.
4065 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4066 and _FloatNx type specifiers.
4067 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4068 (c_parser_declspecs, c_parser_attribute_any_word)
4069 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4070 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4071 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4072 narrower than double.
4073
2f1364c2
JJ
40742016-08-12 Jakub Jelinek <jakub@redhat.com>
4075 Martin Liska <mliska@suse.cz>
4076
4077 PR c/67410
4078 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4079 % to determine val element to change. Assert that
4080 wchar_bytes * charwidth fits into val array.
4081
191816a3
MP
40822016-08-12 Marek Polacek <polacek@redhat.com>
4083
4084 PR c/7652
4085 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4086 (c_parser_postfix_expression): Likewise.
4087 * c-typeck.c (build_unary_op): Adjust fall through comment.
4088 (c_mark_addressable): Likewise.
4089
b95a64bb
JJ
40902016-08-11 Jakub Jelinek <jakub@redhat.com>
4091
4092 PR c/72816
4093 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4094 array member through typedef, for orig_qual_indirect == 0 clear
4095 orig_qual_type.
4096
895aa8e1
DM
40972016-08-08 David Malcolm <dmalcolm@redhat.com>
4098
4099 PR c/64955
4100 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4101 this up to selftest::run_c_tests.
4102 (selftest::run_c_tests): New function.
4103
0b212d8c
TS
41042016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4105
ae9281fc
TS
4106 * c-parser.c (struct oacc_routine_data): Add error_seen and
4107 fndecl_seen members.
4108 (c_finish_oacc_routine): Use these.
4109 (c_parser_declaration_or_fndef): Adjust.
4110 (c_parser_oacc_routine): Likewise. Support more C language
4111 constructs, and improve diagnostics. Move pragma context
4112 checking...
4113 (c_parser_pragma): ... here.
4114
0b212d8c
TS
4115 * c-parser.c (struct oacc_routine_data): New.
4116 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4117 Simplify code.
4118 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4119 declare target" attribute.
4120
76e2c821
JB
41212016-08-01 Jan Beulich <jbeulich@suse.com>
4122
4123 * c-fold.c (c_fully_fold_internal): Also emit shift count
4124 warnings for vector types.
4125 * c-typeck.c (build_binary_op): Likewise.
4126
f618a472
MP
41272016-07-29 Marek Polacek <polacek@redhat.com>
4128
4129 PR c/71742
4130 * c-decl.c (finish_struct): Rephrase an error message.
4131
efd0786f
MP
4132 PR c/71853
4133 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4134 to error node for invalid code.
4135
e00dceaf
MP
4136 PR c/71573
4137 * c-decl.c (implicitly_declare): Return decl early not only for
4138 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4139
673a107a
JJ
41402016-07-29 Jakub Jelinek <jakub@redhat.com>
4141
4142 PR c/71969
4143 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4144 on GNU extern inline functions.
4145
a5b5c8b6
MP
41462016-07-29 Marek Polacek <polacek@redhat.com>
4147
4148 PR c/71583
4149 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4150 check expr.value.
4151
e3fe09c1
UB
41522016-07-22 Uros Bizjak <ubizjak@gmail.com>
4153
4154 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4155
7c8f7eaa
DM
41562016-07-20 David Malcolm <dmalcolm@redhat.com>
4157
4158 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4159 spellcheck-tree.h
4160 (best_macro_match): Likewise, converting from a typedef to a
4161 subclass.
4162 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4163 (lookup_name_fuzzy): Update for change of best_macro_match to a
4164 subclass with a ctor that calls cpp_forall_identifiers.
4165
de6a69ee
DM
41662016-07-20 David Malcolm <dmalcolm@redhat.com>
4167
4168 * c-decl.c (implicit_decl_warning): Update for conversion of
4169 return type of lookup_name_fuzzy to const char *.
4170 (undeclared_variable): Likewise.
4171 (lookup_name_fuzzy): Convert return type from tree to
4172 const char *.
4173 * c-parser.c (c_parser_declaration_or_fndef): Update for
4174 conversion of return type of lookup_name_fuzzy to const char *.
4175 (c_parser_parameter_declaration): Likewise.
4176
b1c9c068
CP
41772016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4178
4179 * c-parser.c (c_parser_oacc_declare): Don't scan for
4180 GOMP_MAP_POINTER.
4181 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4182 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4183 zero-length subarrays.
4184
ddbbcb19
JJ
41852016-07-15 Jakub Jelinek <jakub@redhat.com>
4186
4187 PR c/71858
4188 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4189 instead of FUZZY_LOOKUP_NAME.
4190 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4191 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4192
dd36b877
JJ
41932016-07-14 Jakub Jelinek <jakub@redhat.com>
4194
4195 PR c/71858
4196 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4197
8c681247
TS
41982016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4199
4200 * c-parser.c (c_parser_generic_selection): Make type of variable
4201 auto_vec.
4202 (c_parser_omp_declare_simd): Likewise.
4203
bf4fa671
TS
42042016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4205
4206 * c-decl.c (struct c_struct_parse_info): Change member types
4207 from vec to auto_vec.
4208 (start_struct): Adjust.
4209 (finish_struct): Likewise.
4210
557e8c49
JJ
42112016-07-02 Jakub Jelinek <jakub@redhat.com>
4212
4213 PR c/71719
4214 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4215
54d19c3b
TS
42162016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4217
4218 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4219 Move pragma context checking into...
4220 (c_parser_omp_cancellation_point): ... here, and improve
4221 diagnostic messages.
4222 * c-typeck.c (c_finish_omp_cancel)
4223 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4224
152ef731
JJ
42252016-06-29 Jakub Jelinek <jakub@redhat.com>
4226
4227 PR c/71685
4228 * c-typeck.c (c_build_qualified_type): Don't clear
4229 C_TYPE_INCOMPLETE_VARS for the main variant.
4230
42312016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4232
4233 PR c/71552
4234 * c-typeck.c (output_init_element): Diagnose incompatible types
4235 before non-constant initializers.
4236
e9ac1f86
JJ
42372016-06-28 Jakub Jelinek <jakub@redhat.com>
4238
4239 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4240
277d7ee0
AK
42412016-06-23 Andi Kleen <ak@linux.intel.com>
4242
4243 * Make-lang.in: Add support for autofdo.
4244
1a4f11c8
DM
42452016-06-22 David Malcolm <dmalcolm@redhat.com>
4246
4247 PR c/70339
4248 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4249 (implicit_decl_warning): When issuing warnings for implicit
4250 declarations, attempt to provide a suggestion via
4251 lookup_name_fuzzy.
4252 (undeclared_variable): Likewise when issuing errors.
4253 (lookup_name_in_scope): Likewise.
4254 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4255 (best_macro_match): New typedef.
4256 (find_closest_macro_cpp_cb): New function.
4257 (lookup_name_fuzzy): New function.
4258 * c-parser.c: Include gcc-rich-location.h.
4259 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4260 (c_keyword_starts_typename): ...this new function.
4261 (c_parser_declaration_or_fndef): When issuing errors about
4262 missing "struct" etc, add a fixit. For other kinds of errors,
4263 attempt to provide a suggestion via lookup_name_fuzzy.
4264 (c_parser_parms_declarator): When looking ahead to detect typos in
4265 type names, also reject CPP_KEYWORD.
4266 (c_parser_parameter_declaration): When issuing errors about
4267 unknown type names, attempt to provide a suggestion via
4268 lookup_name_fuzzy.
4269 * c-tree.h (c_keyword_starts_typename): New prototype.
4270
5a578671
JM
42712016-06-20 Joseph Myers <joseph@codesourcery.com>
4272
4273 PR c/71601
4274 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4275 c_common_type returns error_mark_node.
4276
3f8257db 42772016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4278
4279 PR c/69507
4280 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4281 __alignof__ (expression).
4282
6a3f203c
DM
42832016-06-14 David Malcolm <dmalcolm@redhat.com>
4284
4285 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4286
264757fb
DM
42872016-06-14 David Malcolm <dmalcolm@redhat.com>
4288
4289 * c-typeck.c (build_component_ref): Simplify fixit code by
4290 using gcc_rich_location::add_fixit_misspelled_id.
4291 (set_init_label): Likewise.
4292
f7e4f2e3
DM
42932016-06-13 David Malcolm <dmalcolm@redhat.com>
4294
4295 * c-parser.c (c_parser_initelt): Provide location of name for new
4296 location_t param of set_init_label.
4297 * c-tree.h (set_init_label): Add location_t param.
4298 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4299 param and use it when issuing error messages about unrecognized
4300 field names. Attempt to provide a fixit hint if appropriate,
4301 otherwise update the error message to provide the type name.
4302
4b1ffdb1
TS
43032016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4304
4305 PR c/71381
4306 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4307 Loosen checking.
4308
44a845ca
MS
43092016-06-08 Martin Sebor <msebor@redhat.com>
4310 Jakub Jelinek <jakub@redhat.com>
4311
4312 PR c++/70507
4313 PR c/68120
4314 * c-typeck.c (convert_arguments): Don't promote last argument
4315 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4316
92a5f2ba
MP
43172016-06-08 Marek Polacek <polacek@redhat.com>
4318
4319 PR c/71418
4320 * c-decl.c (grokdeclarator): Check TYPE_P.
4321
08203f73
MP
4322 PR c/71426
4323 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4324 code.
4325
6ffd47b7
DM
43262016-06-07 David Malcolm <dmalcolm@redhat.com>
4327
4328 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4329 and structure element reference, capture the location of the
4330 element name token and pass it to build_component_ref.
4331 (c_parser_postfix_expression_after_primary): Likewise for
4332 structure element dereference.
4333 (c_parser_omp_variable_list): Likewise for
4334 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4335 * c-tree.h (build_component_ref): Add location_t param.
4336 * c-typeck.c (build_component_ref): Add location_t param
4337 COMPONENT_LOC. Use it, if available, when issuing hints about
4338 mispelled member names to provide a fixit replacement hint.
4339
1f40cff3
MP
43402016-06-06 Marek Polacek <polacek@redhat.com>
4341
4342 PR c/71362
4343 * c-parser.c (c_parser_direct_declarator): Set location.
4344
5545a907
MP
43452016-06-06 Marek Polacek <polacek@redhat.com>
4346
4347 * c-typeck.c (comptypes_internal): Handle comparisons of
4348 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4349 TYPE_REF_CAN_ALIAS_ALL.
4350
b605f663
CLT
43512016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4352
4353 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4354 arguments as addressable when async clause exists.
4355
00631022
JJ
43562016-05-30 Jakub Jelinek <jakub@redhat.com>
4357
4358 PR c++/71349
4359 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4360 when combined with target construct.
4361
7211a097
JJ
43622016-05-26 Jakub Jelinek <jakub@redhat.com>
4363
4364 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4365 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4366
95efe6b6
MP
43672016-05-25 Marek Polacek <polacek@redhat.com>
4368
4369 PR c/71265
4370 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4371
a23faf7a
MP
4372 PR c/71266
4373 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4374
e46c7770
CP
43752016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4376
4377 * c-parser.c (c_parser_oacc_declare): Add support for
4378 GOMP_MAP_FIRSTPRIVATE_POINTER.
4379 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4380 argument with enum c_omp_region_type ort.
4381 (handle_omp_array_sections): Likewise. Update call to
4382 handle_omp_array_sections_1.
4383 (c_finish_omp_clauses): Add specific errors and warning messages for
4384 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4385 call to handle_omp_array_sections.
4386
a04e69c0
TS
43872016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4388
4389 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4390
f17a223d
RB
43912016-05-24 Richard Biener <rguenther@suse.de>
4392
4393 PR middle-end/70434
4394 PR c/69504
4395 * c-typeck.c (build_array_ref): Do not complain about indexing
4396 non-lvalue vectors. Adjust for function name change.
4397
79063edd
MS
43982016-05-20 Martin Sebor <msebor@redhat.com>
4399
4400 PR c/71115
4401 * c-typeck.c (error_init): Use
4402 expansion_point_location_if_in_system_header.
4403 (warning_init): Same.
4404
8a40fef3
DM
44052016-05-19 David Malcolm <dmalcolm@redhat.com>
4406
4407 PR c/71171
4408 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4409 in error-handling.
4410 (c_parser_postfix_expression): Likewise.
4411 * c-tree.h (c_expr::set_error): New method.
4412 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4413 that result's range is initialized.
4414
e9892350
JG
44152016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4416
4417 * c-typeck.c (parser_build_unary_op): Fix formatting.
4418
8fad45f5
MW
44192016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4420
4421 * c-decl.c (grokdeclarator): Remove errmsg and use of
4422 targetm.invalid_return_type.
4423 (grokparms): Remove errmsg and use of
4424 targetm.invalid_parameter_type.
4425
aa4b467b
JM
44262016-05-13 Joseph Myers <joseph@codesourcery.com>
4427
4428 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4429 function return type.
4430
4f2e1536
MP
44312016-05-12 Marek Polacek <polacek@redhat.com>
4432
4433 PR c/70756
4434 * c-decl.c (build_compound_literal): Pass LOC down to
4435 c_incomplete_type_error.
4436 * c-tree.h (require_complete_type): Adjust declaration.
4437 (c_incomplete_type_error): Likewise.
4438 * c-typeck.c (require_complete_type): Add location parameter, pass it
4439 down to c_incomplete_type_error.
4440 (c_incomplete_type_error): Add location parameter, pass it down to
4441 error_at.
4442 (build_component_ref): Pass location down to c_incomplete_type_error.
4443 (default_conversion): Pass location down to require_complete_type.
4444 (build_array_ref): Likewise.
4445 (build_function_call_vec): Likewise.
4446 (convert_arguments): Likewise.
4447 (build_unary_op): Likewise.
4448 (build_c_cast): Likewise.
4449 (build_modify_expr): Likewise.
4450 (convert_for_assignment): Likewise.
4451 (c_finish_omp_clauses): Likewise.
4452
d6e83a8d
MM
44532016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4454
4455 PR c/43651
4456 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4457 is enabled.
4458 * c-errors.c (pedwarn_c90): Return true if warned.
4459 * c-tree.h (pedwarn_c90): Change return type to bool.
4460 (enum c_declspec_word): Add new enumerator cdw_atomic.
4461
5c3a10fb
MP
44622016-05-11 Marek Polacek <polacek@redhat.com>
4463
4464 PR c++/71024
4465 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4466 diagnose_mismatched_attributes and call it.
4467
cf68d92c
MP
44682016-05-10 Marek Polacek <polacek@redhat.com>
4469
4470 PR c/70255
4471 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4472 on a declaration following the definition.
4473
351f85c5
JJ
44742016-05-05 Jakub Jelinek <jakub@redhat.com>
4475
4476 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4477 parse it through to c_parser_c99_block_statement.
4478 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4479 caller.
4480
deef7113
MP
44812016-05-04 Marek Polacek <polacek@redhat.com>
4482
4483 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4484 OPT_Wdangling_else.
4485
de55efd5
MP
44862016-05-04 Marek Polacek <polacek@redhat.com>
4487
4488 PR c/48778
4489 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4490 for macro expansions.
4491
79ce98bc
MP
44922016-05-03 Marek Polacek <polacek@redhat.com>
4493
4494 PR c/70859
4495 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4496 check_builtin_function_arguments.
4497
fb2647aa
RB
44982016-05-03 Richard Biener <rguenther@suse.de>
4499
4500 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4501 the checksum from the previous stage.
4502
77886428
CP
45032016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4504
4505 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4506 c_finish_omp_clauses.
4507 (c_parser_omp_all_clauses): Likewise.
4508 (c_parser_oacc_cache): Likewise.
4509 (c_parser_oacc_loop): Likewise.
4510 (omp_split_clauses): Likewise.
4511 (c_parser_omp_declare_target): Likewise.
4512 (c_parser_cilk_all_clauses): Likewise.
4513 (c_parser_cilk_for): Likewise.
4514 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4515 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4516
7176a4a0
MP
45172016-05-02 Marek Polacek <polacek@redhat.com>
4518
4519 PR c/70851
4520 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4521 incomplete type.
4522
e7ff0319
CP
45232016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4524
4525 PR middle-end/70626
4526 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4527 OACC_LOOP_CLAUSE_MASK.
4528 (c_parser_oacc_kernels_parallel): Update call to
4529 c_oacc_split_loop_clauses.
4530
9f405ce1
AM
45312016-04-28 Andrew MacLeod <amacleod@redhat.com>
4532
4533 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4534 argument to build_modify_expr in two cases.
4535
c1e1f433
BS
45362016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4537
4538 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4539 warn_for_memset instead of warning directly here.
4540
2448a956
MP
45412016-04-26 Marek Polacek <polacek@redhat.com>
4542
4543 PR c/67784
4544 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4545 out of ...
4546 (c_parser_for_statement): ... here.
4547 (c_parser_if_statement): Use it.
4548 (c_parser_switch_statement): Use it.
4549 (c_parser_while_statement): Use it.
4550
b02a5e26
MP
4551 PR c/70791
4552 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4553
477d4906
IV
45542016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4555
4556 PR c++/69363
4557 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4558 instead of c_finish_cilk_clauses.
4559 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4560 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4561 floating-point variables in the linear clause for Cilk Plus.
4562
fe37c7af
MM
45632016-04-18 Michael Matz <matz@suse.de>
4564
4565 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4566 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4567
949505a9
MP
45682016-04-15 Marek Polacek <polacek@redhat.com>
4569
4570 PR c/70671
4571 * c-typeck.c (build_unary_op): Pass location down to error and
4572 warning call.
4573
dda1bf61
JJ
45742016-04-15 Jakub Jelinek <jakub@redhat.com>
4575
4576 PR c/70436
4577 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4578 where needed.
4579 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4580 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4581 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4582 Adjust c_parser_pragma callers.
4583 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4584 caller.
4585 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4586 c_parser_statement.
4587 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4588 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4589 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4590 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4591 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4592 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4593 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4594 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4595 down where needed.
4596 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4597 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4598 calls.
4599
99cd9857
MP
46002016-04-13 Marek Polacek <polacek@redhat.com>
4601
4602 PR c/70436
4603 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4604 adjust callers.
4605 (c_parser_statement): Likewise.
4606 (c_parser_c99_block_statement): Likewise.
4607 (c_parser_while_statement): Likewise.
4608 (c_parser_for_statement): Likewise.
4609 (c_parser_if_body): Don't set IF_P here.
4610 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4611 about dangling else here.
4612 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4613 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4614 warn about dangling else here.
4615
f13355da
MP
46162016-04-04 Marek Polacek <polacek@redhat.com>
4617
4618 PR c/70307
4619 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4620
5fde6a45
MP
46212016-03-31 Marek Polacek <polacek@redhat.com>
4622
4623 PR c/70297
4624 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4625
4bbf545b
DM
46262016-03-18 David Malcolm <dmalcolm@redhat.com>
4627
4628 PR c/70281
4629 * c-parser.c (c_parser_postfix_expression): Set the source range
4630 for uses of "__builtin_types_compatible_p".
4631
fcc2b74f
JJ
46322016-03-17 Jakub Jelinek <jakub@redhat.com>
4633
4634 PR c/70280
4635 * c-typeck.c (composite_type): Don't count void_list_node
4636 into len, if the list is terminated by void_list_node, start
4637 with void_list_node instead of NULL for newargs. Stop
4638 at void_list_node.
4639
ab4c578f
MP
46402016-03-16 Marek Polacek <polacek@redhat.com>
4641
4642 PR c/70093
4643 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4644 nested functions returning VM types.
4645
96b3c82d
CP
46462016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4647
4648 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4649 when calling c_finish_omp_clauses.
4650
29b9828f
BS
46512016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4652
4653 PR c/69824
4654 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4655 for later.
4656
7ff6ca38
MP
46572016-03-04 Marek Polacek <polacek@redhat.com>
4658
4659 PR c/69798
4660 * c-parser.c (c_parser_postfix_expression): Call
4661 c_parser_cast_expression rather than c_parser_postfix_expression.
4662
686e2237
JJ
46632016-03-01 Jakub Jelinek <jakub@redhat.com>
4664
4665 PR c/69796
4666 PR c/69974
4667 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4668 of incomplete decls to error_mark_node.
4669
0b05329b
MP
46702016-02-24 Marek Polacek <polacek@redhat.com>
4671
4672 PR c/69819
4673 * c-decl.c (finish_decl): Don't update the copy of the type of a
4674 different decl type.
4675
067fbd8b
JJ
46762016-02-23 Jakub Jelinek <jakub@redhat.com>
4677
4678 PR objc/69844
4679 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4680 in id_kind reclassification.
4681
bf14eba2
JJ
46822016-02-16 Jakub Jelinek <jakub@redhat.com>
4683
4684 PR c/69835
4685 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4686
ba539195
JN
46872016-02-16 James Norris <jnorris@codesourcery.com>
4688
4689 PR c/64748
4690 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4691
16595a1f
BS
46922016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4693
f48dfe98
BS
4694 * c-decl.c (build_null_declspecs): Zero the entire struct.
4695
16595a1f
BS
4696 PR c/69522
4697 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4698 callers changed. If nested_p is true, use it to call
4699 finish_implicit_inits.
4700 * c-tree.h (finish_implicit_inits): Declare.
4701 * c-typeck.c (finish_implicit_inits): New function. Move code
4702 from ...
4703 (push_init_level): ... here.
4704 (set_designator, process_init_element): Call finish_implicit_inits.
4705
66756373
JJ
47062016-02-11 Jakub Jelinek <jakub@redhat.com>
4707
4708 PR c/69768
4709 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4710 arguments for -Waddress warning.
4711
1066e9b5
JJ
47122016-02-04 Jakub Jelinek <jakub@redhat.com>
4713
4714 PR c/69669
4715 * c-decl.c (finish_enum): When honoring mode attribute,
4716 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4717
3a5d2ba4
JJ
47182016-01-29 Jakub Jelinek <jakub@redhat.com>
4719
4720 PR debug/69518
4721 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4722 all type variants, not just TYPE_MAIN_VARIANT.
4723
cbdd8ae0
JJ
47242016-01-27 Jakub Jelinek <jakub@redhat.com>
4725
4726 PR debug/66869
4727 * c-decl.c (c_write_global_declarations_1): Warn with
4728 warn_unused_function if static prototype without definition
4729 is not C_DECL_USED.
4730
fa74a4bc
MP
47312016-01-27 Marek Polacek <polacek@redhat.com>
4732
4733 PR c/68062
4734 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4735 to unsigned, if needed. Add -Wsign-compare warning.
4736
13f92e8d
JJ
47372016-01-26 Jakub Jelinek <jakub@redhat.com>
4738
4739 PR tree-optimization/69483
4740 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4741
cd8e73dc 47422016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4743
4744 PR c/24293
4745 * c-tree.h (incomplete_record_decls): Declare.
4746 * c-parser.c (incomplete_record_decls): Define.
4747 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4748 report error if any decl has zero size.
4749 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4750 or enum type to incomplete_record_decls.
4751
e6d6ec9e
TV
47522016-01-14 Tom de Vries <tom@codesourcery.com>
4753
4754 PR tree-optimization/68773
4755 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4756 set force_output.
4757
00083992
MP
47582016-01-14 Marek Polacek <polacek@redhat.com>
4759
4760 PR c/69262
4761 * c-decl.c (grokdeclarator): Provide more information for invalid
4762 array declarations.
4763
7443cf13
DM
47642016-01-06 David Malcolm <dmalcolm@redhat.com>
4765
4766 * c-parser.c (c_parser_unary_expression): For dereferences, build
4767 a combined location before calling build_indirect_ref, so that
4768 error reports cover the full range, manually updating the c_expr
4769 src_range.
4770
6b131d5b
MP
47712016-01-06 Marek Polacek <polacek@redhat.com>
4772
4773 PR sanitizer/69099
4774 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4775 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4776 NULL.
4777
818ab71a
JJ
47782016-01-04 Jakub Jelinek <jakub@redhat.com>
4779
4780 Update copyright years.
4781
2fe0a208
MP
47822016-01-04 Marek Polacek <polacek@redhat.com>
4783
4784 PR c/68908
4785 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4786 optimization to use __atomic_fetch_* built-in if possible.
4787
c7b48c8a
TS
47882015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4789
4790 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4791 into...
4792 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4793 all users.
4794
fda5652f
MP
47952015-12-22 Marek Polacek <polacek@redhat.com>
4796
4797 PR c/69002
4798 * c-typeck.c (build_component_ref): Warn when acessing elements of
4799 atomic structures or unions.
4800
745e411d
DM
48012015-12-21 David Malcolm <dmalcolm@redhat.com>
4802
4803 * c-typeck.c: Include "gcc-rich-location.h".
4804 (build_binary_op): In the two places that call binary_op_error,
4805 create a gcc_rich_location and populate it with the location of
4806 the binary op and its two operands.
4807
94c40e19
DM
48082015-12-16 David Malcolm <dmalcolm@redhat.com>
4809
4810 * c-parser.c (c_parser_statement_after_labels): When calling
4811 c_finish_return, Use the return expression's location if it has
4812 one, falling back to the location of the first token within it.
4813 * c-typeck.c (c_finish_return): When issuing warnings about
4814 the incorrect presence/absence of a return value, issue a note
4815 showing the declaration of the function.
4816
de67c4c3
DM
48172015-12-16 David Malcolm <dmalcolm@redhat.com>
4818
4819 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4820 to 4.
4821 (c_parser_peek_nth_token): New function.
4822 (c_parser_peek_conflict_marker): New function.
4823 (c_parser_error): Detect conflict markers and report them as such.
4824
a10704e1
DM
48252015-12-16 David Malcolm <dmalcolm@redhat.com>
4826
4827 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4828 to preserve range information for the primary expression
4829 in the call to c_parser_postfix_expression_after_primary.
4830
8062bca6
DM
48312015-12-16 David Malcolm <dmalcolm@redhat.com>
4832
4833 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4834 expression location, falling back on the first token location,
4835 rather than always using the latter.
4836
d06f8b75
MP
48372015-12-16 Marek Polacek <polacek@redhat.com>
4838
4839 PR c/64637
4840 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4841 available.
4842
2994fb91
MP
48432015-12-15 Marek Polacek <polacek@redhat.com>
4844
4845 PR c/68907
4846 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4847 artificial decl.
4848
a1b93f8d
DM
48492015-12-08 David Malcolm <dmalcolm@redhat.com>
4850
4851 * c-parser.c (c_parser_alignof_expression): Capture location of
4852 closing parenthesis (if any), or of end of unary expression, and
4853 use it to build a src_range for the expression.
4854
46c6e1e2
DM
48552015-12-08 David Malcolm <dmalcolm@redhat.com>
4856
4857 PR c/68757
4858 * c-parser.c (c_parser_get_builtin_args): Add
4859 "out_close_paren_loc" param, and write back to it.
4860 (c_parser_postfix_expression): Capture the closing
4861 parenthesis location for RID_CHOOSE_EXPR,
4862 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4863 RID_BUILTIN_SHUFFLE and use it to set the source range
4864 for such expressions; within RID_BUILTIN_COMPLEX set
4865 the underlying location.
4866
66189108
MP
48672015-12-07 Marek Polacek <polacek@redhat.com>
4868
4869 PR c/68668
4870 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4871 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4872
f187980b
EB
48732015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4874
4875 * c-tree.h (c_build_va_arg): Adjust prototype.
4876 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4877 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4878 parameter, adjust throughout and issue an error if EXPR is a component
4879 with reverse storage order.
4880
4250754e
JM
48812015-12-02 Jason Merrill <jason@redhat.com>
4882
4883 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4884 (c_fully_fold_internal, decl_constant_value_for_optimization):
4885 Move from c-common.c.
4886 * c-tree.h: Declare decl_constant_value_for_optimization.
4887 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4888
e9e32ee6
JM
48892015-12-02 Joseph Myers <joseph@codesourcery.com>
4890
4891 PR c/68162
4892 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4893 following link from declarator to next declarator. Track original
4894 qualified type and pass it to c_build_qualified_type.
4895 * c-typeck.c (c_build_qualified_type): Add arguments
4896 orig_qual_type and orig_qual_indirect.
4897
ff7a55bf
TS
48982015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4899
4900 * c-parser.c (c_parser_omp_clause_name)
4901 (c_parser_oacc_all_clauses): Alphabetical sorting.
4902
657e4e47
JJ
49032015-12-02 Jakub Jelinek <jakub@redhat.com>
4904
4905 PR c/68533
4906 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4907 for diagnostics.
4908
37d5ad46
JB
49092015-12-01 Julian Brown <julian@codesourcery.com>
4910 Cesar Philippidis <cesar@codesourcery.com>
4911 James Norris <James_Norris@mentor.com>
4912
4913 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4914 (c_parser_oacc_clause_use_device): New function.
4915 (c_parser_oacc_all_clauses): Add use_device support.
4916 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4917 (c_parser_oacc_host_data): New function.
4918 (c_parser_omp_construct): Add host_data support.
4919 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4920 * c-typeck.c (c_finish_oacc_host_data): New function.
4921 (c_finish_omp_clauses): Add use_device support.
4922
a4850ce9
JH
49232015-11-29 Jan Hubicka <hubicka@ucw.cz>
4924
4925 PR c/67106
4926 * c-decl.c: Set TYPE_PACKED in variants.
4927
b58d3df2
ML
49282015-11-27 Martin Liska <mliska@suse.cz>
4929
4930 PR c++/68312
4931 * c-array-notation.c (fix_builtin_array_notation_fn):
4932 Use release_vec_vec instead of vec::release.
4933 (build_array_notation_expr): Likewise.
4934 (fix_conditional_array_notations_1): Likewise.
4935 (fix_array_notation_expr): Likewise.
4936 (fix_array_notation_call_expr): Likewise.
4937
aec17bfe
JJ
49382015-11-27 Jakub Jelinek <jakub@redhat.com>
4939
4940 PR c/63326
4941 * c-parser.c (c_parser_compound_statement_nostart): If
4942 last_label is true, use pragma_stmt instead of pragma_compound
4943 as second c_parser_pragma argument.
4944 (c_parser_omp_ordered, c_parser_omp_target_update,
4945 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4946 false as second argument to c_parser_skip_to_pragma_eol after
4947 diagnosing standalone directives used in pragma_stmt context.
4948
688c4de0
IV
49492015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4950
4951 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4952 with "if (ENABLE_OFFLOADING)".
4953
cbd03aee
DM
49542015-11-23 David Malcolm <dmalcolm@redhat.com>
4955
4956 PR objc/68438
4957 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4958 for various Objective-C constructs: Class.name syntax,
4959 @selector(), @protocol(), @encode(), and [] message syntax.
4960
a87a86e1
DM
49612015-11-20 David Malcolm <dmalcolm@redhat.com>
4962
4963 PR 62314
4964 * c-typeck.c (should_suggest_deref_p): New function.
4965 (build_component_ref): Special-case POINTER_TYPE when
4966 generating a "not a structure of union" error message, and
4967 suggest a "->" rather than a ".", providing a fix-it hint.
4968
8ece8dfb
DM
49692015-11-19 David Malcolm <dmalcolm@redhat.com>
4970
4971 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4972 candidate into a new function, find_closest_identifier.
4973
433068cc
MP
49742015-11-19 Marek Polacek <polacek@redhat.com>
4975
4976 PR c/68412
4977 * c-typeck.c (parser_build_binary_op): Properly handle
4978 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4979
bef08b71
DM
49802015-11-17 David Malcolm <dmalcolm@redhat.com>
4981
4982 * c-parser.c (set_c_expr_source_range): Bulletproof both
4983 overloaded implementations against NULL expr->value.
4984 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4985 values.
4986 (c_parser_unary_expression): Likewise when handling addresses of
4987 labels.
4988 (c_parser_postfix_expression): Likewise for statement expressions,
4989 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4990 __builtin_va_arg, and for __builtin_offset_of.
4991 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4992 src_range using the range of the braced initializer.
4993 (c_parser_transaction_expression): Set src_range for "ret" to a
4994 sane pair of values.
4995
fff77217
KY
49962015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4997
4998 * c-parser.c (c_finish_omp_declare_simd): Look for
4999 "simd" attribute as well. Update error message.
5000
1d899da2
TS
50012015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5002
5003 * c-parser.c (c_parser_omp_declare_target): Adjust.
5004
e4606348
JJ
50052015-11-14 Jakub Jelinek <jakub@redhat.com>
5006
5007 * c-typeck.c (c_finish_omp_clauses): Don't mark
5008 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5009
3e636daf
MP
50102015-11-14 Marek Polacek <polacek@redhat.com>
5011
5012 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5013 * c-typeck.c: Likewise.
5014
ebedc9a3
DM
50152015-11-13 David Malcolm <dmalcolm@redhat.com>
5016
5017 * c-decl.c (warn_defaults_to): Pass line_table to
5018 rich_location ctor.
5019 * c-errors.c (pedwarn_c99): Likewise.
5020 (pedwarn_c90): Likewise.
5021 * c-parser.c (set_c_expr_source_range): New functions.
5022 (c_token::get_range): New method.
5023 (c_token::get_finish): New method.
5024 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5025 based on the range from the start of the LHS to the end of the
5026 RHS.
5027 (c_parser_conditional_expression): Likewise, based on the range
5028 from the start of the cond.value to the end of exp2.value.
5029 (c_parser_binary_expression): Call set_c_expr_source_range on
5030 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5031 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5032 based on the cast_loc through to the end of the expr.
5033 (c_parser_unary_expression): Likewise, based on the
5034 op_loc through to the end of op.
5035 (c_parser_sizeof_expression) Likewise, based on the start of the
5036 sizeof token through to either the closing paren or the end of
5037 expr.
5038 (c_parser_postfix_expression): Likewise, using the token range,
5039 or from the open paren through to the close paren for
5040 parenthesized expressions.
5041 (c_parser_postfix_expression_after_primary): Likewise, for
5042 various kinds of expression.
5043 * c-tree.h (struct c_expr): Add field "src_range".
5044 (c_expr::get_start): New method.
5045 (c_expr::get_finish): New method.
5046 (set_c_expr_source_range): New decls.
5047 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5048 on ret for prefix unary ops.
5049 (parser_build_binary_op): Likewise, running from the start of
5050 arg1.value through to the end of arg2.value.
5051
ec8b536f
MP
50522015-11-13 Marek Polacek <polacek@redhat.com>
5053
5054 PR c/68320
5055 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5056
277fe616
DM
50572015-11-13 David Malcolm <dmalcolm@redhat.com>
5058
5059 * c-typeck.c: Include spellcheck.h.
5060 (lookup_field_fuzzy_find_candidates): New function.
5061 (lookup_field_fuzzy): New function.
5062 (build_component_ref): If the field was not found, try using
5063 lookup_field_fuzzy and potentially offer a suggestion.
5064
6e232ba4
JN
50652015-11-12 James Norris <jnorris@codesourcery.com>
5066 Joseph Myers <joseph@codesourcery.com>
5067
5068 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5069 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5070 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5071 and PRAGMA_OMP_CLAUSE_LINK.
5072 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5073 and PRAGMA_OACC_CLAUSE_LINK.
5074 (OACC_DECLARE_CLAUSE_MASK): New definition.
5075 (c_parser_oacc_declare): New function.
5076
9be4f715
MP
50772015-11-12 Marek Polacek <polacek@redhat.com>
5078
5079 PR c/67784
5080 * c-parser.c (c_parser_for_statement): Reclassify the token in
5081 a correct scope.
5082
e78bede6
MP
50832015-11-11 Marek Polacek <polacek@redhat.com>
5084
5085 PR c/68107
5086 PR c++/68266
5087 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5088 checking the size of an array.
5089
69f293c9
AM
50902015-11-11 Andrew MacLeod <amacleod@redhat.com>
5091
5092 * c-array-notation.c: Remove unused header files.
5093 * c-aux-info.c: Likewise.
5094 * c-convert.c: Likewise.
5095 * c-decl.c: Likewise.
5096 * c-errors.c: Likewise.
5097 * c-lang.c: Likewise.
5098 * c-objc-common.c: Likewise.
5099 * c-parser.c: Likewise.
5100 * c-typeck.c: Likewise.
5101 * gccspec.c: Likewise.
5102
3a40d81d
NS
51032015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5104 Cesar Philippidis <cesar@codesourcery.com>
5105 James Norris <jnorris@codesourcery.com>
5106 Julian Brown <julian@codesourcery.com>
5107 Nathan Sidwell <nathan@codesourcery.com>
5108
3a40d81d
NS
5109 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5110 routine arg.
5111 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5112 (c_parser_pragma): Parse 'acc routine'.
5113 (OACC_ROUTINE_CLAUSE_MARK): Define.
5114 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5115
fc402eec
AA
51162015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5117
5118 PR debug/67192
5119 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5120 location of the backward-goto to the start of the loop body.
5121
f6b0b3db
AA
51222015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5123
5124 PR debug/67192
5125 * c-parser.c (c_parser_while_statement): Finish the loop before
5126 parsing ahead for misleading indentation.
5127 (c_parser_for_statement): Likewise.
5128
ee45a32d
EB
51292015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5130
5131 * c-decl.c (finish_struct): If the structure has reverse storage
5132 order, rewrite the type of array fields with scalar component. Call
5133 maybe_apply_pragma_scalar_storage_order on entry.
5134 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5135 errors on bit-fields and reverse SSO here and not...
5136 (c_mark_addressable): ...here.
5137 (output_init_element): Adjust call to initializer_constant_valid_p.
5138 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5139
8a645150
DM
51402015-11-06 David Malcolm <dmalcolm@redhat.com>
5141
5142 * c-decl.c (warn_defaults_to): Update for change in signature
5143 of diagnostic_set_info.
5144 * c-errors.c (pedwarn_c99): Likewise.
5145 (pedwarn_c90): Likewise.
5146 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5147 for textinfo::set_location.
5148
7a5e4956
CP
51492015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5150 Thomas Schwinge <thomas@codesourcery.com>
5151 James Norris <jnorris@codesourcery.com>
5152
5153 * c-parser.c (c_parser_omp_clause_name): Add support for
5154 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5155 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5156 default(none) in OpenACC.
5157 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5158 arguments.
5159 (c_parser_oacc_clause_tile): New function.
5160 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5161 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5162 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5163 TILE}.
5164 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5165 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5166 FIRSTPRIVATE}.
5167 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5168 (c_parser_oacc_update): Update the error message for missing clauses.
5169 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5170 and OMP_CLAUSE_INDEPENDENT.
5171
bfcfbfa0
MP
51722015-11-05 Marek Polacek <polacek@redhat.com>
5173
5174 PR c/68090
5175 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5176 deal with pre-evaluation on invalid types.
5177
e01d41e5
JJ
51782015-11-05 Jakub Jelinek <jakub@redhat.com>
5179 Ilya Verbin <ilya.verbin@intel.com>
5180
5181 * c-parser.c: Include context.h and gimple-expr.h.
5182 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5183 monotonic together with nonmonotonic.
5184 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5185 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5186 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5187 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5188 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5189 expressions on combined target teams before the target.
5190 (c_parser_omp_declare_target): If decl has "omp declare target" or
5191 "omp declare target link" attribute, and cgraph or varpool node already
5192 exists, then set corresponding flags. Call c_finish_omp_clauses
5193 in the parenthesized extended-list syntax case.
5194 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5195 declare target.
5196 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5197 on OMP_CLAUSE_REDUCTION array sections.
5198 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5199 into the constant offset, or for variable low-bound using
5200 POINTER_PLUS_EXPR. For structure element based array sections use
5201 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5202 (c_finish_omp_clauses): Drop generic_field_head, structure
5203 elements are now always mapped even as array section bases,
5204 diagnose same var in data sharing and mapping clauses. Diagnose if
5205 linear step on declare simd is neither a constant nor a uniform
5206 parameter. Look through POINTER_PLUS_EXPR for array section
5207 reductions. Diagnose the same var or function appearing multiple
5208 times on the same directive. Fix up wording for the to clause if t
5209 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5210 modifier on kinds other than dynamic or guided or nonmonotonic
5211 modifier together with ordered clause.
5212
4bf9e5a8
TS
52132015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5214 Chung-Lin Tang <cltang@codesourcery.com>
5215
5216 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5217
2adfab87
AM
52182015-10-29 Andrew MacLeod <amacleod@redhat.com>
5219
5220 * c-array-notation.c: Reorder #include's and remove duplicates.
5221 * c-aux-info.c: Likewise.
5222 * c-convert.c: Likewise.
5223 * c-decl.c: Likewise.
5224 * c-errors.c: Likewise.
5225 * c-lang.c: Likewise.
5226 * c-objc-common.c: Likewise.
5227 * c-parser.c: Likewise.
5228 * c-typeck.c: Likewise.
5229
e922069e
JW
52302015-10-26 Jim Wilson <jim.wilson@linaro.org>
5231
5232 PR debug/66068
5233 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5234 after calling build_qualified_type.
5235
765dd391
CP
52362015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5237 Thomas Schwinge <thomas@codesourcery.com>
5238 James Norris <jnorris@codesourcery.com>
5239 Joseph Myers <joseph@codesourcery.com>
5240 Julian Brown <julian@codesourcery.com>
5241 Bernd Schmidt <bschmidt@redhat.com>
5242
5243 * c-parser.c (c_parser_oacc_shape_clause): New.
5244 (c_parser_oacc_simple_clause): New.
5245 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5246 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5247
88bae6f4
TS
52482015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5249 James Norris <jnorris@codesourcery.com>
5250 Cesar Philippidis <cesar@codesourcery.com>
5251
5252 PR c/64765
5253 PR c/64880
5254 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5255 parameters, and handle these. Adjust all users.
5256 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5257 into...
5258 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5259 all users.
5260 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5261 declare functions.
5262 (c_finish_omp_construct): Declare function.
5263 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5264 Merge functions into...
5265 (c_finish_omp_construct): ... this new function.
5266
a8fc2579
RB
52672015-10-22 Richard Biener <rguenther@suse.de>
5268
5269 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5270 before folding a MINUS_EXPR.
5271
e9122ef6
MP
52722015-10-21 Marek Polacek <polacek@redhat.com>
5273
5274 PR c/68024
5275 * c-decl.c (start_function): Warn about vararg functions without
5276 a prototype.
5277
9f47c7e5
IE
52782015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5279
5280 * c-typeck.c (build_conditional_expr): Use boolean vector
5281 type for vector comparison.
5282 (build_vec_cmp): New.
5283 (build_binary_op): Use build_vec_cmp for comparison.
5284
fa60eeb9
MP
52852015-10-20 Marek Polacek <polacek@redhat.com>
5286
5287 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5288
2c7020eb
MP
52892015-10-20 Marek Polacek <polacek@redhat.com>
5290
5291 PR c/67964
5292 * c-parser.c (c_parser_attributes): Break out of the loop if the
5293 token after an attribute isn't a comma.
5294
d9a6bd32
JJ
52952015-10-13 Jakub Jelinek <jakub@redhat.com>
5296 Aldy Hernandez <aldyh@redhat.com>
5297
5298 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5299 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5300 (c_parser_omp_variable_list): Handle structure elements for
5301 map, to and from clauses. Handle array sections in reduction
5302 clause. Formatting fixes.
5303 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5304 if clause modifiers.
5305 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5306 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5307 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5308 c_parser_omp_clause_is_device_ptr): New functions.
5309 (c_parser_omp_clause_ordered): Parse optional parameter.
5310 (c_parser_omp_clause_reduction): Handle array reductions.
5311 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5312 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5313 functions.
5314 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5315 (c_parser_omp_clause_depend_sink): New function.
5316 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5317 (c_parser_omp_clause_map): Parse release/delete map kinds and
5318 optional always modifier.
5319 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5320 and c_finish_omp_clauses callers.
5321 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5322 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5323 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5324 (OMP_CRITICAL_CLAUSE_MASK): Define.
5325 (c_parser_omp_critical): Parse critical clauses.
5326 (c_parser_omp_for_loop): Handle doacross loops, adjust
5327 c_finish_omp_for and c_finish_omp_clauses callers.
5328 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5329 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5330 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5331 (c_parser_omp_for): Disallow ordered clause when combined with
5332 distribute. Disallow linear clause when combined with distribute
5333 and not combined with simd.
5334 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5335 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5336 parse clauses and if depend clause is found, don't parse a body.
5337 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5338 Allow target parallel without for after it.
5339 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5340 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5341 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5342 invalid kinds.
5343 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5344 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5345 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5346 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5347 functions.
5348 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5349 defaultmap and is_device_ptr clauses.
5350 (c_parser_omp_target): Parse target parallel and target simd. Set
5351 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5352 and target exit data. Diagnose invalid map kinds.
5353 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5354 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5355 construct.
5356 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5357 &omp_priv.
5358 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5359 (c_parser_omp_taskloop): New function.
5360 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5361 handle PRAGMA_OMP_TASKLOOP.
5362 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5363 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5364 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5365 Add IS_OMP argument, handle structure element bases, diagnose
5366 bitfields, pass IS_OMP recursively, diagnose known zero length
5367 array sections in depend clauses, handle array sections in reduction
5368 clause, diagnose negative length even for pointers.
5369 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5370 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5371 array sections in reduction clause, set
5372 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5373 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5374 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5375 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5376
21ba0cea
MP
53772015-10-06 Marek Polacek <polacek@redhat.com>
5378
5379 * c-parser.c (c_parser_statement_after_labels): Use
5380 protected_set_expr_location.
5381 (c_parser_omp_clause_num_gangs): Likewise.
5382 (c_parser_omp_clause_num_threads): Likewise.
5383 (c_parser_omp_clause_num_workers): Likewise.
5384 (c_parser_omp_clause_vector_length): Likewise.
5385 (c_parser_omp_clause_num_teams): Likewise.
5386 (c_parser_omp_clause_thread_limit): Likewise.
5387 * c-typeck.c (build_c_cast): Likewise.
5388 (c_cast_expr): Likewise.
5389
624d31fe
RS
53902015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5391
5392 * c-typeck.c (c_tree_equal): Use real_equal instead of
5393 REAL_VALUES_EQUAL.
5394
b8fd7909
JM
53952015-10-04 Jason Merrill <jason@redhat.com>
5396
5397 * c-parser.c (c_lex_one_token): Handle @synchronized.
5398 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5399 can change whether the function is transaction_safe.
5400
1c7485af
MP
54012015-10-02 Marek Polacek <polacek@redhat.com>
5402
5403 PR c/67730
5404 * c-typeck.c (convert_for_assignment): Use the expansion point
5405 location throughout.
5406
3e3b8d63
MP
54072015-10-02 Marek Polacek <polacek@redhat.com>
5408
5409 PR c/64249
5410 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5411 and pass it down to c_parser_if_statement.
5412 (c_parser_else_body): Add CHAIN parameter and pass it down to
5413 c_parser_statement_after_labels.
5414 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5415 duplicated if-else-if conditions.
5416
aabef2de
MP
54172015-10-01 Marek Polacek <polacek@redhat.com>
5418
5419 * c-typeck.c (convert_for_assignment): Improve commentary.
5420
de8ddd5f
MP
54212015-09-30 Marek Polacek <polacek@redhat.com>
5422
5423 PR c/67730
5424 * c-typeck.c (c_finish_return): Use the expansion point location for
5425 certain "return with value" warnings.
5426
c4914de6
MLI
54272015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5428
5429 * c-parser.c (pragma_lex): Add loc argument.
5430
0e36f5c7
MP
54312015-09-15 Marek Polacek <polacek@redhat.com>
5432
5433 PR c/67580
5434 * c-decl.c (tag_exists_p): New function.
5435 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5436 struct/union/enum keywords are missing.
5437 * c-tree.h (tag_exists_p): Declare.
5438
2f3bb934
MP
54392015-09-15 Marek Polacek <polacek@redhat.com>
5440
5441 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5442 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5443 Return NULL_TREE instead of 0.
5444 (lookup_name): Return NULL_TREE instead of 0.
5445 (lookup_name_in_scope): Likewise.
5446 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5447 (parser_xref_tag): Use false instead of 0.
5448 (start_struct): Use true instead of 1.
5449 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5450
aa256c4a
MP
54512015-09-14 Marek Polacek <polacek@redhat.com>
5452
5453 * c-typeck.c (set_nonincremental_init_from_string): Use
5454 HOST_WIDE_INT_M1U when shifting a negative value.
5455
dbb68221
MW
54562015-09-09 Mark Wielaard <mjw@redhat.com>
5457
5458 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5459 parm against NULL.
5460
a8a098ac
JJ
54612015-09-10 Jakub Jelinek <jakub@redhat.com>
5462
5463 PR c/67502
5464 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5465 into OMP_FOR_PRE_BODY rather than before the loop.
5466
f4b189d5
JJ
54672015-09-09 Jakub Jelinek <jakub@redhat.com>
5468
0bb99c11
JJ
5469 PR c/67501
5470 * c-parser.c (c_parser_oacc_all_clauses,
5471 c_parser_omp_all_clauses): Remove invalid clause from
5472 list of clauses even if parser->error is set.
5473
fce5e5e3
JJ
5474 PR c/67500
5475 * c-parser.c (c_parser_omp_clause_aligned,
5476 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5477 test for errors.
5478 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5479 error_mark_node.
5480
f4b189d5
JJ
5481 PR c/67495
5482 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5483 instead of c_parser_unary_expression. If the result is !lvalue_p,
5484 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5485
b2aaf235
MP
54862015-09-04 Marek Polacek <polacek@redhat.com>
5487
5488 PR sanitizer/67279
5489 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5490
1807ffc1
MS
54912015-09-03 Martin Sebor <msebor@redhat.com>
5492
5493 PR c/66516
8b652e65
JJ
5494 * c-typeck.c (convert_arguments, parser_build_unary_op,
5495 build_conditional_expr, c_cast_expr, convert_for_assignment,
5496 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5497 reject_gcc_builtin.
5498 (c_decl_implicit): Define.
5499
d04ff417
MP
55002015-09-02 Marek Polacek <polacek@redhat.com>
5501
5502 PR c/67432
5503 * c-parser.c (c_parser_enum_specifier): Give a better error for
5504 an empty enum.
5505
a79683d5
TS
55062015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5507
5508 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5509
191a6b94
MP
55102015-08-12 Marek Polacek <polacek@redhat.com>
5511
5512 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5513 LOC to it.
5514
420a9d9b
MP
55152015-08-03 Marek Polacek <polacek@redhat.com>
5516
5517 PR c/67088
5518 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5519 Use it.
5520 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5521
992118a1
PP
55222015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5523
5524 * c-parser.c (c_parser_if_body): Take token_indent_info
5525 argument. Call warn_for_misleading_indentation even when the
5526 body is a semicolon. Extract token_indent_infos corresponding
5527 to the guard, body and next tokens. Adjust call to
5528 warn_for_misleading_indentation accordingly.
5529 (c_parser_else_body): Likewise.
5530 (c_parser_if_statement): Likewise.
5531 (c_parser_while_statement): Likewise.
5532 (c_parser_for_statement): Likewise.
5533
46308474
LFSM
55342015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5535 Manuel López-Ibáñez <manu@gcc.gnu.org>
5536
5537 * c-decl.c (get_parm_info): Remove static var. Update warning
5538 message.
5539
05b28fd6
MP
55402015-07-27 Marek Polacek <polacek@redhat.com>
5541
5542 PR c++/66555
5543 PR c/54979
5544 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5545
451b5e48
MP
55462015-07-20 Marek Polacek <polacek@redhat.com>
5547
5548 PR c++/55095
5549 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5550 (build_binary_op): Warn about left shift overflows.
5551
1916bcb5
AM
55522015-07-09 Andrew MacLeod <amacleod@redhat.com>
5553
5554 * c-array-notation.c: Adjust includes for flags.h changes.
5555 * c-objc-common.c: Likewise.
5556
c7131fb2
AM
55572015-07-07 Andrew MacLeod <amacleod@redhat.com>
5558
5559 * c-array-notation.c: Adjust includes.
5560 * c-aux-info.c: Likewise.
5561 * c-convert.c: Likewise.
5562 * c-decl.c: Likewise.
5563 * c-errors.c: Likewise.
5564 * c-lang.c: Likewise.
5565 * c-objc-common.c: Likewise.
5566 * c-parser.c: Likewise.
5567 * c-typeck.c: Likewise.
5568
da2e71c9
MLI
55692015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5570
5571 PR fortran/66605
5572 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5573
b155cfd9
MP
55742015-06-29 Marek Polacek <polacek@redhat.com>
5575
5576 PR c/66322
5577 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5578 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5579 about -Wswitch-bool here.
5580 (do_case): Update c_add_case_label call.
5581 (c_finish_case): Update c_do_switch_warnings call.
5582
31521951
MP
55832015-06-27 Marek Polacek <polacek@redhat.com>
5584
5585 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5586
22d03525
MP
55872015-06-26 Marek Polacek <polacek@redhat.com>
5588
5589 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5590 INDIRECT_REF_P.
5591 * c-typeck.c (array_to_pointer_conversion): Likewise.
5592 (build_unary_op): Likewise.
5593 (c_finish_return): Likewise.
5594
f0889939
AM
55952015-06-25 Andrew MacLeod <amacleod@redhat.com>
5596
5597 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5598 * c-parser.c: Likewise.
5599
8d67ee55
RS
56002015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5601
5602 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5603 instead of pointer_hash.
5604 (detect_field_duplicates): Likewise.
5605
0ae9bd27
MP
56062015-06-25 Marek Polacek <polacek@redhat.com>
5607
5608 * c-array-notation.c: Use VAR_P throughout.
5609 * c-decl.c: Likewise.
5610 * c-objc-common.c: Likewise.
5611 * c-parser.c: Likewise.
5612 * c-typeck.c: Likewise.
5613
62f9079a
MP
56142015-06-25 Marek Polacek <polacek@redhat.com>
5615
5616 * c-decl.c: Use is_global_var throughout.
5617 * c-parser.c: Likewise.
5618 * c-typeck.c: Likewise.
5619
abb226c9
AM
56202015-06-17 Andrew MacLeod <amacleod@redhat.com>
5621
5622 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5623 * c-aux-info.c: Likewise.
5624 * c-convert.c: Likewise.
5625 * c-decl.c: Likewise.
5626 * c-errors.c: Likewise.
5627 * c-lang.c: Likewise.
5628 * c-objc-common.c: Likewise.
5629 * c-parser.c: Likewise.
5630 * c-typeck.c: Likewise.
5631
8cbababc
JH
56322015-06-11 Jan Hubicka <hubicka@ucw.cz>
5633
5634 PR middle-end/66325
5635 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5636 variants.
5637
a0349665
PMR
56382015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5639
5640 * c-decl.c (pop_scope): Register the main translation unit
5641 through the new debug hook.
5642
13fdf2e2
AM
56432015-06-08 Andrew MacLeod <amacleod@redhat.com>
5644
5645 * c-array-notation.c : Adjust include files.
5646 * c-aux-info.c : Likewise.
5647 * c-convert.c : Likewise.
5648 * c-decl.c : Likewise.
5649 * c-errors.c : Likewise.
5650 * c-lang.c : Likewise.
5651 * c-lang.h : Likewise.
5652 * c-objc-common.c : Likewise.
5653 * c-parser.c : Likewise.
5654 * c-typeck.c : Likewise.
5655
d7438551
AH
56562015-06-05 Aldy Hernandez <aldyh@redhat.com>
5657
5658 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5659 immediately clobber it.
5660 (c_write_global_declarations_1): Remove call to
5661 check_global_declaration_1.
5662 (c_write_global_declarations_2): Remove.
5663 (c_write_final_cleanups): Rename from c_write_global_declarations.
5664 Remove call to finalize_compilation_unit.
5665 Remove calls to debugging hooks.
5666 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5667 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5668 * c-tree.h: Remove c_write_global_declarations.
5669
ecb9f223
AM
56702015-06-04 Andrew MacLeod <amacleod@redhat.com>
5671
5672 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5673 * c-aux-info.c: Likewise.
5674 * c-convert.c: Likewise.
5675 * c-decl.c: Likewise.
5676 * c-errors.c: Likewise.
5677 * c-lang.c: Likewise.
5678 * c-objc-common.c: Likewise.
5679 * c-parser.c: Likewise.
5680 * c-typeck.c: Likewise.
5681
9482b620
MP
56822015-06-04 Marek Polacek <polacek@redhat.com>
5683
5684 PR c/66341
5685 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5686 it is a lvalue.
5687
bc51ace3
PK
56882015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5689
5690 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5691 Warn for empty struct.
5692 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5693
ea5b45b6
AT
56942015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5695
5696 * c-decl.c (start_function): Call plugin before parsing.
5697 (finish_function): Call plugin after parsing.
5698
c2d47482
PK
56992015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5700
5701 PR c/49551
5702 * c-decl.c (merge_decls): Merge DECL_COMMON.
5703
a95492ab
JW
57042015-05-22 Jim Wilson <jim.wilson@linaro.org>
5705
5706 * Make-lang.in (check_gcc_pallelize): Define.
5707
fd5c817a
MP
57082015-05-22 Marek Polacek <polacek@redhat.com>
5709
5710 PR c/47043
5711 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5712 attributes.
5713
c7b70a3c
MP
57142015-05-21 Marek Polacek <polacek@redhat.com>
5715
5716 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5717 DECL_BUILT_IN.
5718
21b634ae
MP
57192015-05-20 Marek Polacek <polacek@redhat.com>
5720
5721 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5722 * c-typeck.c: Likewise.
5723
296a8c2f
MP
57242015-05-19 Marek Polacek <polacek@redhat.com>
5725
5726 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5727
41b37d5e
JJ
57282015-05-19 Jakub Jelinek <jakub@redhat.com>
5729
5730 PR middle-end/66199
5731 * c-parser.c (c_parser_omp_for_loop): Don't add
5732 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5733 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5734 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5735 constructs.
5736
fab27f52
MM
57372015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5738
5739 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5740 swaps.
fab27f52 5741
40de31cf
MLI
57422015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5743
5744 PR fortran/44054
5745 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5746 accessor function.
5747
3aa3c9fc
MP
57482015-05-14 Marek Polacek <polacek@redhat.com>
5749
5750 PR c/66066
5751 PR c/66127
5752 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5753 rather than with 0.
5754
c3388e62
DM
57552015-05-12 David Malcolm <dmalcolm@redhat.com>
5756
5757 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5758 to add a call to warn_for_misleading_indentation.
5759 (c_parser_else_body): Likewise, adding param "else_loc".
5760 (c_parser_if_statement): Check for misleading indentation.
5761 (c_parser_while_statement): Likewise.
5762 (c_parser_for_statement): Likewise.
5763
755e528f
MP
57642015-05-08 Marek Polacek <polacek@redhat.com>
5765
5766 PR c/64918
5767 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5768 (output_init_element): Likewise.
5769
0173bd2a
MP
57702015-05-07 Marek Polacek <polacek@redhat.com>
5771
5772 PR c/65179
5773 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5774 value.
5775
9babc352
MP
57762015-04-30 Marek Polacek <polacek@redhat.com>
5777
5778 * c-typeck.c (set_init_label): Call error_at instead of error and
5779 pass LOC to it.
5780
ac9f18db
MP
5781 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5782 the type of a decl.
5783
ec3fba51
MP
5784 * c-typeck.c (c_build_va_arg): Clarify the error message.
5785
b811915d
TS
57862015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5787
5788 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5789 OMP_STANDALONE_CLAUSES.
5790
f3075008
MP
57912015-04-28 Marek Polacek <polacek@redhat.com>
5792
5793 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5794
4e81b788
MP
57952015-04-28 Marek Polacek <polacek@redhat.com>
5796
5797 PR c/65901
5798 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5799
6c1db78e
MP
58002015-04-25 Marek Polacek <polacek@redhat.com>
5801
5802 PR c/52085
5803 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5804 attribute.
5805
5c4abbb8
MP
58062015-04-23 Marek Polacek <polacek@redhat.com>
5807
5808 PR c/65345
5809 * c-decl.c (set_labels_context_r): New function.
5810 (store_parm_decls): Call it via walk_tree_without_duplicates.
5811 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5812 instead of create_tmp_var. Build TARGET_EXPR instead of
5813 COMPOUND_EXPR.
5814 (build_atomic_assign): Use create_tmp_var_raw instead of
5815 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5816
06aca1d5
IV
58172015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5818
5819 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5820 (c_parser_omp_target_update): Add missed %> to error_at ().
5821
8fba1830
BRF
58222015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5823
5824 PR target/55143
5825 * c-decl.c (c_default_pointer_mode): Remove definition.
5826 * c-tree.h (c_default_pointer_mode): Remove declaration.
5827
62021f64
TB
58282015-03-27 Tobias Burnus <burnus@net-b.de>
5829
5830 PR c/65586
5831 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5832 error out.
5833 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5834 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5835 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5836
9b65e171
JJ
58372015-03-19 Jakub Jelinek <jakub@redhat.com>
5838
5839 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5840 attribute for DECL_EXTERNAL VAR_DECLs.
5841
17958621
JJ
58422015-03-11 Jakub Jelinek <jakub@redhat.com>
5843
5844 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5845 argument.
5846
7ccb1a11
JJ
58472015-03-10 Jakub Jelinek <jakub@redhat.com>
5848
5849 PR c/65120
5850 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5851 before preparing arguments to warn_logical_not_parentheses.
5852
01177669
JJ
58532015-03-09 Jakub Jelinek <jakub@redhat.com>
5854
5855 PR c/65120
5856 * c-typeck.c (parser_build_binary_op): Don't warn for
5857 !!x == y or !b == y where b is _Bool.
5858
802ac282
MP
58592015-03-09 Marek Polacek <polacek@redhat.com>
5860
5861 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5862 * c-decl.c (grokdeclarator): Likewise.
5863 * c-typeck.c (build_binary_op): Likewise.
5864
e5165b60
MP
58652015-02-27 Marek Polacek <polacek@redhat.com>
5866
5867 PR c/65228
5868 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5869
065d214c
MP
58702015-02-14 Marek Polacek <polacek@redhat.com>
5871
5872 PR c/64768
5873 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5874 declared through a typedef name.
5875
e5d9235b
MP
58762015-02-13 Marek Polacek <polacek@redhat.com>
5877
5878 PR c/65050
5879 * c-decl.c (grokdeclarator): Print also the type when giving
5880 the error message about array's incomplete element type.
5881
fa01ffcc
JJ
58822015-02-11 Jakub Jelinek <jakub@redhat.com>
5883
5884 PR c/64824
5885 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5886 check in the POP macro.
5887
c3e38a03
MP
58882015-02-09 Marek Polacek <polacek@redhat.com>
5889
5890 PR c/64856
5891 * c-typeck.c (process_init_element): Don't always wrap
5892 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5893 initializing a range of elements.
5894
4886ec8e
JJ
58952015-02-04 Jakub Jelinek <jakub@redhat.com>
5896
5897 PR c/64824
5898 PR c/64868
5899 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5900
c3e38a03 59012015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5902
5903 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5904 processing enum declaration.
5905
7b33f0c8
MP
59062015-01-29 Marek Polacek <polacek@redhat.com>
5907
5908 PR c/64709
5909 * c-typeck.c (pop_init_level): If constructor_elements has
5910 exactly one element with integer_zerop value, set constructor_zeroinit
5911 to 1. Remove braces around warning_init call.
5912
dea63e49
JJ
59132015-01-27 Jakub Jelinek <jakub@redhat.com>
5914
5915 PR c/64766
5916 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5917 of FUNCTION_DECLs with error_mark_node.
5918
d38f7dce
JJ
59192015-01-26 Jakub Jelinek <jakub@redhat.com>
5920
5921 PR c/64778
5922 * c-typeck.c (convert_arguments): Return -1 if there are
5923 error_args, even if we've diagnosed too many arguments.
5924
cbf5d0e7
RB
59252015-01-21 Richard Biener <rguenther@suse.de>
5926
5927 PR middle-end/64313
5928 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5929 for builtins the user declared correctly.
5930
41dbbb37
TS
59312015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5932 Bernd Schmidt <bernds@codesourcery.com>
5933 Cesar Philippidis <cesar@codesourcery.com>
5934 James Norris <jnorris@codesourcery.com>
5935 Jakub Jelinek <jakub@redhat.com>
5936 Ilmir Usmanov <i.usmanov@samsung.com>
5937
5938 * c-parser.c: Include "gomp-constants.h".
5939 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5940 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5941 Use OMP_CLAUSE_SET_MAP_KIND.
5942 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5943 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5944 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5945 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5946 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5947 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5948 "copyout", "create", "delete", "deviceptr", "gang", "host",
5949 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5950 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5951 "present_or_create", "pcreate", "seq", "self", "vector",
5952 "vector_length", "wait", "worker".
5953 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5954 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5955 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5956 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5957 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5958 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5959 (c_parser_oacc_data_clause_deviceptr)
5960 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5961 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5962 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5963 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5964 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5965 (c_parser_oacc_parallel, c_parser_oacc_update)
5966 (c_parser_oacc_wait): New functions.
5967 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5968 (c_finish_oacc_data): New prototypes.
5969 * c-typeck.c: Include "gomp-constants.h".
5970 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5971 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5972 OMP_CLAUSE_SET_MAP_KIND.
5973 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5974 (c_finish_oacc_data): New functions.
5975 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5976 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5977 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5978 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5979 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5980 GOMP_MAP_FORCE_DEVICEPTR.
5981
adfac8df
JJ
59822015-01-09 Michael Collison <michael.collison@linaro.org>
5983
5984 * c-array-notation.c: Include hash-set.h, machmode.h,
5985 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5986 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5987 * c-aux-info.c: Ditto.
5988 * c-convert.c: Ditto.
5989 * c-decl.c: Ditto.
5990 * c-errors.c: Ditto.
5991 * c-lang.c: Dittoxs.
5992 * c-objc-common.c: Ditto.
5993 * c-parser.c: Ditto.
5994 * c-typeck.c: Include hash-set.h, machmode.h,
5995 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5996 fold-const.h, wide-int.h, inchash.h, real.h and
5997 fixed-value.h due to flattening of tree.h.
5998
2cc901dc
MP
59992015-01-07 Marek Polacek <polacek@redhat.com>
6000
6001 PR c/64417
6002 * c-typeck.c (process_init_element): Disallow initialization of
6003 a flexible array member with a string constant if the structure
6004 is in an array.
6005
5624e564
JJ
60062015-01-05 Jakub Jelinek <jakub@redhat.com>
6007
e5341100
JJ
6008 PR sanitizer/64344
6009 * c-typeck.c (convert_for_assignment, c_finish_return): For
6010 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6011 types also set in_late_binary_op around convert call.
6012 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6013 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6014 result on expr as last argument to ubsan_instrument_float_cast,
6015 if in_late_binary_op, don't use c_save_expr but save_expr.
6016
5624e564
JJ
6017 Update copyright years.
6018
5bd012f8
MP
60192015-01-05 Marek Polacek <polacek@redhat.com>
6020
6021 PR c/64423
6022 * c-typeck.c (build_array_ref): Pass loc down to
6023 warn_array_subscript_with_type_char.
6024
3f8257db 60252014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6026
6027 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6028 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6029 element type.
8e745a17 6030 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6031 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6032 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6033 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6034 to PEDWARN_FOR_QUALIFIERS.
768952be 6035
8f94a8c4
JJ
60362014-12-17 Jakub Jelinek <jakub@redhat.com>
6037
6038 PR sanitizer/64289
6039 * c-convert.c: Include ubsan.h.
6040 (convert): For real -> integral casts and
6041 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6042 instead instrument the float cast directly.
6043
b731b390
JJ
60442014-11-29 Jakub Jelinek <jakub@redhat.com>
6045
6046 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6047 c_finish_stmt_expr): Remove NULL last argument from
6048 create_tmp_var_raw and create_tmp_var calls.
6049 * c-array-notation.c (fix_builtin_array_notation_fn,
6050 build_array_notation_expr, fix_conditional_array_notations_1,
6051 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6052
541e35a6
MP
60532014-11-28 Marek Polacek <polacek@redhat.com>
6054
6055 PR c/63862
6056 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6057 convert the right operand to integer type.
6058
b286be94
MP
60592014-11-25 Marek Polacek <polacek@redhat.com>
6060
6061 PR c/63877
6062 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6063 for inline functions.
6064
aa7da51a
JJ
60652014-11-21 Jakub Jelinek <jakub@redhat.com>
6066
6067 PR target/63764
6068 * c-typeck.c (build_array_ref): Adjust
6069 convert_vector_to_pointer_for_subscript caller. If it returns true,
6070 call non_lvalue_loc on the result.
6071
d876207f
RB
60722014-11-11 Richard Biener <rguenther@suse.de>
6073
6074 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6075 to true.
6076
e5e44252
AK
60772014-11-10 Andi Kleen <ak@linux.intel.com>
6078
6079 PR c/60804
6080 * c-parser.c (c_parser_statement_after_labels): Call
6081 check_no_cilk.
6082 (c_parser_if_statement): Dito.
6083 (c_parser_switch_statement): Dito.
6084 (c_parser_while_statement): Dito.
6085 (c_parser_do_statement): Dito.
6086 (c_parser_for_statement): Dito.
6087 * c-typeck.c (c_finish_loop): Dito.
6088
13c21655
PC
60892014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6090
6091 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6092 OPT_Wshift_count_overflow in the warnings.
6093
2d51fcef
MP
60942014-10-30 Marek Polacek <polacek@redhat.com>
6095
6096 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6097 print the stripped version as well, if they're not the same.
6098
ef4bddc2
RS
60992014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6100
6101 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6102 machine_mode.
6103
c582198b
AM
61042014-10-28 Andrew MacLeod <amacleod@redhat.com>
6105
6106 * c-decl.c: Adjust include files.
6107 * c-parser.c: Ditto.
6108
ddc8de03
PM
61092014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6110 Tom Tromey <tromey@redhat.com>
6111
6112 * c-tree.h (enum c_oracle_request): New.
6113 (c_binding_oracle_function): New typedef.
6114 (c_binding_oracle, c_pushtag, c_bind): Declare.
6115 * c-decl.c (c_binding_oracle): New global.
6116 (I_SYMBOL_CHECKED): New macro.
6117 (i_symbol_binding): New function.
6118 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6119 (I_TAG_CHECKED): New macro.
6120 (i_tag_binding): New function.
6121 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6122 (I_LABEL_CHECKED): New macro.
6123 (i_label_binding): New function.
6124 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6125 (c_print_identifier): Save and restore c_binding_oracle.
6126 (c_pushtag, c_bind): New functions.
6127
60393bbc
AM
61282014-10-27 Andrew MacLeod <amacleod@redhat.com>
6129
6130 * c-typeck.c: Adjust include files.
6131
d723bb7c
MLI
61322014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6133
6134 PR c++/53061
6135 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6136 initialization here...
6137 (c_initialize_diagnostics): ... but here. Set defaults after
6138 building pretty-printer.
6139
1bc5a451
MP
61402014-10-23 Marek Polacek <polacek@redhat.com>
6141
6142 PR c/63626
6143 * c-decl.c (pop_scope): Don't print warning in external_scope.
6144
4435bb92
MP
61452014-10-19 Marek Polacek <polacek@redhat.com>
6146
6147 PR c/63567
6148 * c-typeck.c (output_init_element): Allow initializing objects with
6149 static storage duration with compound literals even in C99 and add
6150 pedwarn for it.
6151
7278465e
MP
61522014-10-17 Marek Polacek <polacek@redhat.com>
6153
6154 PR c/63567
6155 * c-typeck.c (digest_init): Allow initializing objects with static
6156 storage duration with compound literals even in C99 and add pedwarn
6157 for it.
6158
d9b7be2e
MP
61592014-10-17 Marek Polacek <polacek@redhat.com>
6160
6161 PR c/63543
6162 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6163 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6164 error multiple times. Print the type.
6165
f406ae1f
MP
61662014-10-17 Marek Polacek <polacek@redhat.com>
6167
6168 PR c/63549
6169 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6170 type.
6171
92574c7c
MP
61722014-10-17 Marek Polacek <polacek@redhat.com>
6173
6174 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6175 (start_function): Use OPT_Wimplicit_int instead of 0.
6176 (store_parm_decls_oldstyle): Likewise.
6177
1bc4a978
MT
61782014-10-17 Alan Modra <amodra@gmail.com>
6179
6180 PR middle-end/61848
6181 * c-decl.c (merge_decls): Don't merge section name or tls model
6182 to newdecl symtab node, instead merge to olddecl. Override
6183 existing olddecl section name. Set tls_model for all thread-local
6184 vars, not just OMP thread-private ones. Remove incorrect comment.
6185
83685514
AM
61862014-10-16 Andrew MacLeod <amacleod@redhat.com>
6187
6188 * c-decl.c: Adjust include files.
6189
78a7c317
DD
61902014-10-14 DJ Delorie <dj@redhat.com>
6191
6192 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6193 (c_token_starts_typename): Check all __intN, not just __int128.
6194 (c_token_starts_declspecs): Likewise.
6195 (c_parser_declspecs): Likewise.
6196 (c_parser_attribute_any_word): Likewise.
6197 (c_parser_objc_selector): Likewise.
6198 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6199 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6200 is specified.
6201 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6202 __int128.
6203 (finish_declspecs): Likewise.
6204
74d98c1e
AB
62052014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6206
8e745a17 6207 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6208 the duplicate code.
8e745a17 6209 (c_parser_statement): Call the new function.
74d98c1e 6210
84937de2
MP
62112014-10-09 Marek Polacek <polacek@redhat.com>
6212
6213 PR c/63480
6214 * c-typeck.c (pop_init_level): Don't warn about initializing
6215 with { }.
6216
0382aaa0
MP
62172014-10-07 Marek Polacek <polacek@redhat.com>
6218
6219 PR c/59717
6220 * c-decl.c (header_for_builtin_fn): New function.
6221 (implicitly_declare): Suggest which header to include.
6222
7a0ca710
MP
62232014-10-07 Marek Polacek <polacek@redhat.com>
6224
6225 * c-convert.c (convert): Use error_operand_p.
6226 * c-typeck.c (require_complete_type): Likewise.
6227 (really_atomic_lvalue): Likewise.
6228 (digest_init): Likewise.
6229 (handle_omp_array_sections_1): Likewise.
6230
6bc8a126
MP
62312014-10-03 Marek Polacek <polacek@redhat.com>
6232
6233 PR c/63453
6234 * c-decl.c (pop_scope): Don't warn about "inline function declared
6235 but never defined" for functions marked with gnu_inline attribute.
6236
d90c0a59
JJ
62372014-09-25 Jakub Jelinek <jakub@redhat.com>
6238
6239 PR c++/63249
6240 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6241 on low_bound and length.
6242
083e891e
MP
62432014-09-24 Marek Polacek <polacek@redhat.com>
6244
6245 PR c/61405
6246 PR c/53874
6247 * c-parser.c: Don't define CPP_KEYWORD.
6248 (c_parser_switch_statement): Pass original type to c_finish_case.
6249 * c-tree.h (c_finish_case): Update declaration.
6250 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6251 conditionally to c_do_switch_warnings.
6252
8d95fe25
MP
62532014-09-03 Marek Polacek <polacek@redhat.com>
6254
6255 PR c/62024
6256 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6257 conversions.
6258
9a771876
JJ
62592014-09-02 Jakub Jelinek <jakub@redhat.com>
6260 Balaji V. Iyer <balaji.v.iyer@intel.com>
6261 Igor Zamyatin <igor.zamyatin@intel.com>
6262
6263 * c-parser.c (c_parser_cilk_for): New function.
6264 (c_parser_cilk_grainsize): Likewise.
6265 (c_get_temp_regvar): Likewise.
6266 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6267 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6268 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6269 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6270 case.
6271
b7679d96
CG
62722014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6273
6274 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6275 with using HOST_WIDE_INT without truncation to 'int'
6276
59ea0364
MP
62772014-08-22 Marek Polacek <polacek@redhat.com>
6278
6279 PR c++/62199
6280 * c-typeck.c (parser_build_binary_op): Adjust call to
6281 warn_logical_not_parentheses.
6282
671a475e
IZ
62832014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6284
6285 PR other/62008
6286 * c-parser.c (c_parser_array_notation): Check for correct
6287 type of an array added.
6288
04159acf
MP
62892014-08-19 Marek Polacek <polacek@redhat.com>
6290
6291 PR c++/62153
6292 * c-typeck.c (build_binary_op): If either operand of a comparison
6293 is a boolean expression, call maybe_warn_bool_compare.
6294
c77935ee
PP
62952014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6296
6297 PR c/45584
6298 * c-typeck.c (build_c_cast): Do a conversion even when the
6299 TYPE_MAIN_VARIANTs are the same.
6300
35aff4fb
MP
63012014-08-19 Marek Polacek <polacek@redhat.com>
6302
6303 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6304 pedwarn_c99 instead of pedwarn.
6305 (grokfield): Likewise.
6306 (warn_defaults_to): New function.
6307 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6308 Unconditionally call pedwarn_c99 instead of pedwarn.
6309 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6310 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6311 check flag_isoc11 before.
6312 * c-errors.c (pedwarn_c99): Change the return type to bool.
6313 Handle -Wc99-c11-compat.
6314 * c-parser.c (disable_extension_diagnostics): Handle
6315 warn_c99_c11_compat.
6316 (restore_extension_diagnostics): Likewise.
6317 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6318 instead of pedwarn, don't check flag_isoc11 before.
6319 (c_parser_declspecs): Likewise.
6320 (c_parser_alignas_specifier): Likewise.
6321 (c_parser_alignof_expression): Likewise.
6322 (c_parser_generic_selection): Likewise.
6323 * c-tree.h (pedwarn_c99): Update declaration.
6324 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6325 of pedwarn_c99.
6326
177cce46
MP
63272014-08-19 Marek Polacek <polacek@redhat.com>
6328
6329 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6330 to pedwarn_c90.
6331 * c-errors.c: Include "opts.h".
6332 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6333 * c-parser.c (disable_extension_diagnostics): Handle negative value
6334 of warn_c90_c99_compat, too.
6335 (restore_extension_diagnostics): Likewise.
6336 (c_parser_compound_statement_nostart): Pass
6337 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6338
6dc99c33
MP
63392014-08-12 Marek Polacek <polacek@redhat.com>
6340
6341 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6342 Add pedwarn.
6343 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6344 Likewise.
6345 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6346
3f8257db 63472014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6348
6349 PR c/51849
6350 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6351 Call pedwarn_c90 instead of pedwarn.
6352 (check_bitfield_type_and_width): Likewise.
6353 (declspecs_add_qual): Likewise.
6354 (declspecs_add_type): Likewise.
6355 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6356 Adjust to only call pedwarn_c90.
6357 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6358 pedwarn_c90 instead of pedwarn.
6359 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6360 * c-parser.c (disable_extension_diagnostics): Handle
6361 warn_c90_c99_compat.
6362 (restore_extension_diagnostics): Likewise.
6363 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6364 pedwarn_c90 instead of pedwarn.
6365 (c_parser_initelt): Likewise.
6366 (c_parser_postfix_expression): Likewise.
6367 (c_parser_postfix_expression_after_paren_type): Likewise.
6368 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6369 * c-tree.h: Fix formatting.
6370 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6371 pedwarn_c90 instead of pedwarn.
6372
9f25a338
TS
63732014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6374
6375 * c-typeck.c: Remove include of pointer-set.h.
6376
044331a8
MP
63772014-08-07 Marek Polacek <polacek@redhat.com>
6378
6379 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6380
b787e7a2
TS
63812014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6382
6383 * c-typeck.c: Use hash_map instead of pointer_map.
6384
6e2830c3
TS
63852014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6386
6387 * c-decl.c: Use hash_set instead of pointer_set.
6388
a7ee52fb
IZ
63892014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6390
6391 PR middle-end/61455
6392 * c-array-notation.c (expand_array_notations): Handling
6393 of DECL_EXPR added.
6394
b4dfdc11
MG
63952014-07-31 Marc Glisse <marc.glisse@inria.fr>
6396
6397 PR c++/60517
6398 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6399 a local variable.
6400
976d5a22
TT
64012014-07-30 Tom Tromey <tromey@redhat.com>
6402
6403 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6404 field.
6405 (really_start_incremental_init, push_init_level): Initialize
6406 designator_depth.
6407 (pop_init_level): Set global designator_depth.
6408 (process_init_element): Check for designated_init attribute.
6409
30281de2
MP
64102014-07-20 Marek Polacek <polacek@redhat.com>
6411
6412 PR c/61852
6413 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6414 (implicitly_declare): Pass location to implicit_decl_warning.
6415
b108f48f
JJ
64162014-07-14 Jakub Jelinek <jakub@redhat.com>
6417
6418 PR middle-end/61294
6419 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6420 If non-NULL, call c_parser_check_literal_zero.
6421 (c_parser_check_literal_zero): New function.
6422 (c_parser_postfix_expression_after_primary): Adjust
6423 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6424
773ec47f
MP
64252014-07-06 Marek Polacek <polacek@redhat.com>
6426
6427 PR c/6940
6428 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6429 * c-tree.h (C_ARRAY_PARAMETER): Define.
6430 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6431 function parameter.
6432
22e1cf1c 64332014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6434 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6435
6436 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6437 releasing symbol.
6438
52ec0ea3
MP
64392014-07-01 Marek Polacek <polacek@redhat.com>
6440
6441 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6442 instead of 0 to WARN_FOR_ASSIGNMENT.
6443
d5c3d343
MP
64442014-07-01 Marek Polacek <polacek@redhat.com>
6445
6446 PR c/58286
6447 * c-typeck.c (convert_for_assignment): Pass
6448 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6449
6a7253a4
MP
64502014-06-30 Marek Polacek <polacek@redhat.com>
6451
6452 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6453 has no_sanitize_undefined attribute.
6454
5e88a8f4
IZ
64552014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6456
6457 PR middle-end/57541
6458 * c-array-notation.c (fix_builtin_array_notation_fn):
6459 Check for 0 arguments in builtin call. Check that bultin argument is
6460 correct.
6461 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6462 index.
6463
9698b078
SH
64642014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6465
6466 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6467 qualifiers in __auto_type for atomic types.
6468 (c_parser_typeof_specifier): Discard all type qualifiers in
6469 __typeof__ for atomic types.
6470
6e07c515
MP
64712014-06-25 Marek Polacek <polacek@redhat.com>
6472
6473 PR c/61162
6474 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6475 the return expression to c_finish_return.
6476
da6f124d
JJ
64772014-06-25 Jakub Jelinek <jakub@redhat.com>
6478
6479 * c-typeck.c (c_finish_omp_clauses): Make sure
6480 OMP_CLAUSE_LINEAR_STEP has correct type.
6481
c203e8a7
TS
64822014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6483
6484 * c-decl.c: Adjust.
6485
56ad0e38
JJ
64862014-06-24 Jakub Jelinek <jakub@redhat.com>
6487
6488 * c-parser.c (c_parser_omp_for_loop): For
6489 #pragma omp parallel for simd move lastprivate clause from parallel
6490 to for rather than simd.
6491
47c2554f
MP
64922014-06-23 Marek Polacek <polacek@redhat.com>
6493
6494 * c-typeck.c (parser_build_binary_op): Don't call
6495 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6496
56363ffd
JH
64972014-06-15 Jan Hubicka <hubicka@ucw.cz>
6498
6499 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6500 * c-decl.c (merge_decls): Likewise.
6501
d7ff7ae5
MP
65022014-06-09 Marek Polacek <polacek@redhat.com>
6503
6504 PR c/36446
6505 * c-typeck.c (error_init): Call inform instead of error_at.
6506 (pedwarn_init): Call inform instead of pedwarn.
6507 (warning_init): Call inform instead of warning_at.
6508
24d047a3
JH
65092014-06-07 Jan Hubicka <hubicka@ucw.cz>
6510
6511 * c-decl.c (merge_decls): Use set_decl_section_name.
6512 (duplicate_decls): Remove node if it exists.
6513
9bac5cbb
G
65142014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6515
6516 PR c/53119
6517 * c-typeck.c (push_init_level, process_init_element,
6518 pop_init_level): Correct check for zero initialization, move
6519 missing brace warning to respect zero initialization.
6520
8ffcdea8
MP
65212014-06-05 Marek Polacek <polacek@redhat.com>
6522
6523 PR c/56724
6524 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6525
742938c9
MP
65262014-06-05 Marek Polacek <polacek@redhat.com>
6527
6528 PR c/49706
6529 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6530 on the left hand side operand of a comparison.
742938c9 6531
6447c55d
MP
65322014-06-05 Marek Polacek <polacek@redhat.com>
6533
6534 PR c/48062
6535 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6536 Print note only if the warning was printed.
6537
9dc7743c
IZ
65382014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6539
6540 PR c/58942
6541 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6542 with a pointer.
6543
fedfecef
MP
65442014-06-03 Marek Polacek <polacek@redhat.com>
6545
6546 PR c/60439
6547 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6548 c_start_case.
6549 * c-tree.h (c_start_case): Update.
6550 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6551 switch condition has boolean value.
6552
9b2b7279
AM
65532014-06-02 Andrew MacLeod <amacleod@redhat.com>
6554
6555 * c-decl.c: Include builtins.h.
6556 * c-parser.c: Likewise.
6557
5c1bc275
MP
65582014-05-27 Marek Polacek <polacek@redhat.com>
6559
6560 PR c/56724
6561 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6562 error and warning calls to error_at and warning_at. Pass location of
6563 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6564 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6565 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6566
97563bc8
IZ
65672014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6568
6569 PR c/61191
6570 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6571 function parameters.
6572
aede2c10
JH
65732014-05-23 Jan Hubicka <hubicka@ucw.cz>
6574
6575 * c-decl.c (merge_decls): Preserve symtab node pointers.
6576 (duplicate_decls): Free new decl.
6577
edbba2ce
TS
65782014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6579
f3316c6d
TS
6580 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6581 initialization.
6582
edbba2ce
TS
6583 * c-parser.c (c_parser_omp_target): Return bool values.
6584
68c81f24
TS
65852014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6586
6587 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6588 num_teams_loc variable to num_thread_limit_loc.
6589
632f2871
RS
65902014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6591
6592 * c-array-notation.c (expand_array_notations): Use void_node
6593 instead of void_zero_node.
6594
766090c2
TS
65952014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6596
6597 * c-decl.c (finish_struct): Adjust.
6598 (finish_enum): Likewise.
6599 (bind): Adjust.
6600 (record_inline_static): Likewise.
6601 (push_scope): Likewise.
6602 (make_label): Likewise.
6603 (lookup_label_for_goto): Likewise.
6604 (finish_struct): Likewise.
6605 (finish_enum): Likewise.
6606 (store_parm_decls): Likewise.
6607 (c_push_function_context): Likewise.
6608 * c-lang.h: Remove usage of variable_size gty attribute.
6609 * c-parser.c (c_parse_init): Adjust.
6610 (c_parse_file): Likewise.
6611
2b107f6b
MP
66122014-05-13 Marek Polacek <polacek@redhat.com>
6613
6614 PR c/61162
6615 * c-typeck.c (convert_for_assignment): Pass location to
6616 WARN_FOR_ASSIGNMENT instead of input_location.
6617
d033409e
MP
66182014-05-10 Marek Polacek <polacek@redhat.com>
6619
6620 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6621 maybe_warn_string_init.
6622 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6623 maybe_warn_string_init.
6624 * c-tree.h (maybe_warn_string_init): Update declaration.
6625 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6626 Call pedwarn_init with loc instead of with input_location.
6627 (digest_init): Pass init_loc to maybe_warn_string_init.
6628 (pop_init_level): Call pedwarn_init with loc instead of with
6629 input_location.
6630 (set_init_index): Likewise.
6631 (process_init_element): Likewise.
6632
ea58ef42
MP
66332014-05-09 Marek Polacek <polacek@redhat.com>
6634
6635 PR c/61096
6636 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6637 (c_parser_initelt): Pass location to set_init_label. Pass array index
6638 location to set_init_index.
6639 * c-tree.h (push_init_level): Update declaration.
6640 (pop_init_level): Likewise.
6641 (set_init_index): Likewise.
6642 (set_init_label): Likewise.
6643 * c-typeck.c (error_init): Add location parameter. Call error_at
6644 instead of error.
6645 (digest_init): Pass init_loc to error_init.
6646 (really_start_incremental_init):
6647 (push_init_level): Add location parameter. Pass loc to pop_init_level
6648 and error_init.
6649 (pop_init_level): Likewise.
6650 (set_designator): Add location parameter. Pass loc to pop_init_level,
6651 push_init_level, and error_init.
6652 (set_init_index): Add location parameter. Pass loc to error_init and
6653 set_designator.
6654 (set_init_label): Likewise.
6655 (output_init_element): Pass loc to error_init.
6656 (process_init_element): Pass loc to error_init, pop_init_level,
6657 pedwarn_init, and push_init_level.
6658
661a0813
MP
66592014-05-09 Marek Polacek <polacek@redhat.com>
6660
6661 PR c/50459
6662 * c-parser.c (c_parser_attributes): Parse the arguments as an
6663 expression-list if the attribute takes identifier.
6664
2793eeab
MP
66652014-05-08 Marek Polacek <polacek@redhat.com>
6666
6667 PR c/61053
6668 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6669 TYPE_ALIGN_UNIT.
6670
f827930a
MP
66712014-05-08 Marek Polacek <polacek@redhat.com>
6672
6673 PR c/61077
6674 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6675 of main.
6676
1d60af08
KZ
66772014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6678 Mike Stump <mikestump@comcast.net>
6679 Richard Sandiford <rdsandiford@googlemail.com>
6680
6681 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6682 (finish_enum): Use wide-int interfaces.
6683 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6684 * c-typeck.c (build_c_cast): Likewise.
6685 (set_nonincremental_init_from_string): Likewise.
6686 (c_tree_equal): Likewise.
6687
a0e24419
MP
66882014-05-02 Marek Polacek <polacek@redhat.com>
6689
6690 PR c/25801
6691 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6692 Return size_one_node when the type is not complete.
6693 (pointer_diff): Remove comment.
6694 (build_unary_op): Improve error messages.
6695
19fc9faa
MP
66962014-05-02 Marek Polacek <polacek@redhat.com>
6697
6698 * c-typeck.c (c_finish_return): Separate warning_at calls.
6699
63bc4e87
MP
67002014-05-02 Marek Polacek <polacek@redhat.com>
6701
6702 * c-tree.h (error_init): Remove declaration.
6703 (pedwarn_init): Likewise.
6704 * c-typeck.c (error_init): Make static and move above.
6705 (pedwarn_init): Likewise.
6706 (warning_init): Move above.
6707 (maybe_warn_string_init): Likewise.
6708
4bd2511b
JL
67092014-05-01 Jeff Law <law@redhat.com>
6710
6711 Revert:
6712
6713 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6714 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6715 avoid goto.
6716
6a358dcb
MP
67172014-05-02 Marek Polacek <polacek@redhat.com>
6718
6719 PR c/60784
6720 * c-typeck.c (push_init_level): Set constructor_designated to
6721 p->designated for structures.
6722
ae5ebda4
MP
67232014-05-01 Marek Polacek <polacek@redhat.com>
6724
6725 PR c/60915
6726 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6727 function-definition has an attribute after the declarator.
6728
96b40f8d
MP
67292014-05-01 Marek Polacek <polacek@redhat.com>
6730
6731 PR c/60257
6732 * c-typeck.c (warning_init): Add location_t parameter. Call
6733 warning_at instead of warning.
6734 (push_init_level): Pass input_location to warning_init.
6735 (add_pending_init): Add location_t parameter. Pass loc to
6736 warning_init.
6737 (set_nonincremental_init): Pass input_location to add_pending_init.
6738 (set_nonincremental_init_from_string): Likewise.
6739 (output_init_element): Pass loc to warning_init and to
6740 add_pending_init.
6741
32e00768
MP
67422014-05-01 Marek Polacek <polacek@redhat.com>
6743
6744 PR c/43395
6745 * c-typeck.c (c_finish_return): Distinguish between label and variable
6746 when warning about returning local address.
6747
c9379ce2
MP
67482014-05-01 Marek Polacek <polacek@redhat.com>
6749
6750 PR c/29467
6751 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6752 in C89 mode.
6753
d00887e8
MP
67542014-05-01 Marek Polacek <polacek@redhat.com>
6755
6756 PR c/43245
6757 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6758 instead of 0 to WARN_FOR_QUALIFIERS.
6759
5436fa2e
MP
67602014-05-01 Marek Polacek <polacek@redhat.com>
6761
6762 PR c/56989
6763 * c-typeck.c (default_conversion): Use better location for
6764 error call.
6765
f8ed5150
MP
67662014-04-30 Marek Polacek <polacek@redhat.com>
6767
6768 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6769 also when SANITIZE_FLOAT_DIVIDE is on.
6770
8337d1db
MP
67712014-04-30 Marek Polacek <polacek@redhat.com>
6772
6773 PR c/60139
6774 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6775 and pedwarn_init. Use loc insted of input_location.
6776
c4bdc42f
MP
67772014-04-30 Marek Polacek <polacek@redhat.com>
6778
6779 PR c/60351
6780 * c-typeck.c (build_binary_op): Use location when warning about
6781 shift count.
6782
45484dcf
MP
67832014-04-25 Marek Polacek <polacek@redhat.com>
6784
6785 PR c/18079
6786 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6787 always_inline/noinline and hot/cold attributes.
6788
34cf811f
MP
67892014-04-25 Marek Polacek <polacek@redhat.com>
6790
6791 PR c/60114
6792 * c-parser.c (c_parser_initelt): Pass input_location to
6793 process_init_element.
6794 (c_parser_initval): Pass loc to process_init_element.
6795 * c-tree.h (process_init_element): Adjust declaration.
6796 * c-typeck.c (push_init_level): Pass input_location to
6797 process_init_element.
6798 (pop_init_level): Likewise.
6799 (set_designator): Likewise.
6800 (output_init_element): Add location_t parameter. Pass loc to
6801 digest_init.
6802 (output_pending_init_elements): Pass input_location to
6803 output_init_element.
6804 (process_init_element): Add location_t parameter. Pass loc to
6805 output_init_element.
6806
42056eac
JJ
68072014-04-24 Jakub Jelinek <jakub@redhat.com>
6808
6809 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6810 atomic-clause, allow comma in between atomic-clause and
6811 seq_cst.
6812
e162a134
JJ
68132014-04-22 Jakub Jelinek <jakub@redhat.com>
6814
6815 PR c/59073
6816 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6817 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6818
2f6babac
IZ
68192014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6820
6821 PR middle-end/60469
6822 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6823 create_tmp_var instead build_decl for creating temps.
6824 (build_array_notation_expr): Likewise.
6825 (fix_conditional_array_notations_1): Likewise.
6826 (fix_array_notation_expr): Likewise.
6827 (fix_array_notation_call_expr): Likewise.
6828
8edbfaa6
JJ
68292014-03-28 Jakub Jelinek <jakub@redhat.com>
6830
6831 PR c++/60689
6832 * c-tree.h (c_build_function_call_vec): New prototype.
6833 * c-typeck.c (build_function_call_vec): Don't call
6834 resolve_overloaded_builtin here.
6835 (c_build_function_call_vec): New wrapper function around
6836 build_function_call_vec. Call resolve_overloaded_builtin here.
6837 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6838 Call c_build_function_call_vec instead of build_function_call_vec.
6839 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6840 * c-decl.c (finish_decl): Likewise.
6841
7485aeea
MLI
68422014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6843
6844 PR c/55383
6845 * c-typeck.c: Use correct format string in cast-qual warning
6846
b17a8b07
TS
68472014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6848
6849 * c-decl.c (c_decl_attributes): Use
6850 lang_hooks.types.omp_mappable_type.
6851 * c-typeck.c (c_finish_omp_clauses): Likewise.
6852
3af9c5e9
MP
68532014-03-06 Marek Polacek <polacek@redhat.com>
6854
6855 PR c/60197
6856 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6857 of checking tree code.
6858
1c9f5f33
PK
68592014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6860
6861 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6862 (c_parser_parameter_declaration): Likewise.
6863
cc28fc7f
MP
68642014-02-19 Marek Polacek <polacek@redhat.com>
6865
6866 PR c/60195
6867 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6868 Call mark_exp_read on exp.value.
6869 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6870 TREE_ADDRESSABLE on old instead of val.
6871 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6872
b581c05c
PK
68732014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6874
6875 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6876 C_EXPR_APPEND by vec_safe_push.
6877 * c-tree.h (C_EXPR_APPEND): Remove.
6878
81e5eca8
MP
68792014-01-31 Marek Polacek <polacek@redhat.com>
6880
6881 PR c/59963
6882 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6883 build_function_call_vec.
6884 (build_function_call): Likewise.
6885 (build_atomic_assign): Likewise.
6886 (build_function_call_vec): Add arg_loc parameter. Use it.
6887 (convert_arguments): Likewise.
6888 (convert_for_assignment): Rename rhs_loc to expr_loc.
6889 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6890 (c_parser_objc_keywordexpr): Likewise.
6891 (c_parser_postfix_expression_after_primary): Call
6892 build_function_call_vec with expr_loc rather than op_loc.
6893 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6894 build_function_call_vec.
6895 (c_parser_expr_list): Add locations parameter. Fill it with locations
6896 of function arguments.
6897 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6898
68fca595
MP
68992014-01-30 Marek Polacek <polacek@redhat.com>
6900
6901 PR c/59940
6902 * c-typeck.c (build_function_call_vec): Use loc parameter.
6903 (convert_arguments): Add location parameter. Use it.
6904 (ep_convert_and_check): Likewise.
6905 (build_atomic_assign): Adjust convert_for_assignment call.
6906 (build_modify_expr): Likewise.
6907 (digest_init): Likewise.
6908 (c_finish_return): Likewise.
6909 (build_conditional_expr): Adjust ep_convert_and_check calls.
6910 (convert_for_assignment): Add rhs_loc parameter. Use it.
6911 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6912 calls.
6913
fa337f3a
RB
69142014-01-30 Richard Biener <rguenther@suse.de>
6915
6916 PR c/59905
6917 * c-typeck.c (build_function_call_vec): Do not replace calls
6918 to a function via an incompatible type with a runtime abort.
6919
b72271b9
BI
69202014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6921
6922 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6923 flag_enable_cilkplus with flag_cilkplus.
6924 (c_parser_direct_declarator_inner): Likewise.
6925 (c_parser_attribute_any_word): Likewise.
6926 (c_parser_attributes): Likewise.
6927 (c_parser_compound_statement): Likewise.
6928 (c_parser_statement_after_labels): Likewise.
6929 (c_parser_if_statement): Likewise.
6930 (c_parser_switch_statement): Likewise.
6931 (c_parser_do_statement): Likewise.
6932 (c_parser_for_statement): Likewise.
6933 (c_parser_unary_expression): Likewise.
6934 (c_parser_postfix_expression): Likewise.
6935 (c_parser_postfix_expression_after_primary): Likewise.
6936 (c_parser_postfix_expression_after_primary): Likewise.
6937 (c_parser_omp_clause_name): Likewise.
6938 (c_finish_omp_declare_simd): Likewise.
6939 (c_parser_cilk_verify_simd): Likewise.
6940 * c-typeck.c (build_array_ref): Likewise.
6941 (build_function_call_vec): Likewise.
6942 (convert_arguments): Likewise.
6943 (build_compound_expr): Likewise.
6944 (c_finish_return): Likewise.
6945 (c_finish_if_stmt): Likewise.
6946 (c_finish_loop): Likewise.
6947 (build_binary_op): Likewise.
6948
393e8e8b
MP
69492014-01-23 Marek Polacek <polacek@redhat.com>
6950
6951 PR c/59846
6952 * c-typeck.c (parser_build_binary_op): Use location instead of
6953 input_location.
6954 (build_binary_op): Pass location to shorten_compare.
6955
f04dda30
MP
69562014-01-23 Marek Polacek <polacek@redhat.com>
6957
6958 PR c/58346
6959 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6960 an empty aggregate.
6961
789eadcd
MP
69622014-01-23 Marek Polacek <polacek@redhat.com>
6963
6964 PR c/59871
6965 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6966 of a comma expression.
6967 (emit_side_effect_warnings): Likewise.
6968
40f14e9f
BI
69692014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6970
6971 PR c/59825
6972 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6973 function to use walk_tree and moved a lot of its functionality to
6974 expand_array_notations.
6975 (expand_array_notations): New function.
6976
74558dd9
BI
69772014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6978
6979 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6980 attribute an attribute without value.
6981
652fea39
JJ
69822014-01-23 Jakub Jelinek <jakub@redhat.com>
6983
6984 PR middle-end/58809
6985 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6986 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6987
f34f1c87
MP
69882014-01-22 Marek Polacek <polacek@redhat.com>
6989
6990 PR c/59891
6991 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6992 of remove_c_maybe_const_expr on op1 and op2.
6993
241f845a
JJ
69942014-01-15 Jakub Jelinek <jakub@redhat.com>
6995
6996 PR c/58943
6997 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6998 effects, preevaluate rhs using SAVE_EXPR first.
6999
9a74f20c
BI
70002014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7001
7002 PR c++/59631
7003 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7004 statements with if-elseif statements.
7005
96066ce1
MP
70062014-01-06 Marek Polacek <polacek@redhat.com>
7007
7008 PR c/57773
7009 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7010 defined bit-field types only in ISO C.
7011
23a5b65a
RS
70122014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7013
7014 Update copyright years
7015
f9030485
RS
70162014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7017
7018 * c-array-notation.c: Use the standard form for the copyright notice.
7019
41958c28
BI
70202013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7021
7022 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7023 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7024 field in parser is not empty. If not-empty, call the function
7025 c_parser_finish_omp_declare_simd.
7026 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7027 between SIMD-enabled functions and #pragma simd. Added new parameter.
7028 (c_parser_cilk_all_clauses): Modified the usage of the function
7029 c_parser_cilk_clause_vectorlength as mentioned above.
7030 (c_parser_cilk_simd_fn_vector_attrs): New function.
7031 (c_finish_cilk_simd_fn_tokens): Likewise.
7032 (is_cilkplus_vector_p): Likewise.
7033 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7034 "nomask," and "mask" strings in clause name.
7035 (c_parser_omp_all_clauses): Added 3 new case statements:
7036 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7037 PRAGMA_CILK_CLAUSE_NOMASK.
7038 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7039 check for vector attribute and if so call the function
7040 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7041 called the function c_finish_cilk_simd_fn_tokens.
7042 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7043 parser field is non-empty. If so, parse them as you would parse
7044 the omp declare simd pragma.
7045 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7046 Added a check when step is a parameter and flag it as error.
7047 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7048 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7049 pragma_omp_clause.
7050
cef0fd0e
TS
70512013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7052
7053 * c-parser.c (c_parser_omp_parallel): Fix description.
7054
12893402
BI
70552013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7056
7057 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7058 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7059 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7060 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7061
296674db
JM
70622013-12-04 Joseph Myers <joseph@codesourcery.com>
7063
7064 PR c/52023
7065 * c-parser.c (c_parser_alignas_specifier): Use
7066 c_sizeof_or_alignof_type instead of c_alignof.
7067 (c_parser_alignof_expression): Likewise, with min_alignof
7068 parameter depending on alignof spelling used.
7069
edd28054
MP
70702013-12-04 Marek Polacek <polacek@redhat.com>
7071
7072 PR c/54113
7073 * c-decl.c (start_function): Don't warn for missing prototype for
7074 inline functions.
7075
da0fc454
MP
70762013-12-03 Marek Polacek <polacek@redhat.com>
7077
7078 PR c/59351
7079 * c-decl.c (build_compound_literal): Allow compound literals with
7080 empty initial value.
7081
4c2ecab0
JM
70822013-12-02 Joseph Myers <joseph@codesourcery.com>
7083
7084 PR c/58235
7085 * c-typeck.c (build_modify_expr): Diagnose assignment to
7086 expression with array type.
7087
340baef7
JM
70882013-11-29 Joseph Myers <joseph@codesourcery.com>
7089
7090 PR c/42262
7091 * c-typeck.c (process_init_element): Do not treat a string as
7092 initializing a whole array when used with a designator for an
7093 individual element.
7094
6763b9f7
JM
70952013-11-29 Joseph Myers <joseph@codesourcery.com>
7096
7097 PR c/57574
7098 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7099 an inline function following a static declaration.
7100
e7bd1de1
JJ
71012013-11-28 Jakub Jelinek <jakub@redhat.com>
7102
7103 PR c/59310
7104 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7105 to p_name before calling c_parser_omp_teams instead of after.
7106 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7107 argument. Remove unused p_name variable.
7108
0136f8f0
AH
71092013-11-27 Aldy Hernandez <aldyh@redhat.com>
7110 Jakub Jelinek <jakub@redhat.com>
7111
7112 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7113 external_scope is NULL.
7114
241b71bb
TV
71152013-11-27 Tom de Vries <tom@codesourcery.com>
7116 Marc Glisse <marc.glisse@inria.fr>
7117
7118 PR c++/59032
7119 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7120
2fb9a547
AM
71212013-11-22 Andrew MacLeod <amacleod@redhat.com>
7122
7123 * c-typeck.c: Add required include files from gimple.h.
7124
8400e75e
DM
71252013-11-22 David Malcolm <dmalcolm@redhat.com>
7126
7127 * c-decl.c (define_label, shadow_tag_warned)
7128 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7129 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7130 (declspecs_add_type): Remove use of in_system_header macro.
7131 * c-parser.c (c_parser_unary_expression): Likewise.
7132 * c-typeck.c (store_init_value, process_init_element)
7133 (c_start_case): Likewise.
7134
7135 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7136 macro.
7137
7138 * c-parser.c (c_parser_set_source_position_from_token): Remove
7139 reference to in_system_header from comment.
7140
386b1f1f
RS
71412013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7142
7143 * c-decl.c (grokdeclarator): Update comment to refer to
7144 tree_to_[su]hwi rather than tree_low_cst.
7145
ae7e9ddd
RS
71462013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7147
7148 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7149 tree_to_uhwi throughout.
7150
9439e9a1
RS
71512013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7152
7153 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7154 throughout.
7155
9541ffee
RS
71562013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7157
7158 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7159 throughout.
7160
c02065fc
AH
71612013-11-15 Aldy Hernandez <aldyh@redhat.com>
7162
7163 * c-parser.c (c_parser_cilk_simd): New.
7164 (c_parser_cilk_verify_simd): New.
7165 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7166 (c_parser_omp_for_loop): Add case for NE_EXPR.
7167 Set c_break_label for CILK_SIMD.
7168 (c_parser_cilk_clause_vectorlength): New.
7169 (c_parser_cilk_clause_linear): New.
7170 (c_parser_cilk_clause_name): New.
7171 (c_parser_cilk_all_clauses): New.
7172 * c-typeck.c (build_unary_op): Pass location argument to
7173 readonly_error.
7174 (build_modify_expr): Same.
7175 (build_asm_expr): Same.
7176 (c_finish_bc_stmt): Error on break/continue in loops.
7177
18f429e2
AM
71782013-11-14 Andrew MacLeod <amacleod@redhat.com>
7179
7180 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7181
d8a2d370
DN
71822013-11-14 Diego Novillo <dnovillo@google.com>
7183
7184 * c-decl.c: Include print-tree.h.
7185 Include stor-layout.h.
7186 Include varasm.h.
7187 Include attribs.h.
7188 Include stringpool.h.
7189 * c-lang.c: Include fold-const.h.
7190 * c-parser.c: Include stringpool.h.
7191 Include attribs.h.
7192 Include stor-layout.h.
7193 Include varasm.h.
7194 Include trans-mem.h.
7195 * c-typeck.c: Include stor-layout.h.
7196 Include trans-mem.h.
7197 Include varasm.h.
7198 Include stmt.h.
7199
38b7bc7f
JM
72002013-11-13 Joseph Myers <joseph@codesourcery.com>
7201
7202 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7203 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7204 __auto_type.
7205 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7206 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7207 RID_AUTO_TYPE.
7208 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7209 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7210 (c_parser_declarator, c_parser_direct_declarator_inner)
7211 (c_parser_parameter_declaration, c_parser_type_name): All callers
7212 changed.
7213 (c_parser_declaration_or_fndef): Handle declarations with type
7214 determined from the initializer.
7215
45b0be94
AM
72162013-11-12 Andrew MacLeod <amacleod@redhat.com>
7217
18f429e2 7218 * c-typeck.c: Include gimplify.h.
45b0be94 7219
582d9b50
JM
72202013-11-12 Joseph Myers <joseph@codesourcery.com>
7221
7222 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7223 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7224 comment.
7225 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7226 or _Thread_local as appropriate in diagnostics.
7227 (build_null_declspecs): Initialize ret->thread_gnu_p.
7228 (declspecs_add_scspec): Handle either __thread or _Thread_local
7229 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7230 pedantic. Do not disallow _Thread_local extern and _Thread_local
7231 static.
7232
267bac10
JM
72332013-11-07 Joseph Myers <joseph@codesourcery.com>
7234 Andrew MacLeod <amacleod@redhat.com>
7235
7236 * c-aux-info.c (gen_type): Handle atomic qualifier.
7237 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7238 qualifiers when compating types.
7239 (shadow_tag_warned): Handle atomic_p in declspecs.
7240 (quals_from_declspecs): Likewise.
7241 (start_decl): Use c_type_promotes_to when promoting argument
7242 types.
7243 (grokdeclarator): Handle _Atomic.
7244 (get_parm_info): Diagnose any qualifier on "void" as only
7245 parameter.
7246 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7247 comparing types. Use c_type_promotes_to when promoting argument
7248 types.
7249 (finish_function): Use c_type_promotes_to when promoting argument
7250 types.
7251 (build_null_declspecs): Handle atomic_p in declspecs.
7252 (declspecs_add_qual): Handle RID_ATOMIC.
7253 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7254 (c_token_starts_declspecs): Handle RID_ATOMIC.
7255 (c_parser_declspecs): Handle atomic type specifiers and
7256 qualifiers.
7257 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7258 from types of expressions with atomic type.
7259 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7260 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7261 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7262 (c_parser_statement_after_labels, c_parser_switch_statement)
7263 (c_parser_for_statement, c_parser_expr_no_commas)
7264 (c_parser_conditional_expression, c_parser_binary_expression)
7265 (c_parser_cast_expression, c_parser_unary_expression)
7266 (c_parser_postfix_expression)
7267 (c_parser_postfix_expression_after_primary, c_parser_expression):
7268 Use convert_lvalue_to_rvalue.
7269 (c_parser_expression_conv, c_parser_expr_list): Document
7270 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7271 (c_parser_objc_synchronized_statement): Use
7272 convert_lvalue_to_rvalue.
7273 (c_parser_objc_selector): Handle RID_ATOMIC.
7274 (c_parser_objc_receiver, c_parser_array_notation): Use
7275 convert_lvalue_to_rvalue.
7276 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7277 _Atomic (type-name).
7278 (struct c_declspecs): Add atomic_p field.
7279 (convert_lvalue_to_rvalue): Declare.
7280 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7281 corresponding atomic types.
7282 (qualify_type): Don't add _Atomic qualifiers from second argument.
7283 (comp_target_types): Do not allow _Atomic mismatches.
7284 (type_lists_compatible_p): Do not remove atomic qualifiers when
7285 comparing types.
7286 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7287 (build_atomic_assign): New functions.
7288 (build_unary_op): Use build_atomic_assign for atomic increment and
7289 decrement.
7290 (build_conditional_expr): Do not treat _Atomic void as a qualified
7291 version of void.
7292 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7293 (find_anonymous_field_with_type, convert_to_anonymous_field)
7294 (convert_for_assignment): Do not remove atomic qualifiers when
7295 comparing types.
7296 (digest_init): Do not accept initialization of arrays of atomic
7297 elements by string constants.
7298 (build_asm_expr): Use convert_lvalue_to_rvalue.
7299 (build_binary_op): Do not treat _Atomic void as a qualified
7300 version of void.
7301
0c249d4b
DD
73022013-11-06 DJ Delorie <dj@redhat.com>
7303
7304 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7305 both explicit and builtin, print the location of the explicit one.
7306
6d7f7e0a
TB
73072013-11-05 Tobias Burnus <burnus@net-b.de>
7308
7309 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7310 c_parser_omp_distribute, c_parser_omp_teams,
7311 c_parser_omp_target, c_parser_omp_declare): Handle
7312 -fopenmp-simd.
7313
b906f4ca
MP
73142013-11-03 Marek Polacek <polacek@redhat.com>
7315
7316 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7317
ee1d5a02
JJ
73182013-11-01 Jakub Jelinek <jakub@redhat.com>
7319
7320 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7321 check_dup_generic at the end, unless remove is true.
7322 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7323 remove = true;.
7324 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7325
5a9785fb
JJ
73262013-10-31 Jakub Jelinek <jakub@redhat.com>
7327
7328 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7329 with decl that is not pointer nor array.
7330
939b37da
BI
73312013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7332
7333 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7334 a spawning function is found.
7335 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7336 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7337 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7338 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7339 case.
7340 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7341 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7342 expr.
7343 (c_finish_return): Added a check to reject _Cilk_spawn in return
7344 expression.
7345 (build_cilk_spawn): New function.
7346 (build_cilk_sync): Likewise.
7347 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7348
d4af74d4
TB
73492013-10-27 Tobias Burnus <burnus@net-b.de>
7350
7351 PR other/33426
7352 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7353 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7354 (c_parser_statement_after_labels): Update calls.
7355
d73749df 73562013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7357
7358 PR other/33426
7359 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7360 Handle PRAGMA_IVDEP.
7361 (c_parser_statement_after_labels): Update call.
7362
f28aa681
MP
73632013-10-24 Marek Polacek <polacek@redhat.com>
7364
7365 * c-parser.c (c_parser_struct_declaration): Add a comment.
7366 (c_parser_declarator): Don't allow _Alignas here.
7367
0645c1a2
AM
73682013-10-17 Andrew MacLeod <amacleod@redhat.com>
7369
7370 * c-parser.c: Include omp-low.h.
7371 * c-typeck.c: Likewise.
7372
568a31f2
MP
73732013-10-17 Marek Polacek <polacek@redhat.com>
7374
7375 PR c/58267
7376 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7377 Document syntax of the array-declarator.
7378 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7379 are not permitted.
7380 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7381 (c_parser_struct_declaration): Likewise.
7382 (c_parser_declarator): Likewise.
7383 (c_parser_direct_declarator_inner): Likewise.
7384 (c_parser_parameter_declaration): Likewise.
7385 (c_parser_type_name): Likewise.
7386
acf0174b
JJ
73872013-10-11 Jakub Jelinek <jakub@redhat.com>
7388
7389 * c-lang.h (current_omp_declare_target_attribute): New extern
7390 decl.
7391 * c-parser.c: Include c-lang.h.
7392 (struct c_parser): Change tokens to c_token *.
7393 Add tokens_buf field. Change tokens_avail type to unsigned int.
7394 (c_parser_consume_token): If parser->tokens isn't
7395 &parser->tokens_buf[0], increment parser->tokens.
7396 (c_parser_consume_pragma): Likewise.
7397 (enum pragma_context): Add pragma_struct and pragma_param.
7398 (c_parser_external_declaration): Adjust
7399 c_parser_declaration_or_fndef caller.
7400 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7401 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7402 Adjust recursive call.
7403 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7404 of pragma_external.
7405 (c_parser_parameter_declaration): Use pragma_param instead of
7406 pragma_external.
7407 (c_parser_compound_statement_nostart, c_parser_label,
7408 c_parser_for_statement): Adjust
7409 c_parser_declaration_or_fndef callers.
7410 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7411 it through to c_parser_conditional_expression.
7412 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7413 pass it through to c_parser_binary_expression. Adjust recursive
7414 call.
7415 (c_parser_binary_expression): Remove prec argument, add
7416 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7417 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7418 binop matches it, use build2 instead of parser_build_binary_op.
7419 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7420 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7421 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7422 Handle pragma_struct and pragma_param the same as pragma_external.
7423 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7424 (c_parser_omp_variable_list): Parse array sections for
7425 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7426 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7427 (c_parser_omp_clause_reduction): Handle user defined reductions.
7428 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7429 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7430 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7431 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7432 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7433 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7434 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7435 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7436 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7437 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7438 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7439 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7440 (c_parser_omp_for_loop): Add CODE argument, pass it through
7441 to c_finish_omp_for. Change last argument to cclauses,
7442 and adjust uses to grab parallel clauses from the array of all
7443 the split clauses. Adjust c_parser_binary_expression,
7444 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7445 (omp_split_clauses): New function.
7446 (c_parser_omp_simd): New function.
7447 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7448 Allow the function to be called also when parsing combined constructs,
7449 and call c_parser_omp_simd when parsing for simd.
7450 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7451 #pragma omp section, require exactly one structured-block instead of
7452 sequence of statements.
7453 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7454 Allow the function to be called also when parsing combined constructs.
7455 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7456 Allow the function to be called also when parsing combined
7457 constructs.
7458 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7459 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7460 c_parser_omp_teams, c_parser_omp_target_data,
7461 c_parser_omp_target_update, c_parser_omp_target,
7462 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7463 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7464 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7465 (c_parser_omp_construct): Add p_name and mask vars. Handle
7466 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7467 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7468 and c_parser_omp_sections callers.
7469 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7470 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7471 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7472 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7473 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7474 OMP_CLAUSE_DEPEND.
7475 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7476 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7477 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7478 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7479 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7480 * c-typeck.c: Include tree-inline.h.
7481 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7482 handle_omp_array_sections_1, handle_omp_array_sections,
7483 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7484 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7485 user defined reductions.
7486 (c_tree_equal): New function.
7487 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7488 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7489 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7490 c_check_omp_declare_reduction_r): New prototypes.
7491 * c-decl.c (current_omp_declare_target_attribute): New variable.
7492 (c_decl_attributes): New function.
7493 (start_decl, start_function): Use it instead of decl_attributes.
7494 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7495 c_omp_reduction_decl, c_omp_reduction_lookup,
7496 c_check_omp_declare_reduction_r): New functions.
7497
0a6c2227
TT
74982013-09-25 Tom Tromey <tromey@redhat.com>
7499
7500 * Make-lang.in (c/gccspec.o): Remove.
7501 (CFLAGS-c/gccspec.o): New variable.
7502 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7503 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7504 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7505
f3bc55f0
TT
75062013-09-25 Tom Tromey <tromey@redhat.com>
7507
7508 * Make-lang.in (c/gccspec.o): Don't use subshell.
7509
a24d975c
MP
75102013-09-18 Marek Polacek <polacek@redhat.com>
7511
7512 PR sanitize/58443
7513 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7514 Remove unnecessary check.
7515
ce6923c5
MP
75162013-09-18 Marek Polacek <polacek@redhat.com>
7517
7518 PR sanitizer/58411
7519 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7520 no_sanitize_undefined attribute.
7521
a1e51df9
KT
75222013-09-13 Kai Tietz <ktietz@redhat.com>
7523
7524 PR target/57848
7525 * c-decl.c (c_builtin_function_ext_scope): Remove
7526 wrong assumption that it is never called on prexisting
7527 symbol.
7528
0af94e6f
JR
75292013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7530
7531 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7532
20059c8b
GDR
75332013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7534
7535 * c-objc-common.c (c_tree_printer): Tidy.
7536
de5a5fa1
MP
75372013-08-30 Marek Polacek <polacek@redhat.com>
7538
7539 * c-typeck.c (build_binary_op): Add division by zero and shift
7540 instrumentation.
7541
2531a1d9 75422013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7543 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7544
6e2bcc98 7545 PR c/35649
2531a1d9
JR
7546 * c-typeck.c (c_common_type): Prefer double_type_node over
7547 other REAL_TYPE types with the same precision.
7548 (convert_arguments): Likewise.
7549
025311c4
GDR
75502013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7551
7552 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7553 (c_initialize_diagnostics): Call a destructor for the early printer.
7554
da6ca2b5
GDR
75552013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7556
7557 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7558 printer initialization.
7559
318cda85 75602013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7561
318cda85
BI
7562 PR c/57490
7563 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7564 check for truth values.
7565 (expand_array_notation_exprs): Added truth values case. Removed an
7566 unwanted else. Added for-loop to walk through subtrees in default
7567 case.
7568
b066401f
GDR
75692013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7570
7571 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7572
fb48aadc
JM
75732013-07-23 Joseph Myers <joseph@codesourcery.com>
7574
7575 * c-parser.c (struct c_generic_association): Fix typo.
7576
433cc7b0
TT
75772013-07-23 Tom Tromey <tromey@redhat.com>
7578 Joseph Myers <joseph@codesourcery.com>
7579
7580 * c-parser.c (struct c_generic_association): New.
7581 (c_generic_association_d): New typedef.
7582 (c_parser_generic_selection): New function.
7583 (c_parser_postfix_expression): Handle RID_GENERIC.
7584
26d40c3d
JM
75852013-07-13 Jason Merrill <jason@redhat.com>
7586
7587 PR c++/57793
7588 * c-decl.c (finish_struct): Check for too-large class.
7589
ecdbd01a 75902013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7591
7592 PR c/57821
7593 * c-typeck.c (set_init_index): When folding, check for index overflow.
7594
1141ed3f
BI
75952013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7596
7597 * c-parser.c (c_parser_array_notation): Removed rejection of array
7598 notations in an array of function pointers.
7599
713b46fa
BI
76002013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7601
7602 * c-array-notation.c (make_triplet_val_inv): New function.
7603 (create_cmp_incr): Likewise.
7604 (create_array_refs): Likewise.
7605 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7606 Also modularized common parts between functions and called the function.
7607 (build_array_notation_expr): Likewise.
7608 (fix_conditional_array_notations_1): Likewise.
7609 (fix_array_notation_expr): Likewise.
7610 (fix_array_notation_call_expr): Likewise.
7611
92f20202
MP
76122013-06-18 Marek Polacek <polacek@redhat.com>
7613
7614 PR c/57630
7615 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7616
73a23b06
BI
76172013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7618
7619 * c-array-notation.c (build_array_notation_expr): Reject array notation
7620 mismatch between LHS and RHS even inside a call_expr. Also, removed
7621 a couple while statements that were dead code.
7622
00b8517d
BI
76232013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7624
7625 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7626 excessive precision expressions in function parameters. Also removed
7627 couple unwanted while statements.
7628
1509bdda
BI
76292013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7630
7631 * c-array-notation.c (expand_array_notation_exprs): Added
7632 ARRAY_NOTATION_REF case.
ab20d992 7633
d60f1706
BI
76342013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7635
7636 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7637 function to c-family/array-notation-common.c.
7638 (is_cilkplus_reduce_builtin): Likewise.
7639 (find_rank): Likewise.
7640 (extract_array_notation_exprs): Likewise.
7641 (replace_array_notations): Likewise.
7642 (find_inv_trees): Likewise.
7643 (replace_inv_trees): Likewise.
7644 (contains_array_notation_expr): Likewise.
7645 (find_correct_array_notation_type): Likewise.
7646 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7647 (struct inv_list): Moved this to c-family/array-notation-common.c.
7648 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7649
6d6efbb3
BI
76502013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7651
7652 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7653 reduction functions outside the for-loop. Added a check if the fundecl
7654 is non-NULL. Finally, removed an unwanted if-statement, and made the
7655 body unconditional.
7656
25c22937
BI
76572013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7658
7659 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7660 condition of the if-statement matches the rank of else-block and then-
7661 block when array notations are used.
7662 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7663 expression after the entire function body is parsed.
7664 (c_parser_expr_no_commas): Delayed creating array notation expressions
7665 to the end of function parsing.
7666 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7667 whole if-statement instead of just the condition.
ab20d992 7668 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7669
edd25645
BI
76702013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7671
7672 PR c/57474
7673 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7674 array to NULL_TREE if they are unused. Also added a check for the
7675 field to be NULL before its fields are used in future.
ab20d992 7676
065ce7f1
RO
76772013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7678
7679 PR bootstrap/57450
7680 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7681 (build_array_notation_expr): Likewise.
7682
36536d79
BI
76832013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7684
7685 * c-typeck.c (build_array_ref): Added a check to see if array's
7686 index is greater than one. If true, then emit an error.
7687 (build_function_call_vec): Exclude error reporting and checking
7688 for builtin array-notation functions.
7689 (convert_arguments): Likewise.
7690 (c_finish_return): Added a check for array notations as a return
7691 expression. If true, then emit an error.
7692 (c_finish_loop): Added a check for array notations in a loop
7693 condition. If true then emit an error.
7694 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7695 (build_binary_op): Added a check for array notation expr inside
7696 op1 and op0. If present, we call another function to find correct
7697 type.
7698 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7699 * c-parser.c (c_parser_compound_statement): Check if array
7700 notation code is used in tree, if so, then transform them into
7701 appropriate C code.
7702 (c_parser_expr_no_commas): Check if array notation is used in LHS
7703 or RHS, if so, then build array notation expression instead of
7704 regular modify.
7705 (c_parser_postfix_expression_after_primary): Added a check for
7706 colon(s) after square braces, if so then handle it like an array
7707 notation. Also, break up array notations in unary op if found.
7708 (c_parser_direct_declarator_inner): Added a check for array
7709 notation.
7710 (c_parser_compound_statement): Added a check for array notation in
7711 a stmt. If one is present, then expand array notation expr.
7712 (c_parser_if_statement): Likewise.
7713 (c_parser_switch_statement): Added a check for array notations in
7714 a switch statement's condition. If true, then output an error.
7715 (c_parser_while_statement): Similarly, but for a while.
7716 (c_parser_do_statement): Similarly, but for a do-while.
7717 (c_parser_for_statement): Similarly, but for a for-loop.
7718 (c_parser_unary_expression): Check if array notation is used in a
7719 pre-increment or pre-decrement expression. If true, then expand
7720 them.
7721 (c_parser_array_notation): New function.
7722 * c-array-notation.c: New file.
7723 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7724
cd192ccc
MS
77252013-05-23 Mike Stump <mikestump@comcast.net>
7726
7727 * c-typeck.c (convert_for_assignment): Handle references to memory
7728 spaces better.
7729
427b248d
JM
77302013-05-16 Jason Merrill <jason@redhat.com>
7731
7732 * Make-lang.in (cc1$(exeext)): Use link mutex.
7733
44d90fe1
PC
77342013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7735
7736 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7737 to simply use OPT_Wpointer_arith.
7738 (build_unary_op): Likewise.
7739
4e7d7b3d
JJ
77402013-04-03 Jakub Jelinek <jakub@redhat.com>
7741
7742 PR c/19449
7743 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7744 argument. If set, or it temporarily for parsing of the first
7745 argument into force_folding_builtin_constant_p.
7746 (c_parser_postfix_expression): Adjust callers.
7747
839b422f
RB
77482013-03-21 Richard Biener <rguenther@suse.de>
7749
7750 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7751 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7752
2ee028f1
MP
77532013-02-12 Marek Polacek <polacek@redhat.com>
7754
7755 PR c/44938
7756 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7757 origtypes to NULL.
7758
8824edff
JJ
77592013-01-24 Jakub Jelinek <jakub@redhat.com>
7760
7761 PR c/56078
7762 * c-typeck.c (set_nonincremental_init_from_string): If
7763 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7764 returned false.
7765 (process_init_element): Likewise.
7766
eadd3d0d
JJ
77672012-12-20 Jakub Jelinek <jakub@redhat.com>
7768
7769 PR c++/55619
7770 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7771 argument, don't call default_function_array_conversion
7772 nor c_fully_fold here.
7773 (c_parser_asm_statement): Adjust callers.
7774 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7775 and outputs here, and call default_function_array_conversion
7776 on inputs that don't need to be addressable.
7777
f8a93a2e
JJ
77782012-12-18 Jakub Jelinek <jakub@redhat.com>
7779
7780 PR c/39464
7781 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7782 warning require that both c_common_unsigned_type as well as
7783 c_common_signed_type is the same for both mvl and mvr types.
7784
9771b263
DN
77852012-11-16 Diego Novillo <dnovillo@google.com>
7786
7787 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7788
7789 * c-common.c: Use new vec API in vec.h.
7790 * c-common.h: Likewise.
7791 * c-gimplify.c: Likewise.
7792 * c-pragma.c: Likewise.
7793 * c-pretty-print.c: Likewise.
7794 * c-pretty-print.h: Likewise.
7795 * c-semantics.c: Likewise.
7796 * c-decl.c: Likewise.
7797 * c-parser.c: Likewise.
7798 * c-tree.h: Likewise.
7799 * c-typeck.c: Likewise.
7800
880661a4
JW
78012012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7802
7803 PR c++/54930
7804 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7805
077d1abe
MLI
78062012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7807
7808 PR c/53066
7809 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7810 shadows a function, unless the variable is a function or a
7811 pointer-to-function.
7812
3a785c97
JJ
78132012-10-12 Jakub Jelinek <jakub@redhat.com>
7814
7815 PR c/54381
7816 * c-parser.c (struct c_tree_loc_pair): Removed.
7817 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7818 add location_t * and tree * arguments, fill in array of 3
7819 sizeof_arg trees and corresponding locs.
7820 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7821 c_parser_expr_list callers.
7822 (c_parser_postfix_expression_after_primary): Likewise. Pass
7823 array of 3 sizeof_arg trees and locs (corresponding to first
7824 3 arguments) to sizeof_pointer_memaccess_warning.
7825
703c8606
LC
78262012-10-09 Lawrence Crowl <crowl@google.com>
7827
7828 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7829 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7830 hash table.
7831
5d9de0d0
PC
78322012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7833
7834 PR c++/54194
7835 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7836 call.
7837
a212e43f
MG
78382012-10-09 Marc Glisse <marc.glisse@inria.fr>
7839
7840 PR c++/54427
7841 * c-typeck.c: Include c-common.h.
7842 (enum stv_conv): Moved to c-common.h.
7843 (scalar_to_vector): Moved to c-common.c.
7844 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7845 * Make-lang.in: c-typeck.c depends on c-common.h.
7846
3b78de56
AC
78472012-10-04 Arnaud Charlet <charlet@adacore.com>
7848
7849 * c-decl.c (c_write_global_declarations): Fix handling of
7850 -fdump-ada-spec*.
7851
78c60e3d
SS
78522012-09-30 Sharad Singhai <singhai@google.com>
7853
7854 * c-decl.c (c_write_global_declarations): Use a different method
7855 to determine if the dump has ben initialized.
7856
9f33203d
JM
78572012-09-14 Joseph Myers <joseph@codesourcery.com>
7858
7859 PR c/54552
7860 * c-typeck.c (c_cast_expr): When casting to a type requiring
7861 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7862 c_fully_fold first.
7863
a27d595d
JM
78642012-09-14 Joseph Myers <joseph@codesourcery.com>
7865
7866 PR c/54103
7867 * c-typeck.c (build_unary_op): Pass original argument of
7868 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7869 any C_MAYBE_CONST_EXPR, if it has integer operands.
7870 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7871 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7872 to c_objc_common_truthvalue_conversion, then remove any
7873 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7874 c_objc_common_truthvalue_conversion not
7875 c_common_truthvalue_conversion.
7876 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7877 call note_integer_operands for arguments with integer operands
7878 that are not integer constants.
7879
9feb29df
JJ
78802012-09-13 Jakub Jelinek <jakub@redhat.com>
7881
7882 PR c/54559
7883 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7884 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7885
d409320c
JJ
78862012-08-31 Jakub Jelinek <jakub@redhat.com>
7887
7888 PR c/54428
7889 * c-convert.c (convert): Don't call fold_convert_loc if
7890 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7891 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7892 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7893
6265d07c
JJ
78942012-08-24 Jakub Jelinek <jakub@redhat.com>
7895
7896 PR c/54355
7897 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7898 for nested and empty_ok arguments in the call to
7899 c_parser_declaration_or_fndef.
7900
1a4049e7
JJ
79012012-08-17 Jakub Jelinek <jakub@redhat.com>
7902
7903 * c-tree.h (c_last_sizeof_arg): Declare.
7904 * c-parser.c (struct c_tree_loc_pair): New type.
7905 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7906 non-NULL.
7907 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7908 (c_parser_postfix_expression_after_primary): Likewise. Call
7909 sizeof_pointer_memaccess_warning if needed.
7910 (sizeof_ptr_memacc_comptypes): New function.
7911 * c-typeck.c (c_last_sizeof_arg): New global variable.
7912 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7913
0229aee9
UB
79142012-07-24 Uros Bizjak <ubizjak@gmail.com>
7915
7916 * c-lang.h (lang_decl): Add variable_size GTY option.
7917
7ee2468b
SB
79182012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7919
7920 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7921 * Make-lang.in: Fix dependencies.
7922
d4a10d0a
SB
79232012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7924
7925 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7926 and add language Makefile hooks.
7927 * config-lang.in: New file.
7928 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7929 add the required "normal" config-lang.in rules.
7930 * c-lang.h: Moved from gcc/ to here.
7931 * c-tree.h: Likewise.
7932 * c-objc-common.c: Likewise.
7933 * c-objc-common.h: Likewise.
7934 * c-typeck.c: Likewise.
7935 * c-convert.c: Likewise.
7936 * c-lang.c: Likewise.
7937 * c-aux-info.c: Likewise.
7938 * c-errors.c: Likewise.
7939 * gccspec.c: Likewise.
7940 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7941 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7942\f
c48514be 7943Copyright (C) 2012-2021 Free Software Foundation, Inc.
d4a10d0a
SB
7944
7945Copying and distribution of this file, with or without modification,
7946are permitted in any medium without royalty provided the copyright
7947notice and this notice are preserved.