]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Add ability to use full resolving path solver in the backward threader.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
c9db17b8
GA
12021-10-09 Jakub Jelinek <jakub@redhat.com>
2
3 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
4 (c_parser_omp_scan_loop_body): Use it.
5 (c_parser_omp_sections_scope): Likewise.
6
50e20ee6
GA
72021-10-07 Richard Biener <rguenther@suse.de>
8
9 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
10
bb6194e0
GA
112021-10-05 Richard Biener <rguenther@suse.de>
12
13 PR c/102605
14 * gimple-parser.c (c_parser_gimple_postfix_expression):
15 Accept more address _Literals.
16
da9c5f78
GA
172021-10-04 Marek Polacek <polacek@redhat.com>
18
19 PR c++/97573
20 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
21
9d116bcc
GA
222021-10-01 Martin Sebor <msebor@redhat.com>
23
24 PR c/102103
25 * c-typeck.c (maybe_warn_for_null_address): New function.
26 (build_binary_op): Call it.
27
282021-10-01 Jakub Jelinek <jakub@redhat.com>
29 Richard Biener <rguenther@suse.de>
30
31 PR sanitizer/102515
32 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
33 for division even for SANITIZE_SI_OVERFLOW.
34
352021-10-01 Jakub Jelinek <jakub@redhat.com>
36
37 * c-parser.c (c_parser_omp_clause_order): Set
38 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
39
fd133479
GA
402021-09-28 Andrew Pinski <apinski@marvell.com>
41
42 PR c/32122
43 * c-parser.c (c_parser_statement_after_labels): Pass
44 the c_expr instead of the tree to c_finish_goto_ptr.
45 * c-typeck.c (c_finish_goto_ptr): Change the second
46 argument type to c_expr.
47 * c-tree.h (c_finish_goto_ptr): Likewise.
48 Error out if the expression was not of a pointer type.
49
e4777439
GA
502021-09-22 Jakub Jelinek <jakub@redhat.com>
51
52 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
53 modifiers.
54
cf74e7b5
GA
552021-09-18 Jakub Jelinek <jakub@redhat.com>
56
57 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
58 and reproducible modifiers.
59 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
60
612021-09-18 Jakub Jelinek <jakub@redhat.com>
62
63 * c-parser.c (c_parser_omp_clause_default): Handle private and
64 firstprivate arguments, adjust diagnostics on unknown argument.
65
0a4cb439
GA
662021-09-17 Jakub Jelinek <jakub@redhat.com>
67
68 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
69 is true.
70
a26206ec
GA
712021-09-10 Jakub Jelinek <jakub@redhat.com>
72
73 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
74 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
75 don't call build_conditional_expr, instead build a COND_EXPR directly.
76 (c_parser_binary_expression): Avoid calling parser_build_binary_op
77 if omp_atomic_lhs even in more cases for >, < or ==.
78 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
79 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
80 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
81 * c-typeck.c (build_binary_op): For flag_openmp only handle
82 MIN_EXPR/MAX_EXPR.
83
b2748138
GA
842021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
85
86 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
87 directive.
88
e11c6046
GA
892021-09-01 Iain Sandoe <iain@sandoe.co.uk>
90
91 * c-decl.c (enum deprecated_states): Add unavailable state.
92 (merge_decls): Copy unavailability.
93 (quals_from_declspecs): Handle unavailable case.
94 (start_decl): Amend the logic handling suppression of nested
95 deprecation states to include unavailability.
96 (smallest_type_quals_location): Amend comment.
97 (grokdeclarator): Handle the unavailable deprecation state.
98 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
99 * c-tree.h (struct c_declspecs): Add unavailable_p.
100 * c-typeck.c (build_component_ref): Handle unavailability.
101 (build_external_ref): Likewise.
102
1032021-09-01 Roger Sayle <roger@nextmovesoftware.com>
104 Joseph Myers <joseph@codesourcery.com>
105
106 PR c/79412
107 * c-decl.c (duplicate_decls): On significant mismatches, mark the
108 types of both (non-function) decls as error_mark_node, so that the
109 middle-end can see the code is malformed.
110 (free_attr_access_data): Don't process if the type has been set to
111 error_mark_node.
112
6d51ee43
GA
1132021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
114
115 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
116 and 'ancestor' in 'target device' clauses.
117
38b19c5b
GA
1182021-08-23 Jakub Jelinek <jakub@redhat.com>
119
120 * c-parser.c (c_parser_omp_clause_num_tasks,
121 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
122
5b2876f9
GA
1232021-08-22 Martin Uecker <muecker@gwdg.de>
124
125 PR c/98397
126 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
127 for pointers to arrays with qualifiers.
128 (build_conditional_expr): For C23 don't lose qualifiers for pointers
129 to arrays when the other pointer is a void pointer. Update warnings.
130 (convert_for_assignment): Update warnings for C2X when converting from
131 void* with qualifiers to a pointer to array with the same qualifiers.
132
7c9e1645
GA
1332021-08-20 Jakub Jelinek <jakub@redhat.com>
134
135 * c-parser.c (c_parser_omp_error): New function.
136 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
137
1382021-08-20 Jakub Jelinek <jakub@redhat.com>
139
140 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
141 comma at the end of list.
142 (c_parser_omp_requires): Likewise.
143
b57fba5e
GA
1442021-08-19 Jakub Jelinek <jakub@redhat.com>
145
146 * c-parser.c (c_parser_omp_requires): Don't call
147 c_parser_peek_2nd_token and optionally consume token if current
148 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
149
6e529985
GA
1502021-08-18 Jakub Jelinek <jakub@redhat.com>
151
152 * c-parser.c (c_parser_omp_nothing): New function.
153 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
154
1552021-08-18 Jakub Jelinek <jakub@redhat.com>
156
157 * c-parser.c (c_parser_statement_after_labels): Add restart label
158 near the start of the function. If c_parser_pragma returns false,
159 goto restart.
160 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
161 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
162 return what c_parser_omp_declare returned. Return true instead of
163 false after emitting errors that the directive is not allowed in
164 pragma_stmt context.
165 (c_parser_omp_ordered): Return true instead of
166 false after emitting errors that the directive is not allowed in
167 pragma_stmt context.
168 (c_parser_omp_target_update): Likewise.
169 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
170 Change return type from tree to bool, return false if the
171 directive should be ignored in pragma_stmt contexts.
172 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
173 return their result directly.
174 (c_parser_omp_cancellation_point): Change return type from void to
175 bool, return false if the directive should be ignored in pragma_stmt
176 contexts.
177 (c_parser_omp_declare): Likewise.
178
2d14d64b
GA
1792021-08-17 Jakub Jelinek <jakub@redhat.com>
180
181 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
182 (c_parser_omp_scope): New function.
183 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
184
72be20e2
GA
1852021-08-12 Jakub Jelinek <jakub@redhat.com>
186
187 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
188 (c_parser_omp_clause_filter): New function.
189 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
190 (OMP_MASKED_CLAUSE_MASK): Define.
191 (c_parser_omp_masked): New function.
192 (c_parser_omp_parallel): Handle parallel masked.
193 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
194 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
195
1962021-08-12 Martin Uecker <muecker@gwdg.de>
197
198 PR c/101838
199 PR c/29970
200 * c-typeck.c (c_expr_sizeof_type): Evaluate
201 size expressions for structs of variable size.
202
2032021-08-12 Tobias Burnus <tobias@codesourcery.com>
204
205 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
206 'primary' as alias for 'master'.
207
3ae564ea
GA
2082021-08-10 Martin Uecker <muecker@gwdg.de>
209
210 PR c/29970
211 * c-typeck.c (c_expr_sizeof_expr): Evaluate
212 size expressions for structs of variable size.
213
f92f4778
GA
2142021-08-06 Tamar Christina <tamar.christina@arm.com>
215
216 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
217 * c-tree.h (c_simulate_enum_decl): Likewise.
218
2192021-08-06 Martin Sebor <msebor@redhat.com>
220
221 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
222 vec arguments to by-reference.
223 (c_finish_omp_declare_simd): Same.
224 (c_parser_compound_statement_nostart): Same.
225 (c_parser_for_statement): Same.
226 (c_parser_objc_methodprotolist): Same.
227 (c_parser_oacc_routine): Same.
228 (c_parser_omp_for_loop): Same.
229 (c_parser_omp_declare_simd): Same.
230
419c6c68
GA
2312021-07-21 Thomas Schwinge <thomas@codesourcery.com>
232 Joseph Myers <joseph@codesourcery.com>
233 Cesar Philippidis <cesar@codesourcery.com>
234
235 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
236 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
237 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
238 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
239
92d45509
GA
2402021-07-20 Martin Sebor <msebor@redhat.com>
241
242 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
243 by-const-reference.
244 * c-typeck.c (c_build_function_call_vec): Same.
245
d97d71a1
GA
2462021-07-15 Martin Sebor <msebor@redhat.com>
247
248 PR c/101289
249 PR c/97548
250 * c-decl.c (get_parm_array_spec): Strip nops.
251
6fba0eea
GA
2522021-07-06 Martin Sebor <msebor@redhat.com>
253
254 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
255
7a60a6e8
GA
2562021-07-02 Jakub Jelinek <jakub@redhat.com>
257
258 PR c/101297
259 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
260 appears before a CPP_NAME.
261
90708f87
GA
2622021-06-25 Martin Sebor <msebor@redhat.com>
263
264 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
265 warning_suppressed_p, suppress_warning, and copy_no_warning.
266 (diagnose_mismatched_decls): Same.
267 (duplicate_decls): Same.
268 (grokdeclarator): Same.
269 (finish_function): Same.
270 (c_write_global_declarations_1): Same.
271 * c-fold.c (c_fully_fold_internal): Same.
272 * c-parser.c (c_parser_expr_no_commas): Same.
273 (c_parser_postfix_expression): Same.
274 * c-typeck.c (array_to_pointer_conversion): Same.
275 (function_to_pointer_conversion): Same.
276 (default_function_array_conversion): Same.
277 (convert_lvalue_to_rvalue): Same.
278 (default_conversion): Same.
279 (build_indirect_ref): Same.
280 (build_function_call_vec): Same.
281 (build_atomic_assign): Same.
282 (build_unary_op): Same.
283 (c_finish_return): Same.
284 (emit_side_effect_warnings): Same.
285 (c_finish_stmt_expr): Same.
286 (c_omp_clause_copy_ctor): Same.
287
9aa8327e
GA
2882021-06-24 Jakub Jelinek <jakub@redhat.com>
289
290 PR c/101176
291 * c-parser.c (c_parser_has_attribute_expression): Set source range for
292 the result.
293
2942021-06-24 Jakub Jelinek <jakub@redhat.com>
295
296 PR c/101171
297 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
298 error_mark_node.
299
3002021-06-24 Jakub Jelinek <jakub@redhat.com>
301
302 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
303 C_ORT_OMP for clauses on target construct.
304 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
305 (c_parser_omp_target): For non-combined target add
306 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
307 C_ORT_OMP_TARGET to c_finish_omp_clauses.
308 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
309 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
310 never present on C_ORT_*DECLARE_SIMD.
311 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
312 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
313 corresponding map clauses.
314
2f080224
GA
3152021-06-21 Jakub Jelinek <jakub@redhat.com>
316
317 PR inline-asm/100785
318 * c-typeck.c (c_mark_addressable): Diagnose trying to make
319 bit-fields addressable.
320
ede6c356
GA
3212021-06-15 Robin Dapp <rdapp@linux.ibm.com>
322
323 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
324 similar.
325
8dc48181
GA
3262021-06-14 Tobias Burnus <tobias@codesourcery.com>
327
328 PR c/100913
329 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
330 var in the error case.
331
438aac59
GA
3322021-06-07 Eric Botcazou <ebotcazou@adacore.com>
333
334 PR c/100920
335 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
336 spot built-in functions.
337
7d6987e9
GA
3382021-06-06 Jakub Jelinek <jakub@redhat.com>
339
340 PR c/100902
341 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
342 even when target is combined with other constructs.
343
3442021-06-06 Eric Botcazou <ebotcazou@adacore.com>
345
346 PR c/100920
347 * c-decl.c (finish_struct): Fix thinko in previous change.
348 * c-typeck.c (convert_for_assignment): Do not warn on pointer
349 assignment and initialization for storage order purposes if the
350 RHS is a call to a DECL_IS_MALLOC function.
351
600f90cb
GA
3522021-06-04 Martin Sebor <msebor@redhat.com>
353
354 PR c/100783
355 * c-objc-common.c (print_type): Handle erroneous types.
356
440c8a0a
GA
3572021-06-03 Jakub Jelinek <jakub@redhat.com>
358
359 PR c++/100859
360 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
361 after depend only cases.
362
ee682192
GA
3632021-05-31 Richard Biener <rguenther@suse.de>
364
365 PR c++/88601
366 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
367 * c-parser.c (c_parser_postfix_expression): Likewise.
368
48166757
GA
3692021-05-28 Richard Biener <rguenther@suse.de>
370
371 PR c/100803
372 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
373 invalid if conditions.
374
3752021-05-28 Jakub Jelinek <jakub@redhat.com>
376
377 PR middle-end/99928
378 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
379 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
380 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
381 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
382 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
383 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
384 if present in map_head, map_field_head or map_firstprivate_head
385 bitmaps.
386
3872021-05-28 Tobias Burnus <tobias@codesourcery.com>
388
389 * c-parser.c (c_parser_omp_clause_affinity): New.
390 (c_parser_omp_clause_name, c_parser_omp_variable_list,
391 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
392 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
393 c_finish_omp_clauses): Likewise.
394
01c59ef2
GA
3952021-05-26 Eric Botcazou <ebotcazou@adacore.com>
396
397 PR c/100653
398 * c-decl.c (finish_struct): Warn for a union containing an aggregate
399 field with a differing scalar storage order.
400
2832d51b
GA
4012021-05-21 Jakub Jelinek <jakub@redhat.com>
402
403 PR middle-end/99928
404 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
405 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
406 if a decl is mentioned both in map clause and in such firstprivate
407 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
408
65f32e5d
GA
4092021-05-19 Jakub Jelinek <jakub@redhat.com>
410
411 PR middle-end/99928
412 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
413 master when combined with taskloop.
414 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
415 parallel master when not combined with taskloop.
416
a8daf9a1
GA
4172021-05-18 Richard Biener <rguenther@suse.de>
418
419 PR c/100522
420 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
421 Diagnose calls to non-functions.
422 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
423
a7ffc1ef
GA
4242021-05-17 Richard Biener <rguenther@suse.de>
425
426 PR c/100625
427 * gimple-parser.c (c_parser_gimple_label): Avoid building
428 a GIMPLE label with NULL label decl.
429
f9af11c7
GA
4302021-05-13 Martin Sebor <msebor@redhat.com>
431
432 PR c/100550
433 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
434
0ff3a0f2
GA
4352021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
436
437 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
438 'close'.
439
aa891c56
GA
4402021-05-10 Martin Liska <mliska@suse.cz>
441
442 * c-aux-info.c (affix_data_type): Use startswith
443 function instead of strncmp.
444 * c-typeck.c (build_function_call_vec): Likewise.
445 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
446
62d87a32
GA
4472021-05-07 Eric Botcazou <ebotcazou@adacore.com>
448
449 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
450 on the address of a pointer field in a record with reverse SSO.
451
99e8df7a
GA
4522021-05-04 Tobias Burnus <tobias@codesourcery.com>
453
454 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
455 for || and && reductions.
456
3c8e539d
GA
4572021-04-29 Joseph Myers <joseph@codesourcery.com>
458
459 * c-typeck.c (function_types_compatible_p): For C2X, treat
460 unprototyped function as compatible with non-variadic prototyped
461 function even if some argument types are changed by the default
462 argument promotions.
463
ee351f7f
GA
4642021-04-15 Martin Sebor <msebor@redhat.com>
465
466 PR c/99420
467 PR c/99972
468 * c-decl.c (pushdecl): Always propagate type attribute.
469
4702021-04-15 Richard Sandiford <richard.sandiford@arm.com>
471
472 PR c/98852
473 * c-typeck.c (c_common_type): Do not drop attributes that
474 affect type identity.
475
1d54b138
GA
4762021-04-10 Jakub Jelinek <jakub@redhat.com>
477
478 PR c/99990
479 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
480 error_mark_node.
481
4493b1c1
GA
4822021-03-25 Jakub Jelinek <jakub@redhat.com>
483
484 PR c++/99565
485 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
486 to operand_equal_p.
487
5f256a70
GA
4882021-03-19 Jakub Jelinek <jakub@redhat.com>
489
490 PR c/99588
491 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
492 with modifycode NOP_EXPR produces and mark the _Atomic var as read
493 if found.
494 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
495 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
496 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
497
3c5b6d24
GA
4982021-03-15 Tobias Burnus <tobias@codesourcery.com>
499
500 PR c++/99509
501 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
502 ensure that the varpool node is marked as offloadable.
503
ceae9533
GA
5042021-03-05 Tobias Burnus <tobias@codesourcery.com>
505
506 PR c/99137
507 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
508
4028d01a
GA
5092021-02-24 Martin Sebor <msebor@redhat.com>
510
511 PR middle-end/97172
512 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
513
bf81237e
GA
5142021-02-18 Jakub Jelinek <jakub@redhat.com>
515
516 PR c/99136
517 * c-typeck.c (c_finish_return): Don't wrap retval into
518 EXCESS_PRECISION_EXPR in functions that return void.
519
0c5cdb31
GA
5202021-02-11 Marek Polacek <polacek@redhat.com>
521
522 * c-parser.c (c_parser_if_statement): Use vec_free.
523
a19dd5e6
GA
5242021-02-04 Martin Sebor <msebor@redhat.com>
525
526 PR c/97882
527 * c-decl.c (locate_old_decl): Add type to diagnostic output.
528 (diagnose_mismatched_decls): Same.
529 (start_function): Introduce temporaries for better readability.
530 * c-typeck.c (comptypes_internal): Only consider complete enum
531 types in comparisons with integers.
532
f7884fb1
GA
5332021-02-01 Martin Sebor <msebor@redhat.com>
534
535 PR middle-end/97172
536 * c-decl.c (free_attr_access_data): New function.
537 (c_parse_final_cleanups): Call free_attr_access_data.
538
59cf67d1
GA
5392021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
540
541 * c-parser.c (c_parser_omp_clause_detach): New.
542 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
543 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
544 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
545 clause. Prevent use of detach with mergeable and overriding the
546 data sharing mode of the event handle.
547
2f7f0d32
GA
5482021-01-15 Jakub Jelinek <jakub@redhat.com>
549
550 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
551 unqualified element type and then call c_build_qualified_type on the
552 ARRAY_TYPE.
553
7d187e4f
GA
5542021-01-07 Richard Biener <rguenther@suse.de>
555
556 * gimple-parser.c (c_parser_gimple_compound_statement): Only
557 reallocate loop array if it is too small.
558
eefe499f
GA
5592020-12-16 Martin Uecker <muecker@gwdg.de>
560
561 PR c/98047
562 * c-typeck.c (build_modify_expr): Drop qualifiers.
563
5642020-12-16 Martin Uecker <muecker@gwdg.de>
565
566 PR c/98260
567 * c-parser.c (c_parser_expression): Look into
568 nop expression when marking expressions as read.
569
d52945ce
GA
5702020-12-14 Martin Liska <mliska@suse.cz>
571
572 PR sanitizer/98204
573 * c-typeck.c (pointer_diff): Do not emit a top-level
574 sanitization.
575 (build_binary_op): Likewise.
576
ca2bd949
GA
5772020-12-09 Tobias Burnus <tobias@codesourcery.com>
578
579 * c-parser.c (c_parser_omp_allocate): New.
580 (c_parser_omp_construct): Call it.
581
5822020-12-09 Richard Biener <rguenther@suse.de>
583
584 PR c/98200
585 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
586 early on error.
587
bc8a7013
GA
5882020-12-07 Martin Uecker <muecker@gwdg.de>
589
590 PR c/97981
591 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
592 that drops qualifiers to the end of the function.
593
d48df6f2
GA
5942020-11-26 Martin Uecker <muecker@gwdg.de>
595
596 PR c/65455
597 PR c/92935
598 * c-parser.c (c_parser_declaration_or_fndef): Remove
599 redundant code to drop qualifiers of _Atomic types for __auto_type.
600 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
601 types for __typeof__.
602
1e2c9a27
GA
6032020-11-24 Jakub Jelinek <jakub@redhat.com>
604
605 PR c/97958
606 * c-parser.c (c_parser_binary_expression): For omp atomic binary
607 expressions, use make_node instead of build2 to avoid checking build2
608 performs.
609
8e6198d0
GA
6102020-11-23 Joseph Myers <joseph@codesourcery.com>
611
612 PR c/95630
613 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
614 for comparisons of complete and incomplete pointers.
615
7a97e2fc
GA
6162020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
617
618 * c-aux-info.c (gen_type): Support opaque types.
619
82e5048e
GA
6202020-11-20 Martin Sebor <msebor@redhat.com>
621
622 PR middle-end/97879
623 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
624
6252020-11-20 Jakub Jelinek <jakub@redhat.com>
626
627 PR other/97911
628 * Make-lang.in (c.serial): Change from goal to a variable.
629 (.PHONY): Drop c.serial.
630
6312020-11-20 Martin Uecker <muecker@gwdg.de>
632
633 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
634
d62586ee
GA
6352020-11-19 Jakub Jelinek <jakub@redhat.com>
636
637 PR c/97860
638 * c-decl.c (get_parm_array_spec): Bail out of nelts is
639 error_operand_p.
640
25bb75f8
GA
6412020-11-18 Jakub Jelinek <jakub@redhat.com>
642
643 * Make-lang.in (c.serial): New goal.
644 (.PHONY): Add c.serial c.prev.
645 (cc1$(exeext)): Call LINK_PROGRESS.
646
77f67db2
GA
6472020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
648
649 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
650 goto too.
651 * c-typeck.c (build_asm_expr): Remove an assert checking output
652 absence for asm goto.
653
6542020-11-13 Jakub Jelinek <jakub@redhat.com>
655
656 * c-typeck.c (c_finish_omp_clauses): Don't clear
657 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
658
6592020-11-13 Iain Sandoe <iain@sandoe.co.uk>
660
661 PR objc/77404
662 * c-parser.c (c_parser_objc_class_definition): Pass the
663 location of the class name to the interface declaration.
664
bb622641
GA
6652020-11-10 Strager Neds <strager.nds@gmail.com>
666
667 * c-decl.c (merge_decls): Use new overload of
668 set_decl_section_name.
669
6702020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
671
672 * c-parser.c (c_parser_omp_target_data): Add use of
673 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
674 handled map clause kind.
675 (c_parser_omp_target_enter_data): Likewise.
676 (c_parser_omp_target_exit_data): Likewise.
677 (c_parser_omp_target): Likewise.
678 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
679 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
680 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
681 same struct field access to co-exist on OpenMP construct.
682
2da7ee05
GA
6832020-11-07 Martin Uecker <muecker@gwdg.de>
684
685 * c-parser.c (c_parser_label): Implement mixing of labels and code.
686 (c_parser_all_labels): Likewise.
687
44cab2d8
GA
6882020-11-06 Iain Sandoe <iain@sandoe.co.uk>
689
690 * c-parser.c (c_parser_objc_at_property_declaration):
691 Improve parsing fidelity. Associate better location info
692 with @property attributes. Clean up the interface to
693 objc_add_property_declaration ().
694
6952020-11-06 Nathan Sidwell <nathan@acm.org>
696
697 * c-decl.c (diagnose_mismatched_decls): Rename
698 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
699 (warn_if_shadowing, implicitly_declare, names_builtin_p)
700 (collect_source_refs): Likewise.
701 * c-typeck.c (inform_declaration, inform_for_arg)
702 (convert_for_assignment): Likewise.
703
7042020-11-06 Tobias Burnus <tobias@codesourcery.com>
705
706 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
707 OpenACC matching.
708 (c_parser_omp_construct): Update call.
709
35c125cb
GA
7102020-11-04 Jakub Jelinek <jakub@redhat.com>
711
712 PR c++/97670
713 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
714 find underlying decl to clear in the aligned_head bitmap.
715
7162020-11-04 Joseph Myers <joseph@codesourcery.com>
717
718 * c-decl.c (handle_nodiscard_attribute): New.
719 (std_attribute_table): Add nodiscard.
720 * c-parser.c (c_parser_std_attribute): Expect argument to
721 nodiscard attribute to be a string. Do not special-case ignoring
722 nodiscard.
723 * c-typeck.c (maybe_warn_nodiscard): New.
724 (build_compound_expr, emit_side_effect_warnings): Call
725 maybe_warn_nodiscard.
726 (c_process_expr_stmt, c_finish_stmt_expr): Also call
727 emit_side_effect_warnings if warn_unused_result.
728
4f0606fe
GA
7292020-10-29 Asher Gordon <AsDaGo@posteo.net>
730
731 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
732 with XDELETE.
733 (finish_init): Likewise.
734 (pop_init_level): Likewise.
735
e93aae4a
GA
7362020-10-28 Joseph Myers <joseph@codesourcery.com>
737
738 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
739 error_at for omitted parameter name.
740
7412020-10-28 Jakub Jelinek <jakub@redhat.com>
742
743 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
744 (c_parser_omp_clause_allocate): New function.
745 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
746 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
747 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
748 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
749 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
750 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
751 PRAGMA_OMP_CLAUSE_ALLOCATE.
752 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
753
89bb01e7
GA
7542020-10-27 Joseph Myers <joseph@codesourcery.com>
755
756 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
757 standard attributes.
758
efe71fcc
GA
7592020-10-23 Marek Polacek <polacek@redhat.com>
760
761 PR c++/91741
762 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
763 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
764 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
765 * c-tree.h (char_type_p): Declare.
766 * c-typeck.c (char_type_p): No longer static.
767
7682020-10-23 Martin Sebor <msebor@redhat.com>
769
770 PR middle-end/97552
771 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
772
2fe5b7d1
GA
7732020-09-19 Martin Sebor <msebor@redhat.com>
774
775 PR c/50584
776 * c-decl.c (lookup_last_decl): Define new function.
777 (c_decl_attributes): Call it.
778 (start_decl): Add argument and use it.
779 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
780 (get_parm_array_spec): Define new function.
781 (push_parm_decl): Call get_parm_array_spec.
782 (start_function): Call warn_parm_array_mismatch. Build attribute
783 access and add it to current function.
784 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
785 in forms of array parameters.
786 * c-tree.h (start_decl): Add argument.
787
7882020-09-19 Sandra Loosemore <sandra@codesourcery.com>
789
790 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
791 with...
792 (in_statement): New.
793 (start_function): Adjust for above change.
794 (c_push_function_context, c_pop_function_context): Likewise.
795 * c-lang.h (struct language_function): Likewise.
796 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
797 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
798 New.
799 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
800 (c_parser_switch_statement): Adjust break/switch context handling
801 and calls to renamed functions.
802 (c_parser_while_statement): Adjust break/switch context handling and
803 build a WHILE_STMT.
804 (c_parser_do_statement): Ditto, with DO_STMT respectively.
805 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
806 (c_parser_omp_for_loop): Adjust break/switch context handling.
807 * c-tree.h (c_break_label, c_cont_label): Delete.
808 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
809 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
810 (in_statement, switch_statement_break_seen_p): Declare.
811 (c_start_case, c_finish_case): Renamed to...
812 (c_start_switch, c_finish_switch).
813 (c_finish_bc_stmt): Adjust arguments.
814 * c-typeck.c (build_function_call_vec): Don't try to print
815 statements with %qE format.
816 (struct c_switch): Rename switch_expr field to switch_stmt.
817 Add break_stmt_seen_p field.
818 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
819 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
820 (do_case): Update for changes to struct c_switch.
821 (c_finish_case): Rename to c_finish_switch. Update for changes to
822 struct c_switch and change of representation from SWITCH_EXPR to
823 SWITCH_STMT.
824 (c_finish_loop): Delete.
825 (c_finish_bc_stmt): Update to reflect changes to break/continue
826 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
827 of a GOTO_EXPR except for objc foreach loops.
828
e1a4a8a0
GA
8292020-09-01 Jakub Jelinek <jakub@redhat.com>
830
831 PR c++/96867
832 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
833 only on PARM_DECLs.
834
8f7ea26a
GA
8352020-08-28 Martin Sebor <msebor@redhat.com>
836
837 PR c/96596
838 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
839 argument type.
840
8b394f01
GA
8412020-08-27 Martin Liska <mliska@suse.cz>
842
843 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
844 growth function to true.
845
db0f6efe
GA
8462020-08-25 Tobias Burnus <tobias@codesourcery.com>
847
848 PR c/96678
849 * c-typeck.c (handle_omp_array_sections_1): Talk about
850 array function parameter in the error message.
851
5c265693
GA
8522020-08-18 Jakub Jelinek <jakub@redhat.com>
853
854 PR c/96571
855 * c-parser.c (c_parser_generic_selection): Change match_found from bool
856 to int, holding index of the match. Call mark_exp_read on the selector
857 expression and on expressions other than the selected one.
858
4967ca2f
GA
8592020-08-01 Richard Sandiford <richard.sandiford@arm.com>
860
861 PR c/96377
862 * c-typeck.c (process_init_element): Split test for whether to
863 recurse into a record, union or array into...
864 (initialize_elementwise_p): ...this new function. Don't recurse
865 into a vector type if the initialization value is also a vector.
866
48cc2e46
GA
8672020-07-31 Richard Biener <rguenther@suse.de>
868
869 PR debug/96383
870 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
871 Define to c_common_finalize_early_debug.
872
3ea9abca
GA
8732020-07-22 Tobias Burnus <tobias@codesourcery.com>
874
875 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
876 (c_parser_omp_critical): Permit hint(0) clause without named critical.
877 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
878
30430061
GA
8792020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
880
881 PR target/95237
882 * c-decl.c (finish_decl): Call target hook
883 lower_local_decl_alignment to lower local decl alignment.
884
3f8ca9cb
GA
8852020-07-09 Julian Brown <julian@codesourcery.com>
886 Thomas Schwinge <thomas@codesourcery.com>
887
888 PR middle-end/95270
889 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
890 for standalone attach/detach clauses.
891
a82c4c4c 8922020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
893
894 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
895 set, warn for conversion between pointers that point to incompatible
896 scalar storage orders.
897
f60ee68d
GA
8982020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
899
900 * c-parser.c (c_parser_statement_after_labels): Pass correct
901 parameters to c_parser_do_statement.
902
56638b9b
GA
9032020-06-16 Jakub Jelinek <jakub@redhat.com>
904
905 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
906 c_in_omp_for.
907 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
908 premature c_fully_fold. Defer explicit c_fully_fold calls to after
909 c_finish_omp_for.
910 * c-tree.h (c_in_omp_for): Declare.
911 * c-typeck.c (c_in_omp_for): Define.
912 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
913 (digest_init): Likewise.
914 (build_binary_op): Likewise.
915
9162020-06-16 Jakub Jelinek <jakub@redhat.com>
917
918 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
919 from kind by comma rather than colon.
920
1a59f3db
GA
9212020-06-05 Mark Wielaard <mark@klomp.org>
922
923 * c-decl.c (implicit_decl_warning): When warned and olddecl is
924 an undeclared builtin, then add a fixit header hint, if found.
925 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
926 warning_at about implicit builtin declaration type mismatch.
927
9a5b7438
GA
9282020-06-03 Mark Wielaard <mark@klomp.org>
929
930 * c-parser.c (struct c_parser): Add seen_string_literal
931 bitfield.
932 (c_parser_consume_token): Reset seen_string_literal.
933 (c_parser_error_richloc): Add name_hint if seen_string_literal
934 and next token is a CPP_NAME and we have a missing header
935 suggestion for the name.
936 (c_parser_string_literal): Set seen_string_literal.
937
9382020-06-03 Mark Wielaard <mark@klomp.org>
939
940 * c-parser.c (c_parser_postfix_expression_after_primary): Add
941 scope with matching_parens after CPP_OPEN_PAREN.
942
9432020-06-03 Tobias Burnus <tobias@codesourcery.com>
944
945 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
946
53ffb43a
GA
9472020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
948
949 * Make-lang.in: Remove extra slash.
950
8f66f175
ML
9512020-05-19 Martin Liska <mliska@suse.cz>
952
953 * c-parser.c: Fix typo.
954
49ddde69
JJ
9552020-05-14 Jakub Jelinek <jakub@redhat.com>
956
957 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
958
eb72dc66
RB
9592020-05-07 Richard Biener <rguenther@suse.de>
960
961 PR middle-end/94703
962 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
963 DECL_GIMPLE_REG_P.
964
bf915591
JJ
9652020-04-30 Jakub Jelinek <jakub@redhat.com>
966
967 PR c/94842
968 * c-decl.c (set_labels_context_r): In addition to context-less
969 LABEL_DECLs adjust also LABEL_DECLs with context equal to
970 parent function if any.
971 (store_parm_decls): Adjust comment.
972
e1113ffb
JJ
9732020-04-19 Jakub Jelinek <jakub@redhat.com>
974
975 PR objc/94637
976 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
977 two CPP_COLON tokens.
978
2e389749
JJ
9792020-04-17 Jakub Jelinek <jakub@redhat.com>
980
981 PR other/94629
982 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
983 to data.clauses.
984
2dc9294c
JJ
9852020-04-15 Jakub Jelinek <jakub@redhat.com>
986
987 PR c/94593
988 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
989 requires directive when not at file scope.
990
13e41d8b
TB
9912020-04-08 Tobias Burnus <tobias@codesourcery.com>
992
993 PR middle-end/94120
994 * c-decl.c (c_check_in_current_scope): New function.
995 * c-tree.h (c_check_in_current_scope): Declare it.
996 * c-parser.c (c_parser_oacc_declare): Add check that variables
997 are declared in the same scope as the directive. Fix handling
998 of namespace vars.
999
4df50a05
JJ
10002020-04-07 Jakub Jelinek <jakub@redhat.com>
1001
1002 PR c++/94512
1003 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1004 if c_parser_omp_master succeeded.
1005
5db9e893
JJ
10062020-03-23 Jakub Jelinek <jakub@redhat.com>
1007
1008 PR gcov-profile/94029
1009 PR c/94239
1010 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1011 the function_start_locus location. Don't do that afterwards for the
1012 __GIMPLE body parsing.
1013
9def91e9
JJ
10142020-03-19 Jakub Jelinek <jakub@redhat.com>
1015
1016 PR gcov-profile/94029
1017 * c-tree.h (finish_function): Add location_t argument defaulted to
1018 input_location.
1019 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1020 set it to the locus of closing } if non-NULL.
1021 (c_parser_compound_statement_nostart): Return locus of closing }.
1022 (c_parser_parse_rtl_body): Likewise.
1023 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1024 finish_function.
1025 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1026 input_location to set function_end_locus.
1027
046c5890
JJ
10282020-03-17 Jakub Jelinek <jakub@redhat.com>
1029
1030 PR c/94172
1031 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1032 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1033 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1034 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1035 ENUMERAL_TYPEs.
1036 (finish_incomplete_vars): New function, moved from finish_struct. Use
1037 relayout_decl instead of layout_decl.
1038 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1039 being TYPE_VFIELD. Use finish_incomplete_vars.
1040 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1041 finish_incomplete_vars.
1042 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1043 also on ENUMERAL_TYPEs.
1044
c015ff8c
JJ
10452020-03-16 Jakub Jelinek <jakub@redhat.com>
1046
1047 PR c/94179
1048 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1049
f2e9fe5f
MS
10502020-03-13 Martin Sebor <msebor@redhat.com>
1051
1052 PR c/94040
1053 * c-decl.c (builtin_structptr_type_count): New constant.
1054 (match_builtin_function_types): Reject decls that are incompatible
1055 in types pointed to by pointers.
1056 (diagnose_mismatched_decls): Adjust comments.
1057
c9d70946
JM
10582020-03-05 Joseph Myers <joseph@codesourcery.com>
1059
1060 PR c/93577
1061 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1062 empty when initialized type is error_mark_node.
1063 (set_designator, process_init_element): Ignore initializers for
1064 elements of a variable-size type or of error_mark_node.
1065
726e292d
MS
10662020-03-01 Martin Sebor <msebor@redhat.com>
1067
1068 PR middle-end/93926
1069 * c-decl.c (types_close_enough_to_match): New function.
1070 (match_builtin_function_types):
1071 (diagnose_mismatched_decls): Add missing inform call to a warning.
1072
a499c2f8
MS
10732020-03-01 Martin Sebor <msebor@redhat.com>
1074
1075 PR c/93812
1076 * c-typeck.c (build_functype_attribute_variant): New function.
1077 (composite_type): Call it.
1078
9c3da8cc
JJ
10792020-02-25 Jakub Jelinek <jakub@redhat.com>
1080
1081 PR other/93912
1082 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1083 Rename last argument from probablity to probability.
1084
bacdd5e9
JJ
10852020-02-13 Jakub Jelinek <jakub@redhat.com>
1086
1087 PR c/93576
1088 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1089 *expr if it has side effects.
1090
f9eb0973
JL
10912020-01-30 Jeff Law <law@redhat.com>
1092
1093 PR c/88660
1094 * c-parser.c (c_parser_switch_statement): Make sure to request
1095 marking the switch expr as used.
1096
ac68e287
JM
10972020-01-22 Joseph Myers <joseph@codesourcery.com>
1098
1099 PR c/93348
1100 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1101 argument with integer operands.
1102
852f0ae8
KK
11032020-01-16 Kerem Kat <keremkat@gmail.com>
1104
1105 PR c/92833
1106 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1107 to support 4 available tokens.
1108
e2346a33
JM
11092020-01-15 Joseph Myers <joseph@codesourcery.com>
1110
1111 PR c/93072
1112 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1113 determine whether to set DECL_CONTEXT.
1114
3d77686d
JM
11152020-01-13 Joseph Myers <joseph@codesourcery.com>
1116
1117 PR c/93241
1118 * c-typeck.c (build_c_cast): Check for expressions with integer
1119 operands that can occur in an unevaluated part of an integer
1120 constant expression and call note_integer_operands as needed.
1121
f74c4b2c
RB
11222019-01-08 Richard Biener <rguenther@suse.de>
1123
1124 PR middle-end/93199
1125 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1126 permanently.
1127
8d9254fc
JJ
11282020-01-01 Jakub Jelinek <jakub@redhat.com>
1129
1130 Update copyright years.
1131
39292e25
EB
11322019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1133
1134 * c-decl.c (collect_source_ref_cb): Delete.
1135 (for_each_global_decl): Rename into...
1136 (collect_source_refs): ...this. Call collect_source_ref directly.
1137 (c_parse_final_cleanups): Always call collect_source_ref on the main
1138 input filename.
1139
519d7496
JB
11402019-12-19 Julian Brown <julian@codesourcery.com>
1141 Cesar Philippidis <cesar@codesourcery.com>
1142
1143 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1144 detach clauses.
1145 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1146 Allow deref (->) in variable lists if true.
1147 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1148 Pass to c_parser_omp_variable_list.
1149 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1150 call to c_parser_omp_variable_list.
1151 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1152 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1153 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1154 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1155 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1156 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1157 and detach. Support deref.
1158 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1159 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1160 (c_oacc_check_attachments): New function.
1161 (c_finish_omp_clauses): Check attach/detach arguments for being
1162 pointers using above. Support deref.
1163
a6163563
JB
11642019-12-19 Julian Brown <julian@codesourcery.com>
1165 Maciej W. Rozycki <macro@codesourcery.com>
1166 Tobias Burnus <tobias@codesourcery.com>
1167 Thomas Schwinge <thomas@codesourcery.com>
1168
1169 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1170 (c_parser_oacc_data_clause): Likewise.
1171 (c_parser_oacc_all_clauses): Likewise.
1172 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1173 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1174 PRAGMA_OACC_CLAUSE_NO_CREATE.
1175 * c-typeck.c (handle_omp_array_sections): Support
1176 GOMP_MAP_NO_ALLOC.
1177
d68f5d45
DM
11782019-12-09 David Malcolm <dmalcolm@redhat.com>
1179
1180 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1181 Replace label_text ctor calls.
1182
4691bf46
JM
11832019-12-04 Joseph Myers <joseph@codesourcery.com>
1184
1185 PR c/36941
1186 PR c/88827
1187 * c-typeck.c (convert_lvalue_to_rvalue): Call
1188 require_complete_type for arguments not of void types.
1189 (build_indirect_ref): Do not diagnose dereferencing pointers to
1190 incomplete types.
1191 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1192
85d11957
JM
11932019-12-03 Joseph Myers <joseph@codesourcery.com>
1194
1195 PR c/88704
1196 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1197 old-style parameter definitions.
1198
4569f8b3
SL
11992019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1200
1201 PR target/92499
1202
1203 * c-decl.c (flexible_array_type_p): Move to common code.
1204
65ef05d0
RS
12052019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1206
1207 * c-decl.c (start_decl): Allow initialization of variables whose
1208 size is a POLY_INT_CST.
1209 (finish_decl): Use verify_type_context to check whether the target
1210 allows variables with a particular type to have static or thread-local
1211 storage duration. Don't raise a second error if such variables do
1212 not have a constant size.
1213 (grokdeclarator): Use verify_type_context to check whether the
1214 target allows fields or array elements to have a particular type.
1215 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1216 the target allows pointer difference for the types involved.
1217 (build_unary_op): Likewise for pointer increment and decrement.
1218
34b43828
JM
12192019-11-29 Joseph Myers <joseph@codesourcery.com>
1220
1221 * c-parser.c (struct c_parser): Add members raw_tokens and
1222 raw_tokens_used.
1223 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1224 using previously-lexed raw tokens.
1225 (c_parser_peek_nth_token_raw)
1226 (c_parser_check_balanced_raw_token_sequence): New functions.
1227 (c_parser_nth_token_starts_std_attributes): Use
1228 c_parser_check_balanced_raw_token_sequence for Objective-C.
1229
5b8d9367
JM
12302019-11-25 Joseph Myers <joseph@codesourcery.com>
1231
1232 PR c/91985
1233 * c-decl.c (finish_declspecs): Use int instead of decimal
1234 floating-point types if decimal floating-point not supported.
1235
1723e1be
JM
12362019-11-25 Joseph Myers <joseph@codesourcery.com>
1237
1238 * c-tree.h (struct c_declarator): Use a structure for id member.
1239 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1240 declarators at the start, not when handling individual declarators
1241 later. Use u.id.id instead of u.id.
1242 (grokfield): Use u.id.id instead of u.id.
1243 (build_id_declarator): Set u.id.id and u.id.attrs.
1244 (finish_declspecs): Handle postfix attributes in case of typedef
1245 name or typeof used.
1246 * c-parser.c (c_parser_direct_declarator)
1247 (c_parser_direct_declarator_inner): Place declarator for
1248 attributes inside that for function or array, not outside. Set
1249 u.id.attrs for identifiers.
1250 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1251 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1252 instead of u.id.
1253
bdaf8be1
JJ
12542019-11-22 Jakub Jelinek <jakub@redhat.com>
1255
1256 PR c/90677
1257 * c-decl.c (identifier_global_tag): Define.
1258
3e00ba47
RB
12592019-11-20 Richard Biener <rguenther@suse.de>
1260
1261 PR c/92088
1262 * c-decl.c (grokdeclarator): Prevent inlining of nested
1263 function with VLA arguments.
1264
8c5b727a
JM
12652019-11-20 Joseph Myers <joseph@codesourcery.com>
1266
1267 * c-decl.c (c_warn_type_attributes): New function.
1268 (groktypename, grokdeclarator, finish_declspecs): Call
1269 c_warn_type_attributes before applying attributes to types.
1270 * c-tree.h (c_warn_type_attributes): Declare.
1271
192961ff
JM
12722019-11-19 Joseph Myers <joseph@codesourcery.com>
1273
1274 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1275 standard attributes.
1276 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1277 pedwarn for unknown standard attributes and return error_mark_node
1278 for them.
1279
20a38017
MM
12802019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1281
1282 * c-parser.c (c_parser_parse_rtl_body): Always call
1283 run_rtl_passes, even if startwith pass is not provided.
1284
d5fbe5e0
JM
12852019-11-15 Joseph Myers <joseph@codesourcery.com>
1286
1287 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1288 duplicate standard attributes.
1289
97cc1187
JM
12902019-11-15 Joseph Myers <joseph@codesourcery.com>
1291
1292 * c-decl.c (std_attribute_table): Add maybe_unused.
1293
f8aea5e3
JM
12942019-11-15 Joseph Myers <joseph@codesourcery.com>
1295
1296 * c-decl.c (std_attribute_table): Add fallthrough.
1297 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1298 attribute at top level.
1299
2cc94aa8
JM
13002019-11-15 Joseph Myers <joseph@codesourcery.com>
1301
1302 * c-decl.c (std_attribute_table): New.
1303 (c_init_decl_processing): Register attributes from
1304 std_attribute_table.
1305 * c-parser.c (c_parser_attribute_arguments): Add arguments
1306 require_string and allow_empty_args. All callers changed.
1307 (c_parser_std_attribute): Set require_string argument for
1308 "deprecated" attribute.
1309
7c5890cc
JM
13102019-11-14 Joseph Myers <joseph@codesourcery.com>
1311
1312 * c-parser.c (c_parser_postfix_expression)
1313 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1314 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1315
e8738f4e
RS
13162019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1317
1318 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1319 of build_same_sized_truth_vector_type.
1320 (build_vec_cmp): Likewise.
1321
b2417b59
JJ
13222019-11-14 Jakub Jelinek <jakub@redhat.com>
1323
bedb7f04
JJ
1324 * c-parser.c (c_parser_omp_context_selector): Don't require score
1325 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1326 negative score.
1327
b2417b59
JJ
1328 * c-parser.c (c_parser_omp_context_selector): Rename
1329 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1330 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1331 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1332 and string literals.
1333
4e03c3a7
JM
13342019-11-14 Joseph Myers <joseph@codesourcery.com>
1335
1336 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1337 ctsk_tagfirstref_attrs.
1338 (struct c_declspecs): Update description of attrs. Add
1339 postfix_attrs and non_std_attrs_seen_p. Increase size of
1340 typespec_kind bit-field.
1341 (c_warn_unused_attributes): New declaration.
1342 (parser_xref_tag): Update prototype.
1343 * c-decl.c (c_warn_unused_attributes): New function.
1344 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1345 ctsk_tagref_attrs. Handle attribute declarations.
1346 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1347 (grokdeclarator): Handle standard attributes.
1348 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1349 attributes to incomplete type reference.
1350 (xref_tag): Update call to parser_xref_tag.
1351 (declspecs_add_addrspace, declspecs_add_type)
1352 (declspecs_add_scspec, declspecs_add_attrs): Set
1353 non_std_attrs_seen_p.
1354 (finish_declspecs): Apply postfix standard attributes to type.
1355 * c-parser.c (c_token_starts_declspecs)
1356 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1357 (c_parser_next_tokens_start_declaration): Update comments.
1358 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1359 parser->tokens[2] to parser->tokens[1].
1360 (c_parser_nth_token_starts_std_attributes)
1361 (c_parser_std_attribute_specifier_sequence): New functions.
1362 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1363 attrs. All callers changed. Handle standard attributes.
1364 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1365 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1366 All callers changed.
1367 (c_parser_declspecs): Add arguments start_std_attr_ok and
1368 end_std_attr_ok. All callers changed. Handle standard
1369 attributes.
1370 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1371 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1372 (c_parser_compound_statement_nostart, c_parser_all_labels)
1373 (c_parser_label, c_parser_statement, c_parser_for_statement):
1374 Handle standard attributes.
1375 * c-parser.h (c_parser_declspecs): Update prototype.
1376 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1377 c_parser_declspecs.
1378
0c29cac4
ML
13792019-11-12 Martin Liska <mliska@suse.cz>
1380
1381 * gimple-parser.c: Do not include params.h.
1382
028d4092
ML
13832019-11-12 Martin Liska <mliska@suse.cz>
1384
1385 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1386 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1387 macro.
1388
62aee289
MR
13892019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1390 Frederik Harwath <frederik@codesourcery.com>
1391
1392 gcc/c/
1393 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1394 (c_parser_oacc_kernels_parallel): Rename function to...
1395 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1396 (c_parser_omp_construct): Update accordingly.
1397
1398
7cec9588
JJ
13992019-11-11 Jakub Jelinek <jakub@redhat.com>
1400
1401 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1402 without corresponding end declare target.
1403
f486280c
RS
14042019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1405
1406 * c-convert.c (convert): Only handle vector conversions if one of
1407 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1408 allows it.
1409 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1410 vectors satisfy gnu_vector_type_p.
1411 (build_unary_op): Only allow unary operators to be applied to
1412 vectors if they satisfy gnu_vector_type_p.
1413 (digest_init): Only allow by-element initialization of vectors
1414 if they satisfy gnu_vector_type_p.
1415 (really_start_incremental_init): Likewise.
1416 (push_init_level): Likewise.
1417 (pop_init_level): Likewise.
1418 (process_init_element): Likewise.
1419 (build_binary_op): Only allow binary operators to be applied to
1420 vectors if they satisfy gnu_vector_type_p.
1421
017c6491
JM
14222019-11-08 Joseph Myers <joseph@codesourcery.com>
1423
1424 * c-decl.c (grokparms): Convert () in a function definition to
1425 (void) for C2x.
1426 (store_parm_decls_oldstyle): Pedwarn for C2x.
1427 (store_parm_decls): Update comment about () not generating a
1428 prototype.
1429
c01bd174
JM
14302019-11-07 Joseph Myers <joseph@codesourcery.com>
1431
1432 * c-parser.c (c_parser_attribute_arguments): New function.
1433 Factored out of c_parser_gnu_attribute.
1434 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1435 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1436 (c_parser_std_attribute_specifier): New functions.
1437 (c_parser_transaction_attributes): Use
1438 c_parser_std_attribute_specifier.
1439
471c5330
JM
14402019-11-07 Joseph Myers <joseph@codesourcery.com>
1441
1442 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1443 lex_joined_string and translate_strings_p.
1444 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1445 c_lex_with_flags.
1446 (c_parser_string_literal): New function.
1447 (c_parser_static_assert_declaration_no_semi): Use
1448 c_parser_string_literal. Do not set lex_untranslated_string.
1449 (c_parser_asm_string_literal): Use c_parser_string_literal.
1450 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1451 (c_parser_gnu_attributes): Set and restore translate_strings_p
1452 instead of lex_untranslated_string.
1453 (c_parser_asm_statement): Do not set lex_untranslated_string.
1454 (c_parser_asm_operands): Likewise.
1455 (c_parser_has_attribute_expression): Set and restore
1456 translate_strings_p instead of lex_untranslated_string.
1457 (c_parser_postfix_expression): Use c_parser_string_literal.
1458 (pragma_lex): Likewise.
1459 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1460 (c_parse_file): Set translate_strings_p.
1461 * gimple-parser.c (c_parser_gimple_postfix_expression)
1462 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1463 * c-parser.c (c_parser_string_literal): Declare function.
1464
d0c464d2
JJ
14652019-11-02 Jakub Jelinek <jakub@redhat.com>
1466
1467 * c-parser.c (c_finish_omp_declare_variant): Use
1468 omp_get_context_selector instead of c_omp_get_context_selector.
1469
ac2cfa6c
RS
14702019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1471
1472 * c-tree.h (c_simulate_enum_decl): Declare.
1473 * c-decl.c (c_simulate_enum_decl): New function.
1474 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1475
74078538
RS
14762019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1477
1478 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1479 * c-decl.c (c_simulate_builtin_function_decl): New function.
1480 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1481 to the above.
1482
ad1539d5
MS
14832019-10-28 Martin Sebor <msebor@redhat.com>
1484
1485 PR c/66970
1486 * c-decl.c (names_builtin_p): Define a new function.
1487
cb73e4e7
RB
14882019-10-28 Richard Biener <rguenther@suse.de>
1489
1490 PR c/92249
1491 * gimple-parser.c (c_parser_parse_gimple_body): Make
1492 current_bb the entry block initially to easier recover
1493 from errors.
1494 (c_parser_gimple_compound_statement): Adjust.
1495
135df52c
JJ
14962019-10-24 Jakub Jelinek <jakub@redhat.com>
1497
1498 * c-parser.c (c_finish_omp_declare_variant): Use
1499 omp_context_selector_matches instead of
1500 c_omp_context_selector_matches.
1501 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1502 attribute in between declare target and end declare target
1503 pragmas.
1504
783bfe5e
JM
15052019-10-15 Joseph Myers <joseph@codesourcery.com>
1506
1507 * c-parser.c (c_parser_attribute_any_word): Rename to
1508 c_parser_gnu_attribute_any_word. All callers changed.
1509 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1510 callers changed.
1511 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1512 callers changed.
1513 (c_parser_declaration_or_fndef, c_parser_declspecs)
1514 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1515 (c_parser_struct_declaration, c_parser_declarator)
1516 (c_parser_gnu_attribute, c_parser_compound_statement)
1517 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1518 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1519 attribute-related syntax productions.
1520
56898e43
RS
15212019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1522
1523 * c-objc-common.c (useful_aka_type_p): Replace with...
1524 (get_aka_type): ...this new function. Given the original type,
1525 decide which aka type to print (if any). Only look through typedefs
1526 if user_facing_original_type_p.
1527 (print_type): Update accordingly.
1528
b9424661
JJ
15292019-10-14 Jakub Jelinek <jakub@redhat.com>
1530
1531 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1532 into int NESTED, if it is 2, diagnose missing commas in between
1533 clauses.
1534 (c_parser_omp_context_selector): Pass 2 as last argument to
1535 c_parser_omp_all_clauses.
1536
20de9568
JJ
15372019-10-12 Jakub Jelinek <jakub@redhat.com>
1538
1539 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1540 For simd properties, put them directly into TREE_VALUE.
1541 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1542 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1543 add "omp declare variant base" attribute rather than
1544 "omp declare variant".
1545
fe2bc27c
JM
15462019-10-11 Joseph Myers <joseph@codesourcery.com>
1547
1548 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1549
94e7f906
JJ
15502019-10-10 Jakub Jelinek <jakub@redhat.com>
1551
1552 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1553 true, terminate processing on closing paren and don't skip to end of
1554 pragma line.
1555 (c_parser_omp_declare_simd): Handle also declare variant.
1556 (omp_construct_selectors, omp_device_selectors,
1557 omp_implementation_selectors, omp_user_selectors): New variables.
1558 (c_parser_omp_context_selector,
1559 c_parser_omp_context_selector_specification,
1560 c_finish_omp_declare_variant): New functions.
1561 (c_finish_omp_declare_simd): Handle both declare simd and
1562 declare variant.
1563 (c_parser_omp_declare): Handle declare variant.
1564
93313b94
JM
15652019-10-02 Joseph Myers <joseph@codesourcery.com>
1566
1567 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1568 CPP_COLON tokens.
1569
55879815
RS
15702019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1571
1572 * c-objc-common.c (useful_aka_type_p): New function.
1573 (print_type): Use it to decide whether an aka type is worth printing.
1574
59bc434a
JJ
15752019-09-27 Jakub Jelinek <jakub@redhat.com>
1576
1577 PR c++/88203
1578 * c-parser.c (c_parser_predefined_identifier): New function.
1579 (c_parser_postfix_expression): Use it.
1580 (c_parser_omp_variable_list): Parse predefined identifiers.
1581 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1582 in shared and firstprivate clauses, even when they are predetermined
1583 shared.
1584
c6447c20
RS
15852019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1586
1587 * c-typeck.c (build_function_call_vec): Take the original function
1588 decl as an optional final parameter. Pass all built-in calls to
1589 check_builtin_function_arguments.
1590
522da4c2
EB
15912019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1592
1593 PR c/91815
1594 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1595 of identifiers in the external scope only for variables and functions.
1596
68e2c199
PK
15972019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1598
1599 PR c/78736
1600 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1601
22f8849d
IS
16022019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1603
1604 PR pch/61250
1605 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1606 after determining that the first token is not
1607 PRAGMA_GCC_PCH_PREPROCESS.
1608
db376f45
EB
16092019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1610
1611 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1612 FUNCTION_DECL to the right value in the presence of nested declarators.
1613
4d732405
RS
16142019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1615
1616 PR middle-end/91421
1617 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1618
cb1180d5
RS
16192019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1620
1621 PR middle-end/91421
1622 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1623 of a built_in_function.
1624 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1625
77eb117f
JJ
16262019-08-10 Jakub Jelinek <jakub@redhat.com>
1627
1628 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1629 (c_parser_omp_clause_device_type): New function.
1630 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1631 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1632 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1633 diagnostics for declare target with clauses nested in clause-less
1634 declare target declaration-definition-seq.
1635 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1636
2c3b8bad
JJ
16372019-08-09 Jakub Jelinek <jakub@redhat.com>
1638
bb522e2e
JJ
1639 * c-parser.c (check_no_duplicate_clause): Simplify using
1640 omp_find_clause.
1641 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1642 directive name modifiers.
1643 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1644
2c3b8bad
JJ
1645 PR c/91401
1646 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1647 check_no_duplicate_clause call. Comment it out, instead emit a
1648 warning for duplicate dist_schedule clauses.
1649
99769e7f
RS
16502019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1651
1652 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1653
8860d270
JJ
16542019-08-08 Jakub Jelinek <jakub@redhat.com>
1655
1656 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1657 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1658 instead of generic_head to track duplicates.
1659
398e3feb
JJ
16602019-08-07 Jakub Jelinek <jakub@redhat.com>
1661
1662 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1663 (c_parser_omp_clause_use_device_addr): New function.
1664 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1665 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1666 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1667 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1668 map or use_device_* clauses.
1669 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1670 in OpenMP, require pointer type rather than pointer or array type.
1671 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1672
a28351e7
JJ
16732019-07-31 Jakub Jelinek <jakub@redhat.com>
1674
1675 PR c/91192
1676 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1677 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1678 case.
1679
6343b6bf
ML
16802019-07-25 Martin Liska <mliska@suse.cz>
1681 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1682
1683 PR c++/23383
1684 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1685
cb50701e
ML
16862019-07-25 Martin Liska <mliska@suse.cz>
1687
1688 * c-decl.c (merge_decls): Use new macros
1689 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1690
62e3e66f
RB
16912019-07-23 Richard Biener <rguenther@suse.de>
1692
1693 PR tree-optimization/83518
1694 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1695 a CFG also rebuild cgraph edges.
1696
554a530f
JJ
16972019-07-20 Jakub Jelinek <jakub@redhat.com>
1698
1699 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1700 (c_parser_omp_clause_bind): New function.
1701 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1702 (OMP_LOOP_CLAUSE_MASK): Define.
1703 (c_parser_omp_loop): New function.
1704 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1705 loop combined with parallel or teams.
1706 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1707 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1708
d119bf79
RS
17092019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1710
1711 PR c/53633
1712 * c-decl.c (finish_function): Check targetm.warn_func_return
1713 before issuing a -Wreturn-type warning.
1714
ab20d992 17152019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1716
1717 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1718 (c_parser_compound_statement): Call it.
1719
1fdd6f04
JJ
17202019-07-12 Jakub Jelinek <jakub@redhat.com>
1721
1722 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1723 (c_parser_omp_clause_order): New function.
1724 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1725 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1726 PRAGMA_OMP_CLAUSE_ORDER.
1727 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1728
8389386c
RB
17292019-07-10 Richard Biener <rguenther@suse.de>
1730
1731 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1732 _Literal (int *) &x for address literals.
1733
99b1c316
MS
17342019-07-09 Martin Sebor <msebor@redhat.com>
1735
1736 PR c++/61339
1737 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1738 to class.
1739 (field_decl_cmp): Same.
1740 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1741 * c-tree.h: Same.
1742 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1743
6c1dae73
MS
17442019-07-09 Martin Sebor <msebor@redhat.com>
1745
1746 PR c++/61339
1747 * c-decl.c: Change class-key from class to struct and vice versa
1748 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1749 * gimple-parser.c: Same.
1750
69b5279e
RB
17512019-07-01 Richard Biener <rguenther@suse.de>
1752
1753 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1754 _Literal (char *) &"foo" for address literals pointing to
1755 STRING_CSTs.
1756
ab20d992
JJ
17572019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1758
1759 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1760 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1761 C incompatibility if alternate "__intN__" form is used.
1762
1e3d475e
MS
17632019-06-24 Martin Sebor <msebor@redhat.com>
1764
1765 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1766
bf38f7e9
JJ
17672019-06-10 Jakub Jelinek <jakub@redhat.com>
1768
1769 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1770 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1771 (c_parser_omp_scan_loop_body): New function.
1772 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1773 inscan reduction clauses.
1774 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1775 non-inscan reductions on the same construct, or inscan reductions with
1776 ordered or schedule clauses, or inscan array reductions.
1777
65985d78
MS
17782019-06-05 Martin Sebor <msebor@redhat.com>
1779
1780 PR c/90737
1781 * c-typeck.c (c_finish_return): Only consider functions returning
1782 pointers as candidates for -Wreturn-local-addr.
1783
0ecf545c
MS
17842019-06-05 Martin Sebor <msebor@redhat.com>
1785
1786 * c-decl.c (start_decl): Adjust quoting and hyphenation
1787 in diagnostics.
1788 (finish_decl): Same.
1789 (finish_enum): Same.
1790 (start_function): Same.
1791 (declspecs_add_type): Same.
1792 * c-parser.c (warn_for_abs): Same.
1793 * c-typeck.c (build_binary_op): Same.
1794
e03436e7
TS
17952019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1796
b48f44bf
TS
1797 PR c/89433
1798 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1799 marked with an OpenACC 'routine' directive.
1800
5bf04509
TS
1801 PR c/89433
1802 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1803 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1804
e03436e7
TS
1805 PR c/89433
1806 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1807 clauses from "omp declare target" attribute.
1808
a9c697b8
MS
18092019-05-16 Martin Sebor <msebor@redhat.com>
1810
ab20d992
JJ
1811 * c-decl.c (start_decl): Quote keywords, operators, and
1812 types in diagnostics.
1813 (finish_decl): Same.
1814 * c-parser.c (c_parser_asm_statement): Same.
1815 (c_parser_conditional_expression): Same.
1816 (c_parser_transaction_cancel): Same.
1817 * c-typeck.c (c_common_type): Same.
1818 (build_conditional_expr): Same.
1819 (digest_init): Same.
1820 (process_init_element): Same.
1821 (build_binary_op): Same.
a9c697b8 1822
c4499192
RB
18232019-05-17 Richard Biener <rguenther@suse.de>
1824
1825 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1826 (c_parser_gimple_unary_expression): Likewise.
1827 (c_parser_gimple_parentized_ternary_expression): New function.
1828
adfe6e4b
RB
18292019-05-16 Richard Biener <rguenther@suse.de>
1830
1831 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1832 (c_parser_gimple_unary_expression): Likewise.
1833
186dabf2
RB
18342019-05-15 Richard Biener <rguenther@suse.de>
1835
1836 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1837 __BIT_FIELD_REF.
1838
1158c5b4
RB
18392019-05-14 Richard Biener <rguenther@suse.de>
1840
1841 * gimple-parser.c (c_parser_gimple_statement): Remove
1842 questionable auto-promotion to VIEW_CONVERT_EXPR.
1843 (c_parser_gimple_typespec): Split out from __MEM parsing.
1844 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1845 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1846 as __VIEW_CONVERT with -gimple.
1847
fd4485aa
ML
18482019-05-09 Martin Liska <mliska@suse.cz>
1849
1850 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1851 __MAX.
1852 (c_parser_gimple_unary_expression): Parse also binary expression
1853 __MIN and __MAX.
1854 (c_parser_gimple_parentized_binary_expression): New function.
1855
d276406a
ML
18562019-05-09 Martin Liska <mliska@suse.cz>
1857
1858 * gimple-parser.c (struct gimple_parser): Add probability.
1859 for gimple_parser_edge.
1860 (gimple_parser::push_edge): Add new argument probability.
1861 (c_parser_gimple_parse_bb_spec): Parse also probability
1862 if present.
1863 (c_parser_parse_gimple_body): Set edge probability.
1864 (c_parser_gimple_compound_statement): Consume token
1865 before calling c_parser_gimple_goto_stmt.
1866 Parse BB counts.
1867 (c_parser_gimple_statement): Pass new argument.
1868 (c_parser_gimple_goto_stmt): Likewise.
1869 (c_parser_gimple_if_stmt): Likewise.
1870 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1871 * c-parser.c (c_parser_declaration_or_fndef): Pass
1872 hot_bb_threshold argument.
1873 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1874 field.
1875 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1876
f179b64e
JJ
18772019-04-26 Jakub Jelinek <jakub@redhat.com>
1878
1879 PR debug/90197
1880 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1881 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1882 (c_parser_do_statement): Likewise.
1883 (c_parser_for_statement): Likewise. Formatting fixes.
1884 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1885 emit DEBUG_BEGIN_STMTs if needed.
1886
e7178413
JJ
18872019-04-19 Jakub Jelinek <jakub@redhat.com>
1888
c280b7ee
JJ
1889 PR c/89888
1890 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1891 (c_start_case): Don't clear it.
1892 (do_case): Adjust c_add_case_label caller.
1893 (c_finish_case): Adjust c_do_switch_warnings caller.
1894
e7178413
JJ
1895 PR c++/90108
1896 * c-decl.c (merge_decls): If remove is main variant and
1897 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1898 variant that has newdecl as TYPE_NAME if any.
1899
60a2c645
JJ
19002019-04-12 Jakub Jelinek <jakub@redhat.com>
1901
1902 PR c/89933
1903 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1904 don't try to remove it from the variant list, but instead assert
1905 it has no variants.
1906
2a82beaa
RB
19072019-04-01 Richard Biener <rguenther@suse.de>
1908
1909 PR c/71598
1910 * c-tree.h (c_get_alias_set): Declare.
1911 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1912 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1913 as the underlying integer type.
1914
bec1da64
MS
19152019-03-19 Martin Sebor <msebor@redhat.com>
1916
1917 PR tree-optimization/89688
1918 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1919 kinds of initializers.
1920
855cd9b1
JJ
19212019-03-19 Jakub Jelinek <jakub@redhat.com>
1922
1923 PR c/89734
1924 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1925 return type even if quals_used is 0. Formatting fixes.
1926
baa09dc5
RB
19272019-03-14 Richard Biener <rguenther@suse.de>
1928
1929 * c-tree.h (enum c_declspec_il): New.
1930 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1931 enum bitfield.
1932 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1933 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1934 (c_parser_declspecs): Adjust.
1935 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1936 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1937 and bitmap.h.
1938 (struct gimple_parser): New.
1939 (gimple_parser::push_edge): New method.
1940 (c_parser_gimple_parse_bb_spec): New helper.
1941 (c_parser_parse_gimple_body): Get start pass and IL specification.
1942 Initialize SSA and CFG.
1943 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1944 Build a gimple_parser parsing state and pass it along.
1945 (c_parser_gimple_statement): Change intermittend __PHI internal
1946 function argument for the edge.
1947 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1948 (c_parser_gimple_goto_stmt): Record edges to build.
1949 (c_parser_gimple_if_stmt): Likewise.
1950 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1951 (c_parser_gimple_or_rtl_pass_list): Likewise.
1952
a3f9f006
ML
19532019-03-11 Martin Liska <mliska@suse.cz>
1954
1955 * c-decl.c (check_for_loop_decls): Wrap an option name
1956 in a string format message and fix GNU coding style.
1957 * c-parser.c (c_parser_declspecs): Likewise.
1958
1db01ff9
JJ
19592019-03-08 Jakub Jelinek <jakub@redhat.com>
1960
1961 PR tree-optimization/89550
1962 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1963 returned true.
1964 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1965 or warning returned true.
1966
66dcb747
JJ
19672019-02-28 Jakub Jelinek <jakub@redhat.com>
1968
1969 PR c/89525
1970 * c-typeck.c (convert_arguments): Call inform_declaration only if
1971 the previous warning_at call returned true.
1972
2263c9f2
TS
19732019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1974
1975 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1976 parameter. Adjust all users.
1977 (c_parser_oacc_simple_clause): Replace parser with loc formal
1978 parameter. Adjust all users.
1979
ab20d992 19802019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1981
1982 PR c/87924
1983 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1984 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1985
5f88ba10
JJ
19862019-02-15 Jakub Jelinek <jakub@redhat.com>
1987
1988 PR c/89340
1989 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1990 before c_decl_attributes rather than after it.
1991
cfc30fd1
JJ
19922019-02-06 Jakub Jelinek <jakub@redhat.com>
1993
1994 PR c/89211
1995 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1996 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1997 instead of 3 nested ifs.
1998
fbe83e6b
JM
19992019-02-06 Joseph Myers <joseph@codesourcery.com>
2000
2001 PR c/88584
2002 * c-decl.c (finish_decl): Do not complete array types for arrays
2003 with external linkage not at file scope.
2004
f461f938
RB
20052019-02-05 Richard Biener <rguenther@suse.de>
2006
2007 PR c/88606
2008 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2009 all type variants when not supported.
2010
fe509359
JJ
20112019-01-30 Jakub Jelinek <jakub@redhat.com>
2012
2013 PR c/89061
2014 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2015 * c-decl.c (decl_jump_unsafe): Return false for
2016 C_DECL_COMPOUND_LITERAL_P decls.
2017 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2018
6a335b96
JJ
20192019-01-29 Jakub Jelinek <jakub@redhat.com>
2020
f4b7e754
JJ
2021 PR c/89045
2022 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2023 scope.
2024
6a335b96
JJ
2025 PR c/86125
2026 * c-decl.c (last_fileptr_type): Remove.
2027 (last_structptr_types): New variable.
2028 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2029 {old,new}rettype instead of the types themselves. Assert
2030 last_structptr_types array has the same number of elements
2031 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2032 argument oldtype and newtype. Instead of handling
2033 just fileptr_type_node specially, handle all builtin_structptr_types
2034 pointer nodes. Formatting fix.
2035
d8b5a1a0
MS
20362019-01-24 Martin Sebor <msebor@redhat.com>
2037
2038 PR c/86125
2039 PR c/88886
2040 PR middle-end/86308
2041 * c-decl.c (match_builtin_function_types): Add arguments.
2042 (diagnose_mismatched_decls): Diagnose mismatched declarations
2043 of built-ins more strictly.
2044
e21c4491
JJ
20452019-01-24 Jakub Jelinek <jakub@redhat.com>
2046
2047 PR c++/88976
2048 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2049 on #pragma omp cancel with different modifiers.
2050
420183d9
L
20512019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2052
2053 PR c/51628
2054 PR c/88664
2055 * c-typeck.c (convert_for_assignment): Upate the
2056 warn_for_address_or_pointer_of_packed_member call.
2057
17ad43dd
TH
20582019-01-16 Tom Honermann <tom@honermann.net>
2059 Jason Merrill <jason@redhat.com>
2060
2061 * c-typeck.c (digest_init): Revised the error message produced for
2062 ill-formed cases of array initialization with a string literal.
2063 (error_init): Make variadic.
2064
5f07d78a
JJ
20652019-01-12 Jakub Jelinek <jakub@redhat.com>
2066
2067 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2068
c4581bbf
JJ
20692019-01-07 Jakub Jelinek <jakub@redhat.com>
2070
2071 PR c/88701
2072 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2073 if current_function_decl is non-NULL.
2074
65c5b1eb
JM
20752019-01-07 Joseph Myers <joseph@codesourcery.com>
2076
2077 PR c/88720
2078 PR c/88726
2079 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2080 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2081 functions declared but never defined only for external scope, not
2082 for other scopes.
2083
d8fcab68
JJ
20842019-01-07 Jakub Jelinek <jakub@redhat.com>
2085
2086 PR c++/85052
2087 * c-parser.c (c_parser_postfix_expression): Parse
2088 __builtin_convertvector.
2089
a5544970
JJ
20902019-01-01 Jakub Jelinek <jakub@redhat.com>
2091
2092 Update copyright years.
2093
da77eace
L
20942018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2095
2096 PR c/51628
2097 * c-typeck.c (convert_for_assignment): Call
2098 warn_for_address_or_pointer_of_packed_member.
2099
1edf8866
SB
21002018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2101
2102 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2103 a more specific error message (instead of just falling through).
2104
db4fd626
SB
21052018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2106
2107 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2108 asm qualifier is first seen; use that to give nicer "duplicate asm
2109 qualifier" messages. Delete 'quals" variable, instead pass the
2110 "is_volatile_ flag to build_asm_stmt directly.
2111 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2112 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2113
9c9cfcbb
SB
21142018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2115
2116 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2117 "done" boolean variable.
2118
a14feb3c
DM
21192018-12-19 David Malcolm <dmalcolm@redhat.com>
2120
2121 PR c++/87504
2122 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2123 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2124 (build_binary_op): Use struct op_location_t and
2125 class binary_op_rich_location.
2126
6d939173
JJ
21272018-12-11 Jakub Jelinek <jakub@redhat.com>
2128
2129 PR sanitizer/88426
2130 * c-convert.c (convert): Call c_fully_fold before calling
2131 ubsan_instrument_float_cast.
2132
b7055028
SB
21332018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2134
2135 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2136 setting "quals".
2137
5b76e75f
SB
21382018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2139
2140 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2141 after asm. Pass a flag for it to build_asm_expr.
2142 * c-tree.h (build_asm_expr): Update declaration.
2143 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2144 set ASM_INLINE_P.
2145
30bd42b9
SB
21462018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2147
2148 PR inline-asm/55681
2149 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2150 combination of volatile and goto, in any order, without repetitions.
2151
9df6c0e4
JB
21522018-12-04 James Norris <jnorris@codesourcery.com>
2153 Cesar Philippidis <cesar@codesourcery.com>
2154 Julian Brown <julian@codesourcery.com>
2155
2156 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2157 code.
2158
f44697b7
RB
21592018-11-30 Richard Biener <rguenther@suse.de>
2160
2161 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2162 _Literal (type) { ... } as empty aggregate or vector constructor.
2163
550dfbdc
MS
21642018-11-29 Martin Sebor <msebor@redhat.com>
2165
2166 PR c/88091
2167 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2168 (convert_arguments): Add comments. Pass additional argument to
2169 the function above.
2170
673670da
MS
21712018-11-29 Martin Sebor <msebor@redhat.com>
2172
2173 PR c/88172
2174 PR testsuite/88208
2175 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2176
db1d09b0
MS
21772018-11-23 Martin Sebor <msebor@redhat.com>
2178
2179 PR testsuite/88098
2180 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2181 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2182
98f08eb8
MS
21832018-11-20 Martin Sebor <msebor@redhat.com>
2184
2185 * c-parser.c (c_parser_has_attribute_expression): New function.
2186 (c_parser_attribute): New function.
2187 (c_parser_attributes): Move code into c_parser_attribute.
2188 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2189
cd5da983
MS
21902018-11-15 Martin Sebor <msebor@redhat.com>
2191
2192 PR c/83656
2193 * c-decl.c (header_for_builtin_fn): Declare.
2194 (diagnose_mismatched_decls): Diagnose declarations of built-in
2195 functions without a prototype.
2196 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2197 (convert_argument): Same.
2198 (convert_arguments): Factor code out into convert_argument.
2199 Detect mismatches between built-in formal arguments in calls
2200 to built-in without prototype.
2201 (build_conditional_expr): Same.
2202 (type_or_builtin_type): New function.
2203 (convert_for_assignment): Add argument. Conditionally issue
2204 warnings instead of errors for mismatches.
2205
620e594b
DM
22062018-11-13 David Malcolm <dmalcolm@redhat.com>
2207
2208 * c-decl.c: Replace "source_location" with "location_t".
2209 * c-tree.h: Likewise.
2210 * c-typeck.c: Likewise.
2211 * gimple-parser.c: Likewise.
2212
3179ebae
JJ
22132018-11-09 Jakub Jelinek <jakub@redhat.com>
2214
81a227c6
JJ
2215 * c-parser.c (c_parser_omp_clause_final): Use
2216 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2217 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2218 parsing instead of c_parser_paren_condition.
2219 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2220 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2221 c_fully_fold instead of c_parser_condition.
2222 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2223 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2224 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2225 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2226 c_parser_expr_no_commas instead of c_parser_expression.
2227
98c91c56
JJ
2228 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2229 reduction clause with inscan modifier.
2230
3179ebae
JJ
2231 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2232 clauses other than atomic_default_mem_order.
2233
28567c40
JJ
22342018-11-08 Jakub Jelinek <jakub@redhat.com>
2235
2236 * c-parser.c: Include memmode.h.
2237 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2238 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2239 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2240 task_reduction clauses.
2241 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2242 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2243 section, or lvalue assignment expression.
2244 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2245 (c_parser_omp_clause_lastprivate): Parse optional
2246 conditional: modifier.
2247 (c_parser_omp_clause_hint): Require constant integer expression rather
2248 than just integer expression.
2249 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2250 clause.
2251 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2252 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2253 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2254 functions.
2255 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2256 iterators. Parse mutexinoutset and depobj kinds.
2257 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2258 callers.
2259 (c_parser_omp_all_clauses): Likewise. Handle
2260 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2261 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2262 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2263 default memory order from requires directive if any. Adjust
2264 c_finish_omp_atomic caller.
2265 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2266 (c_parser_omp_flush): Parse flush with memory-order-clause.
2267 (c_parser_omp_for_loop): Allow NE_EXPR even in
2268 OpenMP loops, adjust c_finish_omp_for caller.
2269 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2270 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2271 Allow to be called while parsing combined parallel master.
2272 Parse combined master taskloop{, simd}.
2273 (c_parser_omp_parallel): Parse combined
2274 parallel master{, taskloop{, simd}} constructs.
2275 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2276 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2277 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2278 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2279 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2280 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2281 around teams body. Use SET_EXPR_LOCATION.
2282 (c_parser_omp_target_data): Allow target data
2283 with only use_device_ptr clauses.
2284 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2285 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2286 (c_parser_omp_requires): New function.
2287 (c_finish_taskloop_clauses): New function.
2288 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2289 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2290 declaration. Disallow in_reduction clause when combined with parallel
2291 master.
2292 (c_parser_omp_construct): Adjust c_parser_omp_master and
2293 c_parser_omp_taskgroup callers.
2294 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2295 other than cancel.
2296 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2297 like OMP_CLAUSE_REDUCTION.
2298 (handle_omp_array_sections): Likewise. Call save_expr on array
2299 reductions before calling build_index_type. Handle depend clauses
2300 with iterators.
2301 (struct c_find_omp_var_s): New type.
2302 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2303 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2304 with static, runtime or auto schedule kinds. Call save_expr for whole
2305 array reduction sizes. Diagnose reductions with zero sized elements
2306 or variable length structures. Diagnose nogroup clause used with
2307 reduction clause(s). Handle depend clause with
2308 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2309 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2310 some different type for other kinds. Use build_unary_op with
2311 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2312 Handle depend clauses with iterators. Remove no longer needed special
2313 case that predetermined const qualified vars may be specified in
2314 firstprivate clause. Complain if const qualified vars are mentioned
2315 in data-sharing clauses other than firstprivate or shared. Use
2316 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2317 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2318 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2319 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2320
7e2de6df
DM
23212018-10-29 David Malcolm <dmalcolm@redhat.com>
2322
2323 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2324 logic for change to name_hint::operator bool.
2325 (undeclared_variable): Likewise.
2326 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2327 (c_parser_parameter_declaration): Likewise.
2328
9f936c86
JM
23292018-10-17 Joseph Myers <joseph@codesourcery.com>
2330
2331 * c-errors.c (pedwarn_c11): New function.
2332 * c-parser.c (disable_extension_diagnostics): Save
2333 warn_c11_c2x_compat and set it to 0.
2334 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2335 (c_parser_static_assert_declaration_no_semi): Handle
2336 _Static_assert without string constant.
2337 * c-tree.h (pedwarn_c11): New prototype.
2338
033eb567
DM
23392018-10-17 David Malcolm <dmalcolm@redhat.com>
2340
2341 * Make-lang.in (selftest-c): New.
2342 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2343 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2344 from gcc/Makefile.in.
2345
0edf3afe
RB
23462018-10-02 Richard Biener <rguenther@suse.de>
2347
2348 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2349
8313a764
JM
23502018-09-26 Joseph Myers <joseph@codesourcery.com>
2351
2352 PR c/87390
2353 * c-typeck.c (build_binary_op): Use excess precision for
2354 comparisons of integers and floating-point for C11 and later.
2355
ce6f0888
MJ
23562018-09-26 Martin Jambor <mjambor@suse.cz>
2357
2358 PR c/87347
2359 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2360 comment.
ce6f0888 2361
9c4a4b3c
DM
23622018-09-17 David Malcolm <dmalcolm@redhat.com>
2363
2364 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2365 Update for new param.
2366 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2367 Likewise.
2368
80c6d1f4
MJ
23692018-09-17 Martin Jambor <mjambor@suse.cz>
2370
2371 PR c/63886
2372 * c-parser.c: (warn_for_abs): New function.
2373 (c_parser_postfix_expression_after_primary): Call it.
2374
4a426e36
BE
23752018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2376
2377 * c-typeck.c (digest_init): Shorten overlength strings.
2378
6d900107
BE
23792018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2380
2381 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2382
b5764229
BE
23832018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2384
2385 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2386 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2387
22eea6b2
AM
23882018-08-30 Alexander Monakov <amonakov@ispras.ru>
2389
2390 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2391 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2392
85204e23
DM
23932018-08-27 David Malcolm <dmalcolm@redhat.com>
2394
2395 PR 87091
2396 * c-decl.c (implicitly_declare): Update call to
2397 maybe_add_include_fixit to suggest overriding the location, as it
2398 is for a note.
2399 * c-objc-common.c (c_tree_printer): Update for conversion of
2400 show_caret_p to a tri-state.
2401
3d78e008
ML
24022018-08-27 Martin Liska <mliska@suse.cz>
2403
2404 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2405 fndecl_built_in_p and remove check for FUNCTION_DECL if
2406 possible.
3d78e008
ML
2407 (diagnose_mismatched_decls): Likewise.
2408 (merge_decls): Likewise.
2409 (warn_if_shadowing): Likewise.
2410 (pushdecl): Likewise.
2411 (implicitly_declare): Likewise.
2412 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2413 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2414 * c-typeck.c (build_function_call_vec): Likewise.
2415 (convert_arguments): Likewise.
2416
097f82ec
DM
24172018-08-20 David Malcolm <dmalcolm@redhat.com>
2418
2419 PR other/84889
2420 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2421 (diagnose_mismatched_decls): Likewise, in various places.
2422 (warn_if_shadowing): Likewise.
2423 (implicit_decl_warning): Likewise.
2424 (implicitly_declare): Likewise.
2425 (undeclared_variable): Likewise.
2426 (declare_label): Likewise.
2427 (grokdeclarator): Likewise.
2428 (start_function): Likewise.
2429 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2430 (c_parser_parameter_declaration): Likewise.
2431 (c_parser_binary_expression): Likewise.
2432 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2433 (parser_build_binary_op): Likewise.
2434 (build_unary_op): Likewise.
2435 (error_init): Likewise.
2436 (pedwarn_init): Likewise.
2437 (warning_init): Likewise.
2438 (convert_for_assignment): Likewise.
2439
96e6ae57
DM
24402018-08-15 David Malcolm <dmalcolm@redhat.com>
2441
2442 * c-objc-common.c: Include "gcc-rich-location.h".
2443 (c_tree_printer): Move implemenation of '%T' to...
2444 (print_type): ...this new function.
2445 (range_label_for_type_mismatch::get_text): New function.
2446 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2447 range for the various ic_argpass cases.
2448 (class maybe_range_label_for_tree_type_mismatch): New class.
2449 (build_binary_op): Use it when calling binary_op_error.
2450
0cd020ae 24512018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2452
0cd020ae
PK
2453 * c-decl.c (start_decl): Do not warn if variables is named as main
2454 and is a local variable.
2455
72733314
IS
24562018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2457
2458 PR c/19315
2459 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2460 objects of unknown size.
2461
23aa9f7c
MS
24622018-08-13 Martin Sebor <msebor@redhat.com>
2463
2464 PR tree-optimization/71625
2465 * c-parser.c (c_parser_declaration_or_fndef): Call
2466 braced_list_to_string.
2467
e5e7e50d
BH
24682018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2469
2470 PR c/86690
2471 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2472 errors.
2473
8a45b051
MS
24742018-08-01 Martin Sebor <msebor@redhat.com>
2475
2476 PR tree-optimization/86650
2477 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2478 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2479
5922dcb5
JJ
24802018-08-01 Jakub Jelinek <jakub@redhat.com>
2481
2482 PR c/85704
2483 * c-typeck.c (init_field_decl_cmp): New function.
2484 (output_pending_init_elements): Use it for field comparisons
2485 instead of pure bit_position comparisons.
2486
9b452033
JJ
24872018-07-12 Jakub Jelinek <jakub@redhat.com>
2488
2489 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2490 type here, instead add "omp declare target implicit" attribute.
2491 (finish_decl): Diagnose vars without mappable type here.
2492
ab20d992
JJ
24932018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2494 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2495 Cesar Philippidis <cesar@codesourcery.com>
2496
2497 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2498 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2499 to their non-present_or_* counterparts. Make 'self' an alias to
2500 PRAGMA_OACC_CLAUSE_HOST.
2501 (c_parser_oacc_data_clause): Update GOMP mappings for
2502 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2503 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2504 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2505 Remove support for present_or_* clauses.
2506 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2507 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2508 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2509 (OACC_DATA_CLAUSE_MASK): Likewise.
2510 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2511 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2512 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2513 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2514 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2515
e197e64e
KV
25162018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2517
2518 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2519 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2520 (c_parser_gimple_unary_expression): Likewise.
2521
487f2f61
JJ
25222018-06-15 Jakub Jelinek <jakub@redhat.com>
2523
2524 PR c/86093
2525 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2526 before doing POINTER_DIFF_EXPR.
2527
e4d44a37
MP
25282018-06-07 Marek Polacek <polacek@redhat.com>
2529
2530 PR c/85318
2531 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2532 for loop initial declarations.
2533
b67b9225
DP
25342018-05-30 David Pagan <dave.pagan@oracle.com>
2535
2536 PR c/55976
2537 * c-decl.c (grokdeclarator): Update check for return type warnings.
2538 (start_function): Likewise.
2539 (finish_function): Likewise.
2540 * c-typeck.c (c_finish_return): Update check for return type warnings.
2541 Pass OPT_Wreturn_type to pedwarn when appropriate.
2542
c566cc9f
RS
25432018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2544
2545 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2546 __FMA_EXPR handlng.
2547
e4f81565
RS
25482018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2549
2550 * gimple-parser.c: Include internal-fn.h.
2551 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2552 (c_parser_gimple_call_internal): New function.
2553 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2554 Fix typos in comment.
2555
79e7b1fe
JJ
25562018-05-10 Jakub Jelinek <jakub@redhat.com>
2557
2558 PR c++/85662
2559 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2560 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2561 fold_convert_loc.
2562 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2563 fold_offsetof_1, pass argtype as TYPE to it and drop the
2564 fold_convert_loc.
2565
f7584c81
DP
25662018-05-02 David Pagan <dave.pagan@oracle.com>
2567
2568 PR c/30552
2569 * c-decl.c (old_style_parameter_scope): New function.
2570 * c-parser.c (c_parser_postfix_expression): Check for statement
2571 expressions in old-style function parameter list declarations.
2572 * c-parser.h (old_style_parameter_scope): New extern declaration.
2573
b33a0cb3
JJ
25742018-04-25 Jakub Jelinek <jakub@redhat.com>
2575
2576 PR sanitizer/84307
2577 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2578 it is not TREE_STATIC.
2579 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2580 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2581 its COMPOUND_LITERAL_EXPR_DECL.
2582
c5c5822a
JM
25832018-03-21 Joseph Myers <joseph@codesourcery.com>
2584
2585 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2586 where all functions return the same _FloatN or _FloatNx type,
2587 treat integer types as _Float64 instead of double.
2588
aa1c9429
JJ
25892018-03-21 Jakub Jelinek <jakub@redhat.com>
2590
2591 PR c/84999
2592 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2593 building vector comparison, diagnose it and return error_mark_node.
2594
9bb45a95
JJ
25952018-03-15 Jakub Jelinek <jakub@redhat.com>
2596
2597 PR c/84853
2598 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2599 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2600 INTEGER_TYPE element type.
2601
ada6bad9
DP
26022018-03-13 David Pagan <dave.pagan@oracle.com>
2603
2604 PR c/46921
2605 * c-typeck.c (output_init_element): Ensure field initializer
2606 expression is always evaluated if there are side effects.
2607
849bbdb9
JJ
26082018-03-06 Jakub Jelinek <jakub@redhat.com>
2609
2610 PR c/84721
2611 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2612 !building_stmt_list_p ().
2613
d74641bd
RS
26142018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2615
2616 PR c/84305
2617 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2618 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2619 and include the BIND_EXPR in the list of things that need to be
2620 pre-evaluated.
2621
0444aa9c
NS
26222018-02-09 Nathan Sidwell <nathan@acm.org>
2623
2624 PR c/84293
2625 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2626 to strict_aliasing_warning.
2627
7c30b12a
PC
26282018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2629
2630 * c-typeck.c (really_start_incremental_init, push_init_level,
2631 set_nonincremental_init, output_init_element, process_init_element):
2632 Use DECL_UNNAMED_BIT_FIELD.
2633
2be4dfcb
MP
26342018-01-31 Marek Polacek <polacek@redhat.com>
2635
2636 PR c/81779
2637 * c-parser.c (c_parser_compound_statement_nostart): Call
2638 expansion_point_location_if_in_system_header.
2639
bb9869d5
DM
26402018-01-17 David Malcolm <dmalcolm@redhat.com>
2641
2642 PR c++/83814
2643 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2644 the C part.
2645
b4923738
JJ
26462018-01-13 Jakub Jelinek <jakub@redhat.com>
2647
2648 PR c/83801
2649 * c-tree.h (decl_constant_value_1): Add a bool argument.
2650 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2651 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2652 (decl_constant_value): Adjust caller.
2653 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2654 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2655 decl_constant_value returns initializer that has BLKmode or
2656 array type.
2657 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2658
928686b1
RS
26592018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2660 Alan Hayward <alan.hayward@arm.com>
2661 David Sherwood <david.sherwood@arm.com>
2662
2663 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2664 TYPE_VECTOR_SUBPARTS.
2665
85ec4feb
JJ
26662018-01-03 Jakub Jelinek <jakub@redhat.com>
2667
2668 Update copyright years.
2669
913884f7
JJ
26702018-01-01 Jakub Jelinek <jakub@redhat.com>
2671
2672 PR c/83595
2673 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2674 c_parser_conditional_expression, c_parser_cast_expression,
2675 c_parser_sizeof_expression, c_parser_alignof_expression,
2676 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2677 c_parser_transaction_expression): Use set_error () method instead
2678 of setting value member to error_mark_node.
2679
c6cfa2bf
MM
26802017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2681
2682 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2683 and _Float<N>X built-in functions.
2684
11d29d63
JJ
26852017-12-22 Jakub Jelinek <jakub@redhat.com>
2686
14ec014e
JJ
2687 PR debug/83550
2688 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2689 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2690 incomplete vars rather than after it.
2691
11d29d63
JJ
2692 PR debug/83547
2693 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2694 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2695 and consider empty ones if there are no other stmts. For
2696 -Wunused-value walk all statements before the one only followed by
2697 DEBUG_BEGIN_STMTs.
2698
170a8bd6 26992017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2700 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2701
2702 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2703 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2704 (c_parser_do_statement): Likewise.
2705 (c_parser_for_statement): Likewise.
2706 (c_parser_statement_after_labels): Adjust calls to above.
2707 (c_parse_pragma_ivdep): New static function.
2708 (c_parser_pragma_unroll): Likewise.
2709 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2710 <PRAGMA_UNROLL>: New case.
2711
01512446
JJ
27122017-12-19 Jakub Jelinek <jakub@redhat.com>
2713
2714 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2715 perform_integral_promotions, digest_init): Replace Yoda conditions
2716 with typical order conditions.
2717 * c-decl.c (check_bitfield_type_and_width): Likewise.
2718
c65e18d3
BE
27192017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2720
2721 * c-typeck.c (c_safe_arg_type_equiv_p,
2722 c_safe_function_type_cast_p): New function.
2723 (build_c_cast): Implement -Wcast-function-type.
2724
b7280579
RB
27252017-12-14 Richard Biener <rguenther@suse.de>
2726
2727 PR c/83415
2728 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2729 like REALPART_EXPR for the behavior of whether its operand
2730 is an lvalue.
2731
49e6a6c0
MP
27322017-12-12 Marek Polacek <polacek@redhat.com>
2733
2734 PR c/82679
2735 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2736
ab20d992 27372017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2738
2739 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2740 * c-parser.c (add_debug_begin_stmt): New.
2741 (c_parser_declaration_or_fndef): Call it.
2742 (c_parser_compound_statement_nostart): Likewise.
2743 (c_parser_statement_after_labels): Likewise.
2744 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2745
4b2b493f
JM
27462017-12-07 Joseph Myers <joseph@codesourcery.com>
2747
2748 * c-decl.c (build_compound_literal): Add parameter alignas_align
2749 and set alignment of decl if nonzero.
2750 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2751 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2752 qualifier.
2753 (c_parser_struct_declaration): Update syntax comment.
2754 (c_parser_type_name): Add alignas_ok argument and pass it to
2755 c_parser_declspecs.
2756 (c_parser_cast_expression): Pass true to c_parser_type_name and
2757 give error if a cast used an _Alignas specifier.
2758 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2759 give error if sizeof (type-name) used an _Alignas specifier.
2760 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2761 give error if _Alignof (type-name) used an _Alignas specifier.
2762 (c_parser_postfix_expression_after_paren_type): Check specified
2763 alignment for a compound literal and pass it to
2764 build_compound_literal.
2765 * c-parser.h (c_parser_type_name): Update prototype.
2766 * c-tree.h (build_compound_literal): Update prototype.
2767
5d9ae53d
MS
27682017-12-07 Martin Sebor <msebor@redhat.com>
2769
2770 PR c/81544
2771 * c-decl.c (c_decl_attributes): Look up existing declaration and
2772 pass it to decl_attributes.
2773
c79144f8
DM
27742017-12-06 David Malcolm <dmalcolm@redhat.com>
2775
2776 PR c/83236
2777 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2778 reserved for use by the implementation.
2779
613bc14f
DM
27802017-12-06 David Malcolm <dmalcolm@redhat.com>
2781
2782 * c-decl.c: Include "c-family/c-spellcheck.h".
2783
05abad4c
ML
27842017-12-05 Martin Liska <mliska@suse.cz>
2785 Jakub Jelinek <jakub@redhat.com>
2786
2787 * c-typeck.c (pointer_diff): Add new argument and instrument
2788 pointer subtraction.
2789 (build_binary_op): Similar for pointer comparison.
2790
cc6534d4
JJ
27912017-12-01 Jakub Jelinek <jakub@redhat.com>
2792
65791f42
JJ
2793 PR c/79153
2794 * c-parser.c: Include tree-iterator.h.
2795 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2796 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2797 on it.
2798
cc6534d4
JJ
2799 PR c/83222
2800 * c-tree.h (decl_constant_value_1): Declare.
2801 * c-typeck.c (decl_constant_value_1): New function.
2802 (decl_constant_value): Use it.
2803 * c-fold.c (c_fully_fold_internal): If in_init, use
2804 decl_constant_value_1 instead of decl_constant_value.
2805
5de73c05
JJ
28062017-11-30 Jakub Jelinek <jakub@redhat.com>
2807
2808 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2809
058f0b9e
JJ
28102017-11-28 Jakub Jelinek <jakub@redhat.com>
2811
2812 PR sanitizer/81275
2813 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2814 c_switch_covers_all_cases_p returns true.
2815
5e9d6aa4 28162017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2817 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2818
2819 * Make-lang.in (c/c-array-notation.o): Remove.
2820 * c-array-notation.c: Delete.
2821 * c-decl.c: Remove cilkplus condition.
2822 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2823 c_parser_cilk_verify_simd, c_parser_array_notation,
2824 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2825 c_parser_cilk_simd_fn_vector_attrs,
2826 c_finish_cilk_simd_fn_tokens): Delete.
2827 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2828 (c_parser_direct_declarator_inner): Ditto.
2829 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2830 (c_parser_attributes, c_parser_compound_statement,
2831 c_parser_statement_after_labels, c_parser_if_statement,
2832 c_parser_switch_statement, c_parser_while_statement,
2833 c_parser_do_statement, c_parser_for_statement,
2834 c_parser_unary_expression, c_parser_postfix_expression,
2835 c_parser_postfix_expression_after_primary,
2836 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2837 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2838 support.
2839 * c-typeck.c (build_array_ref, build_function_call_vec,
2840 convert_arguments,
2841 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2842 c_finish_loop, build_binary_op): Remove cilkplus support.
2843
9e851845
JJ
28442017-11-28 Jakub Jelinek <jakub@redhat.com>
2845
2846 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2847 of build3.
2848
ab20d992 28492017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2850
2851 * Make-lang.in (c.install-plugin): Install backend import library.
2852
41521dee
JJ
28532017-11-23 Jakub Jelinek <jakub@redhat.com>
2854
2855 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2856 pragma_stmt context.
2857
ac9effed
EB
28582017-11-23 Mike Stump <mikestump@comcast.net>
2859 Eric Botcazou <ebotcazou@adacore.com>
2860
2861 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2862 ANNOTATE_EXPR.
2863 (c_parser_do_statement): Likewise.
2864 (c_parser_for_statement): Likewise.
2865
ce95abc4
DM
28662017-11-22 David Malcolm <dmalcolm@redhat.com>
2867
2868 PR c++/62170
2869 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2870 bool to bool *. Within '%T' handling, if showing an "aka", use
2871 "quoted" param to add appropriate quoting.
2872
974aedcc
MP
28732017-11-22 Marek Polacek <polacek@redhat.com>
2874
2875 PR c++/60336
2876 PR middle-end/67239
2877 PR target/68355
2878 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2879
d4300cc6
DM
28802017-11-21 David Malcolm <dmalcolm@redhat.com>
2881
2882 PR c/83056
2883 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2884 earlier failed lookups.
2885
1af4ebf5
MG
28862017-11-21 Marc Glisse <marc.glisse@inria.fr>
2887
2888 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2889 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2890
26edace6
DM
28912017-11-20 David Malcolm <dmalcolm@redhat.com>
2892
2893 PR c/81404
2894 * c-decl.c: Include "c-family/known-headers.h".
2895 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2896 to known-headers.cc.
2897 (class suggest_missing_header): Move to known-header.h.
2898 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2899 than get_c_name_hint.
2900
b1212255
DM
29012017-11-20 David Malcolm <dmalcolm@redhat.com>
2902
2903 * c-decl.c (get_c_name_hint): New function.
2904 (class suggest_missing_header): New class.
2905 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2906 suggest missing headers to the user.
2907
6c7a259b
DM
29082017-11-20 David Malcolm <dmalcolm@redhat.com>
2909
2910 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2911 Include "c-family/name-hint.h"
2912 (implicit_decl_warning): Convert "hint" from
2913 const char * to name_hint. Pass location to
2914 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2915 warning was not printed.
2916 (undeclared_variable): Likewise for "guessed_id".
2917 (lookup_name_fuzzy): Convert return type from const char *
2918 to name_hint. Add location_t param.
2919 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2920 Include "c-family/name-hint.h"
2921 (c_parser_declaration_or_fndef): Convert "hint" from
2922 const char * to name_hint. Pass location to lookup_name_fuzzy.
2923 (c_parser_parameter_declaration): Likewise.
2924
f9c59f7e
JJ
29252017-11-19 Jakub Jelinek <jakub@redhat.com>
2926
2927 PR c/66618
2928 PR c/69960
2929 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2930 where needed.
2931 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2932 handle_omp_array_sections): Likewise.
2933 (digest_init): Don't call decl_constant_value_for_optimization.
2934 * c-tree.h (decl_constant_value_for_optimization): Removed.
2935 * c-fold.c (c_fold_array_ref): New function.
2936 (c_fully_fold_internal): Add LVAL argument, propagate it through
2937 recursive calls. For VAR_P call decl_constant_value and
2938 unshare if not LVAL and either optimizing or IN_INIT. Remove
2939 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2940 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2941 (c_fully_fold): Add LVAL argument, pass it through to
2942 c_fully_fold_internal.
2943 (decl_constant_value_for_optimization): Removed.
2944
3ca0dc60
JM
29452017-11-15 Joseph Myers <joseph@codesourcery.com>
2946
2947 PR c/81156
2948 * c-parser.c (check_tgmath_function): New function.
2949 (enum tgmath_parm_kind): New enum.
2950 (c_parser_postfix_expression): Handle __builtin_tgmath.
2951
64a5912c
DM
29522017-10-31 David Malcolm <dmalcolm@redhat.com>
2953
2954 * c-decl.c (implicit_decl_warning): Update for renaming of
2955 pedwarn_at_rich_loc and warning_at_rich_loc.
2956 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2957 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2958 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2959 (c_parser_struct_or_union_specifier): Likewise for renaming of
2960 pedwarn_at_rich_loc.
2961 (c_parser_parameter_declaration): Likewise for renaming of
2962 error_at_rich_loc.
2963 * c-typeck.c (build_component_ref): Likewise.
2964 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2965 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2966 (set_init_label): Likewise for renaming of error_at_rich_loc.
2967
c1136864
RB
29682017-10-30 Richard Biener <rguenther@suse.de>
2969
2970 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2971 stmts.
2972
ee5fd23a
MM
29732017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2974
2975 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2976 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2977
1a59ccf2
DM
29782017-10-25 David Malcolm <dmalcolm@redhat.com>
2979
2980 PR c/7356
2981 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2982 semicolons.
2983
bc1a75dd
JJ
29842017-10-25 Jakub Jelinek <jakub@redhat.com>
2985
2986 PR libstdc++/81706
2987 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2988 newdecl to corresponding __builtin_ if any.
2989
ff1ff960
PC
29902017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2991
2992 PR c++/82466
2993 * c-decl.c (diagnose_mismatched_decls): Use
2994 OPT_Wbuiltin_declaration_mismatch.
2995
62e1c678
DM
29962017-10-12 David Malcolm <dmalcolm@redhat.com>
2997
2998 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2999 use it to guard calls to maybe_suggest_missing_token_insertion.
3000 (c_parser_parms_list_declarator): Override default value of new
3001 "type_is_unique" param to c_parser_require.
3002 (c_parser_asm_statement): Likewise.
3003 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3004 defaulting to true.
3005
a92f6726
NS
30062017-10-11 Nathan Sidwell <nathan@acm.org>
3007
3008 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3009
8e6cdc90
RS
30102017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3011
3012 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3013 operating on trees as wide_ints.
3014 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3015 (c_tree_equal): Likewise.
3016
8139a48e
DM
30172017-10-04 David Malcolm <dmalcolm@redhat.com>
3018
3019 * c-decl.c (push_parm_decl): Store c_parm's location into the
3020 PARAM_DECL.
3021 (build_c_parm): Add "loc" param and store it within the c_parm.
3022 * c-parser.c (struct c_parser): Add "last_token_location" field.
3023 (c_parser_consume_token): Store location of the token into the
3024 new field.
3025 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3026 when handling a FUNCTION_DECL, if it doesn't already have them.
3027 (c_parser_parameter_declaration): Generate a location for the
3028 parameter, and pass it to the call to build_c_parm.
3029 * c-tree.h (struct c_parm): Add field "loc".
3030 (build_c_parm): Add location_t param.
3031 * c-typeck.c (get_fndecl_argument_location): New function.
3032 (inform_for_arg): New function.
3033 (convert_for_assignment): Use inform_for_arg when dealing with
3034 ic_argpass.
3035
2a389958
JJ
30362017-09-29 Jakub Jelinek <jakub@redhat.com>
3037
7d386d45
JJ
3038 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3039 width is non-NULL.
3040 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3041 don't SET_DECL_C_BIT_FIELD here.
3042
2a389958
JJ
3043 PR c/82340
3044 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3045 instead of trying to set just TREE_READONLY manually.
3046
ebc6a85e
TV
30472017-09-16 Tom de Vries <tom@codesourcery.com>
3048
3049 PR c/81875
3050 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3051 cond itself.
3052
bb75facd
JM
30532017-09-15 Joseph Myers <joseph@codesourcery.com>
3054
3055 PR c/82071
3056 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3057 for C11.
3058 (build_conditional_expr): For C11, generate result with excess
3059 precision when one argument is an integer and the other is of a
3060 type using excess precision.
3061
1d933576
BE
30622017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3063
3064 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3065
267bbb6f
MP
30662017-09-13 Marek Polacek <polacek@redhat.com>
3067
3068 PR c/82167
3069 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3070 than expr.original_type.
3071
6836632e
NS
30722017-09-12 Nathan Sidwell <nathan@acm.org>
3073
3074 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3075 resort_sorted_fields): Moved from c-family/c-common.c.
3076 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3077
e035be33
JM
30782017-09-01 Joseph Myers <joseph@codesourcery.com>
3079
3080 PR c/82071
3081 * c-typeck.c (build_atomic_assign): Handle argument with excess
3082 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3083 argument passed to build_binary_op and convert_for_assignment but
3084 not for call to c_fully_fold.
3085 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3086 Ensure build_binary_op is called with argument with original
3087 semantic type. Avoid calling c_fully_fold with an
3088 EXCESS_PRECISION_EXPR from build_binary_op.
3089
d2e05fcb
JJ
30902017-09-01 Jakub Jelinek <jakub@redhat.com>
3091
3092 PR c/81887
3093 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3094
b397965c
RS
30952017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3096 Alan Hayward <alan.hayward@arm.com>
3097 David Sherwood <david.sherwood@arm.com>
3098
3099 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3100 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3101 m1 and m2 to the signed equivalent of a fixed-point
3102 SCALAR_TYPE_MODE.
3103
14e18d71
DM
31042017-08-24 David Malcolm <dmalcolm@redhat.com>
3105
3106 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3107 than CAN_HAVE_LOCATION_P when determining whether to use the
3108 location_t value within "value".
3109
7f204c0f
DM
31102017-08-21 David Malcolm <dmalcolm@redhat.com>
3111
3112 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3113 rather than peeking the location of the first token.
3114 * c-tree.h (c_expr::get_location): New method.
3115
2f687306
DM
31162017-08-21 David Malcolm <dmalcolm@redhat.com>
3117
3118 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3119 to check_function_arguments.
3120
3e7b80d7
MP
31212017-08-18 Marek Polacek <polacek@redhat.com>
3122
3123 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3124 commentary.
3125
00aa1fa2
L
31262017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3127
3128 PR c/53037
3129 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3130 (check_bitfield_type_and_width): Don't allow bit-field with
3131 warn_if_not_aligned type.
3132
da67acb9
MS
31332017-08-14 Martin Sebor <msebor@redhat.com>
3134
3135 PR c/81117
3136 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3137
bb85aa74
MP
31382017-08-11 Marek Polacek <polacek@redhat.com>
3139
3140 PR c/81795
3141 * c-decl.c (pushtag): Only print inform if the warning was printed.
3142 (grokdeclarator): Likewise.
3143
32129a17
DM
31442017-08-10 David Malcolm <dmalcolm@redhat.com>
3145
3146 * c-parser.c (c_parser_error): Rename to...
3147 (c_parser_error_richloc): ...this, making static, and adding
3148 "richloc" parameter, passing it to the c_parse_error call,
3149 rather than calling c_parser_set_source_position_from_token.
3150 (c_parser_error): Reintroduce, reimplementing in terms of the
3151 above, converting return type from void to bool.
3152 (class token_pair): New class.
3153 (struct matching_paren_traits): New struct.
3154 (matching_parens): New typedef.
3155 (struct matching_brace_traits): New struct.
3156 (matching_braces): New typedef.
3157 (get_matching_symbol): New function.
3158 (c_parser_require): Add param MATCHING_LOCATION, using it to
3159 highlight matching "opening" tokens for missing "closing" tokens.
3160 (c_parser_skip_until_found): Likewise.
3161 (c_parser_static_assert_declaration_no_semi): Convert explicit
3162 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3163 class matching_parens, so that the pertinent open parenthesis is
3164 highlighted when there are problems locating the close
3165 parenthesis.
3166 (c_parser_struct_or_union_specifier): Likewise.
3167 (c_parser_typeof_specifier): Likewise.
3168 (c_parser_alignas_specifier): Likewise.
3169 (c_parser_simple_asm_expr): Likewise.
3170 (c_parser_braced_init): Likewise, for matching_braces.
3171 (c_parser_paren_condition): Likewise, for matching_parens.
3172 (c_parser_switch_statement): Likewise.
3173 (c_parser_for_statement): Likewise.
3174 (c_parser_asm_statement): Likewise.
3175 (c_parser_asm_operands): Likewise.
3176 (c_parser_cast_expression): Likewise.
3177 (c_parser_sizeof_expression): Likewise.
3178 (c_parser_alignof_expression): Likewise.
3179 (c_parser_generic_selection): Likewise.
3180 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3181 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3182 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3183 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3184 c_parser_skip_until_found call.
3185 (c_parser_objc_class_definition): Use class matching_parens as
3186 above.
3187 (c_parser_objc_method_decl): Likewise.
3188 (c_parser_objc_try_catch_finally_statement): Likewise.
3189 (c_parser_objc_synchronized_statement): Likewise.
3190 (c_parser_objc_at_property_declaration): Likewise.
3191 (c_parser_oacc_wait_list): Likewise.
3192 (c_parser_omp_var_list_parens): Likewise.
3193 (c_parser_omp_clause_collapse): Likewise.
3194 (c_parser_omp_clause_default): Likewise.
3195 (c_parser_omp_clause_if): Likewise.
3196 (c_parser_omp_clause_num_threads): Likewise.
3197 (c_parser_omp_clause_num_tasks): Likewise.
3198 (c_parser_omp_clause_grainsize): Likewise.
3199 (c_parser_omp_clause_priority): Likewise.
3200 (c_parser_omp_clause_hint): Likewise.
3201 (c_parser_omp_clause_defaultmap): Likewise.
3202 (c_parser_oacc_single_int_clause): Likewise.
3203 (c_parser_omp_clause_ordered): Likewise.
3204 (c_parser_omp_clause_reduction): Likewise.
3205 (c_parser_omp_clause_schedule): Likewise.
3206 (c_parser_omp_clause_num_teams): Likewise.
3207 (c_parser_omp_clause_thread_limit): Likewise.
3208 (c_parser_omp_clause_aligned): Likewise.
3209 (c_parser_omp_clause_linear): Likewise.
3210 (c_parser_omp_clause_safelen): Likewise.
3211 (c_parser_omp_clause_simdlen): Likewise.
3212 (c_parser_omp_clause_depend): Likewise.
3213 (c_parser_omp_clause_map): Likewise.
3214 (c_parser_omp_clause_device): Likewise.
3215 (c_parser_omp_clause_dist_schedule): Likewise.
3216 (c_parser_omp_clause_proc_bind): Likewise.
3217 (c_parser_omp_clause_uniform): Likewise.
3218 (c_parser_omp_for_loop): Likewise.
3219 (c_parser_cilk_clause_vectorlength): Likewise.
3220 (c_parser_cilk_clause_linear): Likewise.
3221 (c_parser_transaction_expression): Likewise.
3222 * c-parser.h (c_parser_require): Add param matching_location with
3223 default UNKNOWN_LOCATION.
3224 (c_parser_error): Convert return type from void to bool.
3225 (c_parser_skip_until_found): Add param matching_location with
3226 default UNKNOWN_LOCATION.
3227
30af3a2b
MP
32282017-08-09 Marek Polacek <polacek@redhat.com>
3229
3230 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3231 * c-tree.h (build_external_ref): Update declaration.
3232 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3233 (build_external_ref): Change the type of a parameter to bool.
3234 (parser_build_binary_op): Use true/false instead of 1/0.
3235 (pointer_diff): Likewise.
3236 (build_modify_expr): Likewise.
3237 (set_designator): Change the type of a parameter to bool.
3238 (set_init_index): Use true/false instead of 1/0.
3239 (set_init_label): Likewise.
3240 (output_init_element): Change the type of a parameter to bool.
3241 (output_pending_init_elements): Use true/false instead of 1/0.
3242 (process_init_element): Likewise.
3243 (build_binary_op): Change the type of a parameter to bool.
3244
296c53ac
MP
32452017-08-09 Marek Polacek <polacek@redhat.com>
3246
3247 PR c/81233
3248 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3249 Call emit_diagnostic_valist instead of pedwarn.
3250 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3251 Print the relevant types in diagnostics.
3252
a32c8316
MP
32532017-08-09 Marek Polacek <polacek@redhat.com>
3254
3255 PR c/81417
3256 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3257 build_conditional_expr.
a32c8316
MP
3258 * c-parser.c (c_parser_conditional_expression): Create locations for
3259 EXP1 and EXP2 from their source ranges. Pass the locations down to
3260 build_conditional_expr.
3261 * c-tree.h (build_conditional_expr): Update declaration.
3262 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3263 For -Wsign-compare, also print the types.
3264
314e6352
ML
32652017-08-08 Martin Liska <mliska@suse.cz>
3266
3267 * c-convert.c: Include header files.
3268 * c-typeck.c: Likewise.
3269
577eec56
ML
32702017-08-07 Martin Liska <mliska@suse.cz>
3271
3272 * c-parser.c (c_parser_attributes): Canonicalize name of an
3273 attribute.
3274
f7b6353a
MP
32752017-08-02 Marek Polacek <polacek@redhat.com>
3276
3277 PR c/81289
3278 * c-parser.c (c_parser_unary_expression): Use set_error.
3279
8a6eab34
MP
3280 PR c/81448
3281 PR c/81306
3282 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3283 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3284
ab20d992 32852017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3286 Martin Liska <mliska@suse.cz>
3287
3288 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3289 statement.
7fef86d3 3290
f34ebeb2
ML
32912017-07-31 Martin Liska <mliska@suse.cz>
3292
3293 PR sanitize/81530
3294 * c-convert.c (convert): Guard condition with flag_sanitize_p
3295 also with current_function_decl non-null equality.
3296 * c-decl.c (grokdeclarator): Likewise.
3297 * c-typeck.c (build_binary_op): Likewise.
3298
8595f67b
MP
32992017-07-25 Marek Polacek <polacek@redhat.com>
3300
3301 * c-decl.c (grokfield): Remove local variable.
3302
d49718d6
MP
33032017-07-25 Marek Polacek <polacek@redhat.com>
3304
3305 PR c/81364
3306 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3307 macro expansion if the body is in { }.
3308 (c_parser_while_statement): Likewise.
3309 (c_parser_for_statement): Likewise.
3310
ff22eb12
NS
33112017-07-18 Nathan Sidwell <nathan@acm.org>
3312
3313 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3314
eea77d1f
DM
33152017-07-14 David Malcolm <dmalcolm@redhat.com>
3316
3317 * c-decl.c (implicitly_declare): When suggesting a missing
3318 #include, provide a fix-it hint.
3319
b6f43128
DM
33202017-07-06 David Malcolm <dmalcolm@redhat.com>
3321
3322 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3323 and call that instead.
3324 * c-tree.h (selftest::run_c_tests): New decl.
3325
3e2becc4
MP
33262017-06-26 Marek Polacek <polacek@redhat.com>
3327
3328 PR c/80116
3329 * c-parser.c (c_parser_if_body): Set the location of the
3330 body of the conditional after parsing all the labels. Call
3331 warn_for_multistatement_macros.
3332 (c_parser_else_body): Likewise.
3333 (c_parser_switch_statement): Likewise.
3334 (c_parser_while_statement): Likewise.
3335 (c_parser_for_statement): Likewise.
3336 (c_parser_statement): Add a default argument. Save the location
3337 after labels have been parsed.
3338 (c_parser_c99_block_statement): Likewise.
3339
343ae898
RB
33402017-06-19 Richard Biener <rguenther@suse.de>
3341
3342 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3343 negated _Literals to parse _Literal (int) -1.
3344
45b2222a
ML
33452017-06-13 Martin Liska <mliska@suse.cz>
3346
3347 PR sanitize/78204
3348 * c-convert.c (convert): Use sanitize_flags_p.
3349 * c-decl.c (grokdeclarator): Likewise.
3350 * c-typeck.c (convert_for_assignment): Likewise.
3351 (c_finish_return): Likewise.
3352 (build_binary_op): Likewise.
3353
8ab7005b
JJ
33542017-06-08 Jakub Jelinek <jakub@redhat.com>
3355
3356 PR c/81006
3357 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3358 to sizetype before size_binop.
3359
363dc72c
JJ
33602017-06-07 Jakub Jelinek <jakub@redhat.com>
3361
3362 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3363 of TDI_generic.
3364
dc949728
MP
33652017-06-06 Marek Polacek <polacek@redhat.com>
3366
3367 PR c/79983
3368 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3369 ref.
3370 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3371
40ffd95f
BE
33722017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3373
3374 * c-parser.c (c_parser_binary_expression): Implement the
3375 -Wsizeof_pointer_div warning.
3376 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3377 from a parenthesized expression.
3378 (c_parser_expr_list): Use c_last_sizeof_loc.
3379 * c-tree.h (c_last_sizeof_loc): New external.
3380 * c-typeck.c (c_last_sizeof_loc): New variable.
3381 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3382
9fc5e7a4
MM
33832017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3384
3385 PR testsuite/80580
3386 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3387
f012c8ef
DM
33882017-05-30 David Malcolm <dmalcolm@redhat.com>
3389
3390 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3391 parameters.
3392
3cd211af
MS
33932017-05-24 Martin Sebor <msebor@redhat.com>
3394
3395 PR c/80731
3396 * c-fold.c (c_fully_fold_internal): Adjust.
3397 * c-typeck.c (parser_build_unary_op): Adjust.
3398
fd71a9a2
TS
33992017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3400
3401 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3402 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3403 "VECTOR_LENGTH".
3404
92fa0f9e
MP
34052017-05-23 Marek Polacek <polacek@redhat.com>
3406
3407 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3408 quotes.
3409
d11c168a
JJ
34102017-05-22 Jakub Jelinek <jakub@redhat.com>
3411
3412 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3413 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3414 it returned invariant. Call tree_invariant_p unconditionally
3415 afterwards to decide whether to return expr or op0.
3416
58aca9d9
NS
34172017-05-22 Nathan Sidwell <nathan@acm.org>
3418
3419 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3420
7fd549d2
TS
34212017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3422
3423 * c-parser.c (c_parser_omp_clause_default): Handle
3424 "OMP_CLAUSE_DEFAULT_PRESENT".
3425
6ecd2339
BE
34262017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3427
3428 * config-lang.in (gtfiles): Add c-family/c-format.c.
3429
8a57ecff
NS
34302017-05-18 Nathan Sidwell <nathan@acm.org>
3431
3432 * c-decl.c (pushdecl_top_level): Delete unused function.
3433
6574d78e
MP
34342017-05-18 Marek Polacek <polacek@redhat.com>
3435
3436 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3437 (check_earlier_gotos): Likewise.
3438 (define_label): Likewise.
3439 (pending_xref_error): Likewise.
3440 (smallest_type_quals_location): Likewise.
3441 (grokdeclarator): Likewise.
3442 (grokparms): Likewise.
3443 (identifier_global_value): Likewise.
3444 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3445 (find_init_member): Likewise.
3446
e3455240
MP
34472017-05-18 Marek Polacek <polacek@redhat.com>
3448
3449 * c-decl.c (start_decl): Use false/true instead of 0/1.
3450 (grokdeclarator): Likewise.
3451 (finish_struct): Likewise.
3452 (start_function): Change the return type to bool. Use false/true
3453 instead of 0/1.
3454 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3455 * c-tree.h (start_function): Update.
3456 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3457 (set_designator): Change the return type to bool. Use false/true
3458 instead of 0/1.
3459
3fa8871b
MP
34602017-05-17 Marek Polacek <polacek@redhat.com>
3461
3462 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3463 * c-typeck.c: Likewise.
3464
142473df
MP
34652017-05-17 Marek Polacek <polacek@redhat.com>
3466
3467 PR sanitizer/80659
3468 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3469 DECL_IGNORED_P even for non-static compound literals.
3470
1a817418
ML
34712017-05-17 Martin Liska <mliska@suse.cz>
3472
3473 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3474 use it instead of int type.
3475
b2fa0a8b
MP
34762017-05-17 Marek Polacek <polacek@redhat.com>
3477
3478 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3479 call c_fully_fold.
3480 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3481 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3482 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3483 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3484 save_expr.
3485 (c_parser_conditional_expression): Likewise.
3486 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3487 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3488 (process_init_element): Likewise.
3489 (build_binary_op): Likewise.
3490 (handle_omp_array_sections_1): Likewise.
3491
1e47f02b
TS
34922017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3493
3494 * c-parser.c (c_parser_omp_clause_num_gangs)
3495 (c_parser_omp_clause_num_workers)
3496 (c_parser_omp_clause_vector_length): Merge functions into...
3497 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3498 all users.
3499
c24e924f
NS
35002017-05-11 Nathan Sidwell <nathan@acm.org>
3501
3502 * gimple-parser.c: Don't #include tree-dump.h.
3503
c587104e
MM
35042017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3505
3506 PR testsuite/80580
3507 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3508
67ac9a9d
MM
35092017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3510
3511 PR testsuite/80580
3512 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3513 incorrect __MEM syntax.
3514
ac4eb40f
MM
35152017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3516
3517 PR testsuite/80580
3518 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3519 type of unary '*'.
3520
641da50a
NS
35212017-05-09 Nathan Sidwell <nathan@acm.org>
3522
3523 * c-tree.h (pushdecl): Declare.
3524
56d35585
DM
35252017-05-05 David Malcolm <dmalcolm@redhat.com>
3526
3527 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3528 with diagnostic_report_diagnostic.
3529 * c-errors.c (pedwarn_c99): Likewise.
3530 (pedwarn_c90): Likewise.
3531
815d9cc6
XR
35322017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3533
92a285c1 3534 PR c++/80038
815d9cc6
XR
3535 * c-gimplify.c (c_gimplify_expr): Remove calls to
3536 cilk_gimplifY_call_params_in_spawned_fn.
3537
1c4ea66f
DM
35382017-04-25 David Malcolm <dmalcolm@redhat.com>
3539
3540 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3541 hint for removing extra semicolon.
3542
666f7903
JJ
35432017-04-21 Jakub Jelinek <jakub@redhat.com>
3544
3545 PR c/80468
3546 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3547 enabled, set specs->type to integer_type_node.
3548
5764ee3c
JW
35492017-04-03 Jonathan Wakely <jwakely@redhat.com>
3550
3551 * c-array-notation.c: Fix typo in comment.
3552
10fa8dfb
MP
35532017-03-29 Marek Polacek <polacek@redhat.com>
3554
3555 PR c/79730
3556 * c-decl.c (finish_decl): Check VAR_P.
3557
a9e4a1a5
JJ
35582017-03-27 Jakub Jelinek <jakub@redhat.com>
3559
3560 PR middle-end/80162
3561 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3562 * c-typeck.c (c_mark_addressable): Likewise. Look through
3563 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3564 to ARRAY_TYPE.
3565 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3566
ee3ff394
MP
35672017-03-23 Marek Polacek <polacek@redhat.com>
3568
3569 * c-tree.h: Remove a C_RID_YYCODE reference.
3570
4d1b8e70
JJ
35712017-03-21 Jakub Jelinek <jakub@redhat.com>
3572
3573 PR c/80097
3574 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3575 optional COMPOUND_EXPR with ubsan instrumentation.
3576
31dc71a8
MP
35772017-03-17 Marek Polacek <polacek@redhat.com>
3578
3579 * c-parser.c: Add C11 references.
3580
d579c385
MP
35812017-03-15 Marek Polacek <polacek@redhat.com>
3582
3583 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3584
85059a38
MP
35852017-03-11 Marek Polacek <polacek@redhat.com>
3586
3587 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3588
2f6f187a
DM
35892017-03-10 David Malcolm <dmalcolm@redhat.com>
3590
3591 PR translation/79848
3592 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3593 "%qs".
3594 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3595
36618428
MP
35962017-03-09 Marek Polacek <polacek@redhat.com>
3597
3598 PR sanitizer/79757
3599 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3600 parameter declarations with initializers.
3601
01e5af5a
JJ
36022017-03-09 Jakub Jelinek <jakub@redhat.com>
3603
3604 PR c/79969
3605 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3606 TYPE_STUB_DECL.
3607
a71dbc63
JJ
36082017-03-07 Jakub Jelinek <jakub@redhat.com>
3609
3610 PR c/79834
3611 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3612 for "may only be used in compound statements" diagnostics, change it
3613 such that the same translatable string is used for all pragmas. For
3614 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3615 diagnostics.
3616 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3617 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3618 "may only be used in compound statements" diagnostics, such that the
3619 same translatable string is used for all pragmas.
3620
1ff4bae6
MP
36212017-03-04 Marek Polacek <polacek@redhat.com>
3622
3623 PR c/79847
3624 * c-decl.c (implicit_decl_warning): Add missing space.
3625
7f5a7d78
MP
36262017-03-03 Marek Polacek <polacek@redhat.com>
3627
3628 PR c/79758
3629 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3630 current_function_prototype_arg_types is error_mark_node. Fix
3631 formatting. Use TREE_VALUE instead of TREE_TYPE.
3632
883c8f06
JJ
36332017-03-03 Jakub Jelinek <jakub@redhat.com>
3634
79c9b7a8
JJ
3635 PR c/79837
3636 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3637 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3638 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3639 diagnostics.
3640
883c8f06
JJ
3641 PR c/79836
3642 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3643 instead of %<_Generic>.
3644 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3645 (c_parser_omp_target_exit_data): Use %<release%> instead of
3646 %<release>.
3647
324ff1a0
JJ
36482017-02-28 Jakub Jelinek <jakub@redhat.com>
3649
3650 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3651 instead of just cond ? "..." : "...".
3652 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3653 for "enter"/"exit" keyword.
3654 (c_finish_oacc_routine): Don't use %s to supply portions of the
3655 message.
3656
4227c9ad
JJ
36572017-02-24 Jakub Jelinek <jakub@redhat.com>
3658
3659 PR c++/79588
3660 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3661 handle -Wrestrict here.
3662 * c-typeck.c (build_function_call_vec): Adjust
3663 check_function_arguments caller.
3664
5d972e66
RB
36652017-02-23 Richard Biener <rguenther@suse.de>
3666
3667 PR c/79684
3668 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3669 to initialize c_exprs to return.
3670 (c_parser_gimple_binary_expression): Likewise.
3671 (c_parser_gimple_unary_expression): Likewise.
3672 (c_parser_gimple_postfix_expression): Likewise.
3673
61ac5ebe
MP
36742017-02-22 Marek Polacek <polacek@redhat.com>
3675
3676 PR c/79662
3677 * c-typeck.c (convert_arguments): Handle error_mark_node.
3678
41d1b0b1
PK
36792017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3680
3681 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3682 value of c_parser_parse_ssa_name against error_mark_node and emit
3683 error if ssa name is anonymous and written as default definition.
3684
eab1f169
PK
36852017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3686
3687 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3688 FMA_EXPR.
3689
bcac0b4d
JJ
36902017-02-16 Jakub Jelinek <jakub@redhat.com>
3691
3692 PR c++/79512
3693 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3694 ignore #pragma omp target even when not followed by identifier.
3695
1be33173
PK
36962017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3697
3698 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3699 (c_parser_gimple_unary_expression): Likewise.
3700
aa326bfb
JJ
37012017-02-13 Jakub Jelinek <jakub@redhat.com>
3702
3703 * c-parser.c (c_parser_oacc_declare): Add missing space in
3704 diagnostics.
3705
8a398bc5
PK
37062017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3707
3708 PR c/79478
3709 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3710 set_c_expr_source_range when parsing ssa-name.
3711
3dcde5ef 37122017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3713 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3714
3715 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3716 building IL when arguments are error_mark_node.
3717 (c_parser_gimple_unary_expression): Likewise.
3718 (c_parser_gimple_if_stmt): Likewise.
3719 (c_parser_gimple_switch_stmt): Likewise.
3720 (c_parser_gimple_return_stmt): Likewise.
3721 (c_parser_parse_ssa_name): When name lookup fails do not build
3722 an SSA name. Use undeclared rather than not declared in error
3723 reporting.
3724
192b048b
MP
37252017-02-09 Marek Polacek <polacek@redhat.com>
3726
3727 PR c/79428
3728 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3729 instead of c_parser_skip_until_found.
3730
56f71478
JJ
37312017-02-09 Jakub Jelinek <jakub@redhat.com>
3732
3733 PR c/79431
3734 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3735 symtab_node::get on automatic variables.
3736
02889d23
CLT
37372016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3738 Chung-Lin Tang <cltang@codesourcery.com>
3739
3740 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3741 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3742 semantic checking.
3743 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3744
7af4b20d
RB
37452017-02-07 Richard Biener <rguenther@suse.de>
3746
3747 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3748 (c_parser_gimple_postfix_expression_after_primary):
3749 Do not use c_build_function_call_vec to avoid folding and promotion.
3750 Simplify.
3751
e5e391d6
MO
37522017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3753
3754 PR lto/79061
3755 * c-decl.c (pop_scope): Pass main_input_filename to
3756 build_translation_unit_decl.
3757
c2e84327
DM
37582017-01-24 David Malcolm <dmalcolm@redhat.com>
3759
3760 * c-parser.c: Include "read-rtl-function.h" and
3761 "run-rtl-passes.h".
3762 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3763 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3764 production. Update for renaming of field "gimple_pass" to
3765 "gimple_or_rtl_pass". If __RTL was seen, call
3766 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3767 to an auto_timevar, to cope with early exit.
3768 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3769 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3770 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3771 Handle RID_RTL.
3772 (c_parser_parse_rtl_body): New function.
3773 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3774 (struct c_declspecs): Rename field "gimple_pass" to
3775 "gimple_or_rtl_pass". Add field "rtl_p".
3776 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3777 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3778 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3779 (c_parser_gimple_or_rtl_pass_list): ...this.
3780
2ebd93e1
MP
37812017-01-20 Marek Polacek <polacek@redhat.com>
3782
3783 PR c/64279
3784 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3785
b1c95bb5
RB
37862017-01-13 Richard Biener <rguenther@suse.de>
3787
3788 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3789 nops.
3790
25329913
RB
37912017-01-13 Richard Biener <rguenther@suse.de>
3792
3793 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3794 _Literal ( type-name ) number.
3795
6bb4ea5c
RB
37962017-01-12 Richard Biener <rguenther@suse.de>
3797
3798 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3799 __MEM.
3800
6b5b4e9c
JJ
38012017-01-11 Jakub Jelinek <jakub@redhat.com>
3802
3803 PR c++/72813
3804 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3805 PCH file.
3806
e3252775
RB
38072017-01-11 Richard Biener <rguenther@suse.de>
3808
3809 PR bootstrap/79052
3810 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3811 returns on parse errors.
3812
a9342885
MP
38132017-01-04 Marek Polacek <polacek@redhat.com>
3814
3815 PR c++/64767
3816 * c-parser.c (c_parser_postfix_expression): Mark zero character
3817 constants by setting original_type in c_expr.
3818 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3819 with a zero character constant.
3820 (char_type_p): New function.
3821
5dd9a9d0
DM
38222017-01-04 David Malcolm <dmalcolm@redhat.com>
3823
3824 * c-parser.c (c_parser_declaration_or_fndef): Create a
3825 rich_location at init_loc and parse it to start_init.
3826 (last_init_list_comma): New global.
3827 (c_parser_braced_init): Update last_init_list_comma when parsing
3828 commas. Pass it to pop_init_level. Pass location of closing
3829 brace to pop_init_level.
3830 (c_parser_postfix_expression_after_paren_type): Create a
3831 rich_location at type_loc and parse it to start_init.
3832 (c_parser_omp_declare_reduction): Likewise for loc.
3833 * c-tree.h (start_init): Add rich_location * param.
3834 (pop_init_level): Add location_t param.
3835 * c-typeck.c (struct initializer_stack): Add field
3836 "missing_brace_richloc".
3837 (start_init): Add richloc param, use it to initialize
3838 the stack node's missing_brace_richloc.
3839 (last_init_list_comma): New decl.
3840 (finish_implicit_inits): Pass last_init_list_comma to
3841 pop_init_level.
3842 (push_init_level): When finding missing open braces, add fix-it
3843 hints to the richloc.
3844 (pop_init_level): Add "insert_before" param and pass it
3845 when calling pop_init_level. Add fixits about missing
3846 close braces to any richloc. Use the richloc for the
3847 -Wmissing-braces warning.
3848 (set_designator): Pass last_init_list_comma to pop_init_level.
3849 (process_init_element): Likewise.
3850
cbe34bb5
JJ
38512017-01-01 Jakub Jelinek <jakub@redhat.com>
3852
3853 Update copyright years.
3854
d17680f3
JJ
38552016-12-21 Jakub Jelinek <jakub@redhat.com>
3856
0dba7960
JJ
3857 PR bootstrap/78817
3858 * c-typeck.c (build_function_call_vec): If check_function_arguments
3859 returns true, set TREE_NO_WARNING on CALL_EXPR.
3860
d17680f3
JJ
3861 PR c/77767
3862 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3863 to *expr instead of overwriting it.
3864
aa90531e
RB
38652016-12-20 Richard Biener <rguenther@suse.de>
3866
3867 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3868 error recovery.
3869 (c_parser_gimple_statement): Only build assigns for non-error
3870 stmts.
3871 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3872
629b3d75
MJ
38732016-12-14 Martin Jambor <mjambor@suse.cz>
3874
3875 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3876 omp-low.h.
3877 (c_finish_oacc_routine): Adjusted call to
3878 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3879 to use their new names.
3880 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3881 use its new name.
3882 (c_parser_oacc_update): Likewise.
3883 (c_parser_omp_simd): Likewise.
3884 (c_parser_omp_target_update): Likewise.
3885 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3886 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3887 name.
3888 (c_finish_omp_cancellation_point): Likewise.
3889 * gimple-parser.c: Do not include omp-low.h
3890
c5af52eb
CP
38912016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3892 James Norris <jnorris@codesourcery.com>
3893
3894 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3895 EXIT_DATA,WAIT} are not used in compound statements.
3896 (c_parser_oacc_enter_exit_data): Update diagnostics.
3897
48330c93
BE
38982016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3899
3900 PR c++/71973
3901 * c-decl.c (diagnose_mismatched_decls): Use
3902 OPT_Wbuiltin_declaration_mismatch here too.
3903
899ca90e 39042016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3905 Alan Hayward <alan.hayward@arm.com>
3906 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3907
3908 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3909 (make_label, finish_struct): Likewise.
3910
1ee62b92 39112016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3912 Richard Biener <rguenther@suse.de>
22b15758 3913
8e745a17
JJ
3914 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3915 * config-lang.in (gtfiles): Add c/c-parser.h.
3916 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3917 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3918 * c-parser.c (enum c_id_kind, struct c_token,
3919 c_parser_next_token_is, c_parser_next_token_is_not,
3920 c_parser_next_token_is_keyword,
3921 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3922 Split out to ...
3923 * c-parser.h: ... new header.
3924 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3925 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3926 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3927 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3928 c_parser_error, c_parser_require, c_parser_skip_until_found,
3929 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3930 c_parser_type_name): Export.
3931 (c_parser_tokens_buf): New function.
3932 (c_parser_error): Likewise.
3933 (c_parser_set_error): Likewise.
3934 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3935 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3936 via c_parser_parse_gimple_body.
8e745a17
JJ
3937 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3938 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3939 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3940 c_parser_error, c_parser_require, c_parser_skip_until_found,
3941 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3942 c_parser_type_name): Declare.
1ee62b92
PG
3943 (struct c_parser): Declare forward.
3944 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3945 (c_parser_error): Likewise.
3946 (c_parser_set_error): Likewise.
3947 * gimple-parser.c: New file.
3948 * gimple-parser.h: Likewise.
1ee62b92 3949
22b15758
UB
39502016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3951
3952 PR c/35503
3953 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3954 warn_for_restrict.
3955
84ff4775
LCW
39562016-09-11 Le-Chun Wu <lcwu@google.com>
3957 Mark Wielaard <mjw@redhat.com>
3958
3959 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3960 to the given -Wshadow= variant.
3961
4d0cdd0c
TP
39622016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3963
3964 * c-typeck.c: Include memmodel.h.
3965
1202f33e
JJ
39662016-10-13 Jakub Jelinek <jakub@redhat.com>
3967
3968 PR target/77957
3969 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3970 instead of lhd_return_null_tree_v.
3971
8a14afd0
BS
39722016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3973
3974 PR c++/69733
3975 * c-decl.c (smallest_type_quals_location): New static function.
3976 (grokdeclarator): Try to find the correct location for an ignored
3977 qualifier.
3978
81fea426
MP
39792016-09-26 Marek Polacek <polacek@redhat.com>
3980
3981 PR c/7652
3982 * c-decl.c (pop_scope): Add gcc_fallthrough.
3983
39842016-09-26 Marek Polacek <polacek@redhat.com>
3985
3986 PR c/7652
3987 * c-parser.c (struct c_token): Add flags field.
3988 (c_lex_one_token): Pass it to c_lex_with_flags.
3989 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3990 into IFN_FALLTHROUGH.
3991 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3992 attribute fallthrough after a case label or default label.
3993 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3994
9a2300e9
MP
39952016-09-24 Marek Polacek <polacek@redhat.com>
3996
3997 PR c/77490
3998 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3999 have boolean value. Warn about ++/-- on booleans.
4000
7de76362
JJ
40012016-09-23 Jakub Jelinek <jakub@redhat.com>
4002
4003 * c-parser.c (incomplete_record_decls): Remove unnecessary
4004 = vNULL initialization of file scope vec.
4005
5b73d2ab
MP
40062016-09-16 Marek Polacek <polacek@redhat.com>
4007
4008 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4009
e51fbec3
MP
40102016-09-14 Marek Polacek <polacek@redhat.com>
4011
4012 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4013 (fix_array_notation_expr): Likewise.
4014 * c-decl.c (finish_decl): Likewise.
4015 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4016 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4017 (function_to_pointer_conversion): Use false instead of 0.
4018 (convert_lvalue_to_rvalue): Likewise.
4019 (parser_build_unary_op): Likewise.
4020 (build_atomic_assign): Likewise.
4021 (build_unary_op): Change nonconvert parameter type to bool, use
4022 true/false instead of 1/0.
4023 (build_binary_op): Use true instead of 1.
4024
254830ba
DM
40252016-09-13 David Malcolm <dmalcolm@redhat.com>
4026
4027 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4028 of add_fixit_insert to add_fixit_insert_before.
4029
4c13ba17
MP
40302016-09-13 Marek Polacek <polacek@redhat.com>
4031
4032 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4033 it.
4034
54dcdb88
BE
40352016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4036
4037 PR c++/77496
4038 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4039 COMPOUND_EXPR to warn_for_omitted_condop.
4040
e5106e27
DM
40412016-09-07 David Malcolm <dmalcolm@redhat.com>
4042
4043 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4044 c_get_substring_location for this new langhook.
4045
9dc5773f
JJ
40462016-09-02 Jakub Jelinek <jakub@redhat.com>
4047
4048 PR c/65467
4049 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4050 flag_openmp.
4051 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4052 instead of mark_exp_read on low_bound/length expression.
4053 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4054 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4055 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4056 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4057 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4058 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4059 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4060 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4061 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4062 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4063 instead of mark_expr_read.
4064 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4065 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4066 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4067 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4068 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4069 array section bases outside of depend clause, for depend clause
4070 use convert_lvalue_to_rvalue on the base.
4071 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4072 linear, aligned, map, to and from clauses.
4073 (c_omp_clause_copy_ctor): New function.
4074
295844f6
MP
40752016-09-01 Marek Polacek <polacek@redhat.com>
4076
4077 PR c/7652
4078 * c-typeck.c (composite_type): Add FALLTHRU comment.
4079
089af25c
DM
40802016-08-31 David Malcolm <dmalcolm@redhat.com>
4081
4082 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4083 to the insertion fixits for "struct", "union", and "enum".
4084
f9087798
DM
40852016-08-30 David Malcolm <dmalcolm@redhat.com>
4086
4087 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4088 rather than add_fixit_misspelled_id.
4089 (undeclared_variable): Likewise.
4090 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4091 now-redundant "here" params from add_fixit_insert method calls.
4092 (c_parser_parameter_declaration): Likewise.
4093 * c-typeck.c (build_component_ref): Remove now-redundant range
4094 param from add_fixit_replace method calls.
4095
ebef225f
MP
40962016-08-25 Marek Polacek <polacek@redhat.com>
4097
4098 * c-typeck.c (parser_build_binary_op): Pass LHS to
4099 warn_logical_not_parentheses.
4100
fe377a48
MP
41012016-08-25 Marek Polacek <polacek@redhat.com>
4102
4103 PR c/77323
4104 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4105 or _FloatN or _FloatNx is not supported.
4106 (finish_declspecs): Set type to integer_type_node when _FloatN or
4107 _FloatNx is not supported.
4108
c65699ef
JM
41092016-08-19 Joseph Myers <joseph@codesourcery.com>
4110
4111 PR c/32187
4112 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4113 (struct c_declspecs): Add field floatn_nx_idx.
4114 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4115 and _FloatNx type specifiers.
4116 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4117 (c_parser_declspecs, c_parser_attribute_any_word)
4118 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4119 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4120 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4121 narrower than double.
4122
2f1364c2
JJ
41232016-08-12 Jakub Jelinek <jakub@redhat.com>
4124 Martin Liska <mliska@suse.cz>
4125
4126 PR c/67410
4127 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4128 % to determine val element to change. Assert that
4129 wchar_bytes * charwidth fits into val array.
4130
191816a3
MP
41312016-08-12 Marek Polacek <polacek@redhat.com>
4132
4133 PR c/7652
4134 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4135 (c_parser_postfix_expression): Likewise.
4136 * c-typeck.c (build_unary_op): Adjust fall through comment.
4137 (c_mark_addressable): Likewise.
4138
b95a64bb
JJ
41392016-08-11 Jakub Jelinek <jakub@redhat.com>
4140
4141 PR c/72816
4142 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4143 array member through typedef, for orig_qual_indirect == 0 clear
4144 orig_qual_type.
4145
895aa8e1
DM
41462016-08-08 David Malcolm <dmalcolm@redhat.com>
4147
4148 PR c/64955
4149 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4150 this up to selftest::run_c_tests.
4151 (selftest::run_c_tests): New function.
4152
0b212d8c
TS
41532016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4154
ae9281fc
TS
4155 * c-parser.c (struct oacc_routine_data): Add error_seen and
4156 fndecl_seen members.
4157 (c_finish_oacc_routine): Use these.
4158 (c_parser_declaration_or_fndef): Adjust.
4159 (c_parser_oacc_routine): Likewise. Support more C language
4160 constructs, and improve diagnostics. Move pragma context
4161 checking...
4162 (c_parser_pragma): ... here.
4163
0b212d8c
TS
4164 * c-parser.c (struct oacc_routine_data): New.
4165 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4166 Simplify code.
4167 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4168 declare target" attribute.
4169
76e2c821
JB
41702016-08-01 Jan Beulich <jbeulich@suse.com>
4171
4172 * c-fold.c (c_fully_fold_internal): Also emit shift count
4173 warnings for vector types.
4174 * c-typeck.c (build_binary_op): Likewise.
4175
f618a472
MP
41762016-07-29 Marek Polacek <polacek@redhat.com>
4177
4178 PR c/71742
4179 * c-decl.c (finish_struct): Rephrase an error message.
4180
efd0786f
MP
4181 PR c/71853
4182 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4183 to error node for invalid code.
4184
e00dceaf
MP
4185 PR c/71573
4186 * c-decl.c (implicitly_declare): Return decl early not only for
4187 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4188
673a107a
JJ
41892016-07-29 Jakub Jelinek <jakub@redhat.com>
4190
4191 PR c/71969
4192 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4193 on GNU extern inline functions.
4194
a5b5c8b6
MP
41952016-07-29 Marek Polacek <polacek@redhat.com>
4196
4197 PR c/71583
4198 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4199 check expr.value.
4200
e3fe09c1
UB
42012016-07-22 Uros Bizjak <ubizjak@gmail.com>
4202
4203 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4204
7c8f7eaa
DM
42052016-07-20 David Malcolm <dmalcolm@redhat.com>
4206
4207 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4208 spellcheck-tree.h
4209 (best_macro_match): Likewise, converting from a typedef to a
4210 subclass.
4211 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4212 (lookup_name_fuzzy): Update for change of best_macro_match to a
4213 subclass with a ctor that calls cpp_forall_identifiers.
4214
de6a69ee
DM
42152016-07-20 David Malcolm <dmalcolm@redhat.com>
4216
4217 * c-decl.c (implicit_decl_warning): Update for conversion of
4218 return type of lookup_name_fuzzy to const char *.
4219 (undeclared_variable): Likewise.
4220 (lookup_name_fuzzy): Convert return type from tree to
4221 const char *.
4222 * c-parser.c (c_parser_declaration_or_fndef): Update for
4223 conversion of return type of lookup_name_fuzzy to const char *.
4224 (c_parser_parameter_declaration): Likewise.
4225
b1c9c068
CP
42262016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4227
4228 * c-parser.c (c_parser_oacc_declare): Don't scan for
4229 GOMP_MAP_POINTER.
4230 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4231 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4232 zero-length subarrays.
4233
ddbbcb19
JJ
42342016-07-15 Jakub Jelinek <jakub@redhat.com>
4235
4236 PR c/71858
4237 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4238 instead of FUZZY_LOOKUP_NAME.
4239 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4240 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4241
dd36b877
JJ
42422016-07-14 Jakub Jelinek <jakub@redhat.com>
4243
4244 PR c/71858
4245 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4246
8c681247
TS
42472016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4248
4249 * c-parser.c (c_parser_generic_selection): Make type of variable
4250 auto_vec.
4251 (c_parser_omp_declare_simd): Likewise.
4252
bf4fa671
TS
42532016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4254
4255 * c-decl.c (struct c_struct_parse_info): Change member types
4256 from vec to auto_vec.
4257 (start_struct): Adjust.
4258 (finish_struct): Likewise.
4259
557e8c49
JJ
42602016-07-02 Jakub Jelinek <jakub@redhat.com>
4261
4262 PR c/71719
4263 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4264
54d19c3b
TS
42652016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4266
4267 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4268 Move pragma context checking into...
4269 (c_parser_omp_cancellation_point): ... here, and improve
4270 diagnostic messages.
4271 * c-typeck.c (c_finish_omp_cancel)
4272 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4273
152ef731
JJ
42742016-06-29 Jakub Jelinek <jakub@redhat.com>
4275
4276 PR c/71685
4277 * c-typeck.c (c_build_qualified_type): Don't clear
4278 C_TYPE_INCOMPLETE_VARS for the main variant.
4279
42802016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4281
4282 PR c/71552
4283 * c-typeck.c (output_init_element): Diagnose incompatible types
4284 before non-constant initializers.
4285
e9ac1f86
JJ
42862016-06-28 Jakub Jelinek <jakub@redhat.com>
4287
4288 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4289
277d7ee0
AK
42902016-06-23 Andi Kleen <ak@linux.intel.com>
4291
4292 * Make-lang.in: Add support for autofdo.
4293
1a4f11c8
DM
42942016-06-22 David Malcolm <dmalcolm@redhat.com>
4295
4296 PR c/70339
4297 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4298 (implicit_decl_warning): When issuing warnings for implicit
4299 declarations, attempt to provide a suggestion via
4300 lookup_name_fuzzy.
4301 (undeclared_variable): Likewise when issuing errors.
4302 (lookup_name_in_scope): Likewise.
4303 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4304 (best_macro_match): New typedef.
4305 (find_closest_macro_cpp_cb): New function.
4306 (lookup_name_fuzzy): New function.
4307 * c-parser.c: Include gcc-rich-location.h.
4308 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4309 (c_keyword_starts_typename): ...this new function.
4310 (c_parser_declaration_or_fndef): When issuing errors about
4311 missing "struct" etc, add a fixit. For other kinds of errors,
4312 attempt to provide a suggestion via lookup_name_fuzzy.
4313 (c_parser_parms_declarator): When looking ahead to detect typos in
4314 type names, also reject CPP_KEYWORD.
4315 (c_parser_parameter_declaration): When issuing errors about
4316 unknown type names, attempt to provide a suggestion via
4317 lookup_name_fuzzy.
4318 * c-tree.h (c_keyword_starts_typename): New prototype.
4319
5a578671
JM
43202016-06-20 Joseph Myers <joseph@codesourcery.com>
4321
4322 PR c/71601
4323 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4324 c_common_type returns error_mark_node.
4325
3f8257db 43262016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4327
4328 PR c/69507
4329 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4330 __alignof__ (expression).
4331
6a3f203c
DM
43322016-06-14 David Malcolm <dmalcolm@redhat.com>
4333
4334 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4335
264757fb
DM
43362016-06-14 David Malcolm <dmalcolm@redhat.com>
4337
4338 * c-typeck.c (build_component_ref): Simplify fixit code by
4339 using gcc_rich_location::add_fixit_misspelled_id.
4340 (set_init_label): Likewise.
4341
f7e4f2e3
DM
43422016-06-13 David Malcolm <dmalcolm@redhat.com>
4343
4344 * c-parser.c (c_parser_initelt): Provide location of name for new
4345 location_t param of set_init_label.
4346 * c-tree.h (set_init_label): Add location_t param.
4347 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4348 param and use it when issuing error messages about unrecognized
4349 field names. Attempt to provide a fixit hint if appropriate,
4350 otherwise update the error message to provide the type name.
4351
4b1ffdb1
TS
43522016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4353
4354 PR c/71381
4355 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4356 Loosen checking.
4357
44a845ca
MS
43582016-06-08 Martin Sebor <msebor@redhat.com>
4359 Jakub Jelinek <jakub@redhat.com>
4360
4361 PR c++/70507
4362 PR c/68120
4363 * c-typeck.c (convert_arguments): Don't promote last argument
4364 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4365
92a5f2ba
MP
43662016-06-08 Marek Polacek <polacek@redhat.com>
4367
4368 PR c/71418
4369 * c-decl.c (grokdeclarator): Check TYPE_P.
4370
08203f73
MP
4371 PR c/71426
4372 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4373 code.
4374
6ffd47b7
DM
43752016-06-07 David Malcolm <dmalcolm@redhat.com>
4376
4377 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4378 and structure element reference, capture the location of the
4379 element name token and pass it to build_component_ref.
4380 (c_parser_postfix_expression_after_primary): Likewise for
4381 structure element dereference.
4382 (c_parser_omp_variable_list): Likewise for
4383 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4384 * c-tree.h (build_component_ref): Add location_t param.
4385 * c-typeck.c (build_component_ref): Add location_t param
4386 COMPONENT_LOC. Use it, if available, when issuing hints about
4387 mispelled member names to provide a fixit replacement hint.
4388
1f40cff3
MP
43892016-06-06 Marek Polacek <polacek@redhat.com>
4390
4391 PR c/71362
4392 * c-parser.c (c_parser_direct_declarator): Set location.
4393
5545a907
MP
43942016-06-06 Marek Polacek <polacek@redhat.com>
4395
4396 * c-typeck.c (comptypes_internal): Handle comparisons of
4397 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4398 TYPE_REF_CAN_ALIAS_ALL.
4399
b605f663
CLT
44002016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4401
4402 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4403 arguments as addressable when async clause exists.
4404
00631022
JJ
44052016-05-30 Jakub Jelinek <jakub@redhat.com>
4406
4407 PR c++/71349
4408 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4409 when combined with target construct.
4410
7211a097
JJ
44112016-05-26 Jakub Jelinek <jakub@redhat.com>
4412
4413 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4414 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4415
95efe6b6
MP
44162016-05-25 Marek Polacek <polacek@redhat.com>
4417
4418 PR c/71265
4419 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4420
a23faf7a
MP
4421 PR c/71266
4422 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4423
e46c7770
CP
44242016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4425
4426 * c-parser.c (c_parser_oacc_declare): Add support for
4427 GOMP_MAP_FIRSTPRIVATE_POINTER.
4428 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4429 argument with enum c_omp_region_type ort.
4430 (handle_omp_array_sections): Likewise. Update call to
4431 handle_omp_array_sections_1.
4432 (c_finish_omp_clauses): Add specific errors and warning messages for
4433 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4434 call to handle_omp_array_sections.
4435
a04e69c0
TS
44362016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4437
4438 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4439
f17a223d
RB
44402016-05-24 Richard Biener <rguenther@suse.de>
4441
4442 PR middle-end/70434
4443 PR c/69504
4444 * c-typeck.c (build_array_ref): Do not complain about indexing
4445 non-lvalue vectors. Adjust for function name change.
4446
79063edd
MS
44472016-05-20 Martin Sebor <msebor@redhat.com>
4448
4449 PR c/71115
4450 * c-typeck.c (error_init): Use
4451 expansion_point_location_if_in_system_header.
4452 (warning_init): Same.
4453
8a40fef3
DM
44542016-05-19 David Malcolm <dmalcolm@redhat.com>
4455
4456 PR c/71171
4457 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4458 in error-handling.
4459 (c_parser_postfix_expression): Likewise.
4460 * c-tree.h (c_expr::set_error): New method.
4461 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4462 that result's range is initialized.
4463
e9892350
JG
44642016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4465
4466 * c-typeck.c (parser_build_unary_op): Fix formatting.
4467
8fad45f5
MW
44682016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4469
4470 * c-decl.c (grokdeclarator): Remove errmsg and use of
4471 targetm.invalid_return_type.
4472 (grokparms): Remove errmsg and use of
4473 targetm.invalid_parameter_type.
4474
aa4b467b
JM
44752016-05-13 Joseph Myers <joseph@codesourcery.com>
4476
4477 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4478 function return type.
4479
4f2e1536
MP
44802016-05-12 Marek Polacek <polacek@redhat.com>
4481
4482 PR c/70756
4483 * c-decl.c (build_compound_literal): Pass LOC down to
4484 c_incomplete_type_error.
4485 * c-tree.h (require_complete_type): Adjust declaration.
4486 (c_incomplete_type_error): Likewise.
4487 * c-typeck.c (require_complete_type): Add location parameter, pass it
4488 down to c_incomplete_type_error.
4489 (c_incomplete_type_error): Add location parameter, pass it down to
4490 error_at.
4491 (build_component_ref): Pass location down to c_incomplete_type_error.
4492 (default_conversion): Pass location down to require_complete_type.
4493 (build_array_ref): Likewise.
4494 (build_function_call_vec): Likewise.
4495 (convert_arguments): Likewise.
4496 (build_unary_op): Likewise.
4497 (build_c_cast): Likewise.
4498 (build_modify_expr): Likewise.
4499 (convert_for_assignment): Likewise.
4500 (c_finish_omp_clauses): Likewise.
4501
d6e83a8d
MM
45022016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4503
4504 PR c/43651
4505 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4506 is enabled.
4507 * c-errors.c (pedwarn_c90): Return true if warned.
4508 * c-tree.h (pedwarn_c90): Change return type to bool.
4509 (enum c_declspec_word): Add new enumerator cdw_atomic.
4510
5c3a10fb
MP
45112016-05-11 Marek Polacek <polacek@redhat.com>
4512
4513 PR c++/71024
4514 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4515 diagnose_mismatched_attributes and call it.
4516
cf68d92c
MP
45172016-05-10 Marek Polacek <polacek@redhat.com>
4518
4519 PR c/70255
4520 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4521 on a declaration following the definition.
4522
351f85c5
JJ
45232016-05-05 Jakub Jelinek <jakub@redhat.com>
4524
4525 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4526 parse it through to c_parser_c99_block_statement.
4527 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4528 caller.
4529
deef7113
MP
45302016-05-04 Marek Polacek <polacek@redhat.com>
4531
4532 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4533 OPT_Wdangling_else.
4534
de55efd5
MP
45352016-05-04 Marek Polacek <polacek@redhat.com>
4536
4537 PR c/48778
4538 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4539 for macro expansions.
4540
79ce98bc
MP
45412016-05-03 Marek Polacek <polacek@redhat.com>
4542
4543 PR c/70859
4544 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4545 check_builtin_function_arguments.
4546
fb2647aa
RB
45472016-05-03 Richard Biener <rguenther@suse.de>
4548
4549 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4550 the checksum from the previous stage.
4551
77886428
CP
45522016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4553
4554 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4555 c_finish_omp_clauses.
4556 (c_parser_omp_all_clauses): Likewise.
4557 (c_parser_oacc_cache): Likewise.
4558 (c_parser_oacc_loop): Likewise.
4559 (omp_split_clauses): Likewise.
4560 (c_parser_omp_declare_target): Likewise.
4561 (c_parser_cilk_all_clauses): Likewise.
4562 (c_parser_cilk_for): Likewise.
4563 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4564 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4565
7176a4a0
MP
45662016-05-02 Marek Polacek <polacek@redhat.com>
4567
4568 PR c/70851
4569 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4570 incomplete type.
4571
e7ff0319
CP
45722016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4573
4574 PR middle-end/70626
4575 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4576 OACC_LOOP_CLAUSE_MASK.
4577 (c_parser_oacc_kernels_parallel): Update call to
4578 c_oacc_split_loop_clauses.
4579
9f405ce1
AM
45802016-04-28 Andrew MacLeod <amacleod@redhat.com>
4581
4582 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4583 argument to build_modify_expr in two cases.
4584
c1e1f433
BS
45852016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4586
4587 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4588 warn_for_memset instead of warning directly here.
4589
2448a956
MP
45902016-04-26 Marek Polacek <polacek@redhat.com>
4591
4592 PR c/67784
4593 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4594 out of ...
4595 (c_parser_for_statement): ... here.
4596 (c_parser_if_statement): Use it.
4597 (c_parser_switch_statement): Use it.
4598 (c_parser_while_statement): Use it.
4599
b02a5e26
MP
4600 PR c/70791
4601 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4602
477d4906
IV
46032016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4604
4605 PR c++/69363
4606 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4607 instead of c_finish_cilk_clauses.
4608 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4609 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4610 floating-point variables in the linear clause for Cilk Plus.
4611
fe37c7af
MM
46122016-04-18 Michael Matz <matz@suse.de>
4613
4614 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4615 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4616
949505a9
MP
46172016-04-15 Marek Polacek <polacek@redhat.com>
4618
4619 PR c/70671
4620 * c-typeck.c (build_unary_op): Pass location down to error and
4621 warning call.
4622
dda1bf61
JJ
46232016-04-15 Jakub Jelinek <jakub@redhat.com>
4624
4625 PR c/70436
4626 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4627 where needed.
4628 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4629 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4630 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4631 Adjust c_parser_pragma callers.
4632 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4633 caller.
4634 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4635 c_parser_statement.
4636 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4637 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4638 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4639 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4640 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4641 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4642 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4643 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4644 down where needed.
4645 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4646 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4647 calls.
4648
99cd9857
MP
46492016-04-13 Marek Polacek <polacek@redhat.com>
4650
4651 PR c/70436
4652 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4653 adjust callers.
4654 (c_parser_statement): Likewise.
4655 (c_parser_c99_block_statement): Likewise.
4656 (c_parser_while_statement): Likewise.
4657 (c_parser_for_statement): Likewise.
4658 (c_parser_if_body): Don't set IF_P here.
4659 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4660 about dangling else here.
4661 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4662 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4663 warn about dangling else here.
4664
f13355da
MP
46652016-04-04 Marek Polacek <polacek@redhat.com>
4666
4667 PR c/70307
4668 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4669
5fde6a45
MP
46702016-03-31 Marek Polacek <polacek@redhat.com>
4671
4672 PR c/70297
4673 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4674
4bbf545b
DM
46752016-03-18 David Malcolm <dmalcolm@redhat.com>
4676
4677 PR c/70281
4678 * c-parser.c (c_parser_postfix_expression): Set the source range
4679 for uses of "__builtin_types_compatible_p".
4680
fcc2b74f
JJ
46812016-03-17 Jakub Jelinek <jakub@redhat.com>
4682
4683 PR c/70280
4684 * c-typeck.c (composite_type): Don't count void_list_node
4685 into len, if the list is terminated by void_list_node, start
4686 with void_list_node instead of NULL for newargs. Stop
4687 at void_list_node.
4688
ab4c578f
MP
46892016-03-16 Marek Polacek <polacek@redhat.com>
4690
4691 PR c/70093
4692 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4693 nested functions returning VM types.
4694
96b3c82d
CP
46952016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4696
4697 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4698 when calling c_finish_omp_clauses.
4699
29b9828f
BS
47002016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4701
4702 PR c/69824
4703 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4704 for later.
4705
7ff6ca38
MP
47062016-03-04 Marek Polacek <polacek@redhat.com>
4707
4708 PR c/69798
4709 * c-parser.c (c_parser_postfix_expression): Call
4710 c_parser_cast_expression rather than c_parser_postfix_expression.
4711
686e2237
JJ
47122016-03-01 Jakub Jelinek <jakub@redhat.com>
4713
4714 PR c/69796
4715 PR c/69974
4716 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4717 of incomplete decls to error_mark_node.
4718
0b05329b
MP
47192016-02-24 Marek Polacek <polacek@redhat.com>
4720
4721 PR c/69819
4722 * c-decl.c (finish_decl): Don't update the copy of the type of a
4723 different decl type.
4724
067fbd8b
JJ
47252016-02-23 Jakub Jelinek <jakub@redhat.com>
4726
4727 PR objc/69844
4728 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4729 in id_kind reclassification.
4730
bf14eba2
JJ
47312016-02-16 Jakub Jelinek <jakub@redhat.com>
4732
4733 PR c/69835
4734 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4735
ba539195
JN
47362016-02-16 James Norris <jnorris@codesourcery.com>
4737
4738 PR c/64748
4739 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4740
16595a1f
BS
47412016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4742
f48dfe98
BS
4743 * c-decl.c (build_null_declspecs): Zero the entire struct.
4744
16595a1f
BS
4745 PR c/69522
4746 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4747 callers changed. If nested_p is true, use it to call
4748 finish_implicit_inits.
4749 * c-tree.h (finish_implicit_inits): Declare.
4750 * c-typeck.c (finish_implicit_inits): New function. Move code
4751 from ...
4752 (push_init_level): ... here.
4753 (set_designator, process_init_element): Call finish_implicit_inits.
4754
66756373
JJ
47552016-02-11 Jakub Jelinek <jakub@redhat.com>
4756
4757 PR c/69768
4758 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4759 arguments for -Waddress warning.
4760
1066e9b5
JJ
47612016-02-04 Jakub Jelinek <jakub@redhat.com>
4762
4763 PR c/69669
4764 * c-decl.c (finish_enum): When honoring mode attribute,
4765 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4766
3a5d2ba4
JJ
47672016-01-29 Jakub Jelinek <jakub@redhat.com>
4768
4769 PR debug/69518
4770 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4771 all type variants, not just TYPE_MAIN_VARIANT.
4772
cbdd8ae0
JJ
47732016-01-27 Jakub Jelinek <jakub@redhat.com>
4774
4775 PR debug/66869
4776 * c-decl.c (c_write_global_declarations_1): Warn with
4777 warn_unused_function if static prototype without definition
4778 is not C_DECL_USED.
4779
fa74a4bc
MP
47802016-01-27 Marek Polacek <polacek@redhat.com>
4781
4782 PR c/68062
4783 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4784 to unsigned, if needed. Add -Wsign-compare warning.
4785
13f92e8d
JJ
47862016-01-26 Jakub Jelinek <jakub@redhat.com>
4787
4788 PR tree-optimization/69483
4789 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4790
cd8e73dc 47912016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4792
4793 PR c/24293
4794 * c-tree.h (incomplete_record_decls): Declare.
4795 * c-parser.c (incomplete_record_decls): Define.
4796 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4797 report error if any decl has zero size.
4798 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4799 or enum type to incomplete_record_decls.
4800
e6d6ec9e
TV
48012016-01-14 Tom de Vries <tom@codesourcery.com>
4802
4803 PR tree-optimization/68773
4804 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4805 set force_output.
4806
00083992
MP
48072016-01-14 Marek Polacek <polacek@redhat.com>
4808
4809 PR c/69262
4810 * c-decl.c (grokdeclarator): Provide more information for invalid
4811 array declarations.
4812
7443cf13
DM
48132016-01-06 David Malcolm <dmalcolm@redhat.com>
4814
4815 * c-parser.c (c_parser_unary_expression): For dereferences, build
4816 a combined location before calling build_indirect_ref, so that
4817 error reports cover the full range, manually updating the c_expr
4818 src_range.
4819
6b131d5b
MP
48202016-01-06 Marek Polacek <polacek@redhat.com>
4821
4822 PR sanitizer/69099
4823 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4824 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4825 NULL.
4826
818ab71a
JJ
48272016-01-04 Jakub Jelinek <jakub@redhat.com>
4828
4829 Update copyright years.
4830
2fe0a208
MP
48312016-01-04 Marek Polacek <polacek@redhat.com>
4832
4833 PR c/68908
4834 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4835 optimization to use __atomic_fetch_* built-in if possible.
4836
c7b48c8a
TS
48372015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4838
4839 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4840 into...
4841 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4842 all users.
4843
fda5652f
MP
48442015-12-22 Marek Polacek <polacek@redhat.com>
4845
4846 PR c/69002
4847 * c-typeck.c (build_component_ref): Warn when acessing elements of
4848 atomic structures or unions.
4849
745e411d
DM
48502015-12-21 David Malcolm <dmalcolm@redhat.com>
4851
4852 * c-typeck.c: Include "gcc-rich-location.h".
4853 (build_binary_op): In the two places that call binary_op_error,
4854 create a gcc_rich_location and populate it with the location of
4855 the binary op and its two operands.
4856
94c40e19
DM
48572015-12-16 David Malcolm <dmalcolm@redhat.com>
4858
4859 * c-parser.c (c_parser_statement_after_labels): When calling
4860 c_finish_return, Use the return expression's location if it has
4861 one, falling back to the location of the first token within it.
4862 * c-typeck.c (c_finish_return): When issuing warnings about
4863 the incorrect presence/absence of a return value, issue a note
4864 showing the declaration of the function.
4865
de67c4c3
DM
48662015-12-16 David Malcolm <dmalcolm@redhat.com>
4867
4868 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4869 to 4.
4870 (c_parser_peek_nth_token): New function.
4871 (c_parser_peek_conflict_marker): New function.
4872 (c_parser_error): Detect conflict markers and report them as such.
4873
a10704e1
DM
48742015-12-16 David Malcolm <dmalcolm@redhat.com>
4875
4876 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4877 to preserve range information for the primary expression
4878 in the call to c_parser_postfix_expression_after_primary.
4879
8062bca6
DM
48802015-12-16 David Malcolm <dmalcolm@redhat.com>
4881
4882 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4883 expression location, falling back on the first token location,
4884 rather than always using the latter.
4885
d06f8b75
MP
48862015-12-16 Marek Polacek <polacek@redhat.com>
4887
4888 PR c/64637
4889 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4890 available.
4891
2994fb91
MP
48922015-12-15 Marek Polacek <polacek@redhat.com>
4893
4894 PR c/68907
4895 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4896 artificial decl.
4897
a1b93f8d
DM
48982015-12-08 David Malcolm <dmalcolm@redhat.com>
4899
4900 * c-parser.c (c_parser_alignof_expression): Capture location of
4901 closing parenthesis (if any), or of end of unary expression, and
4902 use it to build a src_range for the expression.
4903
46c6e1e2
DM
49042015-12-08 David Malcolm <dmalcolm@redhat.com>
4905
4906 PR c/68757
4907 * c-parser.c (c_parser_get_builtin_args): Add
4908 "out_close_paren_loc" param, and write back to it.
4909 (c_parser_postfix_expression): Capture the closing
4910 parenthesis location for RID_CHOOSE_EXPR,
4911 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4912 RID_BUILTIN_SHUFFLE and use it to set the source range
4913 for such expressions; within RID_BUILTIN_COMPLEX set
4914 the underlying location.
4915
66189108
MP
49162015-12-07 Marek Polacek <polacek@redhat.com>
4917
4918 PR c/68668
4919 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4920 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4921
f187980b
EB
49222015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4923
4924 * c-tree.h (c_build_va_arg): Adjust prototype.
4925 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4926 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4927 parameter, adjust throughout and issue an error if EXPR is a component
4928 with reverse storage order.
4929
4250754e
JM
49302015-12-02 Jason Merrill <jason@redhat.com>
4931
4932 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4933 (c_fully_fold_internal, decl_constant_value_for_optimization):
4934 Move from c-common.c.
4935 * c-tree.h: Declare decl_constant_value_for_optimization.
4936 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4937
e9e32ee6
JM
49382015-12-02 Joseph Myers <joseph@codesourcery.com>
4939
4940 PR c/68162
4941 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4942 following link from declarator to next declarator. Track original
4943 qualified type and pass it to c_build_qualified_type.
4944 * c-typeck.c (c_build_qualified_type): Add arguments
4945 orig_qual_type and orig_qual_indirect.
4946
ff7a55bf
TS
49472015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4948
4949 * c-parser.c (c_parser_omp_clause_name)
4950 (c_parser_oacc_all_clauses): Alphabetical sorting.
4951
657e4e47
JJ
49522015-12-02 Jakub Jelinek <jakub@redhat.com>
4953
4954 PR c/68533
4955 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4956 for diagnostics.
4957
37d5ad46
JB
49582015-12-01 Julian Brown <julian@codesourcery.com>
4959 Cesar Philippidis <cesar@codesourcery.com>
4960 James Norris <James_Norris@mentor.com>
4961
4962 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4963 (c_parser_oacc_clause_use_device): New function.
4964 (c_parser_oacc_all_clauses): Add use_device support.
4965 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4966 (c_parser_oacc_host_data): New function.
4967 (c_parser_omp_construct): Add host_data support.
4968 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4969 * c-typeck.c (c_finish_oacc_host_data): New function.
4970 (c_finish_omp_clauses): Add use_device support.
4971
a4850ce9
JH
49722015-11-29 Jan Hubicka <hubicka@ucw.cz>
4973
4974 PR c/67106
4975 * c-decl.c: Set TYPE_PACKED in variants.
4976
b58d3df2
ML
49772015-11-27 Martin Liska <mliska@suse.cz>
4978
4979 PR c++/68312
4980 * c-array-notation.c (fix_builtin_array_notation_fn):
4981 Use release_vec_vec instead of vec::release.
4982 (build_array_notation_expr): Likewise.
4983 (fix_conditional_array_notations_1): Likewise.
4984 (fix_array_notation_expr): Likewise.
4985 (fix_array_notation_call_expr): Likewise.
4986
aec17bfe
JJ
49872015-11-27 Jakub Jelinek <jakub@redhat.com>
4988
4989 PR c/63326
4990 * c-parser.c (c_parser_compound_statement_nostart): If
4991 last_label is true, use pragma_stmt instead of pragma_compound
4992 as second c_parser_pragma argument.
4993 (c_parser_omp_ordered, c_parser_omp_target_update,
4994 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4995 false as second argument to c_parser_skip_to_pragma_eol after
4996 diagnosing standalone directives used in pragma_stmt context.
4997
688c4de0
IV
49982015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4999
5000 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5001 with "if (ENABLE_OFFLOADING)".
5002
cbd03aee
DM
50032015-11-23 David Malcolm <dmalcolm@redhat.com>
5004
5005 PR objc/68438
5006 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5007 for various Objective-C constructs: Class.name syntax,
5008 @selector(), @protocol(), @encode(), and [] message syntax.
5009
a87a86e1
DM
50102015-11-20 David Malcolm <dmalcolm@redhat.com>
5011
5012 PR 62314
5013 * c-typeck.c (should_suggest_deref_p): New function.
5014 (build_component_ref): Special-case POINTER_TYPE when
5015 generating a "not a structure of union" error message, and
5016 suggest a "->" rather than a ".", providing a fix-it hint.
5017
8ece8dfb
DM
50182015-11-19 David Malcolm <dmalcolm@redhat.com>
5019
5020 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5021 candidate into a new function, find_closest_identifier.
5022
433068cc
MP
50232015-11-19 Marek Polacek <polacek@redhat.com>
5024
5025 PR c/68412
5026 * c-typeck.c (parser_build_binary_op): Properly handle
5027 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5028
bef08b71
DM
50292015-11-17 David Malcolm <dmalcolm@redhat.com>
5030
5031 * c-parser.c (set_c_expr_source_range): Bulletproof both
5032 overloaded implementations against NULL expr->value.
5033 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5034 values.
5035 (c_parser_unary_expression): Likewise when handling addresses of
5036 labels.
5037 (c_parser_postfix_expression): Likewise for statement expressions,
5038 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5039 __builtin_va_arg, and for __builtin_offset_of.
5040 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5041 src_range using the range of the braced initializer.
5042 (c_parser_transaction_expression): Set src_range for "ret" to a
5043 sane pair of values.
5044
fff77217
KY
50452015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5046
5047 * c-parser.c (c_finish_omp_declare_simd): Look for
5048 "simd" attribute as well. Update error message.
5049
1d899da2
TS
50502015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5051
5052 * c-parser.c (c_parser_omp_declare_target): Adjust.
5053
e4606348
JJ
50542015-11-14 Jakub Jelinek <jakub@redhat.com>
5055
5056 * c-typeck.c (c_finish_omp_clauses): Don't mark
5057 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5058
3e636daf
MP
50592015-11-14 Marek Polacek <polacek@redhat.com>
5060
5061 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5062 * c-typeck.c: Likewise.
5063
ebedc9a3
DM
50642015-11-13 David Malcolm <dmalcolm@redhat.com>
5065
5066 * c-decl.c (warn_defaults_to): Pass line_table to
5067 rich_location ctor.
5068 * c-errors.c (pedwarn_c99): Likewise.
5069 (pedwarn_c90): Likewise.
5070 * c-parser.c (set_c_expr_source_range): New functions.
5071 (c_token::get_range): New method.
5072 (c_token::get_finish): New method.
5073 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5074 based on the range from the start of the LHS to the end of the
5075 RHS.
5076 (c_parser_conditional_expression): Likewise, based on the range
5077 from the start of the cond.value to the end of exp2.value.
5078 (c_parser_binary_expression): Call set_c_expr_source_range on
5079 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5080 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5081 based on the cast_loc through to the end of the expr.
5082 (c_parser_unary_expression): Likewise, based on the
5083 op_loc through to the end of op.
5084 (c_parser_sizeof_expression) Likewise, based on the start of the
5085 sizeof token through to either the closing paren or the end of
5086 expr.
5087 (c_parser_postfix_expression): Likewise, using the token range,
5088 or from the open paren through to the close paren for
5089 parenthesized expressions.
5090 (c_parser_postfix_expression_after_primary): Likewise, for
5091 various kinds of expression.
5092 * c-tree.h (struct c_expr): Add field "src_range".
5093 (c_expr::get_start): New method.
5094 (c_expr::get_finish): New method.
5095 (set_c_expr_source_range): New decls.
5096 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5097 on ret for prefix unary ops.
5098 (parser_build_binary_op): Likewise, running from the start of
5099 arg1.value through to the end of arg2.value.
5100
ec8b536f
MP
51012015-11-13 Marek Polacek <polacek@redhat.com>
5102
5103 PR c/68320
5104 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5105
277fe616
DM
51062015-11-13 David Malcolm <dmalcolm@redhat.com>
5107
5108 * c-typeck.c: Include spellcheck.h.
5109 (lookup_field_fuzzy_find_candidates): New function.
5110 (lookup_field_fuzzy): New function.
5111 (build_component_ref): If the field was not found, try using
5112 lookup_field_fuzzy and potentially offer a suggestion.
5113
6e232ba4
JN
51142015-11-12 James Norris <jnorris@codesourcery.com>
5115 Joseph Myers <joseph@codesourcery.com>
5116
5117 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5118 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5119 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5120 and PRAGMA_OMP_CLAUSE_LINK.
5121 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5122 and PRAGMA_OACC_CLAUSE_LINK.
5123 (OACC_DECLARE_CLAUSE_MASK): New definition.
5124 (c_parser_oacc_declare): New function.
5125
9be4f715
MP
51262015-11-12 Marek Polacek <polacek@redhat.com>
5127
5128 PR c/67784
5129 * c-parser.c (c_parser_for_statement): Reclassify the token in
5130 a correct scope.
5131
e78bede6
MP
51322015-11-11 Marek Polacek <polacek@redhat.com>
5133
5134 PR c/68107
5135 PR c++/68266
5136 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5137 checking the size of an array.
5138
69f293c9
AM
51392015-11-11 Andrew MacLeod <amacleod@redhat.com>
5140
5141 * c-array-notation.c: Remove unused header files.
5142 * c-aux-info.c: Likewise.
5143 * c-convert.c: Likewise.
5144 * c-decl.c: Likewise.
5145 * c-errors.c: Likewise.
5146 * c-lang.c: Likewise.
5147 * c-objc-common.c: Likewise.
5148 * c-parser.c: Likewise.
5149 * c-typeck.c: Likewise.
5150 * gccspec.c: Likewise.
5151
3a40d81d
NS
51522015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5153 Cesar Philippidis <cesar@codesourcery.com>
5154 James Norris <jnorris@codesourcery.com>
5155 Julian Brown <julian@codesourcery.com>
5156 Nathan Sidwell <nathan@codesourcery.com>
5157
3a40d81d
NS
5158 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5159 routine arg.
5160 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5161 (c_parser_pragma): Parse 'acc routine'.
5162 (OACC_ROUTINE_CLAUSE_MARK): Define.
5163 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5164
fc402eec
AA
51652015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5166
5167 PR debug/67192
5168 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5169 location of the backward-goto to the start of the loop body.
5170
f6b0b3db
AA
51712015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5172
5173 PR debug/67192
5174 * c-parser.c (c_parser_while_statement): Finish the loop before
5175 parsing ahead for misleading indentation.
5176 (c_parser_for_statement): Likewise.
5177
ee45a32d
EB
51782015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5179
5180 * c-decl.c (finish_struct): If the structure has reverse storage
5181 order, rewrite the type of array fields with scalar component. Call
5182 maybe_apply_pragma_scalar_storage_order on entry.
5183 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5184 errors on bit-fields and reverse SSO here and not...
5185 (c_mark_addressable): ...here.
5186 (output_init_element): Adjust call to initializer_constant_valid_p.
5187 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5188
8a645150
DM
51892015-11-06 David Malcolm <dmalcolm@redhat.com>
5190
5191 * c-decl.c (warn_defaults_to): Update for change in signature
5192 of diagnostic_set_info.
5193 * c-errors.c (pedwarn_c99): Likewise.
5194 (pedwarn_c90): Likewise.
5195 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5196 for textinfo::set_location.
5197
7a5e4956
CP
51982015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5199 Thomas Schwinge <thomas@codesourcery.com>
5200 James Norris <jnorris@codesourcery.com>
5201
5202 * c-parser.c (c_parser_omp_clause_name): Add support for
5203 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5204 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5205 default(none) in OpenACC.
5206 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5207 arguments.
5208 (c_parser_oacc_clause_tile): New function.
5209 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5210 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5211 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5212 TILE}.
5213 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5214 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5215 FIRSTPRIVATE}.
5216 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5217 (c_parser_oacc_update): Update the error message for missing clauses.
5218 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5219 and OMP_CLAUSE_INDEPENDENT.
5220
bfcfbfa0
MP
52212015-11-05 Marek Polacek <polacek@redhat.com>
5222
5223 PR c/68090
5224 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5225 deal with pre-evaluation on invalid types.
5226
e01d41e5
JJ
52272015-11-05 Jakub Jelinek <jakub@redhat.com>
5228 Ilya Verbin <ilya.verbin@intel.com>
5229
5230 * c-parser.c: Include context.h and gimple-expr.h.
5231 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5232 monotonic together with nonmonotonic.
5233 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5234 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5235 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5236 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5237 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5238 expressions on combined target teams before the target.
5239 (c_parser_omp_declare_target): If decl has "omp declare target" or
5240 "omp declare target link" attribute, and cgraph or varpool node already
5241 exists, then set corresponding flags. Call c_finish_omp_clauses
5242 in the parenthesized extended-list syntax case.
5243 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5244 declare target.
5245 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5246 on OMP_CLAUSE_REDUCTION array sections.
5247 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5248 into the constant offset, or for variable low-bound using
5249 POINTER_PLUS_EXPR. For structure element based array sections use
5250 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5251 (c_finish_omp_clauses): Drop generic_field_head, structure
5252 elements are now always mapped even as array section bases,
5253 diagnose same var in data sharing and mapping clauses. Diagnose if
5254 linear step on declare simd is neither a constant nor a uniform
5255 parameter. Look through POINTER_PLUS_EXPR for array section
5256 reductions. Diagnose the same var or function appearing multiple
5257 times on the same directive. Fix up wording for the to clause if t
5258 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5259 modifier on kinds other than dynamic or guided or nonmonotonic
5260 modifier together with ordered clause.
5261
4bf9e5a8
TS
52622015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5263 Chung-Lin Tang <cltang@codesourcery.com>
5264
5265 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5266
2adfab87
AM
52672015-10-29 Andrew MacLeod <amacleod@redhat.com>
5268
5269 * c-array-notation.c: Reorder #include's and remove duplicates.
5270 * c-aux-info.c: Likewise.
5271 * c-convert.c: Likewise.
5272 * c-decl.c: Likewise.
5273 * c-errors.c: Likewise.
5274 * c-lang.c: Likewise.
5275 * c-objc-common.c: Likewise.
5276 * c-parser.c: Likewise.
5277 * c-typeck.c: Likewise.
5278
e922069e
JW
52792015-10-26 Jim Wilson <jim.wilson@linaro.org>
5280
5281 PR debug/66068
5282 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5283 after calling build_qualified_type.
5284
765dd391
CP
52852015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5286 Thomas Schwinge <thomas@codesourcery.com>
5287 James Norris <jnorris@codesourcery.com>
5288 Joseph Myers <joseph@codesourcery.com>
5289 Julian Brown <julian@codesourcery.com>
5290 Bernd Schmidt <bschmidt@redhat.com>
5291
5292 * c-parser.c (c_parser_oacc_shape_clause): New.
5293 (c_parser_oacc_simple_clause): New.
5294 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5295 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5296
88bae6f4
TS
52972015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5298 James Norris <jnorris@codesourcery.com>
5299 Cesar Philippidis <cesar@codesourcery.com>
5300
5301 PR c/64765
5302 PR c/64880
5303 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5304 parameters, and handle these. Adjust all users.
5305 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5306 into...
5307 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5308 all users.
5309 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5310 declare functions.
5311 (c_finish_omp_construct): Declare function.
5312 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5313 Merge functions into...
5314 (c_finish_omp_construct): ... this new function.
5315
a8fc2579
RB
53162015-10-22 Richard Biener <rguenther@suse.de>
5317
5318 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5319 before folding a MINUS_EXPR.
5320
e9122ef6
MP
53212015-10-21 Marek Polacek <polacek@redhat.com>
5322
5323 PR c/68024
5324 * c-decl.c (start_function): Warn about vararg functions without
5325 a prototype.
5326
9f47c7e5
IE
53272015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5328
5329 * c-typeck.c (build_conditional_expr): Use boolean vector
5330 type for vector comparison.
5331 (build_vec_cmp): New.
5332 (build_binary_op): Use build_vec_cmp for comparison.
5333
fa60eeb9
MP
53342015-10-20 Marek Polacek <polacek@redhat.com>
5335
5336 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5337
2c7020eb
MP
53382015-10-20 Marek Polacek <polacek@redhat.com>
5339
5340 PR c/67964
5341 * c-parser.c (c_parser_attributes): Break out of the loop if the
5342 token after an attribute isn't a comma.
5343
d9a6bd32
JJ
53442015-10-13 Jakub Jelinek <jakub@redhat.com>
5345 Aldy Hernandez <aldyh@redhat.com>
5346
5347 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5348 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5349 (c_parser_omp_variable_list): Handle structure elements for
5350 map, to and from clauses. Handle array sections in reduction
5351 clause. Formatting fixes.
5352 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5353 if clause modifiers.
5354 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5355 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5356 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5357 c_parser_omp_clause_is_device_ptr): New functions.
5358 (c_parser_omp_clause_ordered): Parse optional parameter.
5359 (c_parser_omp_clause_reduction): Handle array reductions.
5360 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5361 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5362 functions.
5363 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5364 (c_parser_omp_clause_depend_sink): New function.
5365 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5366 (c_parser_omp_clause_map): Parse release/delete map kinds and
5367 optional always modifier.
5368 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5369 and c_finish_omp_clauses callers.
5370 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5371 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5372 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5373 (OMP_CRITICAL_CLAUSE_MASK): Define.
5374 (c_parser_omp_critical): Parse critical clauses.
5375 (c_parser_omp_for_loop): Handle doacross loops, adjust
5376 c_finish_omp_for and c_finish_omp_clauses callers.
5377 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5378 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5379 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5380 (c_parser_omp_for): Disallow ordered clause when combined with
5381 distribute. Disallow linear clause when combined with distribute
5382 and not combined with simd.
5383 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5384 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5385 parse clauses and if depend clause is found, don't parse a body.
5386 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5387 Allow target parallel without for after it.
5388 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5389 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5390 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5391 invalid kinds.
5392 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5393 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5394 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5395 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5396 functions.
5397 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5398 defaultmap and is_device_ptr clauses.
5399 (c_parser_omp_target): Parse target parallel and target simd. Set
5400 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5401 and target exit data. Diagnose invalid map kinds.
5402 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5403 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5404 construct.
5405 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5406 &omp_priv.
5407 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5408 (c_parser_omp_taskloop): New function.
5409 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5410 handle PRAGMA_OMP_TASKLOOP.
5411 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5412 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5413 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5414 Add IS_OMP argument, handle structure element bases, diagnose
5415 bitfields, pass IS_OMP recursively, diagnose known zero length
5416 array sections in depend clauses, handle array sections in reduction
5417 clause, diagnose negative length even for pointers.
5418 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5419 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5420 array sections in reduction clause, set
5421 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5422 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5423 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5424 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5425
21ba0cea
MP
54262015-10-06 Marek Polacek <polacek@redhat.com>
5427
5428 * c-parser.c (c_parser_statement_after_labels): Use
5429 protected_set_expr_location.
5430 (c_parser_omp_clause_num_gangs): Likewise.
5431 (c_parser_omp_clause_num_threads): Likewise.
5432 (c_parser_omp_clause_num_workers): Likewise.
5433 (c_parser_omp_clause_vector_length): Likewise.
5434 (c_parser_omp_clause_num_teams): Likewise.
5435 (c_parser_omp_clause_thread_limit): Likewise.
5436 * c-typeck.c (build_c_cast): Likewise.
5437 (c_cast_expr): Likewise.
5438
624d31fe
RS
54392015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5440
5441 * c-typeck.c (c_tree_equal): Use real_equal instead of
5442 REAL_VALUES_EQUAL.
5443
b8fd7909
JM
54442015-10-04 Jason Merrill <jason@redhat.com>
5445
5446 * c-parser.c (c_lex_one_token): Handle @synchronized.
5447 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5448 can change whether the function is transaction_safe.
5449
1c7485af
MP
54502015-10-02 Marek Polacek <polacek@redhat.com>
5451
5452 PR c/67730
5453 * c-typeck.c (convert_for_assignment): Use the expansion point
5454 location throughout.
5455
3e3b8d63
MP
54562015-10-02 Marek Polacek <polacek@redhat.com>
5457
5458 PR c/64249
5459 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5460 and pass it down to c_parser_if_statement.
5461 (c_parser_else_body): Add CHAIN parameter and pass it down to
5462 c_parser_statement_after_labels.
5463 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5464 duplicated if-else-if conditions.
5465
aabef2de
MP
54662015-10-01 Marek Polacek <polacek@redhat.com>
5467
5468 * c-typeck.c (convert_for_assignment): Improve commentary.
5469
de8ddd5f
MP
54702015-09-30 Marek Polacek <polacek@redhat.com>
5471
5472 PR c/67730
5473 * c-typeck.c (c_finish_return): Use the expansion point location for
5474 certain "return with value" warnings.
5475
c4914de6
MLI
54762015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5477
5478 * c-parser.c (pragma_lex): Add loc argument.
5479
0e36f5c7
MP
54802015-09-15 Marek Polacek <polacek@redhat.com>
5481
5482 PR c/67580
5483 * c-decl.c (tag_exists_p): New function.
5484 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5485 struct/union/enum keywords are missing.
5486 * c-tree.h (tag_exists_p): Declare.
5487
2f3bb934
MP
54882015-09-15 Marek Polacek <polacek@redhat.com>
5489
5490 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5491 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5492 Return NULL_TREE instead of 0.
5493 (lookup_name): Return NULL_TREE instead of 0.
5494 (lookup_name_in_scope): Likewise.
5495 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5496 (parser_xref_tag): Use false instead of 0.
5497 (start_struct): Use true instead of 1.
5498 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5499
aa256c4a
MP
55002015-09-14 Marek Polacek <polacek@redhat.com>
5501
5502 * c-typeck.c (set_nonincremental_init_from_string): Use
5503 HOST_WIDE_INT_M1U when shifting a negative value.
5504
dbb68221
MW
55052015-09-09 Mark Wielaard <mjw@redhat.com>
5506
5507 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5508 parm against NULL.
5509
a8a098ac
JJ
55102015-09-10 Jakub Jelinek <jakub@redhat.com>
5511
5512 PR c/67502
5513 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5514 into OMP_FOR_PRE_BODY rather than before the loop.
5515
f4b189d5
JJ
55162015-09-09 Jakub Jelinek <jakub@redhat.com>
5517
0bb99c11
JJ
5518 PR c/67501
5519 * c-parser.c (c_parser_oacc_all_clauses,
5520 c_parser_omp_all_clauses): Remove invalid clause from
5521 list of clauses even if parser->error is set.
5522
fce5e5e3
JJ
5523 PR c/67500
5524 * c-parser.c (c_parser_omp_clause_aligned,
5525 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5526 test for errors.
5527 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5528 error_mark_node.
5529
f4b189d5
JJ
5530 PR c/67495
5531 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5532 instead of c_parser_unary_expression. If the result is !lvalue_p,
5533 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5534
b2aaf235
MP
55352015-09-04 Marek Polacek <polacek@redhat.com>
5536
5537 PR sanitizer/67279
5538 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5539
1807ffc1
MS
55402015-09-03 Martin Sebor <msebor@redhat.com>
5541
5542 PR c/66516
8b652e65
JJ
5543 * c-typeck.c (convert_arguments, parser_build_unary_op,
5544 build_conditional_expr, c_cast_expr, convert_for_assignment,
5545 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5546 reject_gcc_builtin.
5547 (c_decl_implicit): Define.
5548
d04ff417
MP
55492015-09-02 Marek Polacek <polacek@redhat.com>
5550
5551 PR c/67432
5552 * c-parser.c (c_parser_enum_specifier): Give a better error for
5553 an empty enum.
5554
a79683d5
TS
55552015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5556
5557 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5558
191a6b94
MP
55592015-08-12 Marek Polacek <polacek@redhat.com>
5560
5561 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5562 LOC to it.
5563
420a9d9b
MP
55642015-08-03 Marek Polacek <polacek@redhat.com>
5565
5566 PR c/67088
5567 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5568 Use it.
5569 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5570
992118a1
PP
55712015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5572
5573 * c-parser.c (c_parser_if_body): Take token_indent_info
5574 argument. Call warn_for_misleading_indentation even when the
5575 body is a semicolon. Extract token_indent_infos corresponding
5576 to the guard, body and next tokens. Adjust call to
5577 warn_for_misleading_indentation accordingly.
5578 (c_parser_else_body): Likewise.
5579 (c_parser_if_statement): Likewise.
5580 (c_parser_while_statement): Likewise.
5581 (c_parser_for_statement): Likewise.
5582
46308474
LFSM
55832015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5584 Manuel López-Ibáñez <manu@gcc.gnu.org>
5585
5586 * c-decl.c (get_parm_info): Remove static var. Update warning
5587 message.
5588
05b28fd6
MP
55892015-07-27 Marek Polacek <polacek@redhat.com>
5590
5591 PR c++/66555
5592 PR c/54979
5593 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5594
451b5e48
MP
55952015-07-20 Marek Polacek <polacek@redhat.com>
5596
5597 PR c++/55095
5598 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5599 (build_binary_op): Warn about left shift overflows.
5600
1916bcb5
AM
56012015-07-09 Andrew MacLeod <amacleod@redhat.com>
5602
5603 * c-array-notation.c: Adjust includes for flags.h changes.
5604 * c-objc-common.c: Likewise.
5605
c7131fb2
AM
56062015-07-07 Andrew MacLeod <amacleod@redhat.com>
5607
5608 * c-array-notation.c: Adjust includes.
5609 * c-aux-info.c: Likewise.
5610 * c-convert.c: Likewise.
5611 * c-decl.c: Likewise.
5612 * c-errors.c: Likewise.
5613 * c-lang.c: Likewise.
5614 * c-objc-common.c: Likewise.
5615 * c-parser.c: Likewise.
5616 * c-typeck.c: Likewise.
5617
da2e71c9
MLI
56182015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5619
5620 PR fortran/66605
5621 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5622
b155cfd9
MP
56232015-06-29 Marek Polacek <polacek@redhat.com>
5624
5625 PR c/66322
5626 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5627 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5628 about -Wswitch-bool here.
5629 (do_case): Update c_add_case_label call.
5630 (c_finish_case): Update c_do_switch_warnings call.
5631
31521951
MP
56322015-06-27 Marek Polacek <polacek@redhat.com>
5633
5634 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5635
22d03525
MP
56362015-06-26 Marek Polacek <polacek@redhat.com>
5637
5638 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5639 INDIRECT_REF_P.
5640 * c-typeck.c (array_to_pointer_conversion): Likewise.
5641 (build_unary_op): Likewise.
5642 (c_finish_return): Likewise.
5643
f0889939
AM
56442015-06-25 Andrew MacLeod <amacleod@redhat.com>
5645
5646 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5647 * c-parser.c: Likewise.
5648
8d67ee55
RS
56492015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5650
5651 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5652 instead of pointer_hash.
5653 (detect_field_duplicates): Likewise.
5654
0ae9bd27
MP
56552015-06-25 Marek Polacek <polacek@redhat.com>
5656
5657 * c-array-notation.c: Use VAR_P throughout.
5658 * c-decl.c: Likewise.
5659 * c-objc-common.c: Likewise.
5660 * c-parser.c: Likewise.
5661 * c-typeck.c: Likewise.
5662
62f9079a
MP
56632015-06-25 Marek Polacek <polacek@redhat.com>
5664
5665 * c-decl.c: Use is_global_var throughout.
5666 * c-parser.c: Likewise.
5667 * c-typeck.c: Likewise.
5668
abb226c9
AM
56692015-06-17 Andrew MacLeod <amacleod@redhat.com>
5670
5671 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5672 * c-aux-info.c: Likewise.
5673 * c-convert.c: Likewise.
5674 * c-decl.c: Likewise.
5675 * c-errors.c: Likewise.
5676 * c-lang.c: Likewise.
5677 * c-objc-common.c: Likewise.
5678 * c-parser.c: Likewise.
5679 * c-typeck.c: Likewise.
5680
8cbababc
JH
56812015-06-11 Jan Hubicka <hubicka@ucw.cz>
5682
5683 PR middle-end/66325
5684 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5685 variants.
5686
a0349665
PMR
56872015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5688
5689 * c-decl.c (pop_scope): Register the main translation unit
5690 through the new debug hook.
5691
13fdf2e2
AM
56922015-06-08 Andrew MacLeod <amacleod@redhat.com>
5693
5694 * c-array-notation.c : Adjust include files.
5695 * c-aux-info.c : Likewise.
5696 * c-convert.c : Likewise.
5697 * c-decl.c : Likewise.
5698 * c-errors.c : Likewise.
5699 * c-lang.c : Likewise.
5700 * c-lang.h : Likewise.
5701 * c-objc-common.c : Likewise.
5702 * c-parser.c : Likewise.
5703 * c-typeck.c : Likewise.
5704
d7438551
AH
57052015-06-05 Aldy Hernandez <aldyh@redhat.com>
5706
5707 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5708 immediately clobber it.
5709 (c_write_global_declarations_1): Remove call to
5710 check_global_declaration_1.
5711 (c_write_global_declarations_2): Remove.
5712 (c_write_final_cleanups): Rename from c_write_global_declarations.
5713 Remove call to finalize_compilation_unit.
5714 Remove calls to debugging hooks.
5715 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5716 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5717 * c-tree.h: Remove c_write_global_declarations.
5718
ecb9f223
AM
57192015-06-04 Andrew MacLeod <amacleod@redhat.com>
5720
5721 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5722 * c-aux-info.c: Likewise.
5723 * c-convert.c: Likewise.
5724 * c-decl.c: Likewise.
5725 * c-errors.c: Likewise.
5726 * c-lang.c: Likewise.
5727 * c-objc-common.c: Likewise.
5728 * c-parser.c: Likewise.
5729 * c-typeck.c: Likewise.
5730
9482b620
MP
57312015-06-04 Marek Polacek <polacek@redhat.com>
5732
5733 PR c/66341
5734 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5735 it is a lvalue.
5736
bc51ace3
PK
57372015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5738
5739 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5740 Warn for empty struct.
5741 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5742
ea5b45b6
AT
57432015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5744
5745 * c-decl.c (start_function): Call plugin before parsing.
5746 (finish_function): Call plugin after parsing.
5747
c2d47482
PK
57482015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5749
5750 PR c/49551
5751 * c-decl.c (merge_decls): Merge DECL_COMMON.
5752
a95492ab
JW
57532015-05-22 Jim Wilson <jim.wilson@linaro.org>
5754
5755 * Make-lang.in (check_gcc_pallelize): Define.
5756
fd5c817a
MP
57572015-05-22 Marek Polacek <polacek@redhat.com>
5758
5759 PR c/47043
5760 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5761 attributes.
5762
c7b70a3c
MP
57632015-05-21 Marek Polacek <polacek@redhat.com>
5764
5765 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5766 DECL_BUILT_IN.
5767
21b634ae
MP
57682015-05-20 Marek Polacek <polacek@redhat.com>
5769
5770 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5771 * c-typeck.c: Likewise.
5772
296a8c2f
MP
57732015-05-19 Marek Polacek <polacek@redhat.com>
5774
5775 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5776
41b37d5e
JJ
57772015-05-19 Jakub Jelinek <jakub@redhat.com>
5778
5779 PR middle-end/66199
5780 * c-parser.c (c_parser_omp_for_loop): Don't add
5781 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5782 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5783 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5784 constructs.
5785
fab27f52
MM
57862015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5787
5788 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5789 swaps.
fab27f52 5790
40de31cf
MLI
57912015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5792
5793 PR fortran/44054
5794 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5795 accessor function.
5796
3aa3c9fc
MP
57972015-05-14 Marek Polacek <polacek@redhat.com>
5798
5799 PR c/66066
5800 PR c/66127
5801 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5802 rather than with 0.
5803
c3388e62
DM
58042015-05-12 David Malcolm <dmalcolm@redhat.com>
5805
5806 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5807 to add a call to warn_for_misleading_indentation.
5808 (c_parser_else_body): Likewise, adding param "else_loc".
5809 (c_parser_if_statement): Check for misleading indentation.
5810 (c_parser_while_statement): Likewise.
5811 (c_parser_for_statement): Likewise.
5812
755e528f
MP
58132015-05-08 Marek Polacek <polacek@redhat.com>
5814
5815 PR c/64918
5816 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5817 (output_init_element): Likewise.
5818
0173bd2a
MP
58192015-05-07 Marek Polacek <polacek@redhat.com>
5820
5821 PR c/65179
5822 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5823 value.
5824
9babc352
MP
58252015-04-30 Marek Polacek <polacek@redhat.com>
5826
5827 * c-typeck.c (set_init_label): Call error_at instead of error and
5828 pass LOC to it.
5829
ac9f18db
MP
5830 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5831 the type of a decl.
5832
ec3fba51
MP
5833 * c-typeck.c (c_build_va_arg): Clarify the error message.
5834
b811915d
TS
58352015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5836
5837 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5838 OMP_STANDALONE_CLAUSES.
5839
f3075008
MP
58402015-04-28 Marek Polacek <polacek@redhat.com>
5841
5842 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5843
4e81b788
MP
58442015-04-28 Marek Polacek <polacek@redhat.com>
5845
5846 PR c/65901
5847 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5848
6c1db78e
MP
58492015-04-25 Marek Polacek <polacek@redhat.com>
5850
5851 PR c/52085
5852 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5853 attribute.
5854
5c4abbb8
MP
58552015-04-23 Marek Polacek <polacek@redhat.com>
5856
5857 PR c/65345
5858 * c-decl.c (set_labels_context_r): New function.
5859 (store_parm_decls): Call it via walk_tree_without_duplicates.
5860 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5861 instead of create_tmp_var. Build TARGET_EXPR instead of
5862 COMPOUND_EXPR.
5863 (build_atomic_assign): Use create_tmp_var_raw instead of
5864 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5865
06aca1d5
IV
58662015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5867
5868 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5869 (c_parser_omp_target_update): Add missed %> to error_at ().
5870
8fba1830
BRF
58712015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5872
5873 PR target/55143
5874 * c-decl.c (c_default_pointer_mode): Remove definition.
5875 * c-tree.h (c_default_pointer_mode): Remove declaration.
5876
62021f64
TB
58772015-03-27 Tobias Burnus <burnus@net-b.de>
5878
5879 PR c/65586
5880 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5881 error out.
5882 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5883 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5884 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5885
9b65e171
JJ
58862015-03-19 Jakub Jelinek <jakub@redhat.com>
5887
5888 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5889 attribute for DECL_EXTERNAL VAR_DECLs.
5890
17958621
JJ
58912015-03-11 Jakub Jelinek <jakub@redhat.com>
5892
5893 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5894 argument.
5895
7ccb1a11
JJ
58962015-03-10 Jakub Jelinek <jakub@redhat.com>
5897
5898 PR c/65120
5899 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5900 before preparing arguments to warn_logical_not_parentheses.
5901
01177669
JJ
59022015-03-09 Jakub Jelinek <jakub@redhat.com>
5903
5904 PR c/65120
5905 * c-typeck.c (parser_build_binary_op): Don't warn for
5906 !!x == y or !b == y where b is _Bool.
5907
802ac282
MP
59082015-03-09 Marek Polacek <polacek@redhat.com>
5909
5910 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5911 * c-decl.c (grokdeclarator): Likewise.
5912 * c-typeck.c (build_binary_op): Likewise.
5913
e5165b60
MP
59142015-02-27 Marek Polacek <polacek@redhat.com>
5915
5916 PR c/65228
5917 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5918
065d214c
MP
59192015-02-14 Marek Polacek <polacek@redhat.com>
5920
5921 PR c/64768
5922 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5923 declared through a typedef name.
5924
e5d9235b
MP
59252015-02-13 Marek Polacek <polacek@redhat.com>
5926
5927 PR c/65050
5928 * c-decl.c (grokdeclarator): Print also the type when giving
5929 the error message about array's incomplete element type.
5930
fa01ffcc
JJ
59312015-02-11 Jakub Jelinek <jakub@redhat.com>
5932
5933 PR c/64824
5934 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5935 check in the POP macro.
5936
c3e38a03
MP
59372015-02-09 Marek Polacek <polacek@redhat.com>
5938
5939 PR c/64856
5940 * c-typeck.c (process_init_element): Don't always wrap
5941 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5942 initializing a range of elements.
5943
4886ec8e
JJ
59442015-02-04 Jakub Jelinek <jakub@redhat.com>
5945
5946 PR c/64824
5947 PR c/64868
5948 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5949
c3e38a03 59502015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5951
5952 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5953 processing enum declaration.
5954
7b33f0c8
MP
59552015-01-29 Marek Polacek <polacek@redhat.com>
5956
5957 PR c/64709
5958 * c-typeck.c (pop_init_level): If constructor_elements has
5959 exactly one element with integer_zerop value, set constructor_zeroinit
5960 to 1. Remove braces around warning_init call.
5961
dea63e49
JJ
59622015-01-27 Jakub Jelinek <jakub@redhat.com>
5963
5964 PR c/64766
5965 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5966 of FUNCTION_DECLs with error_mark_node.
5967
d38f7dce
JJ
59682015-01-26 Jakub Jelinek <jakub@redhat.com>
5969
5970 PR c/64778
5971 * c-typeck.c (convert_arguments): Return -1 if there are
5972 error_args, even if we've diagnosed too many arguments.
5973
cbf5d0e7
RB
59742015-01-21 Richard Biener <rguenther@suse.de>
5975
5976 PR middle-end/64313
5977 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5978 for builtins the user declared correctly.
5979
41dbbb37
TS
59802015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5981 Bernd Schmidt <bernds@codesourcery.com>
5982 Cesar Philippidis <cesar@codesourcery.com>
5983 James Norris <jnorris@codesourcery.com>
5984 Jakub Jelinek <jakub@redhat.com>
5985 Ilmir Usmanov <i.usmanov@samsung.com>
5986
5987 * c-parser.c: Include "gomp-constants.h".
5988 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5989 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5990 Use OMP_CLAUSE_SET_MAP_KIND.
5991 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5992 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5993 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5994 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5995 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5996 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5997 "copyout", "create", "delete", "deviceptr", "gang", "host",
5998 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5999 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6000 "present_or_create", "pcreate", "seq", "self", "vector",
6001 "vector_length", "wait", "worker".
6002 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6003 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6004 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6005 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6006 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6007 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6008 (c_parser_oacc_data_clause_deviceptr)
6009 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6010 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6011 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6012 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6013 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6014 (c_parser_oacc_parallel, c_parser_oacc_update)
6015 (c_parser_oacc_wait): New functions.
6016 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6017 (c_finish_oacc_data): New prototypes.
6018 * c-typeck.c: Include "gomp-constants.h".
6019 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6020 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6021 OMP_CLAUSE_SET_MAP_KIND.
6022 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6023 (c_finish_oacc_data): New functions.
6024 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6025 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6026 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6027 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6028 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6029 GOMP_MAP_FORCE_DEVICEPTR.
6030
adfac8df
JJ
60312015-01-09 Michael Collison <michael.collison@linaro.org>
6032
6033 * c-array-notation.c: Include hash-set.h, machmode.h,
6034 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6035 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6036 * c-aux-info.c: Ditto.
6037 * c-convert.c: Ditto.
6038 * c-decl.c: Ditto.
6039 * c-errors.c: Ditto.
6040 * c-lang.c: Dittoxs.
6041 * c-objc-common.c: Ditto.
6042 * c-parser.c: Ditto.
6043 * c-typeck.c: Include hash-set.h, machmode.h,
6044 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6045 fold-const.h, wide-int.h, inchash.h, real.h and
6046 fixed-value.h due to flattening of tree.h.
6047
2cc901dc
MP
60482015-01-07 Marek Polacek <polacek@redhat.com>
6049
6050 PR c/64417
6051 * c-typeck.c (process_init_element): Disallow initialization of
6052 a flexible array member with a string constant if the structure
6053 is in an array.
6054
5624e564
JJ
60552015-01-05 Jakub Jelinek <jakub@redhat.com>
6056
e5341100
JJ
6057 PR sanitizer/64344
6058 * c-typeck.c (convert_for_assignment, c_finish_return): For
6059 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6060 types also set in_late_binary_op around convert call.
6061 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6062 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6063 result on expr as last argument to ubsan_instrument_float_cast,
6064 if in_late_binary_op, don't use c_save_expr but save_expr.
6065
5624e564
JJ
6066 Update copyright years.
6067
5bd012f8
MP
60682015-01-05 Marek Polacek <polacek@redhat.com>
6069
6070 PR c/64423
6071 * c-typeck.c (build_array_ref): Pass loc down to
6072 warn_array_subscript_with_type_char.
6073
3f8257db 60742014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6075
6076 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6077 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6078 element type.
8e745a17 6079 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6080 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6081 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6082 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6083 to PEDWARN_FOR_QUALIFIERS.
768952be 6084
8f94a8c4
JJ
60852014-12-17 Jakub Jelinek <jakub@redhat.com>
6086
6087 PR sanitizer/64289
6088 * c-convert.c: Include ubsan.h.
6089 (convert): For real -> integral casts and
6090 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6091 instead instrument the float cast directly.
6092
b731b390
JJ
60932014-11-29 Jakub Jelinek <jakub@redhat.com>
6094
6095 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6096 c_finish_stmt_expr): Remove NULL last argument from
6097 create_tmp_var_raw and create_tmp_var calls.
6098 * c-array-notation.c (fix_builtin_array_notation_fn,
6099 build_array_notation_expr, fix_conditional_array_notations_1,
6100 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6101
541e35a6
MP
61022014-11-28 Marek Polacek <polacek@redhat.com>
6103
6104 PR c/63862
6105 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6106 convert the right operand to integer type.
6107
b286be94
MP
61082014-11-25 Marek Polacek <polacek@redhat.com>
6109
6110 PR c/63877
6111 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6112 for inline functions.
6113
aa7da51a
JJ
61142014-11-21 Jakub Jelinek <jakub@redhat.com>
6115
6116 PR target/63764
6117 * c-typeck.c (build_array_ref): Adjust
6118 convert_vector_to_pointer_for_subscript caller. If it returns true,
6119 call non_lvalue_loc on the result.
6120
d876207f
RB
61212014-11-11 Richard Biener <rguenther@suse.de>
6122
6123 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6124 to true.
6125
e5e44252
AK
61262014-11-10 Andi Kleen <ak@linux.intel.com>
6127
6128 PR c/60804
6129 * c-parser.c (c_parser_statement_after_labels): Call
6130 check_no_cilk.
6131 (c_parser_if_statement): Dito.
6132 (c_parser_switch_statement): Dito.
6133 (c_parser_while_statement): Dito.
6134 (c_parser_do_statement): Dito.
6135 (c_parser_for_statement): Dito.
6136 * c-typeck.c (c_finish_loop): Dito.
6137
13c21655
PC
61382014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6139
6140 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6141 OPT_Wshift_count_overflow in the warnings.
6142
2d51fcef
MP
61432014-10-30 Marek Polacek <polacek@redhat.com>
6144
6145 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6146 print the stripped version as well, if they're not the same.
6147
ef4bddc2
RS
61482014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6149
6150 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6151 machine_mode.
6152
c582198b
AM
61532014-10-28 Andrew MacLeod <amacleod@redhat.com>
6154
6155 * c-decl.c: Adjust include files.
6156 * c-parser.c: Ditto.
6157
ddc8de03
PM
61582014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6159 Tom Tromey <tromey@redhat.com>
6160
6161 * c-tree.h (enum c_oracle_request): New.
6162 (c_binding_oracle_function): New typedef.
6163 (c_binding_oracle, c_pushtag, c_bind): Declare.
6164 * c-decl.c (c_binding_oracle): New global.
6165 (I_SYMBOL_CHECKED): New macro.
6166 (i_symbol_binding): New function.
6167 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6168 (I_TAG_CHECKED): New macro.
6169 (i_tag_binding): New function.
6170 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6171 (I_LABEL_CHECKED): New macro.
6172 (i_label_binding): New function.
6173 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6174 (c_print_identifier): Save and restore c_binding_oracle.
6175 (c_pushtag, c_bind): New functions.
6176
60393bbc
AM
61772014-10-27 Andrew MacLeod <amacleod@redhat.com>
6178
6179 * c-typeck.c: Adjust include files.
6180
d723bb7c
MLI
61812014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6182
6183 PR c++/53061
6184 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6185 initialization here...
6186 (c_initialize_diagnostics): ... but here. Set defaults after
6187 building pretty-printer.
6188
1bc5a451
MP
61892014-10-23 Marek Polacek <polacek@redhat.com>
6190
6191 PR c/63626
6192 * c-decl.c (pop_scope): Don't print warning in external_scope.
6193
4435bb92
MP
61942014-10-19 Marek Polacek <polacek@redhat.com>
6195
6196 PR c/63567
6197 * c-typeck.c (output_init_element): Allow initializing objects with
6198 static storage duration with compound literals even in C99 and add
6199 pedwarn for it.
6200
7278465e
MP
62012014-10-17 Marek Polacek <polacek@redhat.com>
6202
6203 PR c/63567
6204 * c-typeck.c (digest_init): Allow initializing objects with static
6205 storage duration with compound literals even in C99 and add pedwarn
6206 for it.
6207
d9b7be2e
MP
62082014-10-17 Marek Polacek <polacek@redhat.com>
6209
6210 PR c/63543
6211 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6212 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6213 error multiple times. Print the type.
6214
f406ae1f
MP
62152014-10-17 Marek Polacek <polacek@redhat.com>
6216
6217 PR c/63549
6218 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6219 type.
6220
92574c7c
MP
62212014-10-17 Marek Polacek <polacek@redhat.com>
6222
6223 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6224 (start_function): Use OPT_Wimplicit_int instead of 0.
6225 (store_parm_decls_oldstyle): Likewise.
6226
1bc4a978
MT
62272014-10-17 Alan Modra <amodra@gmail.com>
6228
6229 PR middle-end/61848
6230 * c-decl.c (merge_decls): Don't merge section name or tls model
6231 to newdecl symtab node, instead merge to olddecl. Override
6232 existing olddecl section name. Set tls_model for all thread-local
6233 vars, not just OMP thread-private ones. Remove incorrect comment.
6234
83685514
AM
62352014-10-16 Andrew MacLeod <amacleod@redhat.com>
6236
6237 * c-decl.c: Adjust include files.
6238
78a7c317
DD
62392014-10-14 DJ Delorie <dj@redhat.com>
6240
6241 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6242 (c_token_starts_typename): Check all __intN, not just __int128.
6243 (c_token_starts_declspecs): Likewise.
6244 (c_parser_declspecs): Likewise.
6245 (c_parser_attribute_any_word): Likewise.
6246 (c_parser_objc_selector): Likewise.
6247 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6248 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6249 is specified.
6250 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6251 __int128.
6252 (finish_declspecs): Likewise.
6253
74d98c1e
AB
62542014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6255
8e745a17 6256 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6257 the duplicate code.
8e745a17 6258 (c_parser_statement): Call the new function.
74d98c1e 6259
84937de2
MP
62602014-10-09 Marek Polacek <polacek@redhat.com>
6261
6262 PR c/63480
6263 * c-typeck.c (pop_init_level): Don't warn about initializing
6264 with { }.
6265
0382aaa0
MP
62662014-10-07 Marek Polacek <polacek@redhat.com>
6267
6268 PR c/59717
6269 * c-decl.c (header_for_builtin_fn): New function.
6270 (implicitly_declare): Suggest which header to include.
6271
7a0ca710
MP
62722014-10-07 Marek Polacek <polacek@redhat.com>
6273
6274 * c-convert.c (convert): Use error_operand_p.
6275 * c-typeck.c (require_complete_type): Likewise.
6276 (really_atomic_lvalue): Likewise.
6277 (digest_init): Likewise.
6278 (handle_omp_array_sections_1): Likewise.
6279
6bc8a126
MP
62802014-10-03 Marek Polacek <polacek@redhat.com>
6281
6282 PR c/63453
6283 * c-decl.c (pop_scope): Don't warn about "inline function declared
6284 but never defined" for functions marked with gnu_inline attribute.
6285
d90c0a59
JJ
62862014-09-25 Jakub Jelinek <jakub@redhat.com>
6287
6288 PR c++/63249
6289 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6290 on low_bound and length.
6291
083e891e
MP
62922014-09-24 Marek Polacek <polacek@redhat.com>
6293
6294 PR c/61405
6295 PR c/53874
6296 * c-parser.c: Don't define CPP_KEYWORD.
6297 (c_parser_switch_statement): Pass original type to c_finish_case.
6298 * c-tree.h (c_finish_case): Update declaration.
6299 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6300 conditionally to c_do_switch_warnings.
6301
8d95fe25
MP
63022014-09-03 Marek Polacek <polacek@redhat.com>
6303
6304 PR c/62024
6305 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6306 conversions.
6307
9a771876
JJ
63082014-09-02 Jakub Jelinek <jakub@redhat.com>
6309 Balaji V. Iyer <balaji.v.iyer@intel.com>
6310 Igor Zamyatin <igor.zamyatin@intel.com>
6311
6312 * c-parser.c (c_parser_cilk_for): New function.
6313 (c_parser_cilk_grainsize): Likewise.
6314 (c_get_temp_regvar): Likewise.
6315 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6316 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6317 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6318 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6319 case.
6320
b7679d96
CG
63212014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6322
6323 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6324 with using HOST_WIDE_INT without truncation to 'int'
6325
59ea0364
MP
63262014-08-22 Marek Polacek <polacek@redhat.com>
6327
6328 PR c++/62199
6329 * c-typeck.c (parser_build_binary_op): Adjust call to
6330 warn_logical_not_parentheses.
6331
671a475e
IZ
63322014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6333
6334 PR other/62008
6335 * c-parser.c (c_parser_array_notation): Check for correct
6336 type of an array added.
6337
04159acf
MP
63382014-08-19 Marek Polacek <polacek@redhat.com>
6339
6340 PR c++/62153
6341 * c-typeck.c (build_binary_op): If either operand of a comparison
6342 is a boolean expression, call maybe_warn_bool_compare.
6343
c77935ee
PP
63442014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6345
6346 PR c/45584
6347 * c-typeck.c (build_c_cast): Do a conversion even when the
6348 TYPE_MAIN_VARIANTs are the same.
6349
35aff4fb
MP
63502014-08-19 Marek Polacek <polacek@redhat.com>
6351
6352 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6353 pedwarn_c99 instead of pedwarn.
6354 (grokfield): Likewise.
6355 (warn_defaults_to): New function.
6356 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6357 Unconditionally call pedwarn_c99 instead of pedwarn.
6358 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6359 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6360 check flag_isoc11 before.
6361 * c-errors.c (pedwarn_c99): Change the return type to bool.
6362 Handle -Wc99-c11-compat.
6363 * c-parser.c (disable_extension_diagnostics): Handle
6364 warn_c99_c11_compat.
6365 (restore_extension_diagnostics): Likewise.
6366 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6367 instead of pedwarn, don't check flag_isoc11 before.
6368 (c_parser_declspecs): Likewise.
6369 (c_parser_alignas_specifier): Likewise.
6370 (c_parser_alignof_expression): Likewise.
6371 (c_parser_generic_selection): Likewise.
6372 * c-tree.h (pedwarn_c99): Update declaration.
6373 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6374 of pedwarn_c99.
6375
177cce46
MP
63762014-08-19 Marek Polacek <polacek@redhat.com>
6377
6378 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6379 to pedwarn_c90.
6380 * c-errors.c: Include "opts.h".
6381 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6382 * c-parser.c (disable_extension_diagnostics): Handle negative value
6383 of warn_c90_c99_compat, too.
6384 (restore_extension_diagnostics): Likewise.
6385 (c_parser_compound_statement_nostart): Pass
6386 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6387
6dc99c33
MP
63882014-08-12 Marek Polacek <polacek@redhat.com>
6389
6390 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6391 Add pedwarn.
6392 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6393 Likewise.
6394 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6395
3f8257db 63962014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6397
6398 PR c/51849
6399 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6400 Call pedwarn_c90 instead of pedwarn.
6401 (check_bitfield_type_and_width): Likewise.
6402 (declspecs_add_qual): Likewise.
6403 (declspecs_add_type): Likewise.
6404 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6405 Adjust to only call pedwarn_c90.
6406 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6407 pedwarn_c90 instead of pedwarn.
6408 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6409 * c-parser.c (disable_extension_diagnostics): Handle
6410 warn_c90_c99_compat.
6411 (restore_extension_diagnostics): Likewise.
6412 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6413 pedwarn_c90 instead of pedwarn.
6414 (c_parser_initelt): Likewise.
6415 (c_parser_postfix_expression): Likewise.
6416 (c_parser_postfix_expression_after_paren_type): Likewise.
6417 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6418 * c-tree.h: Fix formatting.
6419 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6420 pedwarn_c90 instead of pedwarn.
6421
9f25a338
TS
64222014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6423
6424 * c-typeck.c: Remove include of pointer-set.h.
6425
044331a8
MP
64262014-08-07 Marek Polacek <polacek@redhat.com>
6427
6428 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6429
b787e7a2
TS
64302014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6431
6432 * c-typeck.c: Use hash_map instead of pointer_map.
6433
6e2830c3
TS
64342014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6435
6436 * c-decl.c: Use hash_set instead of pointer_set.
6437
a7ee52fb
IZ
64382014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6439
6440 PR middle-end/61455
6441 * c-array-notation.c (expand_array_notations): Handling
6442 of DECL_EXPR added.
6443
b4dfdc11
MG
64442014-07-31 Marc Glisse <marc.glisse@inria.fr>
6445
6446 PR c++/60517
6447 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6448 a local variable.
6449
976d5a22
TT
64502014-07-30 Tom Tromey <tromey@redhat.com>
6451
6452 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6453 field.
6454 (really_start_incremental_init, push_init_level): Initialize
6455 designator_depth.
6456 (pop_init_level): Set global designator_depth.
6457 (process_init_element): Check for designated_init attribute.
6458
30281de2
MP
64592014-07-20 Marek Polacek <polacek@redhat.com>
6460
6461 PR c/61852
6462 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6463 (implicitly_declare): Pass location to implicit_decl_warning.
6464
b108f48f
JJ
64652014-07-14 Jakub Jelinek <jakub@redhat.com>
6466
6467 PR middle-end/61294
6468 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6469 If non-NULL, call c_parser_check_literal_zero.
6470 (c_parser_check_literal_zero): New function.
6471 (c_parser_postfix_expression_after_primary): Adjust
6472 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6473
773ec47f
MP
64742014-07-06 Marek Polacek <polacek@redhat.com>
6475
6476 PR c/6940
6477 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6478 * c-tree.h (C_ARRAY_PARAMETER): Define.
6479 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6480 function parameter.
6481
22e1cf1c 64822014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6483 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6484
6485 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6486 releasing symbol.
6487
52ec0ea3
MP
64882014-07-01 Marek Polacek <polacek@redhat.com>
6489
6490 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6491 instead of 0 to WARN_FOR_ASSIGNMENT.
6492
d5c3d343
MP
64932014-07-01 Marek Polacek <polacek@redhat.com>
6494
6495 PR c/58286
6496 * c-typeck.c (convert_for_assignment): Pass
6497 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6498
6a7253a4
MP
64992014-06-30 Marek Polacek <polacek@redhat.com>
6500
6501 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6502 has no_sanitize_undefined attribute.
6503
5e88a8f4
IZ
65042014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6505
6506 PR middle-end/57541
6507 * c-array-notation.c (fix_builtin_array_notation_fn):
6508 Check for 0 arguments in builtin call. Check that bultin argument is
6509 correct.
6510 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6511 index.
6512
9698b078
SH
65132014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6514
6515 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6516 qualifiers in __auto_type for atomic types.
6517 (c_parser_typeof_specifier): Discard all type qualifiers in
6518 __typeof__ for atomic types.
6519
6e07c515
MP
65202014-06-25 Marek Polacek <polacek@redhat.com>
6521
6522 PR c/61162
6523 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6524 the return expression to c_finish_return.
6525
da6f124d
JJ
65262014-06-25 Jakub Jelinek <jakub@redhat.com>
6527
6528 * c-typeck.c (c_finish_omp_clauses): Make sure
6529 OMP_CLAUSE_LINEAR_STEP has correct type.
6530
c203e8a7
TS
65312014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6532
6533 * c-decl.c: Adjust.
6534
56ad0e38
JJ
65352014-06-24 Jakub Jelinek <jakub@redhat.com>
6536
6537 * c-parser.c (c_parser_omp_for_loop): For
6538 #pragma omp parallel for simd move lastprivate clause from parallel
6539 to for rather than simd.
6540
47c2554f
MP
65412014-06-23 Marek Polacek <polacek@redhat.com>
6542
6543 * c-typeck.c (parser_build_binary_op): Don't call
6544 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6545
56363ffd
JH
65462014-06-15 Jan Hubicka <hubicka@ucw.cz>
6547
6548 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6549 * c-decl.c (merge_decls): Likewise.
6550
d7ff7ae5
MP
65512014-06-09 Marek Polacek <polacek@redhat.com>
6552
6553 PR c/36446
6554 * c-typeck.c (error_init): Call inform instead of error_at.
6555 (pedwarn_init): Call inform instead of pedwarn.
6556 (warning_init): Call inform instead of warning_at.
6557
24d047a3
JH
65582014-06-07 Jan Hubicka <hubicka@ucw.cz>
6559
6560 * c-decl.c (merge_decls): Use set_decl_section_name.
6561 (duplicate_decls): Remove node if it exists.
6562
9bac5cbb
G
65632014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6564
6565 PR c/53119
6566 * c-typeck.c (push_init_level, process_init_element,
6567 pop_init_level): Correct check for zero initialization, move
6568 missing brace warning to respect zero initialization.
6569
8ffcdea8
MP
65702014-06-05 Marek Polacek <polacek@redhat.com>
6571
6572 PR c/56724
6573 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6574
742938c9
MP
65752014-06-05 Marek Polacek <polacek@redhat.com>
6576
6577 PR c/49706
6578 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6579 on the left hand side operand of a comparison.
742938c9 6580
6447c55d
MP
65812014-06-05 Marek Polacek <polacek@redhat.com>
6582
6583 PR c/48062
6584 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6585 Print note only if the warning was printed.
6586
9dc7743c
IZ
65872014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6588
6589 PR c/58942
6590 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6591 with a pointer.
6592
fedfecef
MP
65932014-06-03 Marek Polacek <polacek@redhat.com>
6594
6595 PR c/60439
6596 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6597 c_start_case.
6598 * c-tree.h (c_start_case): Update.
6599 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6600 switch condition has boolean value.
6601
9b2b7279
AM
66022014-06-02 Andrew MacLeod <amacleod@redhat.com>
6603
6604 * c-decl.c: Include builtins.h.
6605 * c-parser.c: Likewise.
6606
5c1bc275
MP
66072014-05-27 Marek Polacek <polacek@redhat.com>
6608
6609 PR c/56724
6610 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6611 error and warning calls to error_at and warning_at. Pass location of
6612 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6613 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6614 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6615
97563bc8
IZ
66162014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6617
6618 PR c/61191
6619 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6620 function parameters.
6621
aede2c10
JH
66222014-05-23 Jan Hubicka <hubicka@ucw.cz>
6623
6624 * c-decl.c (merge_decls): Preserve symtab node pointers.
6625 (duplicate_decls): Free new decl.
6626
edbba2ce
TS
66272014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6628
f3316c6d
TS
6629 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6630 initialization.
6631
edbba2ce
TS
6632 * c-parser.c (c_parser_omp_target): Return bool values.
6633
68c81f24
TS
66342014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6635
6636 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6637 num_teams_loc variable to num_thread_limit_loc.
6638
632f2871
RS
66392014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6640
6641 * c-array-notation.c (expand_array_notations): Use void_node
6642 instead of void_zero_node.
6643
766090c2
TS
66442014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6645
6646 * c-decl.c (finish_struct): Adjust.
6647 (finish_enum): Likewise.
6648 (bind): Adjust.
6649 (record_inline_static): Likewise.
6650 (push_scope): Likewise.
6651 (make_label): Likewise.
6652 (lookup_label_for_goto): Likewise.
6653 (finish_struct): Likewise.
6654 (finish_enum): Likewise.
6655 (store_parm_decls): Likewise.
6656 (c_push_function_context): Likewise.
6657 * c-lang.h: Remove usage of variable_size gty attribute.
6658 * c-parser.c (c_parse_init): Adjust.
6659 (c_parse_file): Likewise.
6660
2b107f6b
MP
66612014-05-13 Marek Polacek <polacek@redhat.com>
6662
6663 PR c/61162
6664 * c-typeck.c (convert_for_assignment): Pass location to
6665 WARN_FOR_ASSIGNMENT instead of input_location.
6666
d033409e
MP
66672014-05-10 Marek Polacek <polacek@redhat.com>
6668
6669 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6670 maybe_warn_string_init.
6671 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6672 maybe_warn_string_init.
6673 * c-tree.h (maybe_warn_string_init): Update declaration.
6674 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6675 Call pedwarn_init with loc instead of with input_location.
6676 (digest_init): Pass init_loc to maybe_warn_string_init.
6677 (pop_init_level): Call pedwarn_init with loc instead of with
6678 input_location.
6679 (set_init_index): Likewise.
6680 (process_init_element): Likewise.
6681
ea58ef42
MP
66822014-05-09 Marek Polacek <polacek@redhat.com>
6683
6684 PR c/61096
6685 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6686 (c_parser_initelt): Pass location to set_init_label. Pass array index
6687 location to set_init_index.
6688 * c-tree.h (push_init_level): Update declaration.
6689 (pop_init_level): Likewise.
6690 (set_init_index): Likewise.
6691 (set_init_label): Likewise.
6692 * c-typeck.c (error_init): Add location parameter. Call error_at
6693 instead of error.
6694 (digest_init): Pass init_loc to error_init.
6695 (really_start_incremental_init):
6696 (push_init_level): Add location parameter. Pass loc to pop_init_level
6697 and error_init.
6698 (pop_init_level): Likewise.
6699 (set_designator): Add location parameter. Pass loc to pop_init_level,
6700 push_init_level, and error_init.
6701 (set_init_index): Add location parameter. Pass loc to error_init and
6702 set_designator.
6703 (set_init_label): Likewise.
6704 (output_init_element): Pass loc to error_init.
6705 (process_init_element): Pass loc to error_init, pop_init_level,
6706 pedwarn_init, and push_init_level.
6707
661a0813
MP
67082014-05-09 Marek Polacek <polacek@redhat.com>
6709
6710 PR c/50459
6711 * c-parser.c (c_parser_attributes): Parse the arguments as an
6712 expression-list if the attribute takes identifier.
6713
2793eeab
MP
67142014-05-08 Marek Polacek <polacek@redhat.com>
6715
6716 PR c/61053
6717 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6718 TYPE_ALIGN_UNIT.
6719
f827930a
MP
67202014-05-08 Marek Polacek <polacek@redhat.com>
6721
6722 PR c/61077
6723 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6724 of main.
6725
1d60af08
KZ
67262014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6727 Mike Stump <mikestump@comcast.net>
6728 Richard Sandiford <rdsandiford@googlemail.com>
6729
6730 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6731 (finish_enum): Use wide-int interfaces.
6732 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6733 * c-typeck.c (build_c_cast): Likewise.
6734 (set_nonincremental_init_from_string): Likewise.
6735 (c_tree_equal): Likewise.
6736
a0e24419
MP
67372014-05-02 Marek Polacek <polacek@redhat.com>
6738
6739 PR c/25801
6740 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6741 Return size_one_node when the type is not complete.
6742 (pointer_diff): Remove comment.
6743 (build_unary_op): Improve error messages.
6744
19fc9faa
MP
67452014-05-02 Marek Polacek <polacek@redhat.com>
6746
6747 * c-typeck.c (c_finish_return): Separate warning_at calls.
6748
63bc4e87
MP
67492014-05-02 Marek Polacek <polacek@redhat.com>
6750
6751 * c-tree.h (error_init): Remove declaration.
6752 (pedwarn_init): Likewise.
6753 * c-typeck.c (error_init): Make static and move above.
6754 (pedwarn_init): Likewise.
6755 (warning_init): Move above.
6756 (maybe_warn_string_init): Likewise.
6757
4bd2511b
JL
67582014-05-01 Jeff Law <law@redhat.com>
6759
6760 Revert:
6761
6762 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6763 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6764 avoid goto.
6765
6a358dcb
MP
67662014-05-02 Marek Polacek <polacek@redhat.com>
6767
6768 PR c/60784
6769 * c-typeck.c (push_init_level): Set constructor_designated to
6770 p->designated for structures.
6771
ae5ebda4
MP
67722014-05-01 Marek Polacek <polacek@redhat.com>
6773
6774 PR c/60915
6775 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6776 function-definition has an attribute after the declarator.
6777
96b40f8d
MP
67782014-05-01 Marek Polacek <polacek@redhat.com>
6779
6780 PR c/60257
6781 * c-typeck.c (warning_init): Add location_t parameter. Call
6782 warning_at instead of warning.
6783 (push_init_level): Pass input_location to warning_init.
6784 (add_pending_init): Add location_t parameter. Pass loc to
6785 warning_init.
6786 (set_nonincremental_init): Pass input_location to add_pending_init.
6787 (set_nonincremental_init_from_string): Likewise.
6788 (output_init_element): Pass loc to warning_init and to
6789 add_pending_init.
6790
32e00768
MP
67912014-05-01 Marek Polacek <polacek@redhat.com>
6792
6793 PR c/43395
6794 * c-typeck.c (c_finish_return): Distinguish between label and variable
6795 when warning about returning local address.
6796
c9379ce2
MP
67972014-05-01 Marek Polacek <polacek@redhat.com>
6798
6799 PR c/29467
6800 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6801 in C89 mode.
6802
d00887e8
MP
68032014-05-01 Marek Polacek <polacek@redhat.com>
6804
6805 PR c/43245
6806 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6807 instead of 0 to WARN_FOR_QUALIFIERS.
6808
5436fa2e
MP
68092014-05-01 Marek Polacek <polacek@redhat.com>
6810
6811 PR c/56989
6812 * c-typeck.c (default_conversion): Use better location for
6813 error call.
6814
f8ed5150
MP
68152014-04-30 Marek Polacek <polacek@redhat.com>
6816
6817 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6818 also when SANITIZE_FLOAT_DIVIDE is on.
6819
8337d1db
MP
68202014-04-30 Marek Polacek <polacek@redhat.com>
6821
6822 PR c/60139
6823 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6824 and pedwarn_init. Use loc insted of input_location.
6825
c4bdc42f
MP
68262014-04-30 Marek Polacek <polacek@redhat.com>
6827
6828 PR c/60351
6829 * c-typeck.c (build_binary_op): Use location when warning about
6830 shift count.
6831
45484dcf
MP
68322014-04-25 Marek Polacek <polacek@redhat.com>
6833
6834 PR c/18079
6835 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6836 always_inline/noinline and hot/cold attributes.
6837
34cf811f
MP
68382014-04-25 Marek Polacek <polacek@redhat.com>
6839
6840 PR c/60114
6841 * c-parser.c (c_parser_initelt): Pass input_location to
6842 process_init_element.
6843 (c_parser_initval): Pass loc to process_init_element.
6844 * c-tree.h (process_init_element): Adjust declaration.
6845 * c-typeck.c (push_init_level): Pass input_location to
6846 process_init_element.
6847 (pop_init_level): Likewise.
6848 (set_designator): Likewise.
6849 (output_init_element): Add location_t parameter. Pass loc to
6850 digest_init.
6851 (output_pending_init_elements): Pass input_location to
6852 output_init_element.
6853 (process_init_element): Add location_t parameter. Pass loc to
6854 output_init_element.
6855
42056eac
JJ
68562014-04-24 Jakub Jelinek <jakub@redhat.com>
6857
6858 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6859 atomic-clause, allow comma in between atomic-clause and
6860 seq_cst.
6861
e162a134
JJ
68622014-04-22 Jakub Jelinek <jakub@redhat.com>
6863
6864 PR c/59073
6865 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6866 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6867
2f6babac
IZ
68682014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6869
6870 PR middle-end/60469
6871 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6872 create_tmp_var instead build_decl for creating temps.
6873 (build_array_notation_expr): Likewise.
6874 (fix_conditional_array_notations_1): Likewise.
6875 (fix_array_notation_expr): Likewise.
6876 (fix_array_notation_call_expr): Likewise.
6877
8edbfaa6
JJ
68782014-03-28 Jakub Jelinek <jakub@redhat.com>
6879
6880 PR c++/60689
6881 * c-tree.h (c_build_function_call_vec): New prototype.
6882 * c-typeck.c (build_function_call_vec): Don't call
6883 resolve_overloaded_builtin here.
6884 (c_build_function_call_vec): New wrapper function around
6885 build_function_call_vec. Call resolve_overloaded_builtin here.
6886 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6887 Call c_build_function_call_vec instead of build_function_call_vec.
6888 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6889 * c-decl.c (finish_decl): Likewise.
6890
7485aeea
MLI
68912014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6892
6893 PR c/55383
6894 * c-typeck.c: Use correct format string in cast-qual warning
6895
b17a8b07
TS
68962014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6897
6898 * c-decl.c (c_decl_attributes): Use
6899 lang_hooks.types.omp_mappable_type.
6900 * c-typeck.c (c_finish_omp_clauses): Likewise.
6901
3af9c5e9
MP
69022014-03-06 Marek Polacek <polacek@redhat.com>
6903
6904 PR c/60197
6905 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6906 of checking tree code.
6907
1c9f5f33
PK
69082014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6909
6910 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6911 (c_parser_parameter_declaration): Likewise.
6912
cc28fc7f
MP
69132014-02-19 Marek Polacek <polacek@redhat.com>
6914
6915 PR c/60195
6916 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6917 Call mark_exp_read on exp.value.
6918 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6919 TREE_ADDRESSABLE on old instead of val.
6920 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6921
b581c05c
PK
69222014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6923
6924 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6925 C_EXPR_APPEND by vec_safe_push.
6926 * c-tree.h (C_EXPR_APPEND): Remove.
6927
81e5eca8
MP
69282014-01-31 Marek Polacek <polacek@redhat.com>
6929
6930 PR c/59963
6931 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6932 build_function_call_vec.
6933 (build_function_call): Likewise.
6934 (build_atomic_assign): Likewise.
6935 (build_function_call_vec): Add arg_loc parameter. Use it.
6936 (convert_arguments): Likewise.
6937 (convert_for_assignment): Rename rhs_loc to expr_loc.
6938 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6939 (c_parser_objc_keywordexpr): Likewise.
6940 (c_parser_postfix_expression_after_primary): Call
6941 build_function_call_vec with expr_loc rather than op_loc.
6942 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6943 build_function_call_vec.
6944 (c_parser_expr_list): Add locations parameter. Fill it with locations
6945 of function arguments.
6946 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6947
68fca595
MP
69482014-01-30 Marek Polacek <polacek@redhat.com>
6949
6950 PR c/59940
6951 * c-typeck.c (build_function_call_vec): Use loc parameter.
6952 (convert_arguments): Add location parameter. Use it.
6953 (ep_convert_and_check): Likewise.
6954 (build_atomic_assign): Adjust convert_for_assignment call.
6955 (build_modify_expr): Likewise.
6956 (digest_init): Likewise.
6957 (c_finish_return): Likewise.
6958 (build_conditional_expr): Adjust ep_convert_and_check calls.
6959 (convert_for_assignment): Add rhs_loc parameter. Use it.
6960 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6961 calls.
6962
fa337f3a
RB
69632014-01-30 Richard Biener <rguenther@suse.de>
6964
6965 PR c/59905
6966 * c-typeck.c (build_function_call_vec): Do not replace calls
6967 to a function via an incompatible type with a runtime abort.
6968
b72271b9
BI
69692014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6970
6971 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6972 flag_enable_cilkplus with flag_cilkplus.
6973 (c_parser_direct_declarator_inner): Likewise.
6974 (c_parser_attribute_any_word): Likewise.
6975 (c_parser_attributes): Likewise.
6976 (c_parser_compound_statement): Likewise.
6977 (c_parser_statement_after_labels): Likewise.
6978 (c_parser_if_statement): Likewise.
6979 (c_parser_switch_statement): Likewise.
6980 (c_parser_do_statement): Likewise.
6981 (c_parser_for_statement): Likewise.
6982 (c_parser_unary_expression): Likewise.
6983 (c_parser_postfix_expression): Likewise.
6984 (c_parser_postfix_expression_after_primary): Likewise.
6985 (c_parser_postfix_expression_after_primary): Likewise.
6986 (c_parser_omp_clause_name): Likewise.
6987 (c_finish_omp_declare_simd): Likewise.
6988 (c_parser_cilk_verify_simd): Likewise.
6989 * c-typeck.c (build_array_ref): Likewise.
6990 (build_function_call_vec): Likewise.
6991 (convert_arguments): Likewise.
6992 (build_compound_expr): Likewise.
6993 (c_finish_return): Likewise.
6994 (c_finish_if_stmt): Likewise.
6995 (c_finish_loop): Likewise.
6996 (build_binary_op): Likewise.
6997
393e8e8b
MP
69982014-01-23 Marek Polacek <polacek@redhat.com>
6999
7000 PR c/59846
7001 * c-typeck.c (parser_build_binary_op): Use location instead of
7002 input_location.
7003 (build_binary_op): Pass location to shorten_compare.
7004
f04dda30
MP
70052014-01-23 Marek Polacek <polacek@redhat.com>
7006
7007 PR c/58346
7008 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7009 an empty aggregate.
7010
789eadcd
MP
70112014-01-23 Marek Polacek <polacek@redhat.com>
7012
7013 PR c/59871
7014 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7015 of a comma expression.
7016 (emit_side_effect_warnings): Likewise.
7017
40f14e9f
BI
70182014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7019
7020 PR c/59825
7021 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7022 function to use walk_tree and moved a lot of its functionality to
7023 expand_array_notations.
7024 (expand_array_notations): New function.
7025
74558dd9
BI
70262014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7027
7028 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7029 attribute an attribute without value.
7030
652fea39
JJ
70312014-01-23 Jakub Jelinek <jakub@redhat.com>
7032
7033 PR middle-end/58809
7034 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7035 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7036
f34f1c87
MP
70372014-01-22 Marek Polacek <polacek@redhat.com>
7038
7039 PR c/59891
7040 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7041 of remove_c_maybe_const_expr on op1 and op2.
7042
241f845a
JJ
70432014-01-15 Jakub Jelinek <jakub@redhat.com>
7044
7045 PR c/58943
7046 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7047 effects, preevaluate rhs using SAVE_EXPR first.
7048
9a74f20c
BI
70492014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7050
7051 PR c++/59631
7052 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7053 statements with if-elseif statements.
7054
96066ce1
MP
70552014-01-06 Marek Polacek <polacek@redhat.com>
7056
7057 PR c/57773
7058 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7059 defined bit-field types only in ISO C.
7060
23a5b65a
RS
70612014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7062
7063 Update copyright years
7064
f9030485
RS
70652014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7066
7067 * c-array-notation.c: Use the standard form for the copyright notice.
7068
41958c28
BI
70692013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7070
7071 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7072 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7073 field in parser is not empty. If not-empty, call the function
7074 c_parser_finish_omp_declare_simd.
7075 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7076 between SIMD-enabled functions and #pragma simd. Added new parameter.
7077 (c_parser_cilk_all_clauses): Modified the usage of the function
7078 c_parser_cilk_clause_vectorlength as mentioned above.
7079 (c_parser_cilk_simd_fn_vector_attrs): New function.
7080 (c_finish_cilk_simd_fn_tokens): Likewise.
7081 (is_cilkplus_vector_p): Likewise.
7082 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7083 "nomask," and "mask" strings in clause name.
7084 (c_parser_omp_all_clauses): Added 3 new case statements:
7085 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7086 PRAGMA_CILK_CLAUSE_NOMASK.
7087 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7088 check for vector attribute and if so call the function
7089 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7090 called the function c_finish_cilk_simd_fn_tokens.
7091 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7092 parser field is non-empty. If so, parse them as you would parse
7093 the omp declare simd pragma.
7094 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7095 Added a check when step is a parameter and flag it as error.
7096 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7097 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7098 pragma_omp_clause.
7099
cef0fd0e
TS
71002013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7101
7102 * c-parser.c (c_parser_omp_parallel): Fix description.
7103
12893402
BI
71042013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7105
7106 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7107 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7108 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7109 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7110
296674db
JM
71112013-12-04 Joseph Myers <joseph@codesourcery.com>
7112
7113 PR c/52023
7114 * c-parser.c (c_parser_alignas_specifier): Use
7115 c_sizeof_or_alignof_type instead of c_alignof.
7116 (c_parser_alignof_expression): Likewise, with min_alignof
7117 parameter depending on alignof spelling used.
7118
edd28054
MP
71192013-12-04 Marek Polacek <polacek@redhat.com>
7120
7121 PR c/54113
7122 * c-decl.c (start_function): Don't warn for missing prototype for
7123 inline functions.
7124
da0fc454
MP
71252013-12-03 Marek Polacek <polacek@redhat.com>
7126
7127 PR c/59351
7128 * c-decl.c (build_compound_literal): Allow compound literals with
7129 empty initial value.
7130
4c2ecab0
JM
71312013-12-02 Joseph Myers <joseph@codesourcery.com>
7132
7133 PR c/58235
7134 * c-typeck.c (build_modify_expr): Diagnose assignment to
7135 expression with array type.
7136
340baef7
JM
71372013-11-29 Joseph Myers <joseph@codesourcery.com>
7138
7139 PR c/42262
7140 * c-typeck.c (process_init_element): Do not treat a string as
7141 initializing a whole array when used with a designator for an
7142 individual element.
7143
6763b9f7
JM
71442013-11-29 Joseph Myers <joseph@codesourcery.com>
7145
7146 PR c/57574
7147 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7148 an inline function following a static declaration.
7149
e7bd1de1
JJ
71502013-11-28 Jakub Jelinek <jakub@redhat.com>
7151
7152 PR c/59310
7153 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7154 to p_name before calling c_parser_omp_teams instead of after.
7155 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7156 argument. Remove unused p_name variable.
7157
0136f8f0
AH
71582013-11-27 Aldy Hernandez <aldyh@redhat.com>
7159 Jakub Jelinek <jakub@redhat.com>
7160
7161 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7162 external_scope is NULL.
7163
241b71bb
TV
71642013-11-27 Tom de Vries <tom@codesourcery.com>
7165 Marc Glisse <marc.glisse@inria.fr>
7166
7167 PR c++/59032
7168 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7169
2fb9a547
AM
71702013-11-22 Andrew MacLeod <amacleod@redhat.com>
7171
7172 * c-typeck.c: Add required include files from gimple.h.
7173
8400e75e
DM
71742013-11-22 David Malcolm <dmalcolm@redhat.com>
7175
7176 * c-decl.c (define_label, shadow_tag_warned)
7177 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7178 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7179 (declspecs_add_type): Remove use of in_system_header macro.
7180 * c-parser.c (c_parser_unary_expression): Likewise.
7181 * c-typeck.c (store_init_value, process_init_element)
7182 (c_start_case): Likewise.
7183
7184 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7185 macro.
7186
7187 * c-parser.c (c_parser_set_source_position_from_token): Remove
7188 reference to in_system_header from comment.
7189
386b1f1f
RS
71902013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7191
7192 * c-decl.c (grokdeclarator): Update comment to refer to
7193 tree_to_[su]hwi rather than tree_low_cst.
7194
ae7e9ddd
RS
71952013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7196
7197 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7198 tree_to_uhwi throughout.
7199
9439e9a1
RS
72002013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7201
7202 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7203 throughout.
7204
9541ffee
RS
72052013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7206
7207 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7208 throughout.
7209
c02065fc
AH
72102013-11-15 Aldy Hernandez <aldyh@redhat.com>
7211
7212 * c-parser.c (c_parser_cilk_simd): New.
7213 (c_parser_cilk_verify_simd): New.
7214 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7215 (c_parser_omp_for_loop): Add case for NE_EXPR.
7216 Set c_break_label for CILK_SIMD.
7217 (c_parser_cilk_clause_vectorlength): New.
7218 (c_parser_cilk_clause_linear): New.
7219 (c_parser_cilk_clause_name): New.
7220 (c_parser_cilk_all_clauses): New.
7221 * c-typeck.c (build_unary_op): Pass location argument to
7222 readonly_error.
7223 (build_modify_expr): Same.
7224 (build_asm_expr): Same.
7225 (c_finish_bc_stmt): Error on break/continue in loops.
7226
18f429e2
AM
72272013-11-14 Andrew MacLeod <amacleod@redhat.com>
7228
7229 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7230
d8a2d370
DN
72312013-11-14 Diego Novillo <dnovillo@google.com>
7232
7233 * c-decl.c: Include print-tree.h.
7234 Include stor-layout.h.
7235 Include varasm.h.
7236 Include attribs.h.
7237 Include stringpool.h.
7238 * c-lang.c: Include fold-const.h.
7239 * c-parser.c: Include stringpool.h.
7240 Include attribs.h.
7241 Include stor-layout.h.
7242 Include varasm.h.
7243 Include trans-mem.h.
7244 * c-typeck.c: Include stor-layout.h.
7245 Include trans-mem.h.
7246 Include varasm.h.
7247 Include stmt.h.
7248
38b7bc7f
JM
72492013-11-13 Joseph Myers <joseph@codesourcery.com>
7250
7251 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7252 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7253 __auto_type.
7254 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7255 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7256 RID_AUTO_TYPE.
7257 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7258 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7259 (c_parser_declarator, c_parser_direct_declarator_inner)
7260 (c_parser_parameter_declaration, c_parser_type_name): All callers
7261 changed.
7262 (c_parser_declaration_or_fndef): Handle declarations with type
7263 determined from the initializer.
7264
45b0be94
AM
72652013-11-12 Andrew MacLeod <amacleod@redhat.com>
7266
18f429e2 7267 * c-typeck.c: Include gimplify.h.
45b0be94 7268
582d9b50
JM
72692013-11-12 Joseph Myers <joseph@codesourcery.com>
7270
7271 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7272 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7273 comment.
7274 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7275 or _Thread_local as appropriate in diagnostics.
7276 (build_null_declspecs): Initialize ret->thread_gnu_p.
7277 (declspecs_add_scspec): Handle either __thread or _Thread_local
7278 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7279 pedantic. Do not disallow _Thread_local extern and _Thread_local
7280 static.
7281
267bac10
JM
72822013-11-07 Joseph Myers <joseph@codesourcery.com>
7283 Andrew MacLeod <amacleod@redhat.com>
7284
7285 * c-aux-info.c (gen_type): Handle atomic qualifier.
7286 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7287 qualifiers when compating types.
7288 (shadow_tag_warned): Handle atomic_p in declspecs.
7289 (quals_from_declspecs): Likewise.
7290 (start_decl): Use c_type_promotes_to when promoting argument
7291 types.
7292 (grokdeclarator): Handle _Atomic.
7293 (get_parm_info): Diagnose any qualifier on "void" as only
7294 parameter.
7295 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7296 comparing types. Use c_type_promotes_to when promoting argument
7297 types.
7298 (finish_function): Use c_type_promotes_to when promoting argument
7299 types.
7300 (build_null_declspecs): Handle atomic_p in declspecs.
7301 (declspecs_add_qual): Handle RID_ATOMIC.
7302 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7303 (c_token_starts_declspecs): Handle RID_ATOMIC.
7304 (c_parser_declspecs): Handle atomic type specifiers and
7305 qualifiers.
7306 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7307 from types of expressions with atomic type.
7308 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7309 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7310 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7311 (c_parser_statement_after_labels, c_parser_switch_statement)
7312 (c_parser_for_statement, c_parser_expr_no_commas)
7313 (c_parser_conditional_expression, c_parser_binary_expression)
7314 (c_parser_cast_expression, c_parser_unary_expression)
7315 (c_parser_postfix_expression)
7316 (c_parser_postfix_expression_after_primary, c_parser_expression):
7317 Use convert_lvalue_to_rvalue.
7318 (c_parser_expression_conv, c_parser_expr_list): Document
7319 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7320 (c_parser_objc_synchronized_statement): Use
7321 convert_lvalue_to_rvalue.
7322 (c_parser_objc_selector): Handle RID_ATOMIC.
7323 (c_parser_objc_receiver, c_parser_array_notation): Use
7324 convert_lvalue_to_rvalue.
7325 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7326 _Atomic (type-name).
7327 (struct c_declspecs): Add atomic_p field.
7328 (convert_lvalue_to_rvalue): Declare.
7329 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7330 corresponding atomic types.
7331 (qualify_type): Don't add _Atomic qualifiers from second argument.
7332 (comp_target_types): Do not allow _Atomic mismatches.
7333 (type_lists_compatible_p): Do not remove atomic qualifiers when
7334 comparing types.
7335 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7336 (build_atomic_assign): New functions.
7337 (build_unary_op): Use build_atomic_assign for atomic increment and
7338 decrement.
7339 (build_conditional_expr): Do not treat _Atomic void as a qualified
7340 version of void.
7341 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7342 (find_anonymous_field_with_type, convert_to_anonymous_field)
7343 (convert_for_assignment): Do not remove atomic qualifiers when
7344 comparing types.
7345 (digest_init): Do not accept initialization of arrays of atomic
7346 elements by string constants.
7347 (build_asm_expr): Use convert_lvalue_to_rvalue.
7348 (build_binary_op): Do not treat _Atomic void as a qualified
7349 version of void.
7350
0c249d4b
DD
73512013-11-06 DJ Delorie <dj@redhat.com>
7352
7353 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7354 both explicit and builtin, print the location of the explicit one.
7355
6d7f7e0a
TB
73562013-11-05 Tobias Burnus <burnus@net-b.de>
7357
7358 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7359 c_parser_omp_distribute, c_parser_omp_teams,
7360 c_parser_omp_target, c_parser_omp_declare): Handle
7361 -fopenmp-simd.
7362
b906f4ca
MP
73632013-11-03 Marek Polacek <polacek@redhat.com>
7364
7365 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7366
ee1d5a02
JJ
73672013-11-01 Jakub Jelinek <jakub@redhat.com>
7368
7369 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7370 check_dup_generic at the end, unless remove is true.
7371 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7372 remove = true;.
7373 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7374
5a9785fb
JJ
73752013-10-31 Jakub Jelinek <jakub@redhat.com>
7376
7377 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7378 with decl that is not pointer nor array.
7379
939b37da
BI
73802013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7381
7382 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7383 a spawning function is found.
7384 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7385 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7386 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7387 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7388 case.
7389 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7390 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7391 expr.
7392 (c_finish_return): Added a check to reject _Cilk_spawn in return
7393 expression.
7394 (build_cilk_spawn): New function.
7395 (build_cilk_sync): Likewise.
7396 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7397
d4af74d4
TB
73982013-10-27 Tobias Burnus <burnus@net-b.de>
7399
7400 PR other/33426
7401 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7402 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7403 (c_parser_statement_after_labels): Update calls.
7404
d73749df 74052013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7406
7407 PR other/33426
7408 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7409 Handle PRAGMA_IVDEP.
7410 (c_parser_statement_after_labels): Update call.
7411
f28aa681
MP
74122013-10-24 Marek Polacek <polacek@redhat.com>
7413
7414 * c-parser.c (c_parser_struct_declaration): Add a comment.
7415 (c_parser_declarator): Don't allow _Alignas here.
7416
0645c1a2
AM
74172013-10-17 Andrew MacLeod <amacleod@redhat.com>
7418
7419 * c-parser.c: Include omp-low.h.
7420 * c-typeck.c: Likewise.
7421
568a31f2
MP
74222013-10-17 Marek Polacek <polacek@redhat.com>
7423
7424 PR c/58267
7425 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7426 Document syntax of the array-declarator.
7427 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7428 are not permitted.
7429 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7430 (c_parser_struct_declaration): Likewise.
7431 (c_parser_declarator): Likewise.
7432 (c_parser_direct_declarator_inner): Likewise.
7433 (c_parser_parameter_declaration): Likewise.
7434 (c_parser_type_name): Likewise.
7435
acf0174b
JJ
74362013-10-11 Jakub Jelinek <jakub@redhat.com>
7437
7438 * c-lang.h (current_omp_declare_target_attribute): New extern
7439 decl.
7440 * c-parser.c: Include c-lang.h.
7441 (struct c_parser): Change tokens to c_token *.
7442 Add tokens_buf field. Change tokens_avail type to unsigned int.
7443 (c_parser_consume_token): If parser->tokens isn't
7444 &parser->tokens_buf[0], increment parser->tokens.
7445 (c_parser_consume_pragma): Likewise.
7446 (enum pragma_context): Add pragma_struct and pragma_param.
7447 (c_parser_external_declaration): Adjust
7448 c_parser_declaration_or_fndef caller.
7449 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7450 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7451 Adjust recursive call.
7452 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7453 of pragma_external.
7454 (c_parser_parameter_declaration): Use pragma_param instead of
7455 pragma_external.
7456 (c_parser_compound_statement_nostart, c_parser_label,
7457 c_parser_for_statement): Adjust
7458 c_parser_declaration_or_fndef callers.
7459 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7460 it through to c_parser_conditional_expression.
7461 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7462 pass it through to c_parser_binary_expression. Adjust recursive
7463 call.
7464 (c_parser_binary_expression): Remove prec argument, add
7465 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7466 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7467 binop matches it, use build2 instead of parser_build_binary_op.
7468 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7469 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7470 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7471 Handle pragma_struct and pragma_param the same as pragma_external.
7472 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7473 (c_parser_omp_variable_list): Parse array sections for
7474 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7475 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7476 (c_parser_omp_clause_reduction): Handle user defined reductions.
7477 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7478 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7479 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7480 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7481 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7482 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7483 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7484 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7485 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7486 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7487 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7488 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7489 (c_parser_omp_for_loop): Add CODE argument, pass it through
7490 to c_finish_omp_for. Change last argument to cclauses,
7491 and adjust uses to grab parallel clauses from the array of all
7492 the split clauses. Adjust c_parser_binary_expression,
7493 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7494 (omp_split_clauses): New function.
7495 (c_parser_omp_simd): New function.
7496 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7497 Allow the function to be called also when parsing combined constructs,
7498 and call c_parser_omp_simd when parsing for simd.
7499 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7500 #pragma omp section, require exactly one structured-block instead of
7501 sequence of statements.
7502 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7503 Allow the function to be called also when parsing combined constructs.
7504 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7505 Allow the function to be called also when parsing combined
7506 constructs.
7507 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7508 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7509 c_parser_omp_teams, c_parser_omp_target_data,
7510 c_parser_omp_target_update, c_parser_omp_target,
7511 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7512 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7513 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7514 (c_parser_omp_construct): Add p_name and mask vars. Handle
7515 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7516 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7517 and c_parser_omp_sections callers.
7518 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7519 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7520 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7521 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7522 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7523 OMP_CLAUSE_DEPEND.
7524 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7525 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7526 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7527 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7528 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7529 * c-typeck.c: Include tree-inline.h.
7530 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7531 handle_omp_array_sections_1, handle_omp_array_sections,
7532 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7533 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7534 user defined reductions.
7535 (c_tree_equal): New function.
7536 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7537 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7538 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7539 c_check_omp_declare_reduction_r): New prototypes.
7540 * c-decl.c (current_omp_declare_target_attribute): New variable.
7541 (c_decl_attributes): New function.
7542 (start_decl, start_function): Use it instead of decl_attributes.
7543 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7544 c_omp_reduction_decl, c_omp_reduction_lookup,
7545 c_check_omp_declare_reduction_r): New functions.
7546
0a6c2227
TT
75472013-09-25 Tom Tromey <tromey@redhat.com>
7548
7549 * Make-lang.in (c/gccspec.o): Remove.
7550 (CFLAGS-c/gccspec.o): New variable.
7551 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7552 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7553 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7554
f3bc55f0
TT
75552013-09-25 Tom Tromey <tromey@redhat.com>
7556
7557 * Make-lang.in (c/gccspec.o): Don't use subshell.
7558
a24d975c
MP
75592013-09-18 Marek Polacek <polacek@redhat.com>
7560
7561 PR sanitize/58443
7562 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7563 Remove unnecessary check.
7564
ce6923c5
MP
75652013-09-18 Marek Polacek <polacek@redhat.com>
7566
7567 PR sanitizer/58411
7568 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7569 no_sanitize_undefined attribute.
7570
a1e51df9
KT
75712013-09-13 Kai Tietz <ktietz@redhat.com>
7572
7573 PR target/57848
7574 * c-decl.c (c_builtin_function_ext_scope): Remove
7575 wrong assumption that it is never called on prexisting
7576 symbol.
7577
0af94e6f
JR
75782013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7579
7580 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7581
20059c8b
GDR
75822013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7583
7584 * c-objc-common.c (c_tree_printer): Tidy.
7585
de5a5fa1
MP
75862013-08-30 Marek Polacek <polacek@redhat.com>
7587
7588 * c-typeck.c (build_binary_op): Add division by zero and shift
7589 instrumentation.
7590
2531a1d9 75912013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7592 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7593
6e2bcc98 7594 PR c/35649
2531a1d9
JR
7595 * c-typeck.c (c_common_type): Prefer double_type_node over
7596 other REAL_TYPE types with the same precision.
7597 (convert_arguments): Likewise.
7598
025311c4
GDR
75992013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7600
7601 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7602 (c_initialize_diagnostics): Call a destructor for the early printer.
7603
da6ca2b5
GDR
76042013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7605
7606 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7607 printer initialization.
7608
318cda85 76092013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7610
318cda85
BI
7611 PR c/57490
7612 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7613 check for truth values.
7614 (expand_array_notation_exprs): Added truth values case. Removed an
7615 unwanted else. Added for-loop to walk through subtrees in default
7616 case.
7617
b066401f
GDR
76182013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7619
7620 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7621
fb48aadc
JM
76222013-07-23 Joseph Myers <joseph@codesourcery.com>
7623
7624 * c-parser.c (struct c_generic_association): Fix typo.
7625
433cc7b0
TT
76262013-07-23 Tom Tromey <tromey@redhat.com>
7627 Joseph Myers <joseph@codesourcery.com>
7628
7629 * c-parser.c (struct c_generic_association): New.
7630 (c_generic_association_d): New typedef.
7631 (c_parser_generic_selection): New function.
7632 (c_parser_postfix_expression): Handle RID_GENERIC.
7633
26d40c3d
JM
76342013-07-13 Jason Merrill <jason@redhat.com>
7635
7636 PR c++/57793
7637 * c-decl.c (finish_struct): Check for too-large class.
7638
ecdbd01a 76392013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7640
7641 PR c/57821
7642 * c-typeck.c (set_init_index): When folding, check for index overflow.
7643
1141ed3f
BI
76442013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7645
7646 * c-parser.c (c_parser_array_notation): Removed rejection of array
7647 notations in an array of function pointers.
7648
713b46fa
BI
76492013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7650
7651 * c-array-notation.c (make_triplet_val_inv): New function.
7652 (create_cmp_incr): Likewise.
7653 (create_array_refs): Likewise.
7654 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7655 Also modularized common parts between functions and called the function.
7656 (build_array_notation_expr): Likewise.
7657 (fix_conditional_array_notations_1): Likewise.
7658 (fix_array_notation_expr): Likewise.
7659 (fix_array_notation_call_expr): Likewise.
7660
92f20202
MP
76612013-06-18 Marek Polacek <polacek@redhat.com>
7662
7663 PR c/57630
7664 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7665
73a23b06
BI
76662013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7667
7668 * c-array-notation.c (build_array_notation_expr): Reject array notation
7669 mismatch between LHS and RHS even inside a call_expr. Also, removed
7670 a couple while statements that were dead code.
7671
00b8517d
BI
76722013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7673
7674 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7675 excessive precision expressions in function parameters. Also removed
7676 couple unwanted while statements.
7677
1509bdda
BI
76782013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7679
7680 * c-array-notation.c (expand_array_notation_exprs): Added
7681 ARRAY_NOTATION_REF case.
ab20d992 7682
d60f1706
BI
76832013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7684
7685 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7686 function to c-family/array-notation-common.c.
7687 (is_cilkplus_reduce_builtin): Likewise.
7688 (find_rank): Likewise.
7689 (extract_array_notation_exprs): Likewise.
7690 (replace_array_notations): Likewise.
7691 (find_inv_trees): Likewise.
7692 (replace_inv_trees): Likewise.
7693 (contains_array_notation_expr): Likewise.
7694 (find_correct_array_notation_type): Likewise.
7695 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7696 (struct inv_list): Moved this to c-family/array-notation-common.c.
7697 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7698
6d6efbb3
BI
76992013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7700
7701 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7702 reduction functions outside the for-loop. Added a check if the fundecl
7703 is non-NULL. Finally, removed an unwanted if-statement, and made the
7704 body unconditional.
7705
25c22937
BI
77062013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7707
7708 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7709 condition of the if-statement matches the rank of else-block and then-
7710 block when array notations are used.
7711 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7712 expression after the entire function body is parsed.
7713 (c_parser_expr_no_commas): Delayed creating array notation expressions
7714 to the end of function parsing.
7715 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7716 whole if-statement instead of just the condition.
ab20d992 7717 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7718
edd25645
BI
77192013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7720
7721 PR c/57474
7722 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7723 array to NULL_TREE if they are unused. Also added a check for the
7724 field to be NULL before its fields are used in future.
ab20d992 7725
065ce7f1
RO
77262013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7727
7728 PR bootstrap/57450
7729 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7730 (build_array_notation_expr): Likewise.
7731
36536d79
BI
77322013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7733
7734 * c-typeck.c (build_array_ref): Added a check to see if array's
7735 index is greater than one. If true, then emit an error.
7736 (build_function_call_vec): Exclude error reporting and checking
7737 for builtin array-notation functions.
7738 (convert_arguments): Likewise.
7739 (c_finish_return): Added a check for array notations as a return
7740 expression. If true, then emit an error.
7741 (c_finish_loop): Added a check for array notations in a loop
7742 condition. If true then emit an error.
7743 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7744 (build_binary_op): Added a check for array notation expr inside
7745 op1 and op0. If present, we call another function to find correct
7746 type.
7747 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7748 * c-parser.c (c_parser_compound_statement): Check if array
7749 notation code is used in tree, if so, then transform them into
7750 appropriate C code.
7751 (c_parser_expr_no_commas): Check if array notation is used in LHS
7752 or RHS, if so, then build array notation expression instead of
7753 regular modify.
7754 (c_parser_postfix_expression_after_primary): Added a check for
7755 colon(s) after square braces, if so then handle it like an array
7756 notation. Also, break up array notations in unary op if found.
7757 (c_parser_direct_declarator_inner): Added a check for array
7758 notation.
7759 (c_parser_compound_statement): Added a check for array notation in
7760 a stmt. If one is present, then expand array notation expr.
7761 (c_parser_if_statement): Likewise.
7762 (c_parser_switch_statement): Added a check for array notations in
7763 a switch statement's condition. If true, then output an error.
7764 (c_parser_while_statement): Similarly, but for a while.
7765 (c_parser_do_statement): Similarly, but for a do-while.
7766 (c_parser_for_statement): Similarly, but for a for-loop.
7767 (c_parser_unary_expression): Check if array notation is used in a
7768 pre-increment or pre-decrement expression. If true, then expand
7769 them.
7770 (c_parser_array_notation): New function.
7771 * c-array-notation.c: New file.
7772 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7773
cd192ccc
MS
77742013-05-23 Mike Stump <mikestump@comcast.net>
7775
7776 * c-typeck.c (convert_for_assignment): Handle references to memory
7777 spaces better.
7778
427b248d
JM
77792013-05-16 Jason Merrill <jason@redhat.com>
7780
7781 * Make-lang.in (cc1$(exeext)): Use link mutex.
7782
44d90fe1
PC
77832013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7784
7785 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7786 to simply use OPT_Wpointer_arith.
7787 (build_unary_op): Likewise.
7788
4e7d7b3d
JJ
77892013-04-03 Jakub Jelinek <jakub@redhat.com>
7790
7791 PR c/19449
7792 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7793 argument. If set, or it temporarily for parsing of the first
7794 argument into force_folding_builtin_constant_p.
7795 (c_parser_postfix_expression): Adjust callers.
7796
839b422f
RB
77972013-03-21 Richard Biener <rguenther@suse.de>
7798
7799 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7800 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7801
2ee028f1
MP
78022013-02-12 Marek Polacek <polacek@redhat.com>
7803
7804 PR c/44938
7805 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7806 origtypes to NULL.
7807
8824edff
JJ
78082013-01-24 Jakub Jelinek <jakub@redhat.com>
7809
7810 PR c/56078
7811 * c-typeck.c (set_nonincremental_init_from_string): If
7812 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7813 returned false.
7814 (process_init_element): Likewise.
7815
eadd3d0d
JJ
78162012-12-20 Jakub Jelinek <jakub@redhat.com>
7817
7818 PR c++/55619
7819 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7820 argument, don't call default_function_array_conversion
7821 nor c_fully_fold here.
7822 (c_parser_asm_statement): Adjust callers.
7823 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7824 and outputs here, and call default_function_array_conversion
7825 on inputs that don't need to be addressable.
7826
f8a93a2e
JJ
78272012-12-18 Jakub Jelinek <jakub@redhat.com>
7828
7829 PR c/39464
7830 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7831 warning require that both c_common_unsigned_type as well as
7832 c_common_signed_type is the same for both mvl and mvr types.
7833
9771b263
DN
78342012-11-16 Diego Novillo <dnovillo@google.com>
7835
7836 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7837
7838 * c-common.c: Use new vec API in vec.h.
7839 * c-common.h: Likewise.
7840 * c-gimplify.c: Likewise.
7841 * c-pragma.c: Likewise.
7842 * c-pretty-print.c: Likewise.
7843 * c-pretty-print.h: Likewise.
7844 * c-semantics.c: Likewise.
7845 * c-decl.c: Likewise.
7846 * c-parser.c: Likewise.
7847 * c-tree.h: Likewise.
7848 * c-typeck.c: Likewise.
7849
880661a4
JW
78502012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7851
7852 PR c++/54930
7853 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7854
077d1abe
MLI
78552012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7856
7857 PR c/53066
7858 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7859 shadows a function, unless the variable is a function or a
7860 pointer-to-function.
7861
3a785c97
JJ
78622012-10-12 Jakub Jelinek <jakub@redhat.com>
7863
7864 PR c/54381
7865 * c-parser.c (struct c_tree_loc_pair): Removed.
7866 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7867 add location_t * and tree * arguments, fill in array of 3
7868 sizeof_arg trees and corresponding locs.
7869 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7870 c_parser_expr_list callers.
7871 (c_parser_postfix_expression_after_primary): Likewise. Pass
7872 array of 3 sizeof_arg trees and locs (corresponding to first
7873 3 arguments) to sizeof_pointer_memaccess_warning.
7874
703c8606
LC
78752012-10-09 Lawrence Crowl <crowl@google.com>
7876
7877 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7878 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7879 hash table.
7880
5d9de0d0
PC
78812012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7882
7883 PR c++/54194
7884 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7885 call.
7886
a212e43f
MG
78872012-10-09 Marc Glisse <marc.glisse@inria.fr>
7888
7889 PR c++/54427
7890 * c-typeck.c: Include c-common.h.
7891 (enum stv_conv): Moved to c-common.h.
7892 (scalar_to_vector): Moved to c-common.c.
7893 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7894 * Make-lang.in: c-typeck.c depends on c-common.h.
7895
3b78de56
AC
78962012-10-04 Arnaud Charlet <charlet@adacore.com>
7897
7898 * c-decl.c (c_write_global_declarations): Fix handling of
7899 -fdump-ada-spec*.
7900
78c60e3d
SS
79012012-09-30 Sharad Singhai <singhai@google.com>
7902
7903 * c-decl.c (c_write_global_declarations): Use a different method
7904 to determine if the dump has ben initialized.
7905
9f33203d
JM
79062012-09-14 Joseph Myers <joseph@codesourcery.com>
7907
7908 PR c/54552
7909 * c-typeck.c (c_cast_expr): When casting to a type requiring
7910 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7911 c_fully_fold first.
7912
a27d595d
JM
79132012-09-14 Joseph Myers <joseph@codesourcery.com>
7914
7915 PR c/54103
7916 * c-typeck.c (build_unary_op): Pass original argument of
7917 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7918 any C_MAYBE_CONST_EXPR, if it has integer operands.
7919 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7920 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7921 to c_objc_common_truthvalue_conversion, then remove any
7922 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7923 c_objc_common_truthvalue_conversion not
7924 c_common_truthvalue_conversion.
7925 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7926 call note_integer_operands for arguments with integer operands
7927 that are not integer constants.
7928
9feb29df
JJ
79292012-09-13 Jakub Jelinek <jakub@redhat.com>
7930
7931 PR c/54559
7932 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7933 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7934
d409320c
JJ
79352012-08-31 Jakub Jelinek <jakub@redhat.com>
7936
7937 PR c/54428
7938 * c-convert.c (convert): Don't call fold_convert_loc if
7939 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7940 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7941 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7942
6265d07c
JJ
79432012-08-24 Jakub Jelinek <jakub@redhat.com>
7944
7945 PR c/54355
7946 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7947 for nested and empty_ok arguments in the call to
7948 c_parser_declaration_or_fndef.
7949
1a4049e7
JJ
79502012-08-17 Jakub Jelinek <jakub@redhat.com>
7951
7952 * c-tree.h (c_last_sizeof_arg): Declare.
7953 * c-parser.c (struct c_tree_loc_pair): New type.
7954 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7955 non-NULL.
7956 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7957 (c_parser_postfix_expression_after_primary): Likewise. Call
7958 sizeof_pointer_memaccess_warning if needed.
7959 (sizeof_ptr_memacc_comptypes): New function.
7960 * c-typeck.c (c_last_sizeof_arg): New global variable.
7961 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7962
0229aee9
UB
79632012-07-24 Uros Bizjak <ubizjak@gmail.com>
7964
7965 * c-lang.h (lang_decl): Add variable_size GTY option.
7966
7ee2468b
SB
79672012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7968
7969 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7970 * Make-lang.in: Fix dependencies.
7971
d4a10d0a
SB
79722012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7973
7974 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7975 and add language Makefile hooks.
7976 * config-lang.in: New file.
7977 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7978 add the required "normal" config-lang.in rules.
7979 * c-lang.h: Moved from gcc/ to here.
7980 * c-tree.h: Likewise.
7981 * c-objc-common.c: Likewise.
7982 * c-objc-common.h: Likewise.
7983 * c-typeck.c: Likewise.
7984 * c-convert.c: Likewise.
7985 * c-lang.c: Likewise.
7986 * c-aux-info.c: Likewise.
7987 * c-errors.c: Likewise.
7988 * gccspec.c: Likewise.
7989 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7990 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7991\f
c48514be 7992Copyright (C) 2012-2021 Free Software Foundation, Inc.
d4a10d0a
SB
7993
7994Copying and distribution of this file, with or without modification,
7995are permitted in any medium without royalty provided the copyright
7996notice and this notice are preserved.