]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
d: Use HOST_WIDE_INT for type size temporaries.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
280d2838
GA
12021-11-17 Martin Sebor <msebor@redhat.com>
2
3 PR c/101702
4 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
5 bounds before deciding if they're constant.
6
e2b57363
GA
72021-11-15 Jakub Jelinek <jakub@redhat.com>
8
9 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
10 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
11
b39265d4
GA
122021-11-11 Jakub Jelinek <jakub@redhat.com>
13
14 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
15 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
16 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
17 OMP_CLAUSE_NUM_TEAMS_EXPR.
18 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
19 combined target teams even lower-bound expression.
20
212021-11-11 Richard Biener <rguenther@suse.de>
22
23 * gimple-parser.c: Shuffle bitmap.h include.
24
18ae471f
GA
252021-11-03 Joseph Myers <joseph@codesourcery.com>
26
27 PR c/103031
28 * c-convert.c (c_convert): New function, based on convert.
29 (convert): Make into wrapper of c_convert.
30 (convert_init): New function.
31 * c-typeck.c (enum impl_conv): Add ic_init_const.
32 (convert_for_assignment): Handle ic_init_const like ic_init. Add
33 new argument to convert_and_check call.
34 (digest_init): Pass ic_init_const to convert_for_assignment for
35 initializers required to be constant.
36
b4df2dd3
GA
372021-11-02 Richard Sandiford <richard.sandiford@arm.com>
38
39 * c-tree.h (c_simulate_record_decl): Declare.
40 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
41 * c-decl.c (c_simulate_record_decl): New function.
42
c2bd5d8a
GA
432021-10-22 Eric Gallager <egallager@gcc.gnu.org>
44
45 PR other/102663
46 * Make-lang.in: Add dummy c.install-dvi target.
47
93d183a5
GA
482021-10-15 Richard Biener <rguenther@suse.de>
49
50 PR c/102763
51 * gimple-parser.c
52 (c_parser_gimple_postfix_expression_after_primary): Check
53 for a pointer do be dereferenced by ->.
54
5d5885c9
GA
552021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
56
57 * c-parser.c (c_finish_omp_declare_variant): Change call from
58 c_omp_check_context_selector to omp_check_context_selector. Change
59 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
60
c9db17b8
GA
612021-10-09 Jakub Jelinek <jakub@redhat.com>
62
63 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
64 (c_parser_omp_scan_loop_body): Use it.
65 (c_parser_omp_sections_scope): Likewise.
66
50e20ee6
GA
672021-10-07 Richard Biener <rguenther@suse.de>
68
69 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
70
bb6194e0
GA
712021-10-05 Richard Biener <rguenther@suse.de>
72
73 PR c/102605
74 * gimple-parser.c (c_parser_gimple_postfix_expression):
75 Accept more address _Literals.
76
da9c5f78
GA
772021-10-04 Marek Polacek <polacek@redhat.com>
78
79 PR c++/97573
80 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
81
9d116bcc
GA
822021-10-01 Martin Sebor <msebor@redhat.com>
83
84 PR c/102103
85 * c-typeck.c (maybe_warn_for_null_address): New function.
86 (build_binary_op): Call it.
87
882021-10-01 Jakub Jelinek <jakub@redhat.com>
89 Richard Biener <rguenther@suse.de>
90
91 PR sanitizer/102515
92 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
93 for division even for SANITIZE_SI_OVERFLOW.
94
952021-10-01 Jakub Jelinek <jakub@redhat.com>
96
97 * c-parser.c (c_parser_omp_clause_order): Set
98 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
99
fd133479
GA
1002021-09-28 Andrew Pinski <apinski@marvell.com>
101
102 PR c/32122
103 * c-parser.c (c_parser_statement_after_labels): Pass
104 the c_expr instead of the tree to c_finish_goto_ptr.
105 * c-typeck.c (c_finish_goto_ptr): Change the second
106 argument type to c_expr.
107 * c-tree.h (c_finish_goto_ptr): Likewise.
108 Error out if the expression was not of a pointer type.
109
e4777439
GA
1102021-09-22 Jakub Jelinek <jakub@redhat.com>
111
112 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
113 modifiers.
114
cf74e7b5
GA
1152021-09-18 Jakub Jelinek <jakub@redhat.com>
116
117 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
118 and reproducible modifiers.
119 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
120
1212021-09-18 Jakub Jelinek <jakub@redhat.com>
122
123 * c-parser.c (c_parser_omp_clause_default): Handle private and
124 firstprivate arguments, adjust diagnostics on unknown argument.
125
0a4cb439
GA
1262021-09-17 Jakub Jelinek <jakub@redhat.com>
127
128 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
129 is true.
130
a26206ec
GA
1312021-09-10 Jakub Jelinek <jakub@redhat.com>
132
133 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
134 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
135 don't call build_conditional_expr, instead build a COND_EXPR directly.
136 (c_parser_binary_expression): Avoid calling parser_build_binary_op
137 if omp_atomic_lhs even in more cases for >, < or ==.
138 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
139 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
140 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
141 * c-typeck.c (build_binary_op): For flag_openmp only handle
142 MIN_EXPR/MAX_EXPR.
143
b2748138
GA
1442021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
145
146 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
147 directive.
148
e11c6046
GA
1492021-09-01 Iain Sandoe <iain@sandoe.co.uk>
150
151 * c-decl.c (enum deprecated_states): Add unavailable state.
152 (merge_decls): Copy unavailability.
153 (quals_from_declspecs): Handle unavailable case.
154 (start_decl): Amend the logic handling suppression of nested
155 deprecation states to include unavailability.
156 (smallest_type_quals_location): Amend comment.
157 (grokdeclarator): Handle the unavailable deprecation state.
158 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
159 * c-tree.h (struct c_declspecs): Add unavailable_p.
160 * c-typeck.c (build_component_ref): Handle unavailability.
161 (build_external_ref): Likewise.
162
1632021-09-01 Roger Sayle <roger@nextmovesoftware.com>
164 Joseph Myers <joseph@codesourcery.com>
165
166 PR c/79412
167 * c-decl.c (duplicate_decls): On significant mismatches, mark the
168 types of both (non-function) decls as error_mark_node, so that the
169 middle-end can see the code is malformed.
170 (free_attr_access_data): Don't process if the type has been set to
171 error_mark_node.
172
6d51ee43
GA
1732021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
174
175 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
176 and 'ancestor' in 'target device' clauses.
177
38b19c5b
GA
1782021-08-23 Jakub Jelinek <jakub@redhat.com>
179
180 * c-parser.c (c_parser_omp_clause_num_tasks,
181 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
182
5b2876f9
GA
1832021-08-22 Martin Uecker <muecker@gwdg.de>
184
185 PR c/98397
186 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
187 for pointers to arrays with qualifiers.
188 (build_conditional_expr): For C23 don't lose qualifiers for pointers
189 to arrays when the other pointer is a void pointer. Update warnings.
190 (convert_for_assignment): Update warnings for C2X when converting from
191 void* with qualifiers to a pointer to array with the same qualifiers.
192
7c9e1645
GA
1932021-08-20 Jakub Jelinek <jakub@redhat.com>
194
195 * c-parser.c (c_parser_omp_error): New function.
196 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
197
1982021-08-20 Jakub Jelinek <jakub@redhat.com>
199
200 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
201 comma at the end of list.
202 (c_parser_omp_requires): Likewise.
203
b57fba5e
GA
2042021-08-19 Jakub Jelinek <jakub@redhat.com>
205
206 * c-parser.c (c_parser_omp_requires): Don't call
207 c_parser_peek_2nd_token and optionally consume token if current
208 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
209
6e529985
GA
2102021-08-18 Jakub Jelinek <jakub@redhat.com>
211
212 * c-parser.c (c_parser_omp_nothing): New function.
213 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
214
2152021-08-18 Jakub Jelinek <jakub@redhat.com>
216
217 * c-parser.c (c_parser_statement_after_labels): Add restart label
218 near the start of the function. If c_parser_pragma returns false,
219 goto restart.
220 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
221 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
222 return what c_parser_omp_declare returned. Return true instead of
223 false after emitting errors that the directive is not allowed in
224 pragma_stmt context.
225 (c_parser_omp_ordered): Return true instead of
226 false after emitting errors that the directive is not allowed in
227 pragma_stmt context.
228 (c_parser_omp_target_update): Likewise.
229 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
230 Change return type from tree to bool, return false if the
231 directive should be ignored in pragma_stmt contexts.
232 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
233 return their result directly.
234 (c_parser_omp_cancellation_point): Change return type from void to
235 bool, return false if the directive should be ignored in pragma_stmt
236 contexts.
237 (c_parser_omp_declare): Likewise.
238
2d14d64b
GA
2392021-08-17 Jakub Jelinek <jakub@redhat.com>
240
241 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
242 (c_parser_omp_scope): New function.
243 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
244
72be20e2
GA
2452021-08-12 Jakub Jelinek <jakub@redhat.com>
246
247 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
248 (c_parser_omp_clause_filter): New function.
249 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
250 (OMP_MASKED_CLAUSE_MASK): Define.
251 (c_parser_omp_masked): New function.
252 (c_parser_omp_parallel): Handle parallel masked.
253 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
254 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
255
2562021-08-12 Martin Uecker <muecker@gwdg.de>
257
258 PR c/101838
259 PR c/29970
260 * c-typeck.c (c_expr_sizeof_type): Evaluate
261 size expressions for structs of variable size.
262
2632021-08-12 Tobias Burnus <tobias@codesourcery.com>
264
265 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
266 'primary' as alias for 'master'.
267
3ae564ea
GA
2682021-08-10 Martin Uecker <muecker@gwdg.de>
269
270 PR c/29970
271 * c-typeck.c (c_expr_sizeof_expr): Evaluate
272 size expressions for structs of variable size.
273
f92f4778
GA
2742021-08-06 Tamar Christina <tamar.christina@arm.com>
275
276 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
277 * c-tree.h (c_simulate_enum_decl): Likewise.
278
2792021-08-06 Martin Sebor <msebor@redhat.com>
280
281 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
282 vec arguments to by-reference.
283 (c_finish_omp_declare_simd): Same.
284 (c_parser_compound_statement_nostart): Same.
285 (c_parser_for_statement): Same.
286 (c_parser_objc_methodprotolist): Same.
287 (c_parser_oacc_routine): Same.
288 (c_parser_omp_for_loop): Same.
289 (c_parser_omp_declare_simd): Same.
290
419c6c68
GA
2912021-07-21 Thomas Schwinge <thomas@codesourcery.com>
292 Joseph Myers <joseph@codesourcery.com>
293 Cesar Philippidis <cesar@codesourcery.com>
294
295 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
296 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
297 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
298 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
299
92d45509
GA
3002021-07-20 Martin Sebor <msebor@redhat.com>
301
302 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
303 by-const-reference.
304 * c-typeck.c (c_build_function_call_vec): Same.
305
d97d71a1
GA
3062021-07-15 Martin Sebor <msebor@redhat.com>
307
308 PR c/101289
309 PR c/97548
310 * c-decl.c (get_parm_array_spec): Strip nops.
311
6fba0eea
GA
3122021-07-06 Martin Sebor <msebor@redhat.com>
313
314 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
315
7a60a6e8
GA
3162021-07-02 Jakub Jelinek <jakub@redhat.com>
317
318 PR c/101297
319 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
320 appears before a CPP_NAME.
321
90708f87
GA
3222021-06-25 Martin Sebor <msebor@redhat.com>
323
324 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
325 warning_suppressed_p, suppress_warning, and copy_no_warning.
326 (diagnose_mismatched_decls): Same.
327 (duplicate_decls): Same.
328 (grokdeclarator): Same.
329 (finish_function): Same.
330 (c_write_global_declarations_1): Same.
331 * c-fold.c (c_fully_fold_internal): Same.
332 * c-parser.c (c_parser_expr_no_commas): Same.
333 (c_parser_postfix_expression): Same.
334 * c-typeck.c (array_to_pointer_conversion): Same.
335 (function_to_pointer_conversion): Same.
336 (default_function_array_conversion): Same.
337 (convert_lvalue_to_rvalue): Same.
338 (default_conversion): Same.
339 (build_indirect_ref): Same.
340 (build_function_call_vec): Same.
341 (build_atomic_assign): Same.
342 (build_unary_op): Same.
343 (c_finish_return): Same.
344 (emit_side_effect_warnings): Same.
345 (c_finish_stmt_expr): Same.
346 (c_omp_clause_copy_ctor): Same.
347
9aa8327e
GA
3482021-06-24 Jakub Jelinek <jakub@redhat.com>
349
350 PR c/101176
351 * c-parser.c (c_parser_has_attribute_expression): Set source range for
352 the result.
353
3542021-06-24 Jakub Jelinek <jakub@redhat.com>
355
356 PR c/101171
357 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
358 error_mark_node.
359
3602021-06-24 Jakub Jelinek <jakub@redhat.com>
361
362 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
363 C_ORT_OMP for clauses on target construct.
364 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
365 (c_parser_omp_target): For non-combined target add
366 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
367 C_ORT_OMP_TARGET to c_finish_omp_clauses.
368 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
369 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
370 never present on C_ORT_*DECLARE_SIMD.
371 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
372 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
373 corresponding map clauses.
374
2f080224
GA
3752021-06-21 Jakub Jelinek <jakub@redhat.com>
376
377 PR inline-asm/100785
378 * c-typeck.c (c_mark_addressable): Diagnose trying to make
379 bit-fields addressable.
380
ede6c356
GA
3812021-06-15 Robin Dapp <rdapp@linux.ibm.com>
382
383 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
384 similar.
385
8dc48181
GA
3862021-06-14 Tobias Burnus <tobias@codesourcery.com>
387
388 PR c/100913
389 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
390 var in the error case.
391
438aac59
GA
3922021-06-07 Eric Botcazou <ebotcazou@adacore.com>
393
394 PR c/100920
395 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
396 spot built-in functions.
397
7d6987e9
GA
3982021-06-06 Jakub Jelinek <jakub@redhat.com>
399
400 PR c/100902
401 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
402 even when target is combined with other constructs.
403
4042021-06-06 Eric Botcazou <ebotcazou@adacore.com>
405
406 PR c/100920
407 * c-decl.c (finish_struct): Fix thinko in previous change.
408 * c-typeck.c (convert_for_assignment): Do not warn on pointer
409 assignment and initialization for storage order purposes if the
410 RHS is a call to a DECL_IS_MALLOC function.
411
600f90cb
GA
4122021-06-04 Martin Sebor <msebor@redhat.com>
413
414 PR c/100783
415 * c-objc-common.c (print_type): Handle erroneous types.
416
440c8a0a
GA
4172021-06-03 Jakub Jelinek <jakub@redhat.com>
418
419 PR c++/100859
420 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
421 after depend only cases.
422
ee682192
GA
4232021-05-31 Richard Biener <rguenther@suse.de>
424
425 PR c++/88601
426 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
427 * c-parser.c (c_parser_postfix_expression): Likewise.
428
48166757
GA
4292021-05-28 Richard Biener <rguenther@suse.de>
430
431 PR c/100803
432 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
433 invalid if conditions.
434
4352021-05-28 Jakub Jelinek <jakub@redhat.com>
436
437 PR middle-end/99928
438 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
439 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
440 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
441 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
442 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
443 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
444 if present in map_head, map_field_head or map_firstprivate_head
445 bitmaps.
446
4472021-05-28 Tobias Burnus <tobias@codesourcery.com>
448
449 * c-parser.c (c_parser_omp_clause_affinity): New.
450 (c_parser_omp_clause_name, c_parser_omp_variable_list,
451 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
452 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
453 c_finish_omp_clauses): Likewise.
454
01c59ef2
GA
4552021-05-26 Eric Botcazou <ebotcazou@adacore.com>
456
457 PR c/100653
458 * c-decl.c (finish_struct): Warn for a union containing an aggregate
459 field with a differing scalar storage order.
460
2832d51b
GA
4612021-05-21 Jakub Jelinek <jakub@redhat.com>
462
463 PR middle-end/99928
464 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
465 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
466 if a decl is mentioned both in map clause and in such firstprivate
467 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
468
65f32e5d
GA
4692021-05-19 Jakub Jelinek <jakub@redhat.com>
470
471 PR middle-end/99928
472 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
473 master when combined with taskloop.
474 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
475 parallel master when not combined with taskloop.
476
a8daf9a1
GA
4772021-05-18 Richard Biener <rguenther@suse.de>
478
479 PR c/100522
480 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
481 Diagnose calls to non-functions.
482 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
483
a7ffc1ef
GA
4842021-05-17 Richard Biener <rguenther@suse.de>
485
486 PR c/100625
487 * gimple-parser.c (c_parser_gimple_label): Avoid building
488 a GIMPLE label with NULL label decl.
489
f9af11c7
GA
4902021-05-13 Martin Sebor <msebor@redhat.com>
491
492 PR c/100550
493 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
494
0ff3a0f2
GA
4952021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
496
497 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
498 'close'.
499
aa891c56
GA
5002021-05-10 Martin Liska <mliska@suse.cz>
501
502 * c-aux-info.c (affix_data_type): Use startswith
503 function instead of strncmp.
504 * c-typeck.c (build_function_call_vec): Likewise.
505 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
506
62d87a32
GA
5072021-05-07 Eric Botcazou <ebotcazou@adacore.com>
508
509 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
510 on the address of a pointer field in a record with reverse SSO.
511
99e8df7a
GA
5122021-05-04 Tobias Burnus <tobias@codesourcery.com>
513
514 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
515 for || and && reductions.
516
3c8e539d
GA
5172021-04-29 Joseph Myers <joseph@codesourcery.com>
518
519 * c-typeck.c (function_types_compatible_p): For C2X, treat
520 unprototyped function as compatible with non-variadic prototyped
521 function even if some argument types are changed by the default
522 argument promotions.
523
ee351f7f
GA
5242021-04-15 Martin Sebor <msebor@redhat.com>
525
526 PR c/99420
527 PR c/99972
528 * c-decl.c (pushdecl): Always propagate type attribute.
529
5302021-04-15 Richard Sandiford <richard.sandiford@arm.com>
531
532 PR c/98852
533 * c-typeck.c (c_common_type): Do not drop attributes that
534 affect type identity.
535
1d54b138
GA
5362021-04-10 Jakub Jelinek <jakub@redhat.com>
537
538 PR c/99990
539 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
540 error_mark_node.
541
4493b1c1
GA
5422021-03-25 Jakub Jelinek <jakub@redhat.com>
543
544 PR c++/99565
545 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
546 to operand_equal_p.
547
5f256a70
GA
5482021-03-19 Jakub Jelinek <jakub@redhat.com>
549
550 PR c/99588
551 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
552 with modifycode NOP_EXPR produces and mark the _Atomic var as read
553 if found.
554 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
555 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
556 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
557
3c5b6d24
GA
5582021-03-15 Tobias Burnus <tobias@codesourcery.com>
559
560 PR c++/99509
561 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
562 ensure that the varpool node is marked as offloadable.
563
ceae9533
GA
5642021-03-05 Tobias Burnus <tobias@codesourcery.com>
565
566 PR c/99137
567 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
568
4028d01a
GA
5692021-02-24 Martin Sebor <msebor@redhat.com>
570
571 PR middle-end/97172
572 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
573
bf81237e
GA
5742021-02-18 Jakub Jelinek <jakub@redhat.com>
575
576 PR c/99136
577 * c-typeck.c (c_finish_return): Don't wrap retval into
578 EXCESS_PRECISION_EXPR in functions that return void.
579
0c5cdb31
GA
5802021-02-11 Marek Polacek <polacek@redhat.com>
581
582 * c-parser.c (c_parser_if_statement): Use vec_free.
583
a19dd5e6
GA
5842021-02-04 Martin Sebor <msebor@redhat.com>
585
586 PR c/97882
587 * c-decl.c (locate_old_decl): Add type to diagnostic output.
588 (diagnose_mismatched_decls): Same.
589 (start_function): Introduce temporaries for better readability.
590 * c-typeck.c (comptypes_internal): Only consider complete enum
591 types in comparisons with integers.
592
f7884fb1
GA
5932021-02-01 Martin Sebor <msebor@redhat.com>
594
595 PR middle-end/97172
596 * c-decl.c (free_attr_access_data): New function.
597 (c_parse_final_cleanups): Call free_attr_access_data.
598
59cf67d1
GA
5992021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
600
601 * c-parser.c (c_parser_omp_clause_detach): New.
602 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
603 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
604 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
605 clause. Prevent use of detach with mergeable and overriding the
606 data sharing mode of the event handle.
607
2f7f0d32
GA
6082021-01-15 Jakub Jelinek <jakub@redhat.com>
609
610 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
611 unqualified element type and then call c_build_qualified_type on the
612 ARRAY_TYPE.
613
7d187e4f
GA
6142021-01-07 Richard Biener <rguenther@suse.de>
615
616 * gimple-parser.c (c_parser_gimple_compound_statement): Only
617 reallocate loop array if it is too small.
618
eefe499f
GA
6192020-12-16 Martin Uecker <muecker@gwdg.de>
620
621 PR c/98047
622 * c-typeck.c (build_modify_expr): Drop qualifiers.
623
6242020-12-16 Martin Uecker <muecker@gwdg.de>
625
626 PR c/98260
627 * c-parser.c (c_parser_expression): Look into
628 nop expression when marking expressions as read.
629
d52945ce
GA
6302020-12-14 Martin Liska <mliska@suse.cz>
631
632 PR sanitizer/98204
633 * c-typeck.c (pointer_diff): Do not emit a top-level
634 sanitization.
635 (build_binary_op): Likewise.
636
ca2bd949
GA
6372020-12-09 Tobias Burnus <tobias@codesourcery.com>
638
639 * c-parser.c (c_parser_omp_allocate): New.
640 (c_parser_omp_construct): Call it.
641
6422020-12-09 Richard Biener <rguenther@suse.de>
643
644 PR c/98200
645 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
646 early on error.
647
bc8a7013
GA
6482020-12-07 Martin Uecker <muecker@gwdg.de>
649
650 PR c/97981
651 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
652 that drops qualifiers to the end of the function.
653
d48df6f2
GA
6542020-11-26 Martin Uecker <muecker@gwdg.de>
655
656 PR c/65455
657 PR c/92935
658 * c-parser.c (c_parser_declaration_or_fndef): Remove
659 redundant code to drop qualifiers of _Atomic types for __auto_type.
660 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
661 types for __typeof__.
662
1e2c9a27
GA
6632020-11-24 Jakub Jelinek <jakub@redhat.com>
664
665 PR c/97958
666 * c-parser.c (c_parser_binary_expression): For omp atomic binary
667 expressions, use make_node instead of build2 to avoid checking build2
668 performs.
669
8e6198d0
GA
6702020-11-23 Joseph Myers <joseph@codesourcery.com>
671
672 PR c/95630
673 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
674 for comparisons of complete and incomplete pointers.
675
7a97e2fc
GA
6762020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
677
678 * c-aux-info.c (gen_type): Support opaque types.
679
82e5048e
GA
6802020-11-20 Martin Sebor <msebor@redhat.com>
681
682 PR middle-end/97879
683 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
684
6852020-11-20 Jakub Jelinek <jakub@redhat.com>
686
687 PR other/97911
688 * Make-lang.in (c.serial): Change from goal to a variable.
689 (.PHONY): Drop c.serial.
690
6912020-11-20 Martin Uecker <muecker@gwdg.de>
692
693 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
694
d62586ee
GA
6952020-11-19 Jakub Jelinek <jakub@redhat.com>
696
697 PR c/97860
698 * c-decl.c (get_parm_array_spec): Bail out of nelts is
699 error_operand_p.
700
25bb75f8
GA
7012020-11-18 Jakub Jelinek <jakub@redhat.com>
702
703 * Make-lang.in (c.serial): New goal.
704 (.PHONY): Add c.serial c.prev.
705 (cc1$(exeext)): Call LINK_PROGRESS.
706
77f67db2
GA
7072020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
708
709 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
710 goto too.
711 * c-typeck.c (build_asm_expr): Remove an assert checking output
712 absence for asm goto.
713
7142020-11-13 Jakub Jelinek <jakub@redhat.com>
715
716 * c-typeck.c (c_finish_omp_clauses): Don't clear
717 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
718
7192020-11-13 Iain Sandoe <iain@sandoe.co.uk>
720
721 PR objc/77404
722 * c-parser.c (c_parser_objc_class_definition): Pass the
723 location of the class name to the interface declaration.
724
bb622641
GA
7252020-11-10 Strager Neds <strager.nds@gmail.com>
726
727 * c-decl.c (merge_decls): Use new overload of
728 set_decl_section_name.
729
7302020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
731
732 * c-parser.c (c_parser_omp_target_data): Add use of
733 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
734 handled map clause kind.
735 (c_parser_omp_target_enter_data): Likewise.
736 (c_parser_omp_target_exit_data): Likewise.
737 (c_parser_omp_target): Likewise.
738 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
739 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
740 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
741 same struct field access to co-exist on OpenMP construct.
742
2da7ee05
GA
7432020-11-07 Martin Uecker <muecker@gwdg.de>
744
745 * c-parser.c (c_parser_label): Implement mixing of labels and code.
746 (c_parser_all_labels): Likewise.
747
44cab2d8
GA
7482020-11-06 Iain Sandoe <iain@sandoe.co.uk>
749
750 * c-parser.c (c_parser_objc_at_property_declaration):
751 Improve parsing fidelity. Associate better location info
752 with @property attributes. Clean up the interface to
753 objc_add_property_declaration ().
754
7552020-11-06 Nathan Sidwell <nathan@acm.org>
756
757 * c-decl.c (diagnose_mismatched_decls): Rename
758 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
759 (warn_if_shadowing, implicitly_declare, names_builtin_p)
760 (collect_source_refs): Likewise.
761 * c-typeck.c (inform_declaration, inform_for_arg)
762 (convert_for_assignment): Likewise.
763
7642020-11-06 Tobias Burnus <tobias@codesourcery.com>
765
766 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
767 OpenACC matching.
768 (c_parser_omp_construct): Update call.
769
35c125cb
GA
7702020-11-04 Jakub Jelinek <jakub@redhat.com>
771
772 PR c++/97670
773 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
774 find underlying decl to clear in the aligned_head bitmap.
775
7762020-11-04 Joseph Myers <joseph@codesourcery.com>
777
778 * c-decl.c (handle_nodiscard_attribute): New.
779 (std_attribute_table): Add nodiscard.
780 * c-parser.c (c_parser_std_attribute): Expect argument to
781 nodiscard attribute to be a string. Do not special-case ignoring
782 nodiscard.
783 * c-typeck.c (maybe_warn_nodiscard): New.
784 (build_compound_expr, emit_side_effect_warnings): Call
785 maybe_warn_nodiscard.
786 (c_process_expr_stmt, c_finish_stmt_expr): Also call
787 emit_side_effect_warnings if warn_unused_result.
788
4f0606fe
GA
7892020-10-29 Asher Gordon <AsDaGo@posteo.net>
790
791 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
792 with XDELETE.
793 (finish_init): Likewise.
794 (pop_init_level): Likewise.
795
e93aae4a
GA
7962020-10-28 Joseph Myers <joseph@codesourcery.com>
797
798 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
799 error_at for omitted parameter name.
800
8012020-10-28 Jakub Jelinek <jakub@redhat.com>
802
803 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
804 (c_parser_omp_clause_allocate): New function.
805 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
806 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
807 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
808 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
809 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
810 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
811 PRAGMA_OMP_CLAUSE_ALLOCATE.
812 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
813
89bb01e7
GA
8142020-10-27 Joseph Myers <joseph@codesourcery.com>
815
816 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
817 standard attributes.
818
efe71fcc
GA
8192020-10-23 Marek Polacek <polacek@redhat.com>
820
821 PR c++/91741
822 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
823 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
824 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
825 * c-tree.h (char_type_p): Declare.
826 * c-typeck.c (char_type_p): No longer static.
827
8282020-10-23 Martin Sebor <msebor@redhat.com>
829
830 PR middle-end/97552
831 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
832
2fe5b7d1
GA
8332020-09-19 Martin Sebor <msebor@redhat.com>
834
835 PR c/50584
836 * c-decl.c (lookup_last_decl): Define new function.
837 (c_decl_attributes): Call it.
838 (start_decl): Add argument and use it.
839 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
840 (get_parm_array_spec): Define new function.
841 (push_parm_decl): Call get_parm_array_spec.
842 (start_function): Call warn_parm_array_mismatch. Build attribute
843 access and add it to current function.
844 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
845 in forms of array parameters.
846 * c-tree.h (start_decl): Add argument.
847
8482020-09-19 Sandra Loosemore <sandra@codesourcery.com>
849
850 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
851 with...
852 (in_statement): New.
853 (start_function): Adjust for above change.
854 (c_push_function_context, c_pop_function_context): Likewise.
855 * c-lang.h (struct language_function): Likewise.
856 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
857 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
858 New.
859 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
860 (c_parser_switch_statement): Adjust break/switch context handling
861 and calls to renamed functions.
862 (c_parser_while_statement): Adjust break/switch context handling and
863 build a WHILE_STMT.
864 (c_parser_do_statement): Ditto, with DO_STMT respectively.
865 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
866 (c_parser_omp_for_loop): Adjust break/switch context handling.
867 * c-tree.h (c_break_label, c_cont_label): Delete.
868 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
869 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
870 (in_statement, switch_statement_break_seen_p): Declare.
871 (c_start_case, c_finish_case): Renamed to...
872 (c_start_switch, c_finish_switch).
873 (c_finish_bc_stmt): Adjust arguments.
874 * c-typeck.c (build_function_call_vec): Don't try to print
875 statements with %qE format.
876 (struct c_switch): Rename switch_expr field to switch_stmt.
877 Add break_stmt_seen_p field.
878 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
879 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
880 (do_case): Update for changes to struct c_switch.
881 (c_finish_case): Rename to c_finish_switch. Update for changes to
882 struct c_switch and change of representation from SWITCH_EXPR to
883 SWITCH_STMT.
884 (c_finish_loop): Delete.
885 (c_finish_bc_stmt): Update to reflect changes to break/continue
886 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
887 of a GOTO_EXPR except for objc foreach loops.
888
e1a4a8a0
GA
8892020-09-01 Jakub Jelinek <jakub@redhat.com>
890
891 PR c++/96867
892 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
893 only on PARM_DECLs.
894
8f7ea26a
GA
8952020-08-28 Martin Sebor <msebor@redhat.com>
896
897 PR c/96596
898 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
899 argument type.
900
8b394f01
GA
9012020-08-27 Martin Liska <mliska@suse.cz>
902
903 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
904 growth function to true.
905
db0f6efe
GA
9062020-08-25 Tobias Burnus <tobias@codesourcery.com>
907
908 PR c/96678
909 * c-typeck.c (handle_omp_array_sections_1): Talk about
910 array function parameter in the error message.
911
5c265693
GA
9122020-08-18 Jakub Jelinek <jakub@redhat.com>
913
914 PR c/96571
915 * c-parser.c (c_parser_generic_selection): Change match_found from bool
916 to int, holding index of the match. Call mark_exp_read on the selector
917 expression and on expressions other than the selected one.
918
4967ca2f
GA
9192020-08-01 Richard Sandiford <richard.sandiford@arm.com>
920
921 PR c/96377
922 * c-typeck.c (process_init_element): Split test for whether to
923 recurse into a record, union or array into...
924 (initialize_elementwise_p): ...this new function. Don't recurse
925 into a vector type if the initialization value is also a vector.
926
48cc2e46
GA
9272020-07-31 Richard Biener <rguenther@suse.de>
928
929 PR debug/96383
930 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
931 Define to c_common_finalize_early_debug.
932
3ea9abca
GA
9332020-07-22 Tobias Burnus <tobias@codesourcery.com>
934
935 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
936 (c_parser_omp_critical): Permit hint(0) clause without named critical.
937 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
938
30430061
GA
9392020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
940
941 PR target/95237
942 * c-decl.c (finish_decl): Call target hook
943 lower_local_decl_alignment to lower local decl alignment.
944
3f8ca9cb
GA
9452020-07-09 Julian Brown <julian@codesourcery.com>
946 Thomas Schwinge <thomas@codesourcery.com>
947
948 PR middle-end/95270
949 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
950 for standalone attach/detach clauses.
951
a82c4c4c 9522020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
953
954 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
955 set, warn for conversion between pointers that point to incompatible
956 scalar storage orders.
957
f60ee68d
GA
9582020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
959
960 * c-parser.c (c_parser_statement_after_labels): Pass correct
961 parameters to c_parser_do_statement.
962
56638b9b
GA
9632020-06-16 Jakub Jelinek <jakub@redhat.com>
964
965 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
966 c_in_omp_for.
967 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
968 premature c_fully_fold. Defer explicit c_fully_fold calls to after
969 c_finish_omp_for.
970 * c-tree.h (c_in_omp_for): Declare.
971 * c-typeck.c (c_in_omp_for): Define.
972 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
973 (digest_init): Likewise.
974 (build_binary_op): Likewise.
975
9762020-06-16 Jakub Jelinek <jakub@redhat.com>
977
978 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
979 from kind by comma rather than colon.
980
1a59f3db
GA
9812020-06-05 Mark Wielaard <mark@klomp.org>
982
983 * c-decl.c (implicit_decl_warning): When warned and olddecl is
984 an undeclared builtin, then add a fixit header hint, if found.
985 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
986 warning_at about implicit builtin declaration type mismatch.
987
9a5b7438
GA
9882020-06-03 Mark Wielaard <mark@klomp.org>
989
990 * c-parser.c (struct c_parser): Add seen_string_literal
991 bitfield.
992 (c_parser_consume_token): Reset seen_string_literal.
993 (c_parser_error_richloc): Add name_hint if seen_string_literal
994 and next token is a CPP_NAME and we have a missing header
995 suggestion for the name.
996 (c_parser_string_literal): Set seen_string_literal.
997
9982020-06-03 Mark Wielaard <mark@klomp.org>
999
1000 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1001 scope with matching_parens after CPP_OPEN_PAREN.
1002
10032020-06-03 Tobias Burnus <tobias@codesourcery.com>
1004
1005 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1006
53ffb43a
GA
10072020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1008
1009 * Make-lang.in: Remove extra slash.
1010
8f66f175
ML
10112020-05-19 Martin Liska <mliska@suse.cz>
1012
1013 * c-parser.c: Fix typo.
1014
49ddde69
JJ
10152020-05-14 Jakub Jelinek <jakub@redhat.com>
1016
1017 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1018
eb72dc66
RB
10192020-05-07 Richard Biener <rguenther@suse.de>
1020
1021 PR middle-end/94703
1022 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1023 DECL_GIMPLE_REG_P.
1024
bf915591
JJ
10252020-04-30 Jakub Jelinek <jakub@redhat.com>
1026
1027 PR c/94842
1028 * c-decl.c (set_labels_context_r): In addition to context-less
1029 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1030 parent function if any.
1031 (store_parm_decls): Adjust comment.
1032
e1113ffb
JJ
10332020-04-19 Jakub Jelinek <jakub@redhat.com>
1034
1035 PR objc/94637
1036 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1037 two CPP_COLON tokens.
1038
2e389749
JJ
10392020-04-17 Jakub Jelinek <jakub@redhat.com>
1040
1041 PR other/94629
1042 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1043 to data.clauses.
1044
2dc9294c
JJ
10452020-04-15 Jakub Jelinek <jakub@redhat.com>
1046
1047 PR c/94593
1048 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1049 requires directive when not at file scope.
1050
13e41d8b
TB
10512020-04-08 Tobias Burnus <tobias@codesourcery.com>
1052
1053 PR middle-end/94120
1054 * c-decl.c (c_check_in_current_scope): New function.
1055 * c-tree.h (c_check_in_current_scope): Declare it.
1056 * c-parser.c (c_parser_oacc_declare): Add check that variables
1057 are declared in the same scope as the directive. Fix handling
1058 of namespace vars.
1059
4df50a05
JJ
10602020-04-07 Jakub Jelinek <jakub@redhat.com>
1061
1062 PR c++/94512
1063 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1064 if c_parser_omp_master succeeded.
1065
5db9e893
JJ
10662020-03-23 Jakub Jelinek <jakub@redhat.com>
1067
1068 PR gcov-profile/94029
1069 PR c/94239
1070 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1071 the function_start_locus location. Don't do that afterwards for the
1072 __GIMPLE body parsing.
1073
9def91e9
JJ
10742020-03-19 Jakub Jelinek <jakub@redhat.com>
1075
1076 PR gcov-profile/94029
1077 * c-tree.h (finish_function): Add location_t argument defaulted to
1078 input_location.
1079 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1080 set it to the locus of closing } if non-NULL.
1081 (c_parser_compound_statement_nostart): Return locus of closing }.
1082 (c_parser_parse_rtl_body): Likewise.
1083 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1084 finish_function.
1085 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1086 input_location to set function_end_locus.
1087
046c5890
JJ
10882020-03-17 Jakub Jelinek <jakub@redhat.com>
1089
1090 PR c/94172
1091 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1092 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1093 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1094 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1095 ENUMERAL_TYPEs.
1096 (finish_incomplete_vars): New function, moved from finish_struct. Use
1097 relayout_decl instead of layout_decl.
1098 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1099 being TYPE_VFIELD. Use finish_incomplete_vars.
1100 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1101 finish_incomplete_vars.
1102 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1103 also on ENUMERAL_TYPEs.
1104
c015ff8c
JJ
11052020-03-16 Jakub Jelinek <jakub@redhat.com>
1106
1107 PR c/94179
1108 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1109
f2e9fe5f
MS
11102020-03-13 Martin Sebor <msebor@redhat.com>
1111
1112 PR c/94040
1113 * c-decl.c (builtin_structptr_type_count): New constant.
1114 (match_builtin_function_types): Reject decls that are incompatible
1115 in types pointed to by pointers.
1116 (diagnose_mismatched_decls): Adjust comments.
1117
c9d70946
JM
11182020-03-05 Joseph Myers <joseph@codesourcery.com>
1119
1120 PR c/93577
1121 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1122 empty when initialized type is error_mark_node.
1123 (set_designator, process_init_element): Ignore initializers for
1124 elements of a variable-size type or of error_mark_node.
1125
726e292d
MS
11262020-03-01 Martin Sebor <msebor@redhat.com>
1127
1128 PR middle-end/93926
1129 * c-decl.c (types_close_enough_to_match): New function.
1130 (match_builtin_function_types):
1131 (diagnose_mismatched_decls): Add missing inform call to a warning.
1132
a499c2f8
MS
11332020-03-01 Martin Sebor <msebor@redhat.com>
1134
1135 PR c/93812
1136 * c-typeck.c (build_functype_attribute_variant): New function.
1137 (composite_type): Call it.
1138
9c3da8cc
JJ
11392020-02-25 Jakub Jelinek <jakub@redhat.com>
1140
1141 PR other/93912
1142 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1143 Rename last argument from probablity to probability.
1144
bacdd5e9
JJ
11452020-02-13 Jakub Jelinek <jakub@redhat.com>
1146
1147 PR c/93576
1148 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1149 *expr if it has side effects.
1150
f9eb0973
JL
11512020-01-30 Jeff Law <law@redhat.com>
1152
1153 PR c/88660
1154 * c-parser.c (c_parser_switch_statement): Make sure to request
1155 marking the switch expr as used.
1156
ac68e287
JM
11572020-01-22 Joseph Myers <joseph@codesourcery.com>
1158
1159 PR c/93348
1160 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1161 argument with integer operands.
1162
852f0ae8
KK
11632020-01-16 Kerem Kat <keremkat@gmail.com>
1164
1165 PR c/92833
1166 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1167 to support 4 available tokens.
1168
e2346a33
JM
11692020-01-15 Joseph Myers <joseph@codesourcery.com>
1170
1171 PR c/93072
1172 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1173 determine whether to set DECL_CONTEXT.
1174
3d77686d
JM
11752020-01-13 Joseph Myers <joseph@codesourcery.com>
1176
1177 PR c/93241
1178 * c-typeck.c (build_c_cast): Check for expressions with integer
1179 operands that can occur in an unevaluated part of an integer
1180 constant expression and call note_integer_operands as needed.
1181
f74c4b2c
RB
11822019-01-08 Richard Biener <rguenther@suse.de>
1183
1184 PR middle-end/93199
1185 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1186 permanently.
1187
8d9254fc
JJ
11882020-01-01 Jakub Jelinek <jakub@redhat.com>
1189
1190 Update copyright years.
1191
39292e25
EB
11922019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1193
1194 * c-decl.c (collect_source_ref_cb): Delete.
1195 (for_each_global_decl): Rename into...
1196 (collect_source_refs): ...this. Call collect_source_ref directly.
1197 (c_parse_final_cleanups): Always call collect_source_ref on the main
1198 input filename.
1199
519d7496
JB
12002019-12-19 Julian Brown <julian@codesourcery.com>
1201 Cesar Philippidis <cesar@codesourcery.com>
1202
1203 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1204 detach clauses.
1205 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1206 Allow deref (->) in variable lists if true.
1207 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1208 Pass to c_parser_omp_variable_list.
1209 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1210 call to c_parser_omp_variable_list.
1211 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1212 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1213 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1214 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1215 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1216 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1217 and detach. Support deref.
1218 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1219 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1220 (c_oacc_check_attachments): New function.
1221 (c_finish_omp_clauses): Check attach/detach arguments for being
1222 pointers using above. Support deref.
1223
a6163563
JB
12242019-12-19 Julian Brown <julian@codesourcery.com>
1225 Maciej W. Rozycki <macro@codesourcery.com>
1226 Tobias Burnus <tobias@codesourcery.com>
1227 Thomas Schwinge <thomas@codesourcery.com>
1228
1229 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1230 (c_parser_oacc_data_clause): Likewise.
1231 (c_parser_oacc_all_clauses): Likewise.
1232 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1233 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1234 PRAGMA_OACC_CLAUSE_NO_CREATE.
1235 * c-typeck.c (handle_omp_array_sections): Support
1236 GOMP_MAP_NO_ALLOC.
1237
d68f5d45
DM
12382019-12-09 David Malcolm <dmalcolm@redhat.com>
1239
1240 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1241 Replace label_text ctor calls.
1242
4691bf46
JM
12432019-12-04 Joseph Myers <joseph@codesourcery.com>
1244
1245 PR c/36941
1246 PR c/88827
1247 * c-typeck.c (convert_lvalue_to_rvalue): Call
1248 require_complete_type for arguments not of void types.
1249 (build_indirect_ref): Do not diagnose dereferencing pointers to
1250 incomplete types.
1251 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1252
85d11957
JM
12532019-12-03 Joseph Myers <joseph@codesourcery.com>
1254
1255 PR c/88704
1256 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1257 old-style parameter definitions.
1258
4569f8b3
SL
12592019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1260
1261 PR target/92499
1262
1263 * c-decl.c (flexible_array_type_p): Move to common code.
1264
65ef05d0
RS
12652019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1266
1267 * c-decl.c (start_decl): Allow initialization of variables whose
1268 size is a POLY_INT_CST.
1269 (finish_decl): Use verify_type_context to check whether the target
1270 allows variables with a particular type to have static or thread-local
1271 storage duration. Don't raise a second error if such variables do
1272 not have a constant size.
1273 (grokdeclarator): Use verify_type_context to check whether the
1274 target allows fields or array elements to have a particular type.
1275 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1276 the target allows pointer difference for the types involved.
1277 (build_unary_op): Likewise for pointer increment and decrement.
1278
34b43828
JM
12792019-11-29 Joseph Myers <joseph@codesourcery.com>
1280
1281 * c-parser.c (struct c_parser): Add members raw_tokens and
1282 raw_tokens_used.
1283 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1284 using previously-lexed raw tokens.
1285 (c_parser_peek_nth_token_raw)
1286 (c_parser_check_balanced_raw_token_sequence): New functions.
1287 (c_parser_nth_token_starts_std_attributes): Use
1288 c_parser_check_balanced_raw_token_sequence for Objective-C.
1289
5b8d9367
JM
12902019-11-25 Joseph Myers <joseph@codesourcery.com>
1291
1292 PR c/91985
1293 * c-decl.c (finish_declspecs): Use int instead of decimal
1294 floating-point types if decimal floating-point not supported.
1295
1723e1be
JM
12962019-11-25 Joseph Myers <joseph@codesourcery.com>
1297
1298 * c-tree.h (struct c_declarator): Use a structure for id member.
1299 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1300 declarators at the start, not when handling individual declarators
1301 later. Use u.id.id instead of u.id.
1302 (grokfield): Use u.id.id instead of u.id.
1303 (build_id_declarator): Set u.id.id and u.id.attrs.
1304 (finish_declspecs): Handle postfix attributes in case of typedef
1305 name or typeof used.
1306 * c-parser.c (c_parser_direct_declarator)
1307 (c_parser_direct_declarator_inner): Place declarator for
1308 attributes inside that for function or array, not outside. Set
1309 u.id.attrs for identifiers.
1310 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1311 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1312 instead of u.id.
1313
bdaf8be1
JJ
13142019-11-22 Jakub Jelinek <jakub@redhat.com>
1315
1316 PR c/90677
1317 * c-decl.c (identifier_global_tag): Define.
1318
3e00ba47
RB
13192019-11-20 Richard Biener <rguenther@suse.de>
1320
1321 PR c/92088
1322 * c-decl.c (grokdeclarator): Prevent inlining of nested
1323 function with VLA arguments.
1324
8c5b727a
JM
13252019-11-20 Joseph Myers <joseph@codesourcery.com>
1326
1327 * c-decl.c (c_warn_type_attributes): New function.
1328 (groktypename, grokdeclarator, finish_declspecs): Call
1329 c_warn_type_attributes before applying attributes to types.
1330 * c-tree.h (c_warn_type_attributes): Declare.
1331
192961ff
JM
13322019-11-19 Joseph Myers <joseph@codesourcery.com>
1333
1334 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1335 standard attributes.
1336 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1337 pedwarn for unknown standard attributes and return error_mark_node
1338 for them.
1339
20a38017
MM
13402019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1341
1342 * c-parser.c (c_parser_parse_rtl_body): Always call
1343 run_rtl_passes, even if startwith pass is not provided.
1344
d5fbe5e0
JM
13452019-11-15 Joseph Myers <joseph@codesourcery.com>
1346
1347 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1348 duplicate standard attributes.
1349
97cc1187
JM
13502019-11-15 Joseph Myers <joseph@codesourcery.com>
1351
1352 * c-decl.c (std_attribute_table): Add maybe_unused.
1353
f8aea5e3
JM
13542019-11-15 Joseph Myers <joseph@codesourcery.com>
1355
1356 * c-decl.c (std_attribute_table): Add fallthrough.
1357 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1358 attribute at top level.
1359
2cc94aa8
JM
13602019-11-15 Joseph Myers <joseph@codesourcery.com>
1361
1362 * c-decl.c (std_attribute_table): New.
1363 (c_init_decl_processing): Register attributes from
1364 std_attribute_table.
1365 * c-parser.c (c_parser_attribute_arguments): Add arguments
1366 require_string and allow_empty_args. All callers changed.
1367 (c_parser_std_attribute): Set require_string argument for
1368 "deprecated" attribute.
1369
7c5890cc
JM
13702019-11-14 Joseph Myers <joseph@codesourcery.com>
1371
1372 * c-parser.c (c_parser_postfix_expression)
1373 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1374 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1375
e8738f4e
RS
13762019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1377
1378 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1379 of build_same_sized_truth_vector_type.
1380 (build_vec_cmp): Likewise.
1381
b2417b59
JJ
13822019-11-14 Jakub Jelinek <jakub@redhat.com>
1383
bedb7f04
JJ
1384 * c-parser.c (c_parser_omp_context_selector): Don't require score
1385 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1386 negative score.
1387
b2417b59
JJ
1388 * c-parser.c (c_parser_omp_context_selector): Rename
1389 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1390 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1391 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1392 and string literals.
1393
4e03c3a7
JM
13942019-11-14 Joseph Myers <joseph@codesourcery.com>
1395
1396 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1397 ctsk_tagfirstref_attrs.
1398 (struct c_declspecs): Update description of attrs. Add
1399 postfix_attrs and non_std_attrs_seen_p. Increase size of
1400 typespec_kind bit-field.
1401 (c_warn_unused_attributes): New declaration.
1402 (parser_xref_tag): Update prototype.
1403 * c-decl.c (c_warn_unused_attributes): New function.
1404 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1405 ctsk_tagref_attrs. Handle attribute declarations.
1406 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1407 (grokdeclarator): Handle standard attributes.
1408 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1409 attributes to incomplete type reference.
1410 (xref_tag): Update call to parser_xref_tag.
1411 (declspecs_add_addrspace, declspecs_add_type)
1412 (declspecs_add_scspec, declspecs_add_attrs): Set
1413 non_std_attrs_seen_p.
1414 (finish_declspecs): Apply postfix standard attributes to type.
1415 * c-parser.c (c_token_starts_declspecs)
1416 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1417 (c_parser_next_tokens_start_declaration): Update comments.
1418 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1419 parser->tokens[2] to parser->tokens[1].
1420 (c_parser_nth_token_starts_std_attributes)
1421 (c_parser_std_attribute_specifier_sequence): New functions.
1422 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1423 attrs. All callers changed. Handle standard attributes.
1424 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1425 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1426 All callers changed.
1427 (c_parser_declspecs): Add arguments start_std_attr_ok and
1428 end_std_attr_ok. All callers changed. Handle standard
1429 attributes.
1430 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1431 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1432 (c_parser_compound_statement_nostart, c_parser_all_labels)
1433 (c_parser_label, c_parser_statement, c_parser_for_statement):
1434 Handle standard attributes.
1435 * c-parser.h (c_parser_declspecs): Update prototype.
1436 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1437 c_parser_declspecs.
1438
0c29cac4
ML
14392019-11-12 Martin Liska <mliska@suse.cz>
1440
1441 * gimple-parser.c: Do not include params.h.
1442
028d4092
ML
14432019-11-12 Martin Liska <mliska@suse.cz>
1444
1445 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1446 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1447 macro.
1448
62aee289
MR
14492019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1450 Frederik Harwath <frederik@codesourcery.com>
1451
1452 gcc/c/
1453 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1454 (c_parser_oacc_kernels_parallel): Rename function to...
1455 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1456 (c_parser_omp_construct): Update accordingly.
1457
1458
7cec9588
JJ
14592019-11-11 Jakub Jelinek <jakub@redhat.com>
1460
1461 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1462 without corresponding end declare target.
1463
f486280c
RS
14642019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1465
1466 * c-convert.c (convert): Only handle vector conversions if one of
1467 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1468 allows it.
1469 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1470 vectors satisfy gnu_vector_type_p.
1471 (build_unary_op): Only allow unary operators to be applied to
1472 vectors if they satisfy gnu_vector_type_p.
1473 (digest_init): Only allow by-element initialization of vectors
1474 if they satisfy gnu_vector_type_p.
1475 (really_start_incremental_init): Likewise.
1476 (push_init_level): Likewise.
1477 (pop_init_level): Likewise.
1478 (process_init_element): Likewise.
1479 (build_binary_op): Only allow binary operators to be applied to
1480 vectors if they satisfy gnu_vector_type_p.
1481
017c6491
JM
14822019-11-08 Joseph Myers <joseph@codesourcery.com>
1483
1484 * c-decl.c (grokparms): Convert () in a function definition to
1485 (void) for C2x.
1486 (store_parm_decls_oldstyle): Pedwarn for C2x.
1487 (store_parm_decls): Update comment about () not generating a
1488 prototype.
1489
c01bd174
JM
14902019-11-07 Joseph Myers <joseph@codesourcery.com>
1491
1492 * c-parser.c (c_parser_attribute_arguments): New function.
1493 Factored out of c_parser_gnu_attribute.
1494 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1495 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1496 (c_parser_std_attribute_specifier): New functions.
1497 (c_parser_transaction_attributes): Use
1498 c_parser_std_attribute_specifier.
1499
471c5330
JM
15002019-11-07 Joseph Myers <joseph@codesourcery.com>
1501
1502 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1503 lex_joined_string and translate_strings_p.
1504 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1505 c_lex_with_flags.
1506 (c_parser_string_literal): New function.
1507 (c_parser_static_assert_declaration_no_semi): Use
1508 c_parser_string_literal. Do not set lex_untranslated_string.
1509 (c_parser_asm_string_literal): Use c_parser_string_literal.
1510 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1511 (c_parser_gnu_attributes): Set and restore translate_strings_p
1512 instead of lex_untranslated_string.
1513 (c_parser_asm_statement): Do not set lex_untranslated_string.
1514 (c_parser_asm_operands): Likewise.
1515 (c_parser_has_attribute_expression): Set and restore
1516 translate_strings_p instead of lex_untranslated_string.
1517 (c_parser_postfix_expression): Use c_parser_string_literal.
1518 (pragma_lex): Likewise.
1519 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1520 (c_parse_file): Set translate_strings_p.
1521 * gimple-parser.c (c_parser_gimple_postfix_expression)
1522 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1523 * c-parser.c (c_parser_string_literal): Declare function.
1524
d0c464d2
JJ
15252019-11-02 Jakub Jelinek <jakub@redhat.com>
1526
1527 * c-parser.c (c_finish_omp_declare_variant): Use
1528 omp_get_context_selector instead of c_omp_get_context_selector.
1529
ac2cfa6c
RS
15302019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1531
1532 * c-tree.h (c_simulate_enum_decl): Declare.
1533 * c-decl.c (c_simulate_enum_decl): New function.
1534 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1535
74078538
RS
15362019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1537
1538 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1539 * c-decl.c (c_simulate_builtin_function_decl): New function.
1540 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1541 to the above.
1542
ad1539d5
MS
15432019-10-28 Martin Sebor <msebor@redhat.com>
1544
1545 PR c/66970
1546 * c-decl.c (names_builtin_p): Define a new function.
1547
cb73e4e7
RB
15482019-10-28 Richard Biener <rguenther@suse.de>
1549
1550 PR c/92249
1551 * gimple-parser.c (c_parser_parse_gimple_body): Make
1552 current_bb the entry block initially to easier recover
1553 from errors.
1554 (c_parser_gimple_compound_statement): Adjust.
1555
135df52c
JJ
15562019-10-24 Jakub Jelinek <jakub@redhat.com>
1557
1558 * c-parser.c (c_finish_omp_declare_variant): Use
1559 omp_context_selector_matches instead of
1560 c_omp_context_selector_matches.
1561 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1562 attribute in between declare target and end declare target
1563 pragmas.
1564
783bfe5e
JM
15652019-10-15 Joseph Myers <joseph@codesourcery.com>
1566
1567 * c-parser.c (c_parser_attribute_any_word): Rename to
1568 c_parser_gnu_attribute_any_word. All callers changed.
1569 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1570 callers changed.
1571 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1572 callers changed.
1573 (c_parser_declaration_or_fndef, c_parser_declspecs)
1574 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1575 (c_parser_struct_declaration, c_parser_declarator)
1576 (c_parser_gnu_attribute, c_parser_compound_statement)
1577 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1578 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1579 attribute-related syntax productions.
1580
56898e43
RS
15812019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1582
1583 * c-objc-common.c (useful_aka_type_p): Replace with...
1584 (get_aka_type): ...this new function. Given the original type,
1585 decide which aka type to print (if any). Only look through typedefs
1586 if user_facing_original_type_p.
1587 (print_type): Update accordingly.
1588
b9424661
JJ
15892019-10-14 Jakub Jelinek <jakub@redhat.com>
1590
1591 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1592 into int NESTED, if it is 2, diagnose missing commas in between
1593 clauses.
1594 (c_parser_omp_context_selector): Pass 2 as last argument to
1595 c_parser_omp_all_clauses.
1596
20de9568
JJ
15972019-10-12 Jakub Jelinek <jakub@redhat.com>
1598
1599 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1600 For simd properties, put them directly into TREE_VALUE.
1601 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1602 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1603 add "omp declare variant base" attribute rather than
1604 "omp declare variant".
1605
fe2bc27c
JM
16062019-10-11 Joseph Myers <joseph@codesourcery.com>
1607
1608 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1609
94e7f906
JJ
16102019-10-10 Jakub Jelinek <jakub@redhat.com>
1611
1612 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1613 true, terminate processing on closing paren and don't skip to end of
1614 pragma line.
1615 (c_parser_omp_declare_simd): Handle also declare variant.
1616 (omp_construct_selectors, omp_device_selectors,
1617 omp_implementation_selectors, omp_user_selectors): New variables.
1618 (c_parser_omp_context_selector,
1619 c_parser_omp_context_selector_specification,
1620 c_finish_omp_declare_variant): New functions.
1621 (c_finish_omp_declare_simd): Handle both declare simd and
1622 declare variant.
1623 (c_parser_omp_declare): Handle declare variant.
1624
93313b94
JM
16252019-10-02 Joseph Myers <joseph@codesourcery.com>
1626
1627 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1628 CPP_COLON tokens.
1629
55879815
RS
16302019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1631
1632 * c-objc-common.c (useful_aka_type_p): New function.
1633 (print_type): Use it to decide whether an aka type is worth printing.
1634
59bc434a
JJ
16352019-09-27 Jakub Jelinek <jakub@redhat.com>
1636
1637 PR c++/88203
1638 * c-parser.c (c_parser_predefined_identifier): New function.
1639 (c_parser_postfix_expression): Use it.
1640 (c_parser_omp_variable_list): Parse predefined identifiers.
1641 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1642 in shared and firstprivate clauses, even when they are predetermined
1643 shared.
1644
c6447c20
RS
16452019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1646
1647 * c-typeck.c (build_function_call_vec): Take the original function
1648 decl as an optional final parameter. Pass all built-in calls to
1649 check_builtin_function_arguments.
1650
522da4c2
EB
16512019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1652
1653 PR c/91815
1654 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1655 of identifiers in the external scope only for variables and functions.
1656
68e2c199
PK
16572019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1658
1659 PR c/78736
1660 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1661
22f8849d
IS
16622019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1663
1664 PR pch/61250
1665 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1666 after determining that the first token is not
1667 PRAGMA_GCC_PCH_PREPROCESS.
1668
db376f45
EB
16692019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1670
1671 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1672 FUNCTION_DECL to the right value in the presence of nested declarators.
1673
4d732405
RS
16742019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1675
1676 PR middle-end/91421
1677 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1678
cb1180d5
RS
16792019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1680
1681 PR middle-end/91421
1682 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1683 of a built_in_function.
1684 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1685
77eb117f
JJ
16862019-08-10 Jakub Jelinek <jakub@redhat.com>
1687
1688 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1689 (c_parser_omp_clause_device_type): New function.
1690 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1691 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1692 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1693 diagnostics for declare target with clauses nested in clause-less
1694 declare target declaration-definition-seq.
1695 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1696
2c3b8bad
JJ
16972019-08-09 Jakub Jelinek <jakub@redhat.com>
1698
bb522e2e
JJ
1699 * c-parser.c (check_no_duplicate_clause): Simplify using
1700 omp_find_clause.
1701 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1702 directive name modifiers.
1703 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1704
2c3b8bad
JJ
1705 PR c/91401
1706 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1707 check_no_duplicate_clause call. Comment it out, instead emit a
1708 warning for duplicate dist_schedule clauses.
1709
99769e7f
RS
17102019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1711
1712 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1713
8860d270
JJ
17142019-08-08 Jakub Jelinek <jakub@redhat.com>
1715
1716 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1717 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1718 instead of generic_head to track duplicates.
1719
398e3feb
JJ
17202019-08-07 Jakub Jelinek <jakub@redhat.com>
1721
1722 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1723 (c_parser_omp_clause_use_device_addr): New function.
1724 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1725 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1726 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1727 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1728 map or use_device_* clauses.
1729 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1730 in OpenMP, require pointer type rather than pointer or array type.
1731 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1732
a28351e7
JJ
17332019-07-31 Jakub Jelinek <jakub@redhat.com>
1734
1735 PR c/91192
1736 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1737 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1738 case.
1739
6343b6bf
ML
17402019-07-25 Martin Liska <mliska@suse.cz>
1741 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1742
1743 PR c++/23383
1744 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1745
cb50701e
ML
17462019-07-25 Martin Liska <mliska@suse.cz>
1747
1748 * c-decl.c (merge_decls): Use new macros
1749 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1750
62e3e66f
RB
17512019-07-23 Richard Biener <rguenther@suse.de>
1752
1753 PR tree-optimization/83518
1754 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1755 a CFG also rebuild cgraph edges.
1756
554a530f
JJ
17572019-07-20 Jakub Jelinek <jakub@redhat.com>
1758
1759 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1760 (c_parser_omp_clause_bind): New function.
1761 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1762 (OMP_LOOP_CLAUSE_MASK): Define.
1763 (c_parser_omp_loop): New function.
1764 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1765 loop combined with parallel or teams.
1766 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1767 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1768
d119bf79
RS
17692019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1770
1771 PR c/53633
1772 * c-decl.c (finish_function): Check targetm.warn_func_return
1773 before issuing a -Wreturn-type warning.
1774
ab20d992 17752019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1776
1777 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1778 (c_parser_compound_statement): Call it.
1779
1fdd6f04
JJ
17802019-07-12 Jakub Jelinek <jakub@redhat.com>
1781
1782 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1783 (c_parser_omp_clause_order): New function.
1784 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1785 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1786 PRAGMA_OMP_CLAUSE_ORDER.
1787 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1788
8389386c
RB
17892019-07-10 Richard Biener <rguenther@suse.de>
1790
1791 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1792 _Literal (int *) &x for address literals.
1793
99b1c316
MS
17942019-07-09 Martin Sebor <msebor@redhat.com>
1795
1796 PR c++/61339
1797 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1798 to class.
1799 (field_decl_cmp): Same.
1800 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1801 * c-tree.h: Same.
1802 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1803
6c1dae73
MS
18042019-07-09 Martin Sebor <msebor@redhat.com>
1805
1806 PR c++/61339
1807 * c-decl.c: Change class-key from class to struct and vice versa
1808 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1809 * gimple-parser.c: Same.
1810
69b5279e
RB
18112019-07-01 Richard Biener <rguenther@suse.de>
1812
1813 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1814 _Literal (char *) &"foo" for address literals pointing to
1815 STRING_CSTs.
1816
ab20d992
JJ
18172019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1818
1819 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1820 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1821 C incompatibility if alternate "__intN__" form is used.
1822
1e3d475e
MS
18232019-06-24 Martin Sebor <msebor@redhat.com>
1824
1825 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1826
bf38f7e9
JJ
18272019-06-10 Jakub Jelinek <jakub@redhat.com>
1828
1829 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1830 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1831 (c_parser_omp_scan_loop_body): New function.
1832 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1833 inscan reduction clauses.
1834 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1835 non-inscan reductions on the same construct, or inscan reductions with
1836 ordered or schedule clauses, or inscan array reductions.
1837
65985d78
MS
18382019-06-05 Martin Sebor <msebor@redhat.com>
1839
1840 PR c/90737
1841 * c-typeck.c (c_finish_return): Only consider functions returning
1842 pointers as candidates for -Wreturn-local-addr.
1843
0ecf545c
MS
18442019-06-05 Martin Sebor <msebor@redhat.com>
1845
1846 * c-decl.c (start_decl): Adjust quoting and hyphenation
1847 in diagnostics.
1848 (finish_decl): Same.
1849 (finish_enum): Same.
1850 (start_function): Same.
1851 (declspecs_add_type): Same.
1852 * c-parser.c (warn_for_abs): Same.
1853 * c-typeck.c (build_binary_op): Same.
1854
e03436e7
TS
18552019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1856
b48f44bf
TS
1857 PR c/89433
1858 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1859 marked with an OpenACC 'routine' directive.
1860
5bf04509
TS
1861 PR c/89433
1862 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1863 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1864
e03436e7
TS
1865 PR c/89433
1866 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1867 clauses from "omp declare target" attribute.
1868
a9c697b8
MS
18692019-05-16 Martin Sebor <msebor@redhat.com>
1870
ab20d992
JJ
1871 * c-decl.c (start_decl): Quote keywords, operators, and
1872 types in diagnostics.
1873 (finish_decl): Same.
1874 * c-parser.c (c_parser_asm_statement): Same.
1875 (c_parser_conditional_expression): Same.
1876 (c_parser_transaction_cancel): Same.
1877 * c-typeck.c (c_common_type): Same.
1878 (build_conditional_expr): Same.
1879 (digest_init): Same.
1880 (process_init_element): Same.
1881 (build_binary_op): Same.
a9c697b8 1882
c4499192
RB
18832019-05-17 Richard Biener <rguenther@suse.de>
1884
1885 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1886 (c_parser_gimple_unary_expression): Likewise.
1887 (c_parser_gimple_parentized_ternary_expression): New function.
1888
adfe6e4b
RB
18892019-05-16 Richard Biener <rguenther@suse.de>
1890
1891 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1892 (c_parser_gimple_unary_expression): Likewise.
1893
186dabf2
RB
18942019-05-15 Richard Biener <rguenther@suse.de>
1895
1896 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1897 __BIT_FIELD_REF.
1898
1158c5b4
RB
18992019-05-14 Richard Biener <rguenther@suse.de>
1900
1901 * gimple-parser.c (c_parser_gimple_statement): Remove
1902 questionable auto-promotion to VIEW_CONVERT_EXPR.
1903 (c_parser_gimple_typespec): Split out from __MEM parsing.
1904 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1905 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1906 as __VIEW_CONVERT with -gimple.
1907
fd4485aa
ML
19082019-05-09 Martin Liska <mliska@suse.cz>
1909
1910 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1911 __MAX.
1912 (c_parser_gimple_unary_expression): Parse also binary expression
1913 __MIN and __MAX.
1914 (c_parser_gimple_parentized_binary_expression): New function.
1915
d276406a
ML
19162019-05-09 Martin Liska <mliska@suse.cz>
1917
1918 * gimple-parser.c (struct gimple_parser): Add probability.
1919 for gimple_parser_edge.
1920 (gimple_parser::push_edge): Add new argument probability.
1921 (c_parser_gimple_parse_bb_spec): Parse also probability
1922 if present.
1923 (c_parser_parse_gimple_body): Set edge probability.
1924 (c_parser_gimple_compound_statement): Consume token
1925 before calling c_parser_gimple_goto_stmt.
1926 Parse BB counts.
1927 (c_parser_gimple_statement): Pass new argument.
1928 (c_parser_gimple_goto_stmt): Likewise.
1929 (c_parser_gimple_if_stmt): Likewise.
1930 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1931 * c-parser.c (c_parser_declaration_or_fndef): Pass
1932 hot_bb_threshold argument.
1933 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1934 field.
1935 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1936
f179b64e
JJ
19372019-04-26 Jakub Jelinek <jakub@redhat.com>
1938
1939 PR debug/90197
1940 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1941 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1942 (c_parser_do_statement): Likewise.
1943 (c_parser_for_statement): Likewise. Formatting fixes.
1944 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1945 emit DEBUG_BEGIN_STMTs if needed.
1946
e7178413
JJ
19472019-04-19 Jakub Jelinek <jakub@redhat.com>
1948
c280b7ee
JJ
1949 PR c/89888
1950 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1951 (c_start_case): Don't clear it.
1952 (do_case): Adjust c_add_case_label caller.
1953 (c_finish_case): Adjust c_do_switch_warnings caller.
1954
e7178413
JJ
1955 PR c++/90108
1956 * c-decl.c (merge_decls): If remove is main variant and
1957 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1958 variant that has newdecl as TYPE_NAME if any.
1959
60a2c645
JJ
19602019-04-12 Jakub Jelinek <jakub@redhat.com>
1961
1962 PR c/89933
1963 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1964 don't try to remove it from the variant list, but instead assert
1965 it has no variants.
1966
2a82beaa
RB
19672019-04-01 Richard Biener <rguenther@suse.de>
1968
1969 PR c/71598
1970 * c-tree.h (c_get_alias_set): Declare.
1971 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1972 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1973 as the underlying integer type.
1974
bec1da64
MS
19752019-03-19 Martin Sebor <msebor@redhat.com>
1976
1977 PR tree-optimization/89688
1978 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1979 kinds of initializers.
1980
855cd9b1
JJ
19812019-03-19 Jakub Jelinek <jakub@redhat.com>
1982
1983 PR c/89734
1984 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1985 return type even if quals_used is 0. Formatting fixes.
1986
baa09dc5
RB
19872019-03-14 Richard Biener <rguenther@suse.de>
1988
1989 * c-tree.h (enum c_declspec_il): New.
1990 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1991 enum bitfield.
1992 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1993 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1994 (c_parser_declspecs): Adjust.
1995 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1996 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1997 and bitmap.h.
1998 (struct gimple_parser): New.
1999 (gimple_parser::push_edge): New method.
2000 (c_parser_gimple_parse_bb_spec): New helper.
2001 (c_parser_parse_gimple_body): Get start pass and IL specification.
2002 Initialize SSA and CFG.
2003 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2004 Build a gimple_parser parsing state and pass it along.
2005 (c_parser_gimple_statement): Change intermittend __PHI internal
2006 function argument for the edge.
2007 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2008 (c_parser_gimple_goto_stmt): Record edges to build.
2009 (c_parser_gimple_if_stmt): Likewise.
2010 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2011 (c_parser_gimple_or_rtl_pass_list): Likewise.
2012
a3f9f006
ML
20132019-03-11 Martin Liska <mliska@suse.cz>
2014
2015 * c-decl.c (check_for_loop_decls): Wrap an option name
2016 in a string format message and fix GNU coding style.
2017 * c-parser.c (c_parser_declspecs): Likewise.
2018
1db01ff9
JJ
20192019-03-08 Jakub Jelinek <jakub@redhat.com>
2020
2021 PR tree-optimization/89550
2022 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2023 returned true.
2024 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2025 or warning returned true.
2026
66dcb747
JJ
20272019-02-28 Jakub Jelinek <jakub@redhat.com>
2028
2029 PR c/89525
2030 * c-typeck.c (convert_arguments): Call inform_declaration only if
2031 the previous warning_at call returned true.
2032
2263c9f2
TS
20332019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2034
2035 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2036 parameter. Adjust all users.
2037 (c_parser_oacc_simple_clause): Replace parser with loc formal
2038 parameter. Adjust all users.
2039
ab20d992 20402019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2041
2042 PR c/87924
2043 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2044 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2045
5f88ba10
JJ
20462019-02-15 Jakub Jelinek <jakub@redhat.com>
2047
2048 PR c/89340
2049 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2050 before c_decl_attributes rather than after it.
2051
cfc30fd1
JJ
20522019-02-06 Jakub Jelinek <jakub@redhat.com>
2053
2054 PR c/89211
2055 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2056 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2057 instead of 3 nested ifs.
2058
fbe83e6b
JM
20592019-02-06 Joseph Myers <joseph@codesourcery.com>
2060
2061 PR c/88584
2062 * c-decl.c (finish_decl): Do not complete array types for arrays
2063 with external linkage not at file scope.
2064
f461f938
RB
20652019-02-05 Richard Biener <rguenther@suse.de>
2066
2067 PR c/88606
2068 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2069 all type variants when not supported.
2070
fe509359
JJ
20712019-01-30 Jakub Jelinek <jakub@redhat.com>
2072
2073 PR c/89061
2074 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2075 * c-decl.c (decl_jump_unsafe): Return false for
2076 C_DECL_COMPOUND_LITERAL_P decls.
2077 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2078
6a335b96
JJ
20792019-01-29 Jakub Jelinek <jakub@redhat.com>
2080
f4b7e754
JJ
2081 PR c/89045
2082 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2083 scope.
2084
6a335b96
JJ
2085 PR c/86125
2086 * c-decl.c (last_fileptr_type): Remove.
2087 (last_structptr_types): New variable.
2088 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2089 {old,new}rettype instead of the types themselves. Assert
2090 last_structptr_types array has the same number of elements
2091 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2092 argument oldtype and newtype. Instead of handling
2093 just fileptr_type_node specially, handle all builtin_structptr_types
2094 pointer nodes. Formatting fix.
2095
d8b5a1a0
MS
20962019-01-24 Martin Sebor <msebor@redhat.com>
2097
2098 PR c/86125
2099 PR c/88886
2100 PR middle-end/86308
2101 * c-decl.c (match_builtin_function_types): Add arguments.
2102 (diagnose_mismatched_decls): Diagnose mismatched declarations
2103 of built-ins more strictly.
2104
e21c4491
JJ
21052019-01-24 Jakub Jelinek <jakub@redhat.com>
2106
2107 PR c++/88976
2108 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2109 on #pragma omp cancel with different modifiers.
2110
420183d9
L
21112019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2112
2113 PR c/51628
2114 PR c/88664
2115 * c-typeck.c (convert_for_assignment): Upate the
2116 warn_for_address_or_pointer_of_packed_member call.
2117
17ad43dd
TH
21182019-01-16 Tom Honermann <tom@honermann.net>
2119 Jason Merrill <jason@redhat.com>
2120
2121 * c-typeck.c (digest_init): Revised the error message produced for
2122 ill-formed cases of array initialization with a string literal.
2123 (error_init): Make variadic.
2124
5f07d78a
JJ
21252019-01-12 Jakub Jelinek <jakub@redhat.com>
2126
2127 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2128
c4581bbf
JJ
21292019-01-07 Jakub Jelinek <jakub@redhat.com>
2130
2131 PR c/88701
2132 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2133 if current_function_decl is non-NULL.
2134
65c5b1eb
JM
21352019-01-07 Joseph Myers <joseph@codesourcery.com>
2136
2137 PR c/88720
2138 PR c/88726
2139 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2140 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2141 functions declared but never defined only for external scope, not
2142 for other scopes.
2143
d8fcab68
JJ
21442019-01-07 Jakub Jelinek <jakub@redhat.com>
2145
2146 PR c++/85052
2147 * c-parser.c (c_parser_postfix_expression): Parse
2148 __builtin_convertvector.
2149
a5544970
JJ
21502019-01-01 Jakub Jelinek <jakub@redhat.com>
2151
2152 Update copyright years.
2153
da77eace
L
21542018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2155
2156 PR c/51628
2157 * c-typeck.c (convert_for_assignment): Call
2158 warn_for_address_or_pointer_of_packed_member.
2159
1edf8866
SB
21602018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2161
2162 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2163 a more specific error message (instead of just falling through).
2164
db4fd626
SB
21652018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2166
2167 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2168 asm qualifier is first seen; use that to give nicer "duplicate asm
2169 qualifier" messages. Delete 'quals" variable, instead pass the
2170 "is_volatile_ flag to build_asm_stmt directly.
2171 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2172 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2173
9c9cfcbb
SB
21742018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2175
2176 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2177 "done" boolean variable.
2178
a14feb3c
DM
21792018-12-19 David Malcolm <dmalcolm@redhat.com>
2180
2181 PR c++/87504
2182 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2183 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2184 (build_binary_op): Use struct op_location_t and
2185 class binary_op_rich_location.
2186
6d939173
JJ
21872018-12-11 Jakub Jelinek <jakub@redhat.com>
2188
2189 PR sanitizer/88426
2190 * c-convert.c (convert): Call c_fully_fold before calling
2191 ubsan_instrument_float_cast.
2192
b7055028
SB
21932018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2194
2195 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2196 setting "quals".
2197
5b76e75f
SB
21982018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2199
2200 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2201 after asm. Pass a flag for it to build_asm_expr.
2202 * c-tree.h (build_asm_expr): Update declaration.
2203 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2204 set ASM_INLINE_P.
2205
30bd42b9
SB
22062018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2207
2208 PR inline-asm/55681
2209 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2210 combination of volatile and goto, in any order, without repetitions.
2211
9df6c0e4
JB
22122018-12-04 James Norris <jnorris@codesourcery.com>
2213 Cesar Philippidis <cesar@codesourcery.com>
2214 Julian Brown <julian@codesourcery.com>
2215
2216 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2217 code.
2218
f44697b7
RB
22192018-11-30 Richard Biener <rguenther@suse.de>
2220
2221 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2222 _Literal (type) { ... } as empty aggregate or vector constructor.
2223
550dfbdc
MS
22242018-11-29 Martin Sebor <msebor@redhat.com>
2225
2226 PR c/88091
2227 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2228 (convert_arguments): Add comments. Pass additional argument to
2229 the function above.
2230
673670da
MS
22312018-11-29 Martin Sebor <msebor@redhat.com>
2232
2233 PR c/88172
2234 PR testsuite/88208
2235 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2236
db1d09b0
MS
22372018-11-23 Martin Sebor <msebor@redhat.com>
2238
2239 PR testsuite/88098
2240 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2241 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2242
98f08eb8
MS
22432018-11-20 Martin Sebor <msebor@redhat.com>
2244
2245 * c-parser.c (c_parser_has_attribute_expression): New function.
2246 (c_parser_attribute): New function.
2247 (c_parser_attributes): Move code into c_parser_attribute.
2248 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2249
cd5da983
MS
22502018-11-15 Martin Sebor <msebor@redhat.com>
2251
2252 PR c/83656
2253 * c-decl.c (header_for_builtin_fn): Declare.
2254 (diagnose_mismatched_decls): Diagnose declarations of built-in
2255 functions without a prototype.
2256 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2257 (convert_argument): Same.
2258 (convert_arguments): Factor code out into convert_argument.
2259 Detect mismatches between built-in formal arguments in calls
2260 to built-in without prototype.
2261 (build_conditional_expr): Same.
2262 (type_or_builtin_type): New function.
2263 (convert_for_assignment): Add argument. Conditionally issue
2264 warnings instead of errors for mismatches.
2265
620e594b
DM
22662018-11-13 David Malcolm <dmalcolm@redhat.com>
2267
2268 * c-decl.c: Replace "source_location" with "location_t".
2269 * c-tree.h: Likewise.
2270 * c-typeck.c: Likewise.
2271 * gimple-parser.c: Likewise.
2272
3179ebae
JJ
22732018-11-09 Jakub Jelinek <jakub@redhat.com>
2274
81a227c6
JJ
2275 * c-parser.c (c_parser_omp_clause_final): Use
2276 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2277 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2278 parsing instead of c_parser_paren_condition.
2279 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2280 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2281 c_fully_fold instead of c_parser_condition.
2282 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2283 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2284 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2285 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2286 c_parser_expr_no_commas instead of c_parser_expression.
2287
98c91c56
JJ
2288 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2289 reduction clause with inscan modifier.
2290
3179ebae
JJ
2291 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2292 clauses other than atomic_default_mem_order.
2293
28567c40
JJ
22942018-11-08 Jakub Jelinek <jakub@redhat.com>
2295
2296 * c-parser.c: Include memmode.h.
2297 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2298 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2299 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2300 task_reduction clauses.
2301 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2302 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2303 section, or lvalue assignment expression.
2304 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2305 (c_parser_omp_clause_lastprivate): Parse optional
2306 conditional: modifier.
2307 (c_parser_omp_clause_hint): Require constant integer expression rather
2308 than just integer expression.
2309 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2310 clause.
2311 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2312 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2313 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2314 functions.
2315 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2316 iterators. Parse mutexinoutset and depobj kinds.
2317 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2318 callers.
2319 (c_parser_omp_all_clauses): Likewise. Handle
2320 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2321 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2322 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2323 default memory order from requires directive if any. Adjust
2324 c_finish_omp_atomic caller.
2325 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2326 (c_parser_omp_flush): Parse flush with memory-order-clause.
2327 (c_parser_omp_for_loop): Allow NE_EXPR even in
2328 OpenMP loops, adjust c_finish_omp_for caller.
2329 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2330 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2331 Allow to be called while parsing combined parallel master.
2332 Parse combined master taskloop{, simd}.
2333 (c_parser_omp_parallel): Parse combined
2334 parallel master{, taskloop{, simd}} constructs.
2335 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2336 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2337 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2338 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2339 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2340 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2341 around teams body. Use SET_EXPR_LOCATION.
2342 (c_parser_omp_target_data): Allow target data
2343 with only use_device_ptr clauses.
2344 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2345 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2346 (c_parser_omp_requires): New function.
2347 (c_finish_taskloop_clauses): New function.
2348 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2349 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2350 declaration. Disallow in_reduction clause when combined with parallel
2351 master.
2352 (c_parser_omp_construct): Adjust c_parser_omp_master and
2353 c_parser_omp_taskgroup callers.
2354 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2355 other than cancel.
2356 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2357 like OMP_CLAUSE_REDUCTION.
2358 (handle_omp_array_sections): Likewise. Call save_expr on array
2359 reductions before calling build_index_type. Handle depend clauses
2360 with iterators.
2361 (struct c_find_omp_var_s): New type.
2362 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2363 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2364 with static, runtime or auto schedule kinds. Call save_expr for whole
2365 array reduction sizes. Diagnose reductions with zero sized elements
2366 or variable length structures. Diagnose nogroup clause used with
2367 reduction clause(s). Handle depend clause with
2368 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2369 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2370 some different type for other kinds. Use build_unary_op with
2371 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2372 Handle depend clauses with iterators. Remove no longer needed special
2373 case that predetermined const qualified vars may be specified in
2374 firstprivate clause. Complain if const qualified vars are mentioned
2375 in data-sharing clauses other than firstprivate or shared. Use
2376 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2377 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2378 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2379 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2380
7e2de6df
DM
23812018-10-29 David Malcolm <dmalcolm@redhat.com>
2382
2383 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2384 logic for change to name_hint::operator bool.
2385 (undeclared_variable): Likewise.
2386 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2387 (c_parser_parameter_declaration): Likewise.
2388
9f936c86
JM
23892018-10-17 Joseph Myers <joseph@codesourcery.com>
2390
2391 * c-errors.c (pedwarn_c11): New function.
2392 * c-parser.c (disable_extension_diagnostics): Save
2393 warn_c11_c2x_compat and set it to 0.
2394 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2395 (c_parser_static_assert_declaration_no_semi): Handle
2396 _Static_assert without string constant.
2397 * c-tree.h (pedwarn_c11): New prototype.
2398
033eb567
DM
23992018-10-17 David Malcolm <dmalcolm@redhat.com>
2400
2401 * Make-lang.in (selftest-c): New.
2402 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2403 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2404 from gcc/Makefile.in.
2405
0edf3afe
RB
24062018-10-02 Richard Biener <rguenther@suse.de>
2407
2408 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2409
8313a764
JM
24102018-09-26 Joseph Myers <joseph@codesourcery.com>
2411
2412 PR c/87390
2413 * c-typeck.c (build_binary_op): Use excess precision for
2414 comparisons of integers and floating-point for C11 and later.
2415
ce6f0888
MJ
24162018-09-26 Martin Jambor <mjambor@suse.cz>
2417
2418 PR c/87347
2419 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2420 comment.
ce6f0888 2421
9c4a4b3c
DM
24222018-09-17 David Malcolm <dmalcolm@redhat.com>
2423
2424 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2425 Update for new param.
2426 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2427 Likewise.
2428
80c6d1f4
MJ
24292018-09-17 Martin Jambor <mjambor@suse.cz>
2430
2431 PR c/63886
2432 * c-parser.c: (warn_for_abs): New function.
2433 (c_parser_postfix_expression_after_primary): Call it.
2434
4a426e36
BE
24352018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2436
2437 * c-typeck.c (digest_init): Shorten overlength strings.
2438
6d900107
BE
24392018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2440
2441 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2442
b5764229
BE
24432018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2444
2445 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2446 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2447
22eea6b2
AM
24482018-08-30 Alexander Monakov <amonakov@ispras.ru>
2449
2450 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2451 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2452
85204e23
DM
24532018-08-27 David Malcolm <dmalcolm@redhat.com>
2454
2455 PR 87091
2456 * c-decl.c (implicitly_declare): Update call to
2457 maybe_add_include_fixit to suggest overriding the location, as it
2458 is for a note.
2459 * c-objc-common.c (c_tree_printer): Update for conversion of
2460 show_caret_p to a tri-state.
2461
3d78e008
ML
24622018-08-27 Martin Liska <mliska@suse.cz>
2463
2464 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2465 fndecl_built_in_p and remove check for FUNCTION_DECL if
2466 possible.
3d78e008
ML
2467 (diagnose_mismatched_decls): Likewise.
2468 (merge_decls): Likewise.
2469 (warn_if_shadowing): Likewise.
2470 (pushdecl): Likewise.
2471 (implicitly_declare): Likewise.
2472 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2473 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2474 * c-typeck.c (build_function_call_vec): Likewise.
2475 (convert_arguments): Likewise.
2476
097f82ec
DM
24772018-08-20 David Malcolm <dmalcolm@redhat.com>
2478
2479 PR other/84889
2480 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2481 (diagnose_mismatched_decls): Likewise, in various places.
2482 (warn_if_shadowing): Likewise.
2483 (implicit_decl_warning): Likewise.
2484 (implicitly_declare): Likewise.
2485 (undeclared_variable): Likewise.
2486 (declare_label): Likewise.
2487 (grokdeclarator): Likewise.
2488 (start_function): Likewise.
2489 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2490 (c_parser_parameter_declaration): Likewise.
2491 (c_parser_binary_expression): Likewise.
2492 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2493 (parser_build_binary_op): Likewise.
2494 (build_unary_op): Likewise.
2495 (error_init): Likewise.
2496 (pedwarn_init): Likewise.
2497 (warning_init): Likewise.
2498 (convert_for_assignment): Likewise.
2499
96e6ae57
DM
25002018-08-15 David Malcolm <dmalcolm@redhat.com>
2501
2502 * c-objc-common.c: Include "gcc-rich-location.h".
2503 (c_tree_printer): Move implemenation of '%T' to...
2504 (print_type): ...this new function.
2505 (range_label_for_type_mismatch::get_text): New function.
2506 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2507 range for the various ic_argpass cases.
2508 (class maybe_range_label_for_tree_type_mismatch): New class.
2509 (build_binary_op): Use it when calling binary_op_error.
2510
0cd020ae 25112018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2512
0cd020ae
PK
2513 * c-decl.c (start_decl): Do not warn if variables is named as main
2514 and is a local variable.
2515
72733314
IS
25162018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2517
2518 PR c/19315
2519 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2520 objects of unknown size.
2521
23aa9f7c
MS
25222018-08-13 Martin Sebor <msebor@redhat.com>
2523
2524 PR tree-optimization/71625
2525 * c-parser.c (c_parser_declaration_or_fndef): Call
2526 braced_list_to_string.
2527
e5e7e50d
BH
25282018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2529
2530 PR c/86690
2531 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2532 errors.
2533
8a45b051
MS
25342018-08-01 Martin Sebor <msebor@redhat.com>
2535
2536 PR tree-optimization/86650
2537 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2538 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2539
5922dcb5
JJ
25402018-08-01 Jakub Jelinek <jakub@redhat.com>
2541
2542 PR c/85704
2543 * c-typeck.c (init_field_decl_cmp): New function.
2544 (output_pending_init_elements): Use it for field comparisons
2545 instead of pure bit_position comparisons.
2546
9b452033
JJ
25472018-07-12 Jakub Jelinek <jakub@redhat.com>
2548
2549 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2550 type here, instead add "omp declare target implicit" attribute.
2551 (finish_decl): Diagnose vars without mappable type here.
2552
ab20d992
JJ
25532018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2554 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2555 Cesar Philippidis <cesar@codesourcery.com>
2556
2557 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2558 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2559 to their non-present_or_* counterparts. Make 'self' an alias to
2560 PRAGMA_OACC_CLAUSE_HOST.
2561 (c_parser_oacc_data_clause): Update GOMP mappings for
2562 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2563 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2564 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2565 Remove support for present_or_* clauses.
2566 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2567 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2568 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2569 (OACC_DATA_CLAUSE_MASK): Likewise.
2570 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2571 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2572 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2573 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2574 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2575
e197e64e
KV
25762018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2577
2578 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2579 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2580 (c_parser_gimple_unary_expression): Likewise.
2581
487f2f61
JJ
25822018-06-15 Jakub Jelinek <jakub@redhat.com>
2583
2584 PR c/86093
2585 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2586 before doing POINTER_DIFF_EXPR.
2587
e4d44a37
MP
25882018-06-07 Marek Polacek <polacek@redhat.com>
2589
2590 PR c/85318
2591 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2592 for loop initial declarations.
2593
b67b9225
DP
25942018-05-30 David Pagan <dave.pagan@oracle.com>
2595
2596 PR c/55976
2597 * c-decl.c (grokdeclarator): Update check for return type warnings.
2598 (start_function): Likewise.
2599 (finish_function): Likewise.
2600 * c-typeck.c (c_finish_return): Update check for return type warnings.
2601 Pass OPT_Wreturn_type to pedwarn when appropriate.
2602
c566cc9f
RS
26032018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2604
2605 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2606 __FMA_EXPR handlng.
2607
e4f81565
RS
26082018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2609
2610 * gimple-parser.c: Include internal-fn.h.
2611 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2612 (c_parser_gimple_call_internal): New function.
2613 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2614 Fix typos in comment.
2615
79e7b1fe
JJ
26162018-05-10 Jakub Jelinek <jakub@redhat.com>
2617
2618 PR c++/85662
2619 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2620 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2621 fold_convert_loc.
2622 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2623 fold_offsetof_1, pass argtype as TYPE to it and drop the
2624 fold_convert_loc.
2625
f7584c81
DP
26262018-05-02 David Pagan <dave.pagan@oracle.com>
2627
2628 PR c/30552
2629 * c-decl.c (old_style_parameter_scope): New function.
2630 * c-parser.c (c_parser_postfix_expression): Check for statement
2631 expressions in old-style function parameter list declarations.
2632 * c-parser.h (old_style_parameter_scope): New extern declaration.
2633
b33a0cb3
JJ
26342018-04-25 Jakub Jelinek <jakub@redhat.com>
2635
2636 PR sanitizer/84307
2637 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2638 it is not TREE_STATIC.
2639 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2640 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2641 its COMPOUND_LITERAL_EXPR_DECL.
2642
c5c5822a
JM
26432018-03-21 Joseph Myers <joseph@codesourcery.com>
2644
2645 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2646 where all functions return the same _FloatN or _FloatNx type,
2647 treat integer types as _Float64 instead of double.
2648
aa1c9429
JJ
26492018-03-21 Jakub Jelinek <jakub@redhat.com>
2650
2651 PR c/84999
2652 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2653 building vector comparison, diagnose it and return error_mark_node.
2654
9bb45a95
JJ
26552018-03-15 Jakub Jelinek <jakub@redhat.com>
2656
2657 PR c/84853
2658 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2659 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2660 INTEGER_TYPE element type.
2661
ada6bad9
DP
26622018-03-13 David Pagan <dave.pagan@oracle.com>
2663
2664 PR c/46921
2665 * c-typeck.c (output_init_element): Ensure field initializer
2666 expression is always evaluated if there are side effects.
2667
849bbdb9
JJ
26682018-03-06 Jakub Jelinek <jakub@redhat.com>
2669
2670 PR c/84721
2671 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2672 !building_stmt_list_p ().
2673
d74641bd
RS
26742018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2675
2676 PR c/84305
2677 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2678 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2679 and include the BIND_EXPR in the list of things that need to be
2680 pre-evaluated.
2681
0444aa9c
NS
26822018-02-09 Nathan Sidwell <nathan@acm.org>
2683
2684 PR c/84293
2685 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2686 to strict_aliasing_warning.
2687
7c30b12a
PC
26882018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2689
2690 * c-typeck.c (really_start_incremental_init, push_init_level,
2691 set_nonincremental_init, output_init_element, process_init_element):
2692 Use DECL_UNNAMED_BIT_FIELD.
2693
2be4dfcb
MP
26942018-01-31 Marek Polacek <polacek@redhat.com>
2695
2696 PR c/81779
2697 * c-parser.c (c_parser_compound_statement_nostart): Call
2698 expansion_point_location_if_in_system_header.
2699
bb9869d5
DM
27002018-01-17 David Malcolm <dmalcolm@redhat.com>
2701
2702 PR c++/83814
2703 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2704 the C part.
2705
b4923738
JJ
27062018-01-13 Jakub Jelinek <jakub@redhat.com>
2707
2708 PR c/83801
2709 * c-tree.h (decl_constant_value_1): Add a bool argument.
2710 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2711 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2712 (decl_constant_value): Adjust caller.
2713 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2714 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2715 decl_constant_value returns initializer that has BLKmode or
2716 array type.
2717 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2718
928686b1
RS
27192018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2720 Alan Hayward <alan.hayward@arm.com>
2721 David Sherwood <david.sherwood@arm.com>
2722
2723 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2724 TYPE_VECTOR_SUBPARTS.
2725
85ec4feb
JJ
27262018-01-03 Jakub Jelinek <jakub@redhat.com>
2727
2728 Update copyright years.
2729
913884f7
JJ
27302018-01-01 Jakub Jelinek <jakub@redhat.com>
2731
2732 PR c/83595
2733 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2734 c_parser_conditional_expression, c_parser_cast_expression,
2735 c_parser_sizeof_expression, c_parser_alignof_expression,
2736 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2737 c_parser_transaction_expression): Use set_error () method instead
2738 of setting value member to error_mark_node.
2739
c6cfa2bf
MM
27402017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2741
2742 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2743 and _Float<N>X built-in functions.
2744
11d29d63
JJ
27452017-12-22 Jakub Jelinek <jakub@redhat.com>
2746
14ec014e
JJ
2747 PR debug/83550
2748 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2749 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2750 incomplete vars rather than after it.
2751
11d29d63
JJ
2752 PR debug/83547
2753 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2754 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2755 and consider empty ones if there are no other stmts. For
2756 -Wunused-value walk all statements before the one only followed by
2757 DEBUG_BEGIN_STMTs.
2758
170a8bd6 27592017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2760 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2761
2762 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2763 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2764 (c_parser_do_statement): Likewise.
2765 (c_parser_for_statement): Likewise.
2766 (c_parser_statement_after_labels): Adjust calls to above.
2767 (c_parse_pragma_ivdep): New static function.
2768 (c_parser_pragma_unroll): Likewise.
2769 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2770 <PRAGMA_UNROLL>: New case.
2771
01512446
JJ
27722017-12-19 Jakub Jelinek <jakub@redhat.com>
2773
2774 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2775 perform_integral_promotions, digest_init): Replace Yoda conditions
2776 with typical order conditions.
2777 * c-decl.c (check_bitfield_type_and_width): Likewise.
2778
c65e18d3
BE
27792017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2780
2781 * c-typeck.c (c_safe_arg_type_equiv_p,
2782 c_safe_function_type_cast_p): New function.
2783 (build_c_cast): Implement -Wcast-function-type.
2784
b7280579
RB
27852017-12-14 Richard Biener <rguenther@suse.de>
2786
2787 PR c/83415
2788 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2789 like REALPART_EXPR for the behavior of whether its operand
2790 is an lvalue.
2791
49e6a6c0
MP
27922017-12-12 Marek Polacek <polacek@redhat.com>
2793
2794 PR c/82679
2795 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2796
ab20d992 27972017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2798
2799 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2800 * c-parser.c (add_debug_begin_stmt): New.
2801 (c_parser_declaration_or_fndef): Call it.
2802 (c_parser_compound_statement_nostart): Likewise.
2803 (c_parser_statement_after_labels): Likewise.
2804 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2805
4b2b493f
JM
28062017-12-07 Joseph Myers <joseph@codesourcery.com>
2807
2808 * c-decl.c (build_compound_literal): Add parameter alignas_align
2809 and set alignment of decl if nonzero.
2810 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2811 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2812 qualifier.
2813 (c_parser_struct_declaration): Update syntax comment.
2814 (c_parser_type_name): Add alignas_ok argument and pass it to
2815 c_parser_declspecs.
2816 (c_parser_cast_expression): Pass true to c_parser_type_name and
2817 give error if a cast used an _Alignas specifier.
2818 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2819 give error if sizeof (type-name) used an _Alignas specifier.
2820 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2821 give error if _Alignof (type-name) used an _Alignas specifier.
2822 (c_parser_postfix_expression_after_paren_type): Check specified
2823 alignment for a compound literal and pass it to
2824 build_compound_literal.
2825 * c-parser.h (c_parser_type_name): Update prototype.
2826 * c-tree.h (build_compound_literal): Update prototype.
2827
5d9ae53d
MS
28282017-12-07 Martin Sebor <msebor@redhat.com>
2829
2830 PR c/81544
2831 * c-decl.c (c_decl_attributes): Look up existing declaration and
2832 pass it to decl_attributes.
2833
c79144f8
DM
28342017-12-06 David Malcolm <dmalcolm@redhat.com>
2835
2836 PR c/83236
2837 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2838 reserved for use by the implementation.
2839
613bc14f
DM
28402017-12-06 David Malcolm <dmalcolm@redhat.com>
2841
2842 * c-decl.c: Include "c-family/c-spellcheck.h".
2843
05abad4c
ML
28442017-12-05 Martin Liska <mliska@suse.cz>
2845 Jakub Jelinek <jakub@redhat.com>
2846
2847 * c-typeck.c (pointer_diff): Add new argument and instrument
2848 pointer subtraction.
2849 (build_binary_op): Similar for pointer comparison.
2850
cc6534d4
JJ
28512017-12-01 Jakub Jelinek <jakub@redhat.com>
2852
65791f42
JJ
2853 PR c/79153
2854 * c-parser.c: Include tree-iterator.h.
2855 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2856 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2857 on it.
2858
cc6534d4
JJ
2859 PR c/83222
2860 * c-tree.h (decl_constant_value_1): Declare.
2861 * c-typeck.c (decl_constant_value_1): New function.
2862 (decl_constant_value): Use it.
2863 * c-fold.c (c_fully_fold_internal): If in_init, use
2864 decl_constant_value_1 instead of decl_constant_value.
2865
5de73c05
JJ
28662017-11-30 Jakub Jelinek <jakub@redhat.com>
2867
2868 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2869
058f0b9e
JJ
28702017-11-28 Jakub Jelinek <jakub@redhat.com>
2871
2872 PR sanitizer/81275
2873 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2874 c_switch_covers_all_cases_p returns true.
2875
5e9d6aa4 28762017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2877 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2878
2879 * Make-lang.in (c/c-array-notation.o): Remove.
2880 * c-array-notation.c: Delete.
2881 * c-decl.c: Remove cilkplus condition.
2882 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2883 c_parser_cilk_verify_simd, c_parser_array_notation,
2884 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2885 c_parser_cilk_simd_fn_vector_attrs,
2886 c_finish_cilk_simd_fn_tokens): Delete.
2887 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2888 (c_parser_direct_declarator_inner): Ditto.
2889 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2890 (c_parser_attributes, c_parser_compound_statement,
2891 c_parser_statement_after_labels, c_parser_if_statement,
2892 c_parser_switch_statement, c_parser_while_statement,
2893 c_parser_do_statement, c_parser_for_statement,
2894 c_parser_unary_expression, c_parser_postfix_expression,
2895 c_parser_postfix_expression_after_primary,
2896 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2897 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2898 support.
2899 * c-typeck.c (build_array_ref, build_function_call_vec,
2900 convert_arguments,
2901 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2902 c_finish_loop, build_binary_op): Remove cilkplus support.
2903
9e851845
JJ
29042017-11-28 Jakub Jelinek <jakub@redhat.com>
2905
2906 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2907 of build3.
2908
ab20d992 29092017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2910
2911 * Make-lang.in (c.install-plugin): Install backend import library.
2912
41521dee
JJ
29132017-11-23 Jakub Jelinek <jakub@redhat.com>
2914
2915 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2916 pragma_stmt context.
2917
ac9effed
EB
29182017-11-23 Mike Stump <mikestump@comcast.net>
2919 Eric Botcazou <ebotcazou@adacore.com>
2920
2921 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2922 ANNOTATE_EXPR.
2923 (c_parser_do_statement): Likewise.
2924 (c_parser_for_statement): Likewise.
2925
ce95abc4
DM
29262017-11-22 David Malcolm <dmalcolm@redhat.com>
2927
2928 PR c++/62170
2929 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2930 bool to bool *. Within '%T' handling, if showing an "aka", use
2931 "quoted" param to add appropriate quoting.
2932
974aedcc
MP
29332017-11-22 Marek Polacek <polacek@redhat.com>
2934
2935 PR c++/60336
2936 PR middle-end/67239
2937 PR target/68355
2938 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2939
d4300cc6
DM
29402017-11-21 David Malcolm <dmalcolm@redhat.com>
2941
2942 PR c/83056
2943 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2944 earlier failed lookups.
2945
1af4ebf5
MG
29462017-11-21 Marc Glisse <marc.glisse@inria.fr>
2947
2948 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2949 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2950
26edace6
DM
29512017-11-20 David Malcolm <dmalcolm@redhat.com>
2952
2953 PR c/81404
2954 * c-decl.c: Include "c-family/known-headers.h".
2955 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2956 to known-headers.cc.
2957 (class suggest_missing_header): Move to known-header.h.
2958 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2959 than get_c_name_hint.
2960
b1212255
DM
29612017-11-20 David Malcolm <dmalcolm@redhat.com>
2962
2963 * c-decl.c (get_c_name_hint): New function.
2964 (class suggest_missing_header): New class.
2965 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2966 suggest missing headers to the user.
2967
6c7a259b
DM
29682017-11-20 David Malcolm <dmalcolm@redhat.com>
2969
2970 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2971 Include "c-family/name-hint.h"
2972 (implicit_decl_warning): Convert "hint" from
2973 const char * to name_hint. Pass location to
2974 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2975 warning was not printed.
2976 (undeclared_variable): Likewise for "guessed_id".
2977 (lookup_name_fuzzy): Convert return type from const char *
2978 to name_hint. Add location_t param.
2979 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2980 Include "c-family/name-hint.h"
2981 (c_parser_declaration_or_fndef): Convert "hint" from
2982 const char * to name_hint. Pass location to lookup_name_fuzzy.
2983 (c_parser_parameter_declaration): Likewise.
2984
f9c59f7e
JJ
29852017-11-19 Jakub Jelinek <jakub@redhat.com>
2986
2987 PR c/66618
2988 PR c/69960
2989 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2990 where needed.
2991 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2992 handle_omp_array_sections): Likewise.
2993 (digest_init): Don't call decl_constant_value_for_optimization.
2994 * c-tree.h (decl_constant_value_for_optimization): Removed.
2995 * c-fold.c (c_fold_array_ref): New function.
2996 (c_fully_fold_internal): Add LVAL argument, propagate it through
2997 recursive calls. For VAR_P call decl_constant_value and
2998 unshare if not LVAL and either optimizing or IN_INIT. Remove
2999 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3000 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3001 (c_fully_fold): Add LVAL argument, pass it through to
3002 c_fully_fold_internal.
3003 (decl_constant_value_for_optimization): Removed.
3004
3ca0dc60
JM
30052017-11-15 Joseph Myers <joseph@codesourcery.com>
3006
3007 PR c/81156
3008 * c-parser.c (check_tgmath_function): New function.
3009 (enum tgmath_parm_kind): New enum.
3010 (c_parser_postfix_expression): Handle __builtin_tgmath.
3011
64a5912c
DM
30122017-10-31 David Malcolm <dmalcolm@redhat.com>
3013
3014 * c-decl.c (implicit_decl_warning): Update for renaming of
3015 pedwarn_at_rich_loc and warning_at_rich_loc.
3016 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3017 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3018 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3019 (c_parser_struct_or_union_specifier): Likewise for renaming of
3020 pedwarn_at_rich_loc.
3021 (c_parser_parameter_declaration): Likewise for renaming of
3022 error_at_rich_loc.
3023 * c-typeck.c (build_component_ref): Likewise.
3024 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3025 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3026 (set_init_label): Likewise for renaming of error_at_rich_loc.
3027
c1136864
RB
30282017-10-30 Richard Biener <rguenther@suse.de>
3029
3030 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3031 stmts.
3032
ee5fd23a
MM
30332017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3034
3035 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3036 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3037
1a59ccf2
DM
30382017-10-25 David Malcolm <dmalcolm@redhat.com>
3039
3040 PR c/7356
3041 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3042 semicolons.
3043
bc1a75dd
JJ
30442017-10-25 Jakub Jelinek <jakub@redhat.com>
3045
3046 PR libstdc++/81706
3047 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3048 newdecl to corresponding __builtin_ if any.
3049
ff1ff960
PC
30502017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3051
3052 PR c++/82466
3053 * c-decl.c (diagnose_mismatched_decls): Use
3054 OPT_Wbuiltin_declaration_mismatch.
3055
62e1c678
DM
30562017-10-12 David Malcolm <dmalcolm@redhat.com>
3057
3058 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3059 use it to guard calls to maybe_suggest_missing_token_insertion.
3060 (c_parser_parms_list_declarator): Override default value of new
3061 "type_is_unique" param to c_parser_require.
3062 (c_parser_asm_statement): Likewise.
3063 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3064 defaulting to true.
3065
a92f6726
NS
30662017-10-11 Nathan Sidwell <nathan@acm.org>
3067
3068 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3069
8e6cdc90
RS
30702017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3071
3072 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3073 operating on trees as wide_ints.
3074 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3075 (c_tree_equal): Likewise.
3076
8139a48e
DM
30772017-10-04 David Malcolm <dmalcolm@redhat.com>
3078
3079 * c-decl.c (push_parm_decl): Store c_parm's location into the
3080 PARAM_DECL.
3081 (build_c_parm): Add "loc" param and store it within the c_parm.
3082 * c-parser.c (struct c_parser): Add "last_token_location" field.
3083 (c_parser_consume_token): Store location of the token into the
3084 new field.
3085 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3086 when handling a FUNCTION_DECL, if it doesn't already have them.
3087 (c_parser_parameter_declaration): Generate a location for the
3088 parameter, and pass it to the call to build_c_parm.
3089 * c-tree.h (struct c_parm): Add field "loc".
3090 (build_c_parm): Add location_t param.
3091 * c-typeck.c (get_fndecl_argument_location): New function.
3092 (inform_for_arg): New function.
3093 (convert_for_assignment): Use inform_for_arg when dealing with
3094 ic_argpass.
3095
2a389958
JJ
30962017-09-29 Jakub Jelinek <jakub@redhat.com>
3097
7d386d45
JJ
3098 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3099 width is non-NULL.
3100 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3101 don't SET_DECL_C_BIT_FIELD here.
3102
2a389958
JJ
3103 PR c/82340
3104 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3105 instead of trying to set just TREE_READONLY manually.
3106
ebc6a85e
TV
31072017-09-16 Tom de Vries <tom@codesourcery.com>
3108
3109 PR c/81875
3110 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3111 cond itself.
3112
bb75facd
JM
31132017-09-15 Joseph Myers <joseph@codesourcery.com>
3114
3115 PR c/82071
3116 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3117 for C11.
3118 (build_conditional_expr): For C11, generate result with excess
3119 precision when one argument is an integer and the other is of a
3120 type using excess precision.
3121
1d933576
BE
31222017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3123
3124 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3125
267bbb6f
MP
31262017-09-13 Marek Polacek <polacek@redhat.com>
3127
3128 PR c/82167
3129 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3130 than expr.original_type.
3131
6836632e
NS
31322017-09-12 Nathan Sidwell <nathan@acm.org>
3133
3134 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3135 resort_sorted_fields): Moved from c-family/c-common.c.
3136 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3137
e035be33
JM
31382017-09-01 Joseph Myers <joseph@codesourcery.com>
3139
3140 PR c/82071
3141 * c-typeck.c (build_atomic_assign): Handle argument with excess
3142 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3143 argument passed to build_binary_op and convert_for_assignment but
3144 not for call to c_fully_fold.
3145 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3146 Ensure build_binary_op is called with argument with original
3147 semantic type. Avoid calling c_fully_fold with an
3148 EXCESS_PRECISION_EXPR from build_binary_op.
3149
d2e05fcb
JJ
31502017-09-01 Jakub Jelinek <jakub@redhat.com>
3151
3152 PR c/81887
3153 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3154
b397965c
RS
31552017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3156 Alan Hayward <alan.hayward@arm.com>
3157 David Sherwood <david.sherwood@arm.com>
3158
3159 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3160 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3161 m1 and m2 to the signed equivalent of a fixed-point
3162 SCALAR_TYPE_MODE.
3163
14e18d71
DM
31642017-08-24 David Malcolm <dmalcolm@redhat.com>
3165
3166 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3167 than CAN_HAVE_LOCATION_P when determining whether to use the
3168 location_t value within "value".
3169
7f204c0f
DM
31702017-08-21 David Malcolm <dmalcolm@redhat.com>
3171
3172 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3173 rather than peeking the location of the first token.
3174 * c-tree.h (c_expr::get_location): New method.
3175
2f687306
DM
31762017-08-21 David Malcolm <dmalcolm@redhat.com>
3177
3178 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3179 to check_function_arguments.
3180
3e7b80d7
MP
31812017-08-18 Marek Polacek <polacek@redhat.com>
3182
3183 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3184 commentary.
3185
00aa1fa2
L
31862017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3187
3188 PR c/53037
3189 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3190 (check_bitfield_type_and_width): Don't allow bit-field with
3191 warn_if_not_aligned type.
3192
da67acb9
MS
31932017-08-14 Martin Sebor <msebor@redhat.com>
3194
3195 PR c/81117
3196 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3197
bb85aa74
MP
31982017-08-11 Marek Polacek <polacek@redhat.com>
3199
3200 PR c/81795
3201 * c-decl.c (pushtag): Only print inform if the warning was printed.
3202 (grokdeclarator): Likewise.
3203
32129a17
DM
32042017-08-10 David Malcolm <dmalcolm@redhat.com>
3205
3206 * c-parser.c (c_parser_error): Rename to...
3207 (c_parser_error_richloc): ...this, making static, and adding
3208 "richloc" parameter, passing it to the c_parse_error call,
3209 rather than calling c_parser_set_source_position_from_token.
3210 (c_parser_error): Reintroduce, reimplementing in terms of the
3211 above, converting return type from void to bool.
3212 (class token_pair): New class.
3213 (struct matching_paren_traits): New struct.
3214 (matching_parens): New typedef.
3215 (struct matching_brace_traits): New struct.
3216 (matching_braces): New typedef.
3217 (get_matching_symbol): New function.
3218 (c_parser_require): Add param MATCHING_LOCATION, using it to
3219 highlight matching "opening" tokens for missing "closing" tokens.
3220 (c_parser_skip_until_found): Likewise.
3221 (c_parser_static_assert_declaration_no_semi): Convert explicit
3222 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3223 class matching_parens, so that the pertinent open parenthesis is
3224 highlighted when there are problems locating the close
3225 parenthesis.
3226 (c_parser_struct_or_union_specifier): Likewise.
3227 (c_parser_typeof_specifier): Likewise.
3228 (c_parser_alignas_specifier): Likewise.
3229 (c_parser_simple_asm_expr): Likewise.
3230 (c_parser_braced_init): Likewise, for matching_braces.
3231 (c_parser_paren_condition): Likewise, for matching_parens.
3232 (c_parser_switch_statement): Likewise.
3233 (c_parser_for_statement): Likewise.
3234 (c_parser_asm_statement): Likewise.
3235 (c_parser_asm_operands): Likewise.
3236 (c_parser_cast_expression): Likewise.
3237 (c_parser_sizeof_expression): Likewise.
3238 (c_parser_alignof_expression): Likewise.
3239 (c_parser_generic_selection): Likewise.
3240 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3241 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3242 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3243 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3244 c_parser_skip_until_found call.
3245 (c_parser_objc_class_definition): Use class matching_parens as
3246 above.
3247 (c_parser_objc_method_decl): Likewise.
3248 (c_parser_objc_try_catch_finally_statement): Likewise.
3249 (c_parser_objc_synchronized_statement): Likewise.
3250 (c_parser_objc_at_property_declaration): Likewise.
3251 (c_parser_oacc_wait_list): Likewise.
3252 (c_parser_omp_var_list_parens): Likewise.
3253 (c_parser_omp_clause_collapse): Likewise.
3254 (c_parser_omp_clause_default): Likewise.
3255 (c_parser_omp_clause_if): Likewise.
3256 (c_parser_omp_clause_num_threads): Likewise.
3257 (c_parser_omp_clause_num_tasks): Likewise.
3258 (c_parser_omp_clause_grainsize): Likewise.
3259 (c_parser_omp_clause_priority): Likewise.
3260 (c_parser_omp_clause_hint): Likewise.
3261 (c_parser_omp_clause_defaultmap): Likewise.
3262 (c_parser_oacc_single_int_clause): Likewise.
3263 (c_parser_omp_clause_ordered): Likewise.
3264 (c_parser_omp_clause_reduction): Likewise.
3265 (c_parser_omp_clause_schedule): Likewise.
3266 (c_parser_omp_clause_num_teams): Likewise.
3267 (c_parser_omp_clause_thread_limit): Likewise.
3268 (c_parser_omp_clause_aligned): Likewise.
3269 (c_parser_omp_clause_linear): Likewise.
3270 (c_parser_omp_clause_safelen): Likewise.
3271 (c_parser_omp_clause_simdlen): Likewise.
3272 (c_parser_omp_clause_depend): Likewise.
3273 (c_parser_omp_clause_map): Likewise.
3274 (c_parser_omp_clause_device): Likewise.
3275 (c_parser_omp_clause_dist_schedule): Likewise.
3276 (c_parser_omp_clause_proc_bind): Likewise.
3277 (c_parser_omp_clause_uniform): Likewise.
3278 (c_parser_omp_for_loop): Likewise.
3279 (c_parser_cilk_clause_vectorlength): Likewise.
3280 (c_parser_cilk_clause_linear): Likewise.
3281 (c_parser_transaction_expression): Likewise.
3282 * c-parser.h (c_parser_require): Add param matching_location with
3283 default UNKNOWN_LOCATION.
3284 (c_parser_error): Convert return type from void to bool.
3285 (c_parser_skip_until_found): Add param matching_location with
3286 default UNKNOWN_LOCATION.
3287
30af3a2b
MP
32882017-08-09 Marek Polacek <polacek@redhat.com>
3289
3290 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3291 * c-tree.h (build_external_ref): Update declaration.
3292 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3293 (build_external_ref): Change the type of a parameter to bool.
3294 (parser_build_binary_op): Use true/false instead of 1/0.
3295 (pointer_diff): Likewise.
3296 (build_modify_expr): Likewise.
3297 (set_designator): Change the type of a parameter to bool.
3298 (set_init_index): Use true/false instead of 1/0.
3299 (set_init_label): Likewise.
3300 (output_init_element): Change the type of a parameter to bool.
3301 (output_pending_init_elements): Use true/false instead of 1/0.
3302 (process_init_element): Likewise.
3303 (build_binary_op): Change the type of a parameter to bool.
3304
296c53ac
MP
33052017-08-09 Marek Polacek <polacek@redhat.com>
3306
3307 PR c/81233
3308 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3309 Call emit_diagnostic_valist instead of pedwarn.
3310 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3311 Print the relevant types in diagnostics.
3312
a32c8316
MP
33132017-08-09 Marek Polacek <polacek@redhat.com>
3314
3315 PR c/81417
3316 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3317 build_conditional_expr.
a32c8316
MP
3318 * c-parser.c (c_parser_conditional_expression): Create locations for
3319 EXP1 and EXP2 from their source ranges. Pass the locations down to
3320 build_conditional_expr.
3321 * c-tree.h (build_conditional_expr): Update declaration.
3322 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3323 For -Wsign-compare, also print the types.
3324
314e6352
ML
33252017-08-08 Martin Liska <mliska@suse.cz>
3326
3327 * c-convert.c: Include header files.
3328 * c-typeck.c: Likewise.
3329
577eec56
ML
33302017-08-07 Martin Liska <mliska@suse.cz>
3331
3332 * c-parser.c (c_parser_attributes): Canonicalize name of an
3333 attribute.
3334
f7b6353a
MP
33352017-08-02 Marek Polacek <polacek@redhat.com>
3336
3337 PR c/81289
3338 * c-parser.c (c_parser_unary_expression): Use set_error.
3339
8a6eab34
MP
3340 PR c/81448
3341 PR c/81306
3342 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3343 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3344
ab20d992 33452017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3346 Martin Liska <mliska@suse.cz>
3347
3348 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3349 statement.
7fef86d3 3350
f34ebeb2
ML
33512017-07-31 Martin Liska <mliska@suse.cz>
3352
3353 PR sanitize/81530
3354 * c-convert.c (convert): Guard condition with flag_sanitize_p
3355 also with current_function_decl non-null equality.
3356 * c-decl.c (grokdeclarator): Likewise.
3357 * c-typeck.c (build_binary_op): Likewise.
3358
8595f67b
MP
33592017-07-25 Marek Polacek <polacek@redhat.com>
3360
3361 * c-decl.c (grokfield): Remove local variable.
3362
d49718d6
MP
33632017-07-25 Marek Polacek <polacek@redhat.com>
3364
3365 PR c/81364
3366 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3367 macro expansion if the body is in { }.
3368 (c_parser_while_statement): Likewise.
3369 (c_parser_for_statement): Likewise.
3370
ff22eb12
NS
33712017-07-18 Nathan Sidwell <nathan@acm.org>
3372
3373 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3374
eea77d1f
DM
33752017-07-14 David Malcolm <dmalcolm@redhat.com>
3376
3377 * c-decl.c (implicitly_declare): When suggesting a missing
3378 #include, provide a fix-it hint.
3379
b6f43128
DM
33802017-07-06 David Malcolm <dmalcolm@redhat.com>
3381
3382 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3383 and call that instead.
3384 * c-tree.h (selftest::run_c_tests): New decl.
3385
3e2becc4
MP
33862017-06-26 Marek Polacek <polacek@redhat.com>
3387
3388 PR c/80116
3389 * c-parser.c (c_parser_if_body): Set the location of the
3390 body of the conditional after parsing all the labels. Call
3391 warn_for_multistatement_macros.
3392 (c_parser_else_body): Likewise.
3393 (c_parser_switch_statement): Likewise.
3394 (c_parser_while_statement): Likewise.
3395 (c_parser_for_statement): Likewise.
3396 (c_parser_statement): Add a default argument. Save the location
3397 after labels have been parsed.
3398 (c_parser_c99_block_statement): Likewise.
3399
343ae898
RB
34002017-06-19 Richard Biener <rguenther@suse.de>
3401
3402 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3403 negated _Literals to parse _Literal (int) -1.
3404
45b2222a
ML
34052017-06-13 Martin Liska <mliska@suse.cz>
3406
3407 PR sanitize/78204
3408 * c-convert.c (convert): Use sanitize_flags_p.
3409 * c-decl.c (grokdeclarator): Likewise.
3410 * c-typeck.c (convert_for_assignment): Likewise.
3411 (c_finish_return): Likewise.
3412 (build_binary_op): Likewise.
3413
8ab7005b
JJ
34142017-06-08 Jakub Jelinek <jakub@redhat.com>
3415
3416 PR c/81006
3417 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3418 to sizetype before size_binop.
3419
363dc72c
JJ
34202017-06-07 Jakub Jelinek <jakub@redhat.com>
3421
3422 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3423 of TDI_generic.
3424
dc949728
MP
34252017-06-06 Marek Polacek <polacek@redhat.com>
3426
3427 PR c/79983
3428 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3429 ref.
3430 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3431
40ffd95f
BE
34322017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3433
3434 * c-parser.c (c_parser_binary_expression): Implement the
3435 -Wsizeof_pointer_div warning.
3436 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3437 from a parenthesized expression.
3438 (c_parser_expr_list): Use c_last_sizeof_loc.
3439 * c-tree.h (c_last_sizeof_loc): New external.
3440 * c-typeck.c (c_last_sizeof_loc): New variable.
3441 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3442
9fc5e7a4
MM
34432017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3444
3445 PR testsuite/80580
3446 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3447
f012c8ef
DM
34482017-05-30 David Malcolm <dmalcolm@redhat.com>
3449
3450 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3451 parameters.
3452
3cd211af
MS
34532017-05-24 Martin Sebor <msebor@redhat.com>
3454
3455 PR c/80731
3456 * c-fold.c (c_fully_fold_internal): Adjust.
3457 * c-typeck.c (parser_build_unary_op): Adjust.
3458
fd71a9a2
TS
34592017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3460
3461 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3462 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3463 "VECTOR_LENGTH".
3464
92fa0f9e
MP
34652017-05-23 Marek Polacek <polacek@redhat.com>
3466
3467 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3468 quotes.
3469
d11c168a
JJ
34702017-05-22 Jakub Jelinek <jakub@redhat.com>
3471
3472 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3473 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3474 it returned invariant. Call tree_invariant_p unconditionally
3475 afterwards to decide whether to return expr or op0.
3476
58aca9d9
NS
34772017-05-22 Nathan Sidwell <nathan@acm.org>
3478
3479 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3480
7fd549d2
TS
34812017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3482
3483 * c-parser.c (c_parser_omp_clause_default): Handle
3484 "OMP_CLAUSE_DEFAULT_PRESENT".
3485
6ecd2339
BE
34862017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3487
3488 * config-lang.in (gtfiles): Add c-family/c-format.c.
3489
8a57ecff
NS
34902017-05-18 Nathan Sidwell <nathan@acm.org>
3491
3492 * c-decl.c (pushdecl_top_level): Delete unused function.
3493
6574d78e
MP
34942017-05-18 Marek Polacek <polacek@redhat.com>
3495
3496 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3497 (check_earlier_gotos): Likewise.
3498 (define_label): Likewise.
3499 (pending_xref_error): Likewise.
3500 (smallest_type_quals_location): Likewise.
3501 (grokdeclarator): Likewise.
3502 (grokparms): Likewise.
3503 (identifier_global_value): Likewise.
3504 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3505 (find_init_member): Likewise.
3506
e3455240
MP
35072017-05-18 Marek Polacek <polacek@redhat.com>
3508
3509 * c-decl.c (start_decl): Use false/true instead of 0/1.
3510 (grokdeclarator): Likewise.
3511 (finish_struct): Likewise.
3512 (start_function): Change the return type to bool. Use false/true
3513 instead of 0/1.
3514 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3515 * c-tree.h (start_function): Update.
3516 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3517 (set_designator): Change the return type to bool. Use false/true
3518 instead of 0/1.
3519
3fa8871b
MP
35202017-05-17 Marek Polacek <polacek@redhat.com>
3521
3522 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3523 * c-typeck.c: Likewise.
3524
142473df
MP
35252017-05-17 Marek Polacek <polacek@redhat.com>
3526
3527 PR sanitizer/80659
3528 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3529 DECL_IGNORED_P even for non-static compound literals.
3530
1a817418
ML
35312017-05-17 Martin Liska <mliska@suse.cz>
3532
3533 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3534 use it instead of int type.
3535
b2fa0a8b
MP
35362017-05-17 Marek Polacek <polacek@redhat.com>
3537
3538 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3539 call c_fully_fold.
3540 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3541 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3542 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3543 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3544 save_expr.
3545 (c_parser_conditional_expression): Likewise.
3546 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3547 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3548 (process_init_element): Likewise.
3549 (build_binary_op): Likewise.
3550 (handle_omp_array_sections_1): Likewise.
3551
1e47f02b
TS
35522017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3553
3554 * c-parser.c (c_parser_omp_clause_num_gangs)
3555 (c_parser_omp_clause_num_workers)
3556 (c_parser_omp_clause_vector_length): Merge functions into...
3557 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3558 all users.
3559
c24e924f
NS
35602017-05-11 Nathan Sidwell <nathan@acm.org>
3561
3562 * gimple-parser.c: Don't #include tree-dump.h.
3563
c587104e
MM
35642017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3565
3566 PR testsuite/80580
3567 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3568
67ac9a9d
MM
35692017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3570
3571 PR testsuite/80580
3572 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3573 incorrect __MEM syntax.
3574
ac4eb40f
MM
35752017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3576
3577 PR testsuite/80580
3578 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3579 type of unary '*'.
3580
641da50a
NS
35812017-05-09 Nathan Sidwell <nathan@acm.org>
3582
3583 * c-tree.h (pushdecl): Declare.
3584
56d35585
DM
35852017-05-05 David Malcolm <dmalcolm@redhat.com>
3586
3587 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3588 with diagnostic_report_diagnostic.
3589 * c-errors.c (pedwarn_c99): Likewise.
3590 (pedwarn_c90): Likewise.
3591
815d9cc6
XR
35922017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3593
92a285c1 3594 PR c++/80038
815d9cc6
XR
3595 * c-gimplify.c (c_gimplify_expr): Remove calls to
3596 cilk_gimplifY_call_params_in_spawned_fn.
3597
1c4ea66f
DM
35982017-04-25 David Malcolm <dmalcolm@redhat.com>
3599
3600 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3601 hint for removing extra semicolon.
3602
666f7903
JJ
36032017-04-21 Jakub Jelinek <jakub@redhat.com>
3604
3605 PR c/80468
3606 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3607 enabled, set specs->type to integer_type_node.
3608
5764ee3c
JW
36092017-04-03 Jonathan Wakely <jwakely@redhat.com>
3610
3611 * c-array-notation.c: Fix typo in comment.
3612
10fa8dfb
MP
36132017-03-29 Marek Polacek <polacek@redhat.com>
3614
3615 PR c/79730
3616 * c-decl.c (finish_decl): Check VAR_P.
3617
a9e4a1a5
JJ
36182017-03-27 Jakub Jelinek <jakub@redhat.com>
3619
3620 PR middle-end/80162
3621 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3622 * c-typeck.c (c_mark_addressable): Likewise. Look through
3623 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3624 to ARRAY_TYPE.
3625 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3626
ee3ff394
MP
36272017-03-23 Marek Polacek <polacek@redhat.com>
3628
3629 * c-tree.h: Remove a C_RID_YYCODE reference.
3630
4d1b8e70
JJ
36312017-03-21 Jakub Jelinek <jakub@redhat.com>
3632
3633 PR c/80097
3634 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3635 optional COMPOUND_EXPR with ubsan instrumentation.
3636
31dc71a8
MP
36372017-03-17 Marek Polacek <polacek@redhat.com>
3638
3639 * c-parser.c: Add C11 references.
3640
d579c385
MP
36412017-03-15 Marek Polacek <polacek@redhat.com>
3642
3643 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3644
85059a38
MP
36452017-03-11 Marek Polacek <polacek@redhat.com>
3646
3647 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3648
2f6f187a
DM
36492017-03-10 David Malcolm <dmalcolm@redhat.com>
3650
3651 PR translation/79848
3652 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3653 "%qs".
3654 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3655
36618428
MP
36562017-03-09 Marek Polacek <polacek@redhat.com>
3657
3658 PR sanitizer/79757
3659 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3660 parameter declarations with initializers.
3661
01e5af5a
JJ
36622017-03-09 Jakub Jelinek <jakub@redhat.com>
3663
3664 PR c/79969
3665 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3666 TYPE_STUB_DECL.
3667
a71dbc63
JJ
36682017-03-07 Jakub Jelinek <jakub@redhat.com>
3669
3670 PR c/79834
3671 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3672 for "may only be used in compound statements" diagnostics, change it
3673 such that the same translatable string is used for all pragmas. For
3674 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3675 diagnostics.
3676 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3677 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3678 "may only be used in compound statements" diagnostics, such that the
3679 same translatable string is used for all pragmas.
3680
1ff4bae6
MP
36812017-03-04 Marek Polacek <polacek@redhat.com>
3682
3683 PR c/79847
3684 * c-decl.c (implicit_decl_warning): Add missing space.
3685
7f5a7d78
MP
36862017-03-03 Marek Polacek <polacek@redhat.com>
3687
3688 PR c/79758
3689 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3690 current_function_prototype_arg_types is error_mark_node. Fix
3691 formatting. Use TREE_VALUE instead of TREE_TYPE.
3692
883c8f06
JJ
36932017-03-03 Jakub Jelinek <jakub@redhat.com>
3694
79c9b7a8
JJ
3695 PR c/79837
3696 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3697 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3698 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3699 diagnostics.
3700
883c8f06
JJ
3701 PR c/79836
3702 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3703 instead of %<_Generic>.
3704 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3705 (c_parser_omp_target_exit_data): Use %<release%> instead of
3706 %<release>.
3707
324ff1a0
JJ
37082017-02-28 Jakub Jelinek <jakub@redhat.com>
3709
3710 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3711 instead of just cond ? "..." : "...".
3712 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3713 for "enter"/"exit" keyword.
3714 (c_finish_oacc_routine): Don't use %s to supply portions of the
3715 message.
3716
4227c9ad
JJ
37172017-02-24 Jakub Jelinek <jakub@redhat.com>
3718
3719 PR c++/79588
3720 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3721 handle -Wrestrict here.
3722 * c-typeck.c (build_function_call_vec): Adjust
3723 check_function_arguments caller.
3724
5d972e66
RB
37252017-02-23 Richard Biener <rguenther@suse.de>
3726
3727 PR c/79684
3728 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3729 to initialize c_exprs to return.
3730 (c_parser_gimple_binary_expression): Likewise.
3731 (c_parser_gimple_unary_expression): Likewise.
3732 (c_parser_gimple_postfix_expression): Likewise.
3733
61ac5ebe
MP
37342017-02-22 Marek Polacek <polacek@redhat.com>
3735
3736 PR c/79662
3737 * c-typeck.c (convert_arguments): Handle error_mark_node.
3738
41d1b0b1
PK
37392017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3740
3741 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3742 value of c_parser_parse_ssa_name against error_mark_node and emit
3743 error if ssa name is anonymous and written as default definition.
3744
eab1f169
PK
37452017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3746
3747 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3748 FMA_EXPR.
3749
bcac0b4d
JJ
37502017-02-16 Jakub Jelinek <jakub@redhat.com>
3751
3752 PR c++/79512
3753 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3754 ignore #pragma omp target even when not followed by identifier.
3755
1be33173
PK
37562017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3757
3758 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3759 (c_parser_gimple_unary_expression): Likewise.
3760
aa326bfb
JJ
37612017-02-13 Jakub Jelinek <jakub@redhat.com>
3762
3763 * c-parser.c (c_parser_oacc_declare): Add missing space in
3764 diagnostics.
3765
8a398bc5
PK
37662017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3767
3768 PR c/79478
3769 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3770 set_c_expr_source_range when parsing ssa-name.
3771
3dcde5ef 37722017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3773 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3774
3775 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3776 building IL when arguments are error_mark_node.
3777 (c_parser_gimple_unary_expression): Likewise.
3778 (c_parser_gimple_if_stmt): Likewise.
3779 (c_parser_gimple_switch_stmt): Likewise.
3780 (c_parser_gimple_return_stmt): Likewise.
3781 (c_parser_parse_ssa_name): When name lookup fails do not build
3782 an SSA name. Use undeclared rather than not declared in error
3783 reporting.
3784
192b048b
MP
37852017-02-09 Marek Polacek <polacek@redhat.com>
3786
3787 PR c/79428
3788 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3789 instead of c_parser_skip_until_found.
3790
56f71478
JJ
37912017-02-09 Jakub Jelinek <jakub@redhat.com>
3792
3793 PR c/79431
3794 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3795 symtab_node::get on automatic variables.
3796
02889d23
CLT
37972016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3798 Chung-Lin Tang <cltang@codesourcery.com>
3799
3800 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3801 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3802 semantic checking.
3803 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3804
7af4b20d
RB
38052017-02-07 Richard Biener <rguenther@suse.de>
3806
3807 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3808 (c_parser_gimple_postfix_expression_after_primary):
3809 Do not use c_build_function_call_vec to avoid folding and promotion.
3810 Simplify.
3811
e5e391d6
MO
38122017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3813
3814 PR lto/79061
3815 * c-decl.c (pop_scope): Pass main_input_filename to
3816 build_translation_unit_decl.
3817
c2e84327
DM
38182017-01-24 David Malcolm <dmalcolm@redhat.com>
3819
3820 * c-parser.c: Include "read-rtl-function.h" and
3821 "run-rtl-passes.h".
3822 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3823 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3824 production. Update for renaming of field "gimple_pass" to
3825 "gimple_or_rtl_pass". If __RTL was seen, call
3826 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3827 to an auto_timevar, to cope with early exit.
3828 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3829 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3830 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3831 Handle RID_RTL.
3832 (c_parser_parse_rtl_body): New function.
3833 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3834 (struct c_declspecs): Rename field "gimple_pass" to
3835 "gimple_or_rtl_pass". Add field "rtl_p".
3836 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3837 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3838 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3839 (c_parser_gimple_or_rtl_pass_list): ...this.
3840
2ebd93e1
MP
38412017-01-20 Marek Polacek <polacek@redhat.com>
3842
3843 PR c/64279
3844 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3845
b1c95bb5
RB
38462017-01-13 Richard Biener <rguenther@suse.de>
3847
3848 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3849 nops.
3850
25329913
RB
38512017-01-13 Richard Biener <rguenther@suse.de>
3852
3853 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3854 _Literal ( type-name ) number.
3855
6bb4ea5c
RB
38562017-01-12 Richard Biener <rguenther@suse.de>
3857
3858 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3859 __MEM.
3860
6b5b4e9c
JJ
38612017-01-11 Jakub Jelinek <jakub@redhat.com>
3862
3863 PR c++/72813
3864 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3865 PCH file.
3866
e3252775
RB
38672017-01-11 Richard Biener <rguenther@suse.de>
3868
3869 PR bootstrap/79052
3870 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3871 returns on parse errors.
3872
a9342885
MP
38732017-01-04 Marek Polacek <polacek@redhat.com>
3874
3875 PR c++/64767
3876 * c-parser.c (c_parser_postfix_expression): Mark zero character
3877 constants by setting original_type in c_expr.
3878 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3879 with a zero character constant.
3880 (char_type_p): New function.
3881
5dd9a9d0
DM
38822017-01-04 David Malcolm <dmalcolm@redhat.com>
3883
3884 * c-parser.c (c_parser_declaration_or_fndef): Create a
3885 rich_location at init_loc and parse it to start_init.
3886 (last_init_list_comma): New global.
3887 (c_parser_braced_init): Update last_init_list_comma when parsing
3888 commas. Pass it to pop_init_level. Pass location of closing
3889 brace to pop_init_level.
3890 (c_parser_postfix_expression_after_paren_type): Create a
3891 rich_location at type_loc and parse it to start_init.
3892 (c_parser_omp_declare_reduction): Likewise for loc.
3893 * c-tree.h (start_init): Add rich_location * param.
3894 (pop_init_level): Add location_t param.
3895 * c-typeck.c (struct initializer_stack): Add field
3896 "missing_brace_richloc".
3897 (start_init): Add richloc param, use it to initialize
3898 the stack node's missing_brace_richloc.
3899 (last_init_list_comma): New decl.
3900 (finish_implicit_inits): Pass last_init_list_comma to
3901 pop_init_level.
3902 (push_init_level): When finding missing open braces, add fix-it
3903 hints to the richloc.
3904 (pop_init_level): Add "insert_before" param and pass it
3905 when calling pop_init_level. Add fixits about missing
3906 close braces to any richloc. Use the richloc for the
3907 -Wmissing-braces warning.
3908 (set_designator): Pass last_init_list_comma to pop_init_level.
3909 (process_init_element): Likewise.
3910
cbe34bb5
JJ
39112017-01-01 Jakub Jelinek <jakub@redhat.com>
3912
3913 Update copyright years.
3914
d17680f3
JJ
39152016-12-21 Jakub Jelinek <jakub@redhat.com>
3916
0dba7960
JJ
3917 PR bootstrap/78817
3918 * c-typeck.c (build_function_call_vec): If check_function_arguments
3919 returns true, set TREE_NO_WARNING on CALL_EXPR.
3920
d17680f3
JJ
3921 PR c/77767
3922 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3923 to *expr instead of overwriting it.
3924
aa90531e
RB
39252016-12-20 Richard Biener <rguenther@suse.de>
3926
3927 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3928 error recovery.
3929 (c_parser_gimple_statement): Only build assigns for non-error
3930 stmts.
3931 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3932
629b3d75
MJ
39332016-12-14 Martin Jambor <mjambor@suse.cz>
3934
3935 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3936 omp-low.h.
3937 (c_finish_oacc_routine): Adjusted call to
3938 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3939 to use their new names.
3940 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3941 use its new name.
3942 (c_parser_oacc_update): Likewise.
3943 (c_parser_omp_simd): Likewise.
3944 (c_parser_omp_target_update): Likewise.
3945 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3946 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3947 name.
3948 (c_finish_omp_cancellation_point): Likewise.
3949 * gimple-parser.c: Do not include omp-low.h
3950
c5af52eb
CP
39512016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3952 James Norris <jnorris@codesourcery.com>
3953
3954 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3955 EXIT_DATA,WAIT} are not used in compound statements.
3956 (c_parser_oacc_enter_exit_data): Update diagnostics.
3957
48330c93
BE
39582016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3959
3960 PR c++/71973
3961 * c-decl.c (diagnose_mismatched_decls): Use
3962 OPT_Wbuiltin_declaration_mismatch here too.
3963
899ca90e 39642016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3965 Alan Hayward <alan.hayward@arm.com>
3966 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3967
3968 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3969 (make_label, finish_struct): Likewise.
3970
1ee62b92 39712016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3972 Richard Biener <rguenther@suse.de>
22b15758 3973
8e745a17
JJ
3974 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3975 * config-lang.in (gtfiles): Add c/c-parser.h.
3976 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3977 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3978 * c-parser.c (enum c_id_kind, struct c_token,
3979 c_parser_next_token_is, c_parser_next_token_is_not,
3980 c_parser_next_token_is_keyword,
3981 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3982 Split out to ...
3983 * c-parser.h: ... new header.
3984 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3985 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3986 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3987 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3988 c_parser_error, c_parser_require, c_parser_skip_until_found,
3989 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3990 c_parser_type_name): Export.
3991 (c_parser_tokens_buf): New function.
3992 (c_parser_error): Likewise.
3993 (c_parser_set_error): Likewise.
3994 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3995 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3996 via c_parser_parse_gimple_body.
8e745a17
JJ
3997 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3998 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3999 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4000 c_parser_error, c_parser_require, c_parser_skip_until_found,
4001 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4002 c_parser_type_name): Declare.
1ee62b92
PG
4003 (struct c_parser): Declare forward.
4004 (c_parser_tokens_buf): Declare.
8e745a17
JJ
4005 (c_parser_error): Likewise.
4006 (c_parser_set_error): Likewise.
4007 * gimple-parser.c: New file.
4008 * gimple-parser.h: Likewise.
1ee62b92 4009
22b15758
UB
40102016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4011
4012 PR c/35503
4013 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4014 warn_for_restrict.
4015
84ff4775
LCW
40162016-09-11 Le-Chun Wu <lcwu@google.com>
4017 Mark Wielaard <mjw@redhat.com>
4018
4019 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4020 to the given -Wshadow= variant.
4021
4d0cdd0c
TP
40222016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4023
4024 * c-typeck.c: Include memmodel.h.
4025
1202f33e
JJ
40262016-10-13 Jakub Jelinek <jakub@redhat.com>
4027
4028 PR target/77957
4029 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4030 instead of lhd_return_null_tree_v.
4031
8a14afd0
BS
40322016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4033
4034 PR c++/69733
4035 * c-decl.c (smallest_type_quals_location): New static function.
4036 (grokdeclarator): Try to find the correct location for an ignored
4037 qualifier.
4038
81fea426
MP
40392016-09-26 Marek Polacek <polacek@redhat.com>
4040
4041 PR c/7652
4042 * c-decl.c (pop_scope): Add gcc_fallthrough.
4043
40442016-09-26 Marek Polacek <polacek@redhat.com>
4045
4046 PR c/7652
4047 * c-parser.c (struct c_token): Add flags field.
4048 (c_lex_one_token): Pass it to c_lex_with_flags.
4049 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4050 into IFN_FALLTHROUGH.
4051 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4052 attribute fallthrough after a case label or default label.
4053 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4054
9a2300e9
MP
40552016-09-24 Marek Polacek <polacek@redhat.com>
4056
4057 PR c/77490
4058 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4059 have boolean value. Warn about ++/-- on booleans.
4060
7de76362
JJ
40612016-09-23 Jakub Jelinek <jakub@redhat.com>
4062
4063 * c-parser.c (incomplete_record_decls): Remove unnecessary
4064 = vNULL initialization of file scope vec.
4065
5b73d2ab
MP
40662016-09-16 Marek Polacek <polacek@redhat.com>
4067
4068 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4069
e51fbec3
MP
40702016-09-14 Marek Polacek <polacek@redhat.com>
4071
4072 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4073 (fix_array_notation_expr): Likewise.
4074 * c-decl.c (finish_decl): Likewise.
4075 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4076 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4077 (function_to_pointer_conversion): Use false instead of 0.
4078 (convert_lvalue_to_rvalue): Likewise.
4079 (parser_build_unary_op): Likewise.
4080 (build_atomic_assign): Likewise.
4081 (build_unary_op): Change nonconvert parameter type to bool, use
4082 true/false instead of 1/0.
4083 (build_binary_op): Use true instead of 1.
4084
254830ba
DM
40852016-09-13 David Malcolm <dmalcolm@redhat.com>
4086
4087 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4088 of add_fixit_insert to add_fixit_insert_before.
4089
4c13ba17
MP
40902016-09-13 Marek Polacek <polacek@redhat.com>
4091
4092 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4093 it.
4094
54dcdb88
BE
40952016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4096
4097 PR c++/77496
4098 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4099 COMPOUND_EXPR to warn_for_omitted_condop.
4100
e5106e27
DM
41012016-09-07 David Malcolm <dmalcolm@redhat.com>
4102
4103 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4104 c_get_substring_location for this new langhook.
4105
9dc5773f
JJ
41062016-09-02 Jakub Jelinek <jakub@redhat.com>
4107
4108 PR c/65467
4109 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4110 flag_openmp.
4111 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4112 instead of mark_exp_read on low_bound/length expression.
4113 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4114 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4115 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4116 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4117 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4118 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4119 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4120 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4121 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4122 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4123 instead of mark_expr_read.
4124 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4125 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4126 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4127 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4128 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4129 array section bases outside of depend clause, for depend clause
4130 use convert_lvalue_to_rvalue on the base.
4131 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4132 linear, aligned, map, to and from clauses.
4133 (c_omp_clause_copy_ctor): New function.
4134
295844f6
MP
41352016-09-01 Marek Polacek <polacek@redhat.com>
4136
4137 PR c/7652
4138 * c-typeck.c (composite_type): Add FALLTHRU comment.
4139
089af25c
DM
41402016-08-31 David Malcolm <dmalcolm@redhat.com>
4141
4142 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4143 to the insertion fixits for "struct", "union", and "enum".
4144
f9087798
DM
41452016-08-30 David Malcolm <dmalcolm@redhat.com>
4146
4147 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4148 rather than add_fixit_misspelled_id.
4149 (undeclared_variable): Likewise.
4150 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4151 now-redundant "here" params from add_fixit_insert method calls.
4152 (c_parser_parameter_declaration): Likewise.
4153 * c-typeck.c (build_component_ref): Remove now-redundant range
4154 param from add_fixit_replace method calls.
4155
ebef225f
MP
41562016-08-25 Marek Polacek <polacek@redhat.com>
4157
4158 * c-typeck.c (parser_build_binary_op): Pass LHS to
4159 warn_logical_not_parentheses.
4160
fe377a48
MP
41612016-08-25 Marek Polacek <polacek@redhat.com>
4162
4163 PR c/77323
4164 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4165 or _FloatN or _FloatNx is not supported.
4166 (finish_declspecs): Set type to integer_type_node when _FloatN or
4167 _FloatNx is not supported.
4168
c65699ef
JM
41692016-08-19 Joseph Myers <joseph@codesourcery.com>
4170
4171 PR c/32187
4172 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4173 (struct c_declspecs): Add field floatn_nx_idx.
4174 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4175 and _FloatNx type specifiers.
4176 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4177 (c_parser_declspecs, c_parser_attribute_any_word)
4178 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4179 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4180 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4181 narrower than double.
4182
2f1364c2
JJ
41832016-08-12 Jakub Jelinek <jakub@redhat.com>
4184 Martin Liska <mliska@suse.cz>
4185
4186 PR c/67410
4187 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4188 % to determine val element to change. Assert that
4189 wchar_bytes * charwidth fits into val array.
4190
191816a3
MP
41912016-08-12 Marek Polacek <polacek@redhat.com>
4192
4193 PR c/7652
4194 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4195 (c_parser_postfix_expression): Likewise.
4196 * c-typeck.c (build_unary_op): Adjust fall through comment.
4197 (c_mark_addressable): Likewise.
4198
b95a64bb
JJ
41992016-08-11 Jakub Jelinek <jakub@redhat.com>
4200
4201 PR c/72816
4202 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4203 array member through typedef, for orig_qual_indirect == 0 clear
4204 orig_qual_type.
4205
895aa8e1
DM
42062016-08-08 David Malcolm <dmalcolm@redhat.com>
4207
4208 PR c/64955
4209 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4210 this up to selftest::run_c_tests.
4211 (selftest::run_c_tests): New function.
4212
0b212d8c
TS
42132016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4214
ae9281fc
TS
4215 * c-parser.c (struct oacc_routine_data): Add error_seen and
4216 fndecl_seen members.
4217 (c_finish_oacc_routine): Use these.
4218 (c_parser_declaration_or_fndef): Adjust.
4219 (c_parser_oacc_routine): Likewise. Support more C language
4220 constructs, and improve diagnostics. Move pragma context
4221 checking...
4222 (c_parser_pragma): ... here.
4223
0b212d8c
TS
4224 * c-parser.c (struct oacc_routine_data): New.
4225 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4226 Simplify code.
4227 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4228 declare target" attribute.
4229
76e2c821
JB
42302016-08-01 Jan Beulich <jbeulich@suse.com>
4231
4232 * c-fold.c (c_fully_fold_internal): Also emit shift count
4233 warnings for vector types.
4234 * c-typeck.c (build_binary_op): Likewise.
4235
f618a472
MP
42362016-07-29 Marek Polacek <polacek@redhat.com>
4237
4238 PR c/71742
4239 * c-decl.c (finish_struct): Rephrase an error message.
4240
efd0786f
MP
4241 PR c/71853
4242 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4243 to error node for invalid code.
4244
e00dceaf
MP
4245 PR c/71573
4246 * c-decl.c (implicitly_declare): Return decl early not only for
4247 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4248
673a107a
JJ
42492016-07-29 Jakub Jelinek <jakub@redhat.com>
4250
4251 PR c/71969
4252 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4253 on GNU extern inline functions.
4254
a5b5c8b6
MP
42552016-07-29 Marek Polacek <polacek@redhat.com>
4256
4257 PR c/71583
4258 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4259 check expr.value.
4260
e3fe09c1
UB
42612016-07-22 Uros Bizjak <ubizjak@gmail.com>
4262
4263 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4264
7c8f7eaa
DM
42652016-07-20 David Malcolm <dmalcolm@redhat.com>
4266
4267 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4268 spellcheck-tree.h
4269 (best_macro_match): Likewise, converting from a typedef to a
4270 subclass.
4271 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4272 (lookup_name_fuzzy): Update for change of best_macro_match to a
4273 subclass with a ctor that calls cpp_forall_identifiers.
4274
de6a69ee
DM
42752016-07-20 David Malcolm <dmalcolm@redhat.com>
4276
4277 * c-decl.c (implicit_decl_warning): Update for conversion of
4278 return type of lookup_name_fuzzy to const char *.
4279 (undeclared_variable): Likewise.
4280 (lookup_name_fuzzy): Convert return type from tree to
4281 const char *.
4282 * c-parser.c (c_parser_declaration_or_fndef): Update for
4283 conversion of return type of lookup_name_fuzzy to const char *.
4284 (c_parser_parameter_declaration): Likewise.
4285
b1c9c068
CP
42862016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4287
4288 * c-parser.c (c_parser_oacc_declare): Don't scan for
4289 GOMP_MAP_POINTER.
4290 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4291 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4292 zero-length subarrays.
4293
ddbbcb19
JJ
42942016-07-15 Jakub Jelinek <jakub@redhat.com>
4295
4296 PR c/71858
4297 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4298 instead of FUZZY_LOOKUP_NAME.
4299 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4300 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4301
dd36b877
JJ
43022016-07-14 Jakub Jelinek <jakub@redhat.com>
4303
4304 PR c/71858
4305 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4306
8c681247
TS
43072016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4308
4309 * c-parser.c (c_parser_generic_selection): Make type of variable
4310 auto_vec.
4311 (c_parser_omp_declare_simd): Likewise.
4312
bf4fa671
TS
43132016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4314
4315 * c-decl.c (struct c_struct_parse_info): Change member types
4316 from vec to auto_vec.
4317 (start_struct): Adjust.
4318 (finish_struct): Likewise.
4319
557e8c49
JJ
43202016-07-02 Jakub Jelinek <jakub@redhat.com>
4321
4322 PR c/71719
4323 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4324
54d19c3b
TS
43252016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4326
4327 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4328 Move pragma context checking into...
4329 (c_parser_omp_cancellation_point): ... here, and improve
4330 diagnostic messages.
4331 * c-typeck.c (c_finish_omp_cancel)
4332 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4333
152ef731
JJ
43342016-06-29 Jakub Jelinek <jakub@redhat.com>
4335
4336 PR c/71685
4337 * c-typeck.c (c_build_qualified_type): Don't clear
4338 C_TYPE_INCOMPLETE_VARS for the main variant.
4339
43402016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4341
4342 PR c/71552
4343 * c-typeck.c (output_init_element): Diagnose incompatible types
4344 before non-constant initializers.
4345
e9ac1f86
JJ
43462016-06-28 Jakub Jelinek <jakub@redhat.com>
4347
4348 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4349
277d7ee0
AK
43502016-06-23 Andi Kleen <ak@linux.intel.com>
4351
4352 * Make-lang.in: Add support for autofdo.
4353
1a4f11c8
DM
43542016-06-22 David Malcolm <dmalcolm@redhat.com>
4355
4356 PR c/70339
4357 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4358 (implicit_decl_warning): When issuing warnings for implicit
4359 declarations, attempt to provide a suggestion via
4360 lookup_name_fuzzy.
4361 (undeclared_variable): Likewise when issuing errors.
4362 (lookup_name_in_scope): Likewise.
4363 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4364 (best_macro_match): New typedef.
4365 (find_closest_macro_cpp_cb): New function.
4366 (lookup_name_fuzzy): New function.
4367 * c-parser.c: Include gcc-rich-location.h.
4368 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4369 (c_keyword_starts_typename): ...this new function.
4370 (c_parser_declaration_or_fndef): When issuing errors about
4371 missing "struct" etc, add a fixit. For other kinds of errors,
4372 attempt to provide a suggestion via lookup_name_fuzzy.
4373 (c_parser_parms_declarator): When looking ahead to detect typos in
4374 type names, also reject CPP_KEYWORD.
4375 (c_parser_parameter_declaration): When issuing errors about
4376 unknown type names, attempt to provide a suggestion via
4377 lookup_name_fuzzy.
4378 * c-tree.h (c_keyword_starts_typename): New prototype.
4379
5a578671
JM
43802016-06-20 Joseph Myers <joseph@codesourcery.com>
4381
4382 PR c/71601
4383 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4384 c_common_type returns error_mark_node.
4385
3f8257db 43862016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4387
4388 PR c/69507
4389 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4390 __alignof__ (expression).
4391
6a3f203c
DM
43922016-06-14 David Malcolm <dmalcolm@redhat.com>
4393
4394 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4395
264757fb
DM
43962016-06-14 David Malcolm <dmalcolm@redhat.com>
4397
4398 * c-typeck.c (build_component_ref): Simplify fixit code by
4399 using gcc_rich_location::add_fixit_misspelled_id.
4400 (set_init_label): Likewise.
4401
f7e4f2e3
DM
44022016-06-13 David Malcolm <dmalcolm@redhat.com>
4403
4404 * c-parser.c (c_parser_initelt): Provide location of name for new
4405 location_t param of set_init_label.
4406 * c-tree.h (set_init_label): Add location_t param.
4407 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4408 param and use it when issuing error messages about unrecognized
4409 field names. Attempt to provide a fixit hint if appropriate,
4410 otherwise update the error message to provide the type name.
4411
4b1ffdb1
TS
44122016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4413
4414 PR c/71381
4415 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4416 Loosen checking.
4417
44a845ca
MS
44182016-06-08 Martin Sebor <msebor@redhat.com>
4419 Jakub Jelinek <jakub@redhat.com>
4420
4421 PR c++/70507
4422 PR c/68120
4423 * c-typeck.c (convert_arguments): Don't promote last argument
4424 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4425
92a5f2ba
MP
44262016-06-08 Marek Polacek <polacek@redhat.com>
4427
4428 PR c/71418
4429 * c-decl.c (grokdeclarator): Check TYPE_P.
4430
08203f73
MP
4431 PR c/71426
4432 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4433 code.
4434
6ffd47b7
DM
44352016-06-07 David Malcolm <dmalcolm@redhat.com>
4436
4437 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4438 and structure element reference, capture the location of the
4439 element name token and pass it to build_component_ref.
4440 (c_parser_postfix_expression_after_primary): Likewise for
4441 structure element dereference.
4442 (c_parser_omp_variable_list): Likewise for
4443 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4444 * c-tree.h (build_component_ref): Add location_t param.
4445 * c-typeck.c (build_component_ref): Add location_t param
4446 COMPONENT_LOC. Use it, if available, when issuing hints about
4447 mispelled member names to provide a fixit replacement hint.
4448
1f40cff3
MP
44492016-06-06 Marek Polacek <polacek@redhat.com>
4450
4451 PR c/71362
4452 * c-parser.c (c_parser_direct_declarator): Set location.
4453
5545a907
MP
44542016-06-06 Marek Polacek <polacek@redhat.com>
4455
4456 * c-typeck.c (comptypes_internal): Handle comparisons of
4457 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4458 TYPE_REF_CAN_ALIAS_ALL.
4459
b605f663
CLT
44602016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4461
4462 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4463 arguments as addressable when async clause exists.
4464
00631022
JJ
44652016-05-30 Jakub Jelinek <jakub@redhat.com>
4466
4467 PR c++/71349
4468 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4469 when combined with target construct.
4470
7211a097
JJ
44712016-05-26 Jakub Jelinek <jakub@redhat.com>
4472
4473 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4474 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4475
95efe6b6
MP
44762016-05-25 Marek Polacek <polacek@redhat.com>
4477
4478 PR c/71265
4479 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4480
a23faf7a
MP
4481 PR c/71266
4482 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4483
e46c7770
CP
44842016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4485
4486 * c-parser.c (c_parser_oacc_declare): Add support for
4487 GOMP_MAP_FIRSTPRIVATE_POINTER.
4488 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4489 argument with enum c_omp_region_type ort.
4490 (handle_omp_array_sections): Likewise. Update call to
4491 handle_omp_array_sections_1.
4492 (c_finish_omp_clauses): Add specific errors and warning messages for
4493 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4494 call to handle_omp_array_sections.
4495
a04e69c0
TS
44962016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4497
4498 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4499
f17a223d
RB
45002016-05-24 Richard Biener <rguenther@suse.de>
4501
4502 PR middle-end/70434
4503 PR c/69504
4504 * c-typeck.c (build_array_ref): Do not complain about indexing
4505 non-lvalue vectors. Adjust for function name change.
4506
79063edd
MS
45072016-05-20 Martin Sebor <msebor@redhat.com>
4508
4509 PR c/71115
4510 * c-typeck.c (error_init): Use
4511 expansion_point_location_if_in_system_header.
4512 (warning_init): Same.
4513
8a40fef3
DM
45142016-05-19 David Malcolm <dmalcolm@redhat.com>
4515
4516 PR c/71171
4517 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4518 in error-handling.
4519 (c_parser_postfix_expression): Likewise.
4520 * c-tree.h (c_expr::set_error): New method.
4521 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4522 that result's range is initialized.
4523
e9892350
JG
45242016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4525
4526 * c-typeck.c (parser_build_unary_op): Fix formatting.
4527
8fad45f5
MW
45282016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4529
4530 * c-decl.c (grokdeclarator): Remove errmsg and use of
4531 targetm.invalid_return_type.
4532 (grokparms): Remove errmsg and use of
4533 targetm.invalid_parameter_type.
4534
aa4b467b
JM
45352016-05-13 Joseph Myers <joseph@codesourcery.com>
4536
4537 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4538 function return type.
4539
4f2e1536
MP
45402016-05-12 Marek Polacek <polacek@redhat.com>
4541
4542 PR c/70756
4543 * c-decl.c (build_compound_literal): Pass LOC down to
4544 c_incomplete_type_error.
4545 * c-tree.h (require_complete_type): Adjust declaration.
4546 (c_incomplete_type_error): Likewise.
4547 * c-typeck.c (require_complete_type): Add location parameter, pass it
4548 down to c_incomplete_type_error.
4549 (c_incomplete_type_error): Add location parameter, pass it down to
4550 error_at.
4551 (build_component_ref): Pass location down to c_incomplete_type_error.
4552 (default_conversion): Pass location down to require_complete_type.
4553 (build_array_ref): Likewise.
4554 (build_function_call_vec): Likewise.
4555 (convert_arguments): Likewise.
4556 (build_unary_op): Likewise.
4557 (build_c_cast): Likewise.
4558 (build_modify_expr): Likewise.
4559 (convert_for_assignment): Likewise.
4560 (c_finish_omp_clauses): Likewise.
4561
d6e83a8d
MM
45622016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4563
4564 PR c/43651
4565 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4566 is enabled.
4567 * c-errors.c (pedwarn_c90): Return true if warned.
4568 * c-tree.h (pedwarn_c90): Change return type to bool.
4569 (enum c_declspec_word): Add new enumerator cdw_atomic.
4570
5c3a10fb
MP
45712016-05-11 Marek Polacek <polacek@redhat.com>
4572
4573 PR c++/71024
4574 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4575 diagnose_mismatched_attributes and call it.
4576
cf68d92c
MP
45772016-05-10 Marek Polacek <polacek@redhat.com>
4578
4579 PR c/70255
4580 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4581 on a declaration following the definition.
4582
351f85c5
JJ
45832016-05-05 Jakub Jelinek <jakub@redhat.com>
4584
4585 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4586 parse it through to c_parser_c99_block_statement.
4587 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4588 caller.
4589
deef7113
MP
45902016-05-04 Marek Polacek <polacek@redhat.com>
4591
4592 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4593 OPT_Wdangling_else.
4594
de55efd5
MP
45952016-05-04 Marek Polacek <polacek@redhat.com>
4596
4597 PR c/48778
4598 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4599 for macro expansions.
4600
79ce98bc
MP
46012016-05-03 Marek Polacek <polacek@redhat.com>
4602
4603 PR c/70859
4604 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4605 check_builtin_function_arguments.
4606
fb2647aa
RB
46072016-05-03 Richard Biener <rguenther@suse.de>
4608
4609 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4610 the checksum from the previous stage.
4611
77886428
CP
46122016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4613
4614 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4615 c_finish_omp_clauses.
4616 (c_parser_omp_all_clauses): Likewise.
4617 (c_parser_oacc_cache): Likewise.
4618 (c_parser_oacc_loop): Likewise.
4619 (omp_split_clauses): Likewise.
4620 (c_parser_omp_declare_target): Likewise.
4621 (c_parser_cilk_all_clauses): Likewise.
4622 (c_parser_cilk_for): Likewise.
4623 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4624 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4625
7176a4a0
MP
46262016-05-02 Marek Polacek <polacek@redhat.com>
4627
4628 PR c/70851
4629 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4630 incomplete type.
4631
e7ff0319
CP
46322016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4633
4634 PR middle-end/70626
4635 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4636 OACC_LOOP_CLAUSE_MASK.
4637 (c_parser_oacc_kernels_parallel): Update call to
4638 c_oacc_split_loop_clauses.
4639
9f405ce1
AM
46402016-04-28 Andrew MacLeod <amacleod@redhat.com>
4641
4642 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4643 argument to build_modify_expr in two cases.
4644
c1e1f433
BS
46452016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4646
4647 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4648 warn_for_memset instead of warning directly here.
4649
2448a956
MP
46502016-04-26 Marek Polacek <polacek@redhat.com>
4651
4652 PR c/67784
4653 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4654 out of ...
4655 (c_parser_for_statement): ... here.
4656 (c_parser_if_statement): Use it.
4657 (c_parser_switch_statement): Use it.
4658 (c_parser_while_statement): Use it.
4659
b02a5e26
MP
4660 PR c/70791
4661 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4662
477d4906
IV
46632016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4664
4665 PR c++/69363
4666 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4667 instead of c_finish_cilk_clauses.
4668 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4669 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4670 floating-point variables in the linear clause for Cilk Plus.
4671
fe37c7af
MM
46722016-04-18 Michael Matz <matz@suse.de>
4673
4674 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4675 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4676
949505a9
MP
46772016-04-15 Marek Polacek <polacek@redhat.com>
4678
4679 PR c/70671
4680 * c-typeck.c (build_unary_op): Pass location down to error and
4681 warning call.
4682
dda1bf61
JJ
46832016-04-15 Jakub Jelinek <jakub@redhat.com>
4684
4685 PR c/70436
4686 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4687 where needed.
4688 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4689 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4690 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4691 Adjust c_parser_pragma callers.
4692 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4693 caller.
4694 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4695 c_parser_statement.
4696 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4697 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4698 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4699 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4700 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4701 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4702 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4703 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4704 down where needed.
4705 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4706 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4707 calls.
4708
99cd9857
MP
47092016-04-13 Marek Polacek <polacek@redhat.com>
4710
4711 PR c/70436
4712 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4713 adjust callers.
4714 (c_parser_statement): Likewise.
4715 (c_parser_c99_block_statement): Likewise.
4716 (c_parser_while_statement): Likewise.
4717 (c_parser_for_statement): Likewise.
4718 (c_parser_if_body): Don't set IF_P here.
4719 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4720 about dangling else here.
4721 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4722 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4723 warn about dangling else here.
4724
f13355da
MP
47252016-04-04 Marek Polacek <polacek@redhat.com>
4726
4727 PR c/70307
4728 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4729
5fde6a45
MP
47302016-03-31 Marek Polacek <polacek@redhat.com>
4731
4732 PR c/70297
4733 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4734
4bbf545b
DM
47352016-03-18 David Malcolm <dmalcolm@redhat.com>
4736
4737 PR c/70281
4738 * c-parser.c (c_parser_postfix_expression): Set the source range
4739 for uses of "__builtin_types_compatible_p".
4740
fcc2b74f
JJ
47412016-03-17 Jakub Jelinek <jakub@redhat.com>
4742
4743 PR c/70280
4744 * c-typeck.c (composite_type): Don't count void_list_node
4745 into len, if the list is terminated by void_list_node, start
4746 with void_list_node instead of NULL for newargs. Stop
4747 at void_list_node.
4748
ab4c578f
MP
47492016-03-16 Marek Polacek <polacek@redhat.com>
4750
4751 PR c/70093
4752 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4753 nested functions returning VM types.
4754
96b3c82d
CP
47552016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4756
4757 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4758 when calling c_finish_omp_clauses.
4759
29b9828f
BS
47602016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4761
4762 PR c/69824
4763 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4764 for later.
4765
7ff6ca38
MP
47662016-03-04 Marek Polacek <polacek@redhat.com>
4767
4768 PR c/69798
4769 * c-parser.c (c_parser_postfix_expression): Call
4770 c_parser_cast_expression rather than c_parser_postfix_expression.
4771
686e2237
JJ
47722016-03-01 Jakub Jelinek <jakub@redhat.com>
4773
4774 PR c/69796
4775 PR c/69974
4776 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4777 of incomplete decls to error_mark_node.
4778
0b05329b
MP
47792016-02-24 Marek Polacek <polacek@redhat.com>
4780
4781 PR c/69819
4782 * c-decl.c (finish_decl): Don't update the copy of the type of a
4783 different decl type.
4784
067fbd8b
JJ
47852016-02-23 Jakub Jelinek <jakub@redhat.com>
4786
4787 PR objc/69844
4788 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4789 in id_kind reclassification.
4790
bf14eba2
JJ
47912016-02-16 Jakub Jelinek <jakub@redhat.com>
4792
4793 PR c/69835
4794 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4795
ba539195
JN
47962016-02-16 James Norris <jnorris@codesourcery.com>
4797
4798 PR c/64748
4799 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4800
16595a1f
BS
48012016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4802
f48dfe98
BS
4803 * c-decl.c (build_null_declspecs): Zero the entire struct.
4804
16595a1f
BS
4805 PR c/69522
4806 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4807 callers changed. If nested_p is true, use it to call
4808 finish_implicit_inits.
4809 * c-tree.h (finish_implicit_inits): Declare.
4810 * c-typeck.c (finish_implicit_inits): New function. Move code
4811 from ...
4812 (push_init_level): ... here.
4813 (set_designator, process_init_element): Call finish_implicit_inits.
4814
66756373
JJ
48152016-02-11 Jakub Jelinek <jakub@redhat.com>
4816
4817 PR c/69768
4818 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4819 arguments for -Waddress warning.
4820
1066e9b5
JJ
48212016-02-04 Jakub Jelinek <jakub@redhat.com>
4822
4823 PR c/69669
4824 * c-decl.c (finish_enum): When honoring mode attribute,
4825 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4826
3a5d2ba4
JJ
48272016-01-29 Jakub Jelinek <jakub@redhat.com>
4828
4829 PR debug/69518
4830 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4831 all type variants, not just TYPE_MAIN_VARIANT.
4832
cbdd8ae0
JJ
48332016-01-27 Jakub Jelinek <jakub@redhat.com>
4834
4835 PR debug/66869
4836 * c-decl.c (c_write_global_declarations_1): Warn with
4837 warn_unused_function if static prototype without definition
4838 is not C_DECL_USED.
4839
fa74a4bc
MP
48402016-01-27 Marek Polacek <polacek@redhat.com>
4841
4842 PR c/68062
4843 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4844 to unsigned, if needed. Add -Wsign-compare warning.
4845
13f92e8d
JJ
48462016-01-26 Jakub Jelinek <jakub@redhat.com>
4847
4848 PR tree-optimization/69483
4849 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4850
cd8e73dc 48512016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4852
4853 PR c/24293
4854 * c-tree.h (incomplete_record_decls): Declare.
4855 * c-parser.c (incomplete_record_decls): Define.
4856 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4857 report error if any decl has zero size.
4858 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4859 or enum type to incomplete_record_decls.
4860
e6d6ec9e
TV
48612016-01-14 Tom de Vries <tom@codesourcery.com>
4862
4863 PR tree-optimization/68773
4864 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4865 set force_output.
4866
00083992
MP
48672016-01-14 Marek Polacek <polacek@redhat.com>
4868
4869 PR c/69262
4870 * c-decl.c (grokdeclarator): Provide more information for invalid
4871 array declarations.
4872
7443cf13
DM
48732016-01-06 David Malcolm <dmalcolm@redhat.com>
4874
4875 * c-parser.c (c_parser_unary_expression): For dereferences, build
4876 a combined location before calling build_indirect_ref, so that
4877 error reports cover the full range, manually updating the c_expr
4878 src_range.
4879
6b131d5b
MP
48802016-01-06 Marek Polacek <polacek@redhat.com>
4881
4882 PR sanitizer/69099
4883 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4884 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4885 NULL.
4886
818ab71a
JJ
48872016-01-04 Jakub Jelinek <jakub@redhat.com>
4888
4889 Update copyright years.
4890
2fe0a208
MP
48912016-01-04 Marek Polacek <polacek@redhat.com>
4892
4893 PR c/68908
4894 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4895 optimization to use __atomic_fetch_* built-in if possible.
4896
c7b48c8a
TS
48972015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4898
4899 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4900 into...
4901 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4902 all users.
4903
fda5652f
MP
49042015-12-22 Marek Polacek <polacek@redhat.com>
4905
4906 PR c/69002
4907 * c-typeck.c (build_component_ref): Warn when acessing elements of
4908 atomic structures or unions.
4909
745e411d
DM
49102015-12-21 David Malcolm <dmalcolm@redhat.com>
4911
4912 * c-typeck.c: Include "gcc-rich-location.h".
4913 (build_binary_op): In the two places that call binary_op_error,
4914 create a gcc_rich_location and populate it with the location of
4915 the binary op and its two operands.
4916
94c40e19
DM
49172015-12-16 David Malcolm <dmalcolm@redhat.com>
4918
4919 * c-parser.c (c_parser_statement_after_labels): When calling
4920 c_finish_return, Use the return expression's location if it has
4921 one, falling back to the location of the first token within it.
4922 * c-typeck.c (c_finish_return): When issuing warnings about
4923 the incorrect presence/absence of a return value, issue a note
4924 showing the declaration of the function.
4925
de67c4c3
DM
49262015-12-16 David Malcolm <dmalcolm@redhat.com>
4927
4928 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4929 to 4.
4930 (c_parser_peek_nth_token): New function.
4931 (c_parser_peek_conflict_marker): New function.
4932 (c_parser_error): Detect conflict markers and report them as such.
4933
a10704e1
DM
49342015-12-16 David Malcolm <dmalcolm@redhat.com>
4935
4936 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4937 to preserve range information for the primary expression
4938 in the call to c_parser_postfix_expression_after_primary.
4939
8062bca6
DM
49402015-12-16 David Malcolm <dmalcolm@redhat.com>
4941
4942 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4943 expression location, falling back on the first token location,
4944 rather than always using the latter.
4945
d06f8b75
MP
49462015-12-16 Marek Polacek <polacek@redhat.com>
4947
4948 PR c/64637
4949 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4950 available.
4951
2994fb91
MP
49522015-12-15 Marek Polacek <polacek@redhat.com>
4953
4954 PR c/68907
4955 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4956 artificial decl.
4957
a1b93f8d
DM
49582015-12-08 David Malcolm <dmalcolm@redhat.com>
4959
4960 * c-parser.c (c_parser_alignof_expression): Capture location of
4961 closing parenthesis (if any), or of end of unary expression, and
4962 use it to build a src_range for the expression.
4963
46c6e1e2
DM
49642015-12-08 David Malcolm <dmalcolm@redhat.com>
4965
4966 PR c/68757
4967 * c-parser.c (c_parser_get_builtin_args): Add
4968 "out_close_paren_loc" param, and write back to it.
4969 (c_parser_postfix_expression): Capture the closing
4970 parenthesis location for RID_CHOOSE_EXPR,
4971 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4972 RID_BUILTIN_SHUFFLE and use it to set the source range
4973 for such expressions; within RID_BUILTIN_COMPLEX set
4974 the underlying location.
4975
66189108
MP
49762015-12-07 Marek Polacek <polacek@redhat.com>
4977
4978 PR c/68668
4979 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4980 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4981
f187980b
EB
49822015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4983
4984 * c-tree.h (c_build_va_arg): Adjust prototype.
4985 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4986 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4987 parameter, adjust throughout and issue an error if EXPR is a component
4988 with reverse storage order.
4989
4250754e
JM
49902015-12-02 Jason Merrill <jason@redhat.com>
4991
4992 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4993 (c_fully_fold_internal, decl_constant_value_for_optimization):
4994 Move from c-common.c.
4995 * c-tree.h: Declare decl_constant_value_for_optimization.
4996 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4997
e9e32ee6
JM
49982015-12-02 Joseph Myers <joseph@codesourcery.com>
4999
5000 PR c/68162
5001 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5002 following link from declarator to next declarator. Track original
5003 qualified type and pass it to c_build_qualified_type.
5004 * c-typeck.c (c_build_qualified_type): Add arguments
5005 orig_qual_type and orig_qual_indirect.
5006
ff7a55bf
TS
50072015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5008
5009 * c-parser.c (c_parser_omp_clause_name)
5010 (c_parser_oacc_all_clauses): Alphabetical sorting.
5011
657e4e47
JJ
50122015-12-02 Jakub Jelinek <jakub@redhat.com>
5013
5014 PR c/68533
5015 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5016 for diagnostics.
5017
37d5ad46
JB
50182015-12-01 Julian Brown <julian@codesourcery.com>
5019 Cesar Philippidis <cesar@codesourcery.com>
5020 James Norris <James_Norris@mentor.com>
5021
5022 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5023 (c_parser_oacc_clause_use_device): New function.
5024 (c_parser_oacc_all_clauses): Add use_device support.
5025 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5026 (c_parser_oacc_host_data): New function.
5027 (c_parser_omp_construct): Add host_data support.
5028 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5029 * c-typeck.c (c_finish_oacc_host_data): New function.
5030 (c_finish_omp_clauses): Add use_device support.
5031
a4850ce9
JH
50322015-11-29 Jan Hubicka <hubicka@ucw.cz>
5033
5034 PR c/67106
5035 * c-decl.c: Set TYPE_PACKED in variants.
5036
b58d3df2
ML
50372015-11-27 Martin Liska <mliska@suse.cz>
5038
5039 PR c++/68312
5040 * c-array-notation.c (fix_builtin_array_notation_fn):
5041 Use release_vec_vec instead of vec::release.
5042 (build_array_notation_expr): Likewise.
5043 (fix_conditional_array_notations_1): Likewise.
5044 (fix_array_notation_expr): Likewise.
5045 (fix_array_notation_call_expr): Likewise.
5046
aec17bfe
JJ
50472015-11-27 Jakub Jelinek <jakub@redhat.com>
5048
5049 PR c/63326
5050 * c-parser.c (c_parser_compound_statement_nostart): If
5051 last_label is true, use pragma_stmt instead of pragma_compound
5052 as second c_parser_pragma argument.
5053 (c_parser_omp_ordered, c_parser_omp_target_update,
5054 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5055 false as second argument to c_parser_skip_to_pragma_eol after
5056 diagnosing standalone directives used in pragma_stmt context.
5057
688c4de0
IV
50582015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5059
5060 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5061 with "if (ENABLE_OFFLOADING)".
5062
cbd03aee
DM
50632015-11-23 David Malcolm <dmalcolm@redhat.com>
5064
5065 PR objc/68438
5066 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5067 for various Objective-C constructs: Class.name syntax,
5068 @selector(), @protocol(), @encode(), and [] message syntax.
5069
a87a86e1
DM
50702015-11-20 David Malcolm <dmalcolm@redhat.com>
5071
5072 PR 62314
5073 * c-typeck.c (should_suggest_deref_p): New function.
5074 (build_component_ref): Special-case POINTER_TYPE when
5075 generating a "not a structure of union" error message, and
5076 suggest a "->" rather than a ".", providing a fix-it hint.
5077
8ece8dfb
DM
50782015-11-19 David Malcolm <dmalcolm@redhat.com>
5079
5080 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5081 candidate into a new function, find_closest_identifier.
5082
433068cc
MP
50832015-11-19 Marek Polacek <polacek@redhat.com>
5084
5085 PR c/68412
5086 * c-typeck.c (parser_build_binary_op): Properly handle
5087 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5088
bef08b71
DM
50892015-11-17 David Malcolm <dmalcolm@redhat.com>
5090
5091 * c-parser.c (set_c_expr_source_range): Bulletproof both
5092 overloaded implementations against NULL expr->value.
5093 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5094 values.
5095 (c_parser_unary_expression): Likewise when handling addresses of
5096 labels.
5097 (c_parser_postfix_expression): Likewise for statement expressions,
5098 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5099 __builtin_va_arg, and for __builtin_offset_of.
5100 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5101 src_range using the range of the braced initializer.
5102 (c_parser_transaction_expression): Set src_range for "ret" to a
5103 sane pair of values.
5104
fff77217
KY
51052015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5106
5107 * c-parser.c (c_finish_omp_declare_simd): Look for
5108 "simd" attribute as well. Update error message.
5109
1d899da2
TS
51102015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5111
5112 * c-parser.c (c_parser_omp_declare_target): Adjust.
5113
e4606348
JJ
51142015-11-14 Jakub Jelinek <jakub@redhat.com>
5115
5116 * c-typeck.c (c_finish_omp_clauses): Don't mark
5117 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5118
3e636daf
MP
51192015-11-14 Marek Polacek <polacek@redhat.com>
5120
5121 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5122 * c-typeck.c: Likewise.
5123
ebedc9a3
DM
51242015-11-13 David Malcolm <dmalcolm@redhat.com>
5125
5126 * c-decl.c (warn_defaults_to): Pass line_table to
5127 rich_location ctor.
5128 * c-errors.c (pedwarn_c99): Likewise.
5129 (pedwarn_c90): Likewise.
5130 * c-parser.c (set_c_expr_source_range): New functions.
5131 (c_token::get_range): New method.
5132 (c_token::get_finish): New method.
5133 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5134 based on the range from the start of the LHS to the end of the
5135 RHS.
5136 (c_parser_conditional_expression): Likewise, based on the range
5137 from the start of the cond.value to the end of exp2.value.
5138 (c_parser_binary_expression): Call set_c_expr_source_range on
5139 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5140 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5141 based on the cast_loc through to the end of the expr.
5142 (c_parser_unary_expression): Likewise, based on the
5143 op_loc through to the end of op.
5144 (c_parser_sizeof_expression) Likewise, based on the start of the
5145 sizeof token through to either the closing paren or the end of
5146 expr.
5147 (c_parser_postfix_expression): Likewise, using the token range,
5148 or from the open paren through to the close paren for
5149 parenthesized expressions.
5150 (c_parser_postfix_expression_after_primary): Likewise, for
5151 various kinds of expression.
5152 * c-tree.h (struct c_expr): Add field "src_range".
5153 (c_expr::get_start): New method.
5154 (c_expr::get_finish): New method.
5155 (set_c_expr_source_range): New decls.
5156 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5157 on ret for prefix unary ops.
5158 (parser_build_binary_op): Likewise, running from the start of
5159 arg1.value through to the end of arg2.value.
5160
ec8b536f
MP
51612015-11-13 Marek Polacek <polacek@redhat.com>
5162
5163 PR c/68320
5164 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5165
277fe616
DM
51662015-11-13 David Malcolm <dmalcolm@redhat.com>
5167
5168 * c-typeck.c: Include spellcheck.h.
5169 (lookup_field_fuzzy_find_candidates): New function.
5170 (lookup_field_fuzzy): New function.
5171 (build_component_ref): If the field was not found, try using
5172 lookup_field_fuzzy and potentially offer a suggestion.
5173
6e232ba4
JN
51742015-11-12 James Norris <jnorris@codesourcery.com>
5175 Joseph Myers <joseph@codesourcery.com>
5176
5177 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5178 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5179 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5180 and PRAGMA_OMP_CLAUSE_LINK.
5181 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5182 and PRAGMA_OACC_CLAUSE_LINK.
5183 (OACC_DECLARE_CLAUSE_MASK): New definition.
5184 (c_parser_oacc_declare): New function.
5185
9be4f715
MP
51862015-11-12 Marek Polacek <polacek@redhat.com>
5187
5188 PR c/67784
5189 * c-parser.c (c_parser_for_statement): Reclassify the token in
5190 a correct scope.
5191
e78bede6
MP
51922015-11-11 Marek Polacek <polacek@redhat.com>
5193
5194 PR c/68107
5195 PR c++/68266
5196 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5197 checking the size of an array.
5198
69f293c9
AM
51992015-11-11 Andrew MacLeod <amacleod@redhat.com>
5200
5201 * c-array-notation.c: Remove unused header files.
5202 * c-aux-info.c: Likewise.
5203 * c-convert.c: Likewise.
5204 * c-decl.c: Likewise.
5205 * c-errors.c: Likewise.
5206 * c-lang.c: Likewise.
5207 * c-objc-common.c: Likewise.
5208 * c-parser.c: Likewise.
5209 * c-typeck.c: Likewise.
5210 * gccspec.c: Likewise.
5211
3a40d81d
NS
52122015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5213 Cesar Philippidis <cesar@codesourcery.com>
5214 James Norris <jnorris@codesourcery.com>
5215 Julian Brown <julian@codesourcery.com>
5216 Nathan Sidwell <nathan@codesourcery.com>
5217
3a40d81d
NS
5218 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5219 routine arg.
5220 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5221 (c_parser_pragma): Parse 'acc routine'.
5222 (OACC_ROUTINE_CLAUSE_MARK): Define.
5223 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5224
fc402eec
AA
52252015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5226
5227 PR debug/67192
5228 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5229 location of the backward-goto to the start of the loop body.
5230
f6b0b3db
AA
52312015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5232
5233 PR debug/67192
5234 * c-parser.c (c_parser_while_statement): Finish the loop before
5235 parsing ahead for misleading indentation.
5236 (c_parser_for_statement): Likewise.
5237
ee45a32d
EB
52382015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5239
5240 * c-decl.c (finish_struct): If the structure has reverse storage
5241 order, rewrite the type of array fields with scalar component. Call
5242 maybe_apply_pragma_scalar_storage_order on entry.
5243 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5244 errors on bit-fields and reverse SSO here and not...
5245 (c_mark_addressable): ...here.
5246 (output_init_element): Adjust call to initializer_constant_valid_p.
5247 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5248
8a645150
DM
52492015-11-06 David Malcolm <dmalcolm@redhat.com>
5250
5251 * c-decl.c (warn_defaults_to): Update for change in signature
5252 of diagnostic_set_info.
5253 * c-errors.c (pedwarn_c99): Likewise.
5254 (pedwarn_c90): Likewise.
5255 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5256 for textinfo::set_location.
5257
7a5e4956
CP
52582015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5259 Thomas Schwinge <thomas@codesourcery.com>
5260 James Norris <jnorris@codesourcery.com>
5261
5262 * c-parser.c (c_parser_omp_clause_name): Add support for
5263 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5264 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5265 default(none) in OpenACC.
5266 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5267 arguments.
5268 (c_parser_oacc_clause_tile): New function.
5269 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5270 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5271 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5272 TILE}.
5273 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5274 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5275 FIRSTPRIVATE}.
5276 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5277 (c_parser_oacc_update): Update the error message for missing clauses.
5278 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5279 and OMP_CLAUSE_INDEPENDENT.
5280
bfcfbfa0
MP
52812015-11-05 Marek Polacek <polacek@redhat.com>
5282
5283 PR c/68090
5284 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5285 deal with pre-evaluation on invalid types.
5286
e01d41e5
JJ
52872015-11-05 Jakub Jelinek <jakub@redhat.com>
5288 Ilya Verbin <ilya.verbin@intel.com>
5289
5290 * c-parser.c: Include context.h and gimple-expr.h.
5291 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5292 monotonic together with nonmonotonic.
5293 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5294 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5295 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5296 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5297 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5298 expressions on combined target teams before the target.
5299 (c_parser_omp_declare_target): If decl has "omp declare target" or
5300 "omp declare target link" attribute, and cgraph or varpool node already
5301 exists, then set corresponding flags. Call c_finish_omp_clauses
5302 in the parenthesized extended-list syntax case.
5303 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5304 declare target.
5305 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5306 on OMP_CLAUSE_REDUCTION array sections.
5307 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5308 into the constant offset, or for variable low-bound using
5309 POINTER_PLUS_EXPR. For structure element based array sections use
5310 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5311 (c_finish_omp_clauses): Drop generic_field_head, structure
5312 elements are now always mapped even as array section bases,
5313 diagnose same var in data sharing and mapping clauses. Diagnose if
5314 linear step on declare simd is neither a constant nor a uniform
5315 parameter. Look through POINTER_PLUS_EXPR for array section
5316 reductions. Diagnose the same var or function appearing multiple
5317 times on the same directive. Fix up wording for the to clause if t
5318 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5319 modifier on kinds other than dynamic or guided or nonmonotonic
5320 modifier together with ordered clause.
5321
4bf9e5a8
TS
53222015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5323 Chung-Lin Tang <cltang@codesourcery.com>
5324
5325 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5326
2adfab87
AM
53272015-10-29 Andrew MacLeod <amacleod@redhat.com>
5328
5329 * c-array-notation.c: Reorder #include's and remove duplicates.
5330 * c-aux-info.c: Likewise.
5331 * c-convert.c: Likewise.
5332 * c-decl.c: Likewise.
5333 * c-errors.c: Likewise.
5334 * c-lang.c: Likewise.
5335 * c-objc-common.c: Likewise.
5336 * c-parser.c: Likewise.
5337 * c-typeck.c: Likewise.
5338
e922069e
JW
53392015-10-26 Jim Wilson <jim.wilson@linaro.org>
5340
5341 PR debug/66068
5342 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5343 after calling build_qualified_type.
5344
765dd391
CP
53452015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5346 Thomas Schwinge <thomas@codesourcery.com>
5347 James Norris <jnorris@codesourcery.com>
5348 Joseph Myers <joseph@codesourcery.com>
5349 Julian Brown <julian@codesourcery.com>
5350 Bernd Schmidt <bschmidt@redhat.com>
5351
5352 * c-parser.c (c_parser_oacc_shape_clause): New.
5353 (c_parser_oacc_simple_clause): New.
5354 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5355 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5356
88bae6f4
TS
53572015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5358 James Norris <jnorris@codesourcery.com>
5359 Cesar Philippidis <cesar@codesourcery.com>
5360
5361 PR c/64765
5362 PR c/64880
5363 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5364 parameters, and handle these. Adjust all users.
5365 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5366 into...
5367 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5368 all users.
5369 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5370 declare functions.
5371 (c_finish_omp_construct): Declare function.
5372 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5373 Merge functions into...
5374 (c_finish_omp_construct): ... this new function.
5375
a8fc2579
RB
53762015-10-22 Richard Biener <rguenther@suse.de>
5377
5378 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5379 before folding a MINUS_EXPR.
5380
e9122ef6
MP
53812015-10-21 Marek Polacek <polacek@redhat.com>
5382
5383 PR c/68024
5384 * c-decl.c (start_function): Warn about vararg functions without
5385 a prototype.
5386
9f47c7e5
IE
53872015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5388
5389 * c-typeck.c (build_conditional_expr): Use boolean vector
5390 type for vector comparison.
5391 (build_vec_cmp): New.
5392 (build_binary_op): Use build_vec_cmp for comparison.
5393
fa60eeb9
MP
53942015-10-20 Marek Polacek <polacek@redhat.com>
5395
5396 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5397
2c7020eb
MP
53982015-10-20 Marek Polacek <polacek@redhat.com>
5399
5400 PR c/67964
5401 * c-parser.c (c_parser_attributes): Break out of the loop if the
5402 token after an attribute isn't a comma.
5403
d9a6bd32
JJ
54042015-10-13 Jakub Jelinek <jakub@redhat.com>
5405 Aldy Hernandez <aldyh@redhat.com>
5406
5407 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5408 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5409 (c_parser_omp_variable_list): Handle structure elements for
5410 map, to and from clauses. Handle array sections in reduction
5411 clause. Formatting fixes.
5412 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5413 if clause modifiers.
5414 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5415 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5416 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5417 c_parser_omp_clause_is_device_ptr): New functions.
5418 (c_parser_omp_clause_ordered): Parse optional parameter.
5419 (c_parser_omp_clause_reduction): Handle array reductions.
5420 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5421 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5422 functions.
5423 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5424 (c_parser_omp_clause_depend_sink): New function.
5425 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5426 (c_parser_omp_clause_map): Parse release/delete map kinds and
5427 optional always modifier.
5428 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5429 and c_finish_omp_clauses callers.
5430 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5431 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5432 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5433 (OMP_CRITICAL_CLAUSE_MASK): Define.
5434 (c_parser_omp_critical): Parse critical clauses.
5435 (c_parser_omp_for_loop): Handle doacross loops, adjust
5436 c_finish_omp_for and c_finish_omp_clauses callers.
5437 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5438 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5439 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5440 (c_parser_omp_for): Disallow ordered clause when combined with
5441 distribute. Disallow linear clause when combined with distribute
5442 and not combined with simd.
5443 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5444 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5445 parse clauses and if depend clause is found, don't parse a body.
5446 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5447 Allow target parallel without for after it.
5448 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5449 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5450 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5451 invalid kinds.
5452 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5453 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5454 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5455 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5456 functions.
5457 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5458 defaultmap and is_device_ptr clauses.
5459 (c_parser_omp_target): Parse target parallel and target simd. Set
5460 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5461 and target exit data. Diagnose invalid map kinds.
5462 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5463 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5464 construct.
5465 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5466 &omp_priv.
5467 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5468 (c_parser_omp_taskloop): New function.
5469 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5470 handle PRAGMA_OMP_TASKLOOP.
5471 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5472 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5473 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5474 Add IS_OMP argument, handle structure element bases, diagnose
5475 bitfields, pass IS_OMP recursively, diagnose known zero length
5476 array sections in depend clauses, handle array sections in reduction
5477 clause, diagnose negative length even for pointers.
5478 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5479 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5480 array sections in reduction clause, set
5481 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5482 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5483 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5484 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5485
21ba0cea
MP
54862015-10-06 Marek Polacek <polacek@redhat.com>
5487
5488 * c-parser.c (c_parser_statement_after_labels): Use
5489 protected_set_expr_location.
5490 (c_parser_omp_clause_num_gangs): Likewise.
5491 (c_parser_omp_clause_num_threads): Likewise.
5492 (c_parser_omp_clause_num_workers): Likewise.
5493 (c_parser_omp_clause_vector_length): Likewise.
5494 (c_parser_omp_clause_num_teams): Likewise.
5495 (c_parser_omp_clause_thread_limit): Likewise.
5496 * c-typeck.c (build_c_cast): Likewise.
5497 (c_cast_expr): Likewise.
5498
624d31fe
RS
54992015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5500
5501 * c-typeck.c (c_tree_equal): Use real_equal instead of
5502 REAL_VALUES_EQUAL.
5503
b8fd7909
JM
55042015-10-04 Jason Merrill <jason@redhat.com>
5505
5506 * c-parser.c (c_lex_one_token): Handle @synchronized.
5507 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5508 can change whether the function is transaction_safe.
5509
1c7485af
MP
55102015-10-02 Marek Polacek <polacek@redhat.com>
5511
5512 PR c/67730
5513 * c-typeck.c (convert_for_assignment): Use the expansion point
5514 location throughout.
5515
3e3b8d63
MP
55162015-10-02 Marek Polacek <polacek@redhat.com>
5517
5518 PR c/64249
5519 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5520 and pass it down to c_parser_if_statement.
5521 (c_parser_else_body): Add CHAIN parameter and pass it down to
5522 c_parser_statement_after_labels.
5523 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5524 duplicated if-else-if conditions.
5525
aabef2de
MP
55262015-10-01 Marek Polacek <polacek@redhat.com>
5527
5528 * c-typeck.c (convert_for_assignment): Improve commentary.
5529
de8ddd5f
MP
55302015-09-30 Marek Polacek <polacek@redhat.com>
5531
5532 PR c/67730
5533 * c-typeck.c (c_finish_return): Use the expansion point location for
5534 certain "return with value" warnings.
5535
c4914de6
MLI
55362015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5537
5538 * c-parser.c (pragma_lex): Add loc argument.
5539
0e36f5c7
MP
55402015-09-15 Marek Polacek <polacek@redhat.com>
5541
5542 PR c/67580
5543 * c-decl.c (tag_exists_p): New function.
5544 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5545 struct/union/enum keywords are missing.
5546 * c-tree.h (tag_exists_p): Declare.
5547
2f3bb934
MP
55482015-09-15 Marek Polacek <polacek@redhat.com>
5549
5550 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5551 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5552 Return NULL_TREE instead of 0.
5553 (lookup_name): Return NULL_TREE instead of 0.
5554 (lookup_name_in_scope): Likewise.
5555 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5556 (parser_xref_tag): Use false instead of 0.
5557 (start_struct): Use true instead of 1.
5558 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5559
aa256c4a
MP
55602015-09-14 Marek Polacek <polacek@redhat.com>
5561
5562 * c-typeck.c (set_nonincremental_init_from_string): Use
5563 HOST_WIDE_INT_M1U when shifting a negative value.
5564
dbb68221
MW
55652015-09-09 Mark Wielaard <mjw@redhat.com>
5566
5567 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5568 parm against NULL.
5569
a8a098ac
JJ
55702015-09-10 Jakub Jelinek <jakub@redhat.com>
5571
5572 PR c/67502
5573 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5574 into OMP_FOR_PRE_BODY rather than before the loop.
5575
f4b189d5
JJ
55762015-09-09 Jakub Jelinek <jakub@redhat.com>
5577
0bb99c11
JJ
5578 PR c/67501
5579 * c-parser.c (c_parser_oacc_all_clauses,
5580 c_parser_omp_all_clauses): Remove invalid clause from
5581 list of clauses even if parser->error is set.
5582
fce5e5e3
JJ
5583 PR c/67500
5584 * c-parser.c (c_parser_omp_clause_aligned,
5585 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5586 test for errors.
5587 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5588 error_mark_node.
5589
f4b189d5
JJ
5590 PR c/67495
5591 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5592 instead of c_parser_unary_expression. If the result is !lvalue_p,
5593 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5594
b2aaf235
MP
55952015-09-04 Marek Polacek <polacek@redhat.com>
5596
5597 PR sanitizer/67279
5598 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5599
1807ffc1
MS
56002015-09-03 Martin Sebor <msebor@redhat.com>
5601
5602 PR c/66516
8b652e65
JJ
5603 * c-typeck.c (convert_arguments, parser_build_unary_op,
5604 build_conditional_expr, c_cast_expr, convert_for_assignment,
5605 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5606 reject_gcc_builtin.
5607 (c_decl_implicit): Define.
5608
d04ff417
MP
56092015-09-02 Marek Polacek <polacek@redhat.com>
5610
5611 PR c/67432
5612 * c-parser.c (c_parser_enum_specifier): Give a better error for
5613 an empty enum.
5614
a79683d5
TS
56152015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5616
5617 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5618
191a6b94
MP
56192015-08-12 Marek Polacek <polacek@redhat.com>
5620
5621 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5622 LOC to it.
5623
420a9d9b
MP
56242015-08-03 Marek Polacek <polacek@redhat.com>
5625
5626 PR c/67088
5627 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5628 Use it.
5629 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5630
992118a1
PP
56312015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5632
5633 * c-parser.c (c_parser_if_body): Take token_indent_info
5634 argument. Call warn_for_misleading_indentation even when the
5635 body is a semicolon. Extract token_indent_infos corresponding
5636 to the guard, body and next tokens. Adjust call to
5637 warn_for_misleading_indentation accordingly.
5638 (c_parser_else_body): Likewise.
5639 (c_parser_if_statement): Likewise.
5640 (c_parser_while_statement): Likewise.
5641 (c_parser_for_statement): Likewise.
5642
46308474
LFSM
56432015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5644 Manuel López-Ibáñez <manu@gcc.gnu.org>
5645
5646 * c-decl.c (get_parm_info): Remove static var. Update warning
5647 message.
5648
05b28fd6
MP
56492015-07-27 Marek Polacek <polacek@redhat.com>
5650
5651 PR c++/66555
5652 PR c/54979
5653 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5654
451b5e48
MP
56552015-07-20 Marek Polacek <polacek@redhat.com>
5656
5657 PR c++/55095
5658 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5659 (build_binary_op): Warn about left shift overflows.
5660
1916bcb5
AM
56612015-07-09 Andrew MacLeod <amacleod@redhat.com>
5662
5663 * c-array-notation.c: Adjust includes for flags.h changes.
5664 * c-objc-common.c: Likewise.
5665
c7131fb2
AM
56662015-07-07 Andrew MacLeod <amacleod@redhat.com>
5667
5668 * c-array-notation.c: Adjust includes.
5669 * c-aux-info.c: Likewise.
5670 * c-convert.c: Likewise.
5671 * c-decl.c: Likewise.
5672 * c-errors.c: Likewise.
5673 * c-lang.c: Likewise.
5674 * c-objc-common.c: Likewise.
5675 * c-parser.c: Likewise.
5676 * c-typeck.c: Likewise.
5677
da2e71c9
MLI
56782015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5679
5680 PR fortran/66605
5681 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5682
b155cfd9
MP
56832015-06-29 Marek Polacek <polacek@redhat.com>
5684
5685 PR c/66322
5686 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5687 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5688 about -Wswitch-bool here.
5689 (do_case): Update c_add_case_label call.
5690 (c_finish_case): Update c_do_switch_warnings call.
5691
31521951
MP
56922015-06-27 Marek Polacek <polacek@redhat.com>
5693
5694 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5695
22d03525
MP
56962015-06-26 Marek Polacek <polacek@redhat.com>
5697
5698 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5699 INDIRECT_REF_P.
5700 * c-typeck.c (array_to_pointer_conversion): Likewise.
5701 (build_unary_op): Likewise.
5702 (c_finish_return): Likewise.
5703
f0889939
AM
57042015-06-25 Andrew MacLeod <amacleod@redhat.com>
5705
5706 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5707 * c-parser.c: Likewise.
5708
8d67ee55
RS
57092015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5710
5711 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5712 instead of pointer_hash.
5713 (detect_field_duplicates): Likewise.
5714
0ae9bd27
MP
57152015-06-25 Marek Polacek <polacek@redhat.com>
5716
5717 * c-array-notation.c: Use VAR_P throughout.
5718 * c-decl.c: Likewise.
5719 * c-objc-common.c: Likewise.
5720 * c-parser.c: Likewise.
5721 * c-typeck.c: Likewise.
5722
62f9079a
MP
57232015-06-25 Marek Polacek <polacek@redhat.com>
5724
5725 * c-decl.c: Use is_global_var throughout.
5726 * c-parser.c: Likewise.
5727 * c-typeck.c: Likewise.
5728
abb226c9
AM
57292015-06-17 Andrew MacLeod <amacleod@redhat.com>
5730
5731 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5732 * c-aux-info.c: Likewise.
5733 * c-convert.c: Likewise.
5734 * c-decl.c: Likewise.
5735 * c-errors.c: Likewise.
5736 * c-lang.c: Likewise.
5737 * c-objc-common.c: Likewise.
5738 * c-parser.c: Likewise.
5739 * c-typeck.c: Likewise.
5740
8cbababc
JH
57412015-06-11 Jan Hubicka <hubicka@ucw.cz>
5742
5743 PR middle-end/66325
5744 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5745 variants.
5746
a0349665
PMR
57472015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5748
5749 * c-decl.c (pop_scope): Register the main translation unit
5750 through the new debug hook.
5751
13fdf2e2
AM
57522015-06-08 Andrew MacLeod <amacleod@redhat.com>
5753
5754 * c-array-notation.c : Adjust include files.
5755 * c-aux-info.c : Likewise.
5756 * c-convert.c : Likewise.
5757 * c-decl.c : Likewise.
5758 * c-errors.c : Likewise.
5759 * c-lang.c : Likewise.
5760 * c-lang.h : Likewise.
5761 * c-objc-common.c : Likewise.
5762 * c-parser.c : Likewise.
5763 * c-typeck.c : Likewise.
5764
d7438551
AH
57652015-06-05 Aldy Hernandez <aldyh@redhat.com>
5766
5767 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5768 immediately clobber it.
5769 (c_write_global_declarations_1): Remove call to
5770 check_global_declaration_1.
5771 (c_write_global_declarations_2): Remove.
5772 (c_write_final_cleanups): Rename from c_write_global_declarations.
5773 Remove call to finalize_compilation_unit.
5774 Remove calls to debugging hooks.
5775 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5776 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5777 * c-tree.h: Remove c_write_global_declarations.
5778
ecb9f223
AM
57792015-06-04 Andrew MacLeod <amacleod@redhat.com>
5780
5781 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5782 * c-aux-info.c: Likewise.
5783 * c-convert.c: Likewise.
5784 * c-decl.c: Likewise.
5785 * c-errors.c: Likewise.
5786 * c-lang.c: Likewise.
5787 * c-objc-common.c: Likewise.
5788 * c-parser.c: Likewise.
5789 * c-typeck.c: Likewise.
5790
9482b620
MP
57912015-06-04 Marek Polacek <polacek@redhat.com>
5792
5793 PR c/66341
5794 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5795 it is a lvalue.
5796
bc51ace3
PK
57972015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5798
5799 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5800 Warn for empty struct.
5801 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5802
ea5b45b6
AT
58032015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5804
5805 * c-decl.c (start_function): Call plugin before parsing.
5806 (finish_function): Call plugin after parsing.
5807
c2d47482
PK
58082015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5809
5810 PR c/49551
5811 * c-decl.c (merge_decls): Merge DECL_COMMON.
5812
a95492ab
JW
58132015-05-22 Jim Wilson <jim.wilson@linaro.org>
5814
5815 * Make-lang.in (check_gcc_pallelize): Define.
5816
fd5c817a
MP
58172015-05-22 Marek Polacek <polacek@redhat.com>
5818
5819 PR c/47043
5820 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5821 attributes.
5822
c7b70a3c
MP
58232015-05-21 Marek Polacek <polacek@redhat.com>
5824
5825 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5826 DECL_BUILT_IN.
5827
21b634ae
MP
58282015-05-20 Marek Polacek <polacek@redhat.com>
5829
5830 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5831 * c-typeck.c: Likewise.
5832
296a8c2f
MP
58332015-05-19 Marek Polacek <polacek@redhat.com>
5834
5835 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5836
41b37d5e
JJ
58372015-05-19 Jakub Jelinek <jakub@redhat.com>
5838
5839 PR middle-end/66199
5840 * c-parser.c (c_parser_omp_for_loop): Don't add
5841 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5842 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5843 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5844 constructs.
5845
fab27f52
MM
58462015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5847
5848 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5849 swaps.
fab27f52 5850
40de31cf
MLI
58512015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5852
5853 PR fortran/44054
5854 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5855 accessor function.
5856
3aa3c9fc
MP
58572015-05-14 Marek Polacek <polacek@redhat.com>
5858
5859 PR c/66066
5860 PR c/66127
5861 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5862 rather than with 0.
5863
c3388e62
DM
58642015-05-12 David Malcolm <dmalcolm@redhat.com>
5865
5866 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5867 to add a call to warn_for_misleading_indentation.
5868 (c_parser_else_body): Likewise, adding param "else_loc".
5869 (c_parser_if_statement): Check for misleading indentation.
5870 (c_parser_while_statement): Likewise.
5871 (c_parser_for_statement): Likewise.
5872
755e528f
MP
58732015-05-08 Marek Polacek <polacek@redhat.com>
5874
5875 PR c/64918
5876 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5877 (output_init_element): Likewise.
5878
0173bd2a
MP
58792015-05-07 Marek Polacek <polacek@redhat.com>
5880
5881 PR c/65179
5882 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5883 value.
5884
9babc352
MP
58852015-04-30 Marek Polacek <polacek@redhat.com>
5886
5887 * c-typeck.c (set_init_label): Call error_at instead of error and
5888 pass LOC to it.
5889
ac9f18db
MP
5890 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5891 the type of a decl.
5892
ec3fba51
MP
5893 * c-typeck.c (c_build_va_arg): Clarify the error message.
5894
b811915d
TS
58952015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5896
5897 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5898 OMP_STANDALONE_CLAUSES.
5899
f3075008
MP
59002015-04-28 Marek Polacek <polacek@redhat.com>
5901
5902 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5903
4e81b788
MP
59042015-04-28 Marek Polacek <polacek@redhat.com>
5905
5906 PR c/65901
5907 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5908
6c1db78e
MP
59092015-04-25 Marek Polacek <polacek@redhat.com>
5910
5911 PR c/52085
5912 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5913 attribute.
5914
5c4abbb8
MP
59152015-04-23 Marek Polacek <polacek@redhat.com>
5916
5917 PR c/65345
5918 * c-decl.c (set_labels_context_r): New function.
5919 (store_parm_decls): Call it via walk_tree_without_duplicates.
5920 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5921 instead of create_tmp_var. Build TARGET_EXPR instead of
5922 COMPOUND_EXPR.
5923 (build_atomic_assign): Use create_tmp_var_raw instead of
5924 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5925
06aca1d5
IV
59262015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5927
5928 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5929 (c_parser_omp_target_update): Add missed %> to error_at ().
5930
8fba1830
BRF
59312015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5932
5933 PR target/55143
5934 * c-decl.c (c_default_pointer_mode): Remove definition.
5935 * c-tree.h (c_default_pointer_mode): Remove declaration.
5936
62021f64
TB
59372015-03-27 Tobias Burnus <burnus@net-b.de>
5938
5939 PR c/65586
5940 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5941 error out.
5942 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5943 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5944 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5945
9b65e171
JJ
59462015-03-19 Jakub Jelinek <jakub@redhat.com>
5947
5948 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5949 attribute for DECL_EXTERNAL VAR_DECLs.
5950
17958621
JJ
59512015-03-11 Jakub Jelinek <jakub@redhat.com>
5952
5953 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5954 argument.
5955
7ccb1a11
JJ
59562015-03-10 Jakub Jelinek <jakub@redhat.com>
5957
5958 PR c/65120
5959 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5960 before preparing arguments to warn_logical_not_parentheses.
5961
01177669
JJ
59622015-03-09 Jakub Jelinek <jakub@redhat.com>
5963
5964 PR c/65120
5965 * c-typeck.c (parser_build_binary_op): Don't warn for
5966 !!x == y or !b == y where b is _Bool.
5967
802ac282
MP
59682015-03-09 Marek Polacek <polacek@redhat.com>
5969
5970 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5971 * c-decl.c (grokdeclarator): Likewise.
5972 * c-typeck.c (build_binary_op): Likewise.
5973
e5165b60
MP
59742015-02-27 Marek Polacek <polacek@redhat.com>
5975
5976 PR c/65228
5977 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5978
065d214c
MP
59792015-02-14 Marek Polacek <polacek@redhat.com>
5980
5981 PR c/64768
5982 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5983 declared through a typedef name.
5984
e5d9235b
MP
59852015-02-13 Marek Polacek <polacek@redhat.com>
5986
5987 PR c/65050
5988 * c-decl.c (grokdeclarator): Print also the type when giving
5989 the error message about array's incomplete element type.
5990
fa01ffcc
JJ
59912015-02-11 Jakub Jelinek <jakub@redhat.com>
5992
5993 PR c/64824
5994 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5995 check in the POP macro.
5996
c3e38a03
MP
59972015-02-09 Marek Polacek <polacek@redhat.com>
5998
5999 PR c/64856
6000 * c-typeck.c (process_init_element): Don't always wrap
6001 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6002 initializing a range of elements.
6003
4886ec8e
JJ
60042015-02-04 Jakub Jelinek <jakub@redhat.com>
6005
6006 PR c/64824
6007 PR c/64868
6008 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6009
c3e38a03 60102015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
6011
6012 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6013 processing enum declaration.
6014
7b33f0c8
MP
60152015-01-29 Marek Polacek <polacek@redhat.com>
6016
6017 PR c/64709
6018 * c-typeck.c (pop_init_level): If constructor_elements has
6019 exactly one element with integer_zerop value, set constructor_zeroinit
6020 to 1. Remove braces around warning_init call.
6021
dea63e49
JJ
60222015-01-27 Jakub Jelinek <jakub@redhat.com>
6023
6024 PR c/64766
6025 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6026 of FUNCTION_DECLs with error_mark_node.
6027
d38f7dce
JJ
60282015-01-26 Jakub Jelinek <jakub@redhat.com>
6029
6030 PR c/64778
6031 * c-typeck.c (convert_arguments): Return -1 if there are
6032 error_args, even if we've diagnosed too many arguments.
6033
cbf5d0e7
RB
60342015-01-21 Richard Biener <rguenther@suse.de>
6035
6036 PR middle-end/64313
6037 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6038 for builtins the user declared correctly.
6039
41dbbb37
TS
60402015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6041 Bernd Schmidt <bernds@codesourcery.com>
6042 Cesar Philippidis <cesar@codesourcery.com>
6043 James Norris <jnorris@codesourcery.com>
6044 Jakub Jelinek <jakub@redhat.com>
6045 Ilmir Usmanov <i.usmanov@samsung.com>
6046
6047 * c-parser.c: Include "gomp-constants.h".
6048 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6049 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6050 Use OMP_CLAUSE_SET_MAP_KIND.
6051 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6052 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6053 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6054 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6055 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6056 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6057 "copyout", "create", "delete", "deviceptr", "gang", "host",
6058 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6059 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6060 "present_or_create", "pcreate", "seq", "self", "vector",
6061 "vector_length", "wait", "worker".
6062 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6063 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6064 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6065 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6066 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6067 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6068 (c_parser_oacc_data_clause_deviceptr)
6069 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6070 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6071 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6072 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6073 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6074 (c_parser_oacc_parallel, c_parser_oacc_update)
6075 (c_parser_oacc_wait): New functions.
6076 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6077 (c_finish_oacc_data): New prototypes.
6078 * c-typeck.c: Include "gomp-constants.h".
6079 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6080 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6081 OMP_CLAUSE_SET_MAP_KIND.
6082 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6083 (c_finish_oacc_data): New functions.
6084 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6085 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6086 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6087 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6088 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6089 GOMP_MAP_FORCE_DEVICEPTR.
6090
adfac8df
JJ
60912015-01-09 Michael Collison <michael.collison@linaro.org>
6092
6093 * c-array-notation.c: Include hash-set.h, machmode.h,
6094 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6095 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6096 * c-aux-info.c: Ditto.
6097 * c-convert.c: Ditto.
6098 * c-decl.c: Ditto.
6099 * c-errors.c: Ditto.
6100 * c-lang.c: Dittoxs.
6101 * c-objc-common.c: Ditto.
6102 * c-parser.c: Ditto.
6103 * c-typeck.c: Include hash-set.h, machmode.h,
6104 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6105 fold-const.h, wide-int.h, inchash.h, real.h and
6106 fixed-value.h due to flattening of tree.h.
6107
2cc901dc
MP
61082015-01-07 Marek Polacek <polacek@redhat.com>
6109
6110 PR c/64417
6111 * c-typeck.c (process_init_element): Disallow initialization of
6112 a flexible array member with a string constant if the structure
6113 is in an array.
6114
5624e564
JJ
61152015-01-05 Jakub Jelinek <jakub@redhat.com>
6116
e5341100
JJ
6117 PR sanitizer/64344
6118 * c-typeck.c (convert_for_assignment, c_finish_return): For
6119 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6120 types also set in_late_binary_op around convert call.
6121 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6122 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6123 result on expr as last argument to ubsan_instrument_float_cast,
6124 if in_late_binary_op, don't use c_save_expr but save_expr.
6125
5624e564
JJ
6126 Update copyright years.
6127
5bd012f8
MP
61282015-01-05 Marek Polacek <polacek@redhat.com>
6129
6130 PR c/64423
6131 * c-typeck.c (build_array_ref): Pass loc down to
6132 warn_array_subscript_with_type_char.
6133
3f8257db 61342014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6135
6136 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6137 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6138 element type.
8e745a17 6139 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6140 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6141 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6142 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6143 to PEDWARN_FOR_QUALIFIERS.
768952be 6144
8f94a8c4
JJ
61452014-12-17 Jakub Jelinek <jakub@redhat.com>
6146
6147 PR sanitizer/64289
6148 * c-convert.c: Include ubsan.h.
6149 (convert): For real -> integral casts and
6150 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6151 instead instrument the float cast directly.
6152
b731b390
JJ
61532014-11-29 Jakub Jelinek <jakub@redhat.com>
6154
6155 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6156 c_finish_stmt_expr): Remove NULL last argument from
6157 create_tmp_var_raw and create_tmp_var calls.
6158 * c-array-notation.c (fix_builtin_array_notation_fn,
6159 build_array_notation_expr, fix_conditional_array_notations_1,
6160 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6161
541e35a6
MP
61622014-11-28 Marek Polacek <polacek@redhat.com>
6163
6164 PR c/63862
6165 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6166 convert the right operand to integer type.
6167
b286be94
MP
61682014-11-25 Marek Polacek <polacek@redhat.com>
6169
6170 PR c/63877
6171 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6172 for inline functions.
6173
aa7da51a
JJ
61742014-11-21 Jakub Jelinek <jakub@redhat.com>
6175
6176 PR target/63764
6177 * c-typeck.c (build_array_ref): Adjust
6178 convert_vector_to_pointer_for_subscript caller. If it returns true,
6179 call non_lvalue_loc on the result.
6180
d876207f
RB
61812014-11-11 Richard Biener <rguenther@suse.de>
6182
6183 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6184 to true.
6185
e5e44252
AK
61862014-11-10 Andi Kleen <ak@linux.intel.com>
6187
6188 PR c/60804
6189 * c-parser.c (c_parser_statement_after_labels): Call
6190 check_no_cilk.
6191 (c_parser_if_statement): Dito.
6192 (c_parser_switch_statement): Dito.
6193 (c_parser_while_statement): Dito.
6194 (c_parser_do_statement): Dito.
6195 (c_parser_for_statement): Dito.
6196 * c-typeck.c (c_finish_loop): Dito.
6197
13c21655
PC
61982014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6199
6200 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6201 OPT_Wshift_count_overflow in the warnings.
6202
2d51fcef
MP
62032014-10-30 Marek Polacek <polacek@redhat.com>
6204
6205 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6206 print the stripped version as well, if they're not the same.
6207
ef4bddc2
RS
62082014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6209
6210 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6211 machine_mode.
6212
c582198b
AM
62132014-10-28 Andrew MacLeod <amacleod@redhat.com>
6214
6215 * c-decl.c: Adjust include files.
6216 * c-parser.c: Ditto.
6217
ddc8de03
PM
62182014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6219 Tom Tromey <tromey@redhat.com>
6220
6221 * c-tree.h (enum c_oracle_request): New.
6222 (c_binding_oracle_function): New typedef.
6223 (c_binding_oracle, c_pushtag, c_bind): Declare.
6224 * c-decl.c (c_binding_oracle): New global.
6225 (I_SYMBOL_CHECKED): New macro.
6226 (i_symbol_binding): New function.
6227 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6228 (I_TAG_CHECKED): New macro.
6229 (i_tag_binding): New function.
6230 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6231 (I_LABEL_CHECKED): New macro.
6232 (i_label_binding): New function.
6233 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6234 (c_print_identifier): Save and restore c_binding_oracle.
6235 (c_pushtag, c_bind): New functions.
6236
60393bbc
AM
62372014-10-27 Andrew MacLeod <amacleod@redhat.com>
6238
6239 * c-typeck.c: Adjust include files.
6240
d723bb7c
MLI
62412014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6242
6243 PR c++/53061
6244 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6245 initialization here...
6246 (c_initialize_diagnostics): ... but here. Set defaults after
6247 building pretty-printer.
6248
1bc5a451
MP
62492014-10-23 Marek Polacek <polacek@redhat.com>
6250
6251 PR c/63626
6252 * c-decl.c (pop_scope): Don't print warning in external_scope.
6253
4435bb92
MP
62542014-10-19 Marek Polacek <polacek@redhat.com>
6255
6256 PR c/63567
6257 * c-typeck.c (output_init_element): Allow initializing objects with
6258 static storage duration with compound literals even in C99 and add
6259 pedwarn for it.
6260
7278465e
MP
62612014-10-17 Marek Polacek <polacek@redhat.com>
6262
6263 PR c/63567
6264 * c-typeck.c (digest_init): Allow initializing objects with static
6265 storage duration with compound literals even in C99 and add pedwarn
6266 for it.
6267
d9b7be2e
MP
62682014-10-17 Marek Polacek <polacek@redhat.com>
6269
6270 PR c/63543
6271 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6272 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6273 error multiple times. Print the type.
6274
f406ae1f
MP
62752014-10-17 Marek Polacek <polacek@redhat.com>
6276
6277 PR c/63549
6278 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6279 type.
6280
92574c7c
MP
62812014-10-17 Marek Polacek <polacek@redhat.com>
6282
6283 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6284 (start_function): Use OPT_Wimplicit_int instead of 0.
6285 (store_parm_decls_oldstyle): Likewise.
6286
1bc4a978
MT
62872014-10-17 Alan Modra <amodra@gmail.com>
6288
6289 PR middle-end/61848
6290 * c-decl.c (merge_decls): Don't merge section name or tls model
6291 to newdecl symtab node, instead merge to olddecl. Override
6292 existing olddecl section name. Set tls_model for all thread-local
6293 vars, not just OMP thread-private ones. Remove incorrect comment.
6294
83685514
AM
62952014-10-16 Andrew MacLeod <amacleod@redhat.com>
6296
6297 * c-decl.c: Adjust include files.
6298
78a7c317
DD
62992014-10-14 DJ Delorie <dj@redhat.com>
6300
6301 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6302 (c_token_starts_typename): Check all __intN, not just __int128.
6303 (c_token_starts_declspecs): Likewise.
6304 (c_parser_declspecs): Likewise.
6305 (c_parser_attribute_any_word): Likewise.
6306 (c_parser_objc_selector): Likewise.
6307 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6308 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6309 is specified.
6310 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6311 __int128.
6312 (finish_declspecs): Likewise.
6313
74d98c1e
AB
63142014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6315
8e745a17 6316 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6317 the duplicate code.
8e745a17 6318 (c_parser_statement): Call the new function.
74d98c1e 6319
84937de2
MP
63202014-10-09 Marek Polacek <polacek@redhat.com>
6321
6322 PR c/63480
6323 * c-typeck.c (pop_init_level): Don't warn about initializing
6324 with { }.
6325
0382aaa0
MP
63262014-10-07 Marek Polacek <polacek@redhat.com>
6327
6328 PR c/59717
6329 * c-decl.c (header_for_builtin_fn): New function.
6330 (implicitly_declare): Suggest which header to include.
6331
7a0ca710
MP
63322014-10-07 Marek Polacek <polacek@redhat.com>
6333
6334 * c-convert.c (convert): Use error_operand_p.
6335 * c-typeck.c (require_complete_type): Likewise.
6336 (really_atomic_lvalue): Likewise.
6337 (digest_init): Likewise.
6338 (handle_omp_array_sections_1): Likewise.
6339
6bc8a126
MP
63402014-10-03 Marek Polacek <polacek@redhat.com>
6341
6342 PR c/63453
6343 * c-decl.c (pop_scope): Don't warn about "inline function declared
6344 but never defined" for functions marked with gnu_inline attribute.
6345
d90c0a59
JJ
63462014-09-25 Jakub Jelinek <jakub@redhat.com>
6347
6348 PR c++/63249
6349 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6350 on low_bound and length.
6351
083e891e
MP
63522014-09-24 Marek Polacek <polacek@redhat.com>
6353
6354 PR c/61405
6355 PR c/53874
6356 * c-parser.c: Don't define CPP_KEYWORD.
6357 (c_parser_switch_statement): Pass original type to c_finish_case.
6358 * c-tree.h (c_finish_case): Update declaration.
6359 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6360 conditionally to c_do_switch_warnings.
6361
8d95fe25
MP
63622014-09-03 Marek Polacek <polacek@redhat.com>
6363
6364 PR c/62024
6365 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6366 conversions.
6367
9a771876
JJ
63682014-09-02 Jakub Jelinek <jakub@redhat.com>
6369 Balaji V. Iyer <balaji.v.iyer@intel.com>
6370 Igor Zamyatin <igor.zamyatin@intel.com>
6371
6372 * c-parser.c (c_parser_cilk_for): New function.
6373 (c_parser_cilk_grainsize): Likewise.
6374 (c_get_temp_regvar): Likewise.
6375 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6376 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6377 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6378 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6379 case.
6380
b7679d96
CG
63812014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6382
6383 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6384 with using HOST_WIDE_INT without truncation to 'int'
6385
59ea0364
MP
63862014-08-22 Marek Polacek <polacek@redhat.com>
6387
6388 PR c++/62199
6389 * c-typeck.c (parser_build_binary_op): Adjust call to
6390 warn_logical_not_parentheses.
6391
671a475e
IZ
63922014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6393
6394 PR other/62008
6395 * c-parser.c (c_parser_array_notation): Check for correct
6396 type of an array added.
6397
04159acf
MP
63982014-08-19 Marek Polacek <polacek@redhat.com>
6399
6400 PR c++/62153
6401 * c-typeck.c (build_binary_op): If either operand of a comparison
6402 is a boolean expression, call maybe_warn_bool_compare.
6403
c77935ee
PP
64042014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6405
6406 PR c/45584
6407 * c-typeck.c (build_c_cast): Do a conversion even when the
6408 TYPE_MAIN_VARIANTs are the same.
6409
35aff4fb
MP
64102014-08-19 Marek Polacek <polacek@redhat.com>
6411
6412 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6413 pedwarn_c99 instead of pedwarn.
6414 (grokfield): Likewise.
6415 (warn_defaults_to): New function.
6416 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6417 Unconditionally call pedwarn_c99 instead of pedwarn.
6418 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6419 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6420 check flag_isoc11 before.
6421 * c-errors.c (pedwarn_c99): Change the return type to bool.
6422 Handle -Wc99-c11-compat.
6423 * c-parser.c (disable_extension_diagnostics): Handle
6424 warn_c99_c11_compat.
6425 (restore_extension_diagnostics): Likewise.
6426 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6427 instead of pedwarn, don't check flag_isoc11 before.
6428 (c_parser_declspecs): Likewise.
6429 (c_parser_alignas_specifier): Likewise.
6430 (c_parser_alignof_expression): Likewise.
6431 (c_parser_generic_selection): Likewise.
6432 * c-tree.h (pedwarn_c99): Update declaration.
6433 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6434 of pedwarn_c99.
6435
177cce46
MP
64362014-08-19 Marek Polacek <polacek@redhat.com>
6437
6438 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6439 to pedwarn_c90.
6440 * c-errors.c: Include "opts.h".
6441 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6442 * c-parser.c (disable_extension_diagnostics): Handle negative value
6443 of warn_c90_c99_compat, too.
6444 (restore_extension_diagnostics): Likewise.
6445 (c_parser_compound_statement_nostart): Pass
6446 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6447
6dc99c33
MP
64482014-08-12 Marek Polacek <polacek@redhat.com>
6449
6450 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6451 Add pedwarn.
6452 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6453 Likewise.
6454 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6455
3f8257db 64562014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6457
6458 PR c/51849
6459 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6460 Call pedwarn_c90 instead of pedwarn.
6461 (check_bitfield_type_and_width): Likewise.
6462 (declspecs_add_qual): Likewise.
6463 (declspecs_add_type): Likewise.
6464 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6465 Adjust to only call pedwarn_c90.
6466 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6467 pedwarn_c90 instead of pedwarn.
6468 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6469 * c-parser.c (disable_extension_diagnostics): Handle
6470 warn_c90_c99_compat.
6471 (restore_extension_diagnostics): Likewise.
6472 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6473 pedwarn_c90 instead of pedwarn.
6474 (c_parser_initelt): Likewise.
6475 (c_parser_postfix_expression): Likewise.
6476 (c_parser_postfix_expression_after_paren_type): Likewise.
6477 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6478 * c-tree.h: Fix formatting.
6479 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6480 pedwarn_c90 instead of pedwarn.
6481
9f25a338
TS
64822014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6483
6484 * c-typeck.c: Remove include of pointer-set.h.
6485
044331a8
MP
64862014-08-07 Marek Polacek <polacek@redhat.com>
6487
6488 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6489
b787e7a2
TS
64902014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6491
6492 * c-typeck.c: Use hash_map instead of pointer_map.
6493
6e2830c3
TS
64942014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6495
6496 * c-decl.c: Use hash_set instead of pointer_set.
6497
a7ee52fb
IZ
64982014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6499
6500 PR middle-end/61455
6501 * c-array-notation.c (expand_array_notations): Handling
6502 of DECL_EXPR added.
6503
b4dfdc11
MG
65042014-07-31 Marc Glisse <marc.glisse@inria.fr>
6505
6506 PR c++/60517
6507 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6508 a local variable.
6509
976d5a22
TT
65102014-07-30 Tom Tromey <tromey@redhat.com>
6511
6512 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6513 field.
6514 (really_start_incremental_init, push_init_level): Initialize
6515 designator_depth.
6516 (pop_init_level): Set global designator_depth.
6517 (process_init_element): Check for designated_init attribute.
6518
30281de2
MP
65192014-07-20 Marek Polacek <polacek@redhat.com>
6520
6521 PR c/61852
6522 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6523 (implicitly_declare): Pass location to implicit_decl_warning.
6524
b108f48f
JJ
65252014-07-14 Jakub Jelinek <jakub@redhat.com>
6526
6527 PR middle-end/61294
6528 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6529 If non-NULL, call c_parser_check_literal_zero.
6530 (c_parser_check_literal_zero): New function.
6531 (c_parser_postfix_expression_after_primary): Adjust
6532 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6533
773ec47f
MP
65342014-07-06 Marek Polacek <polacek@redhat.com>
6535
6536 PR c/6940
6537 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6538 * c-tree.h (C_ARRAY_PARAMETER): Define.
6539 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6540 function parameter.
6541
22e1cf1c 65422014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6543 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6544
6545 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6546 releasing symbol.
6547
52ec0ea3
MP
65482014-07-01 Marek Polacek <polacek@redhat.com>
6549
6550 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6551 instead of 0 to WARN_FOR_ASSIGNMENT.
6552
d5c3d343
MP
65532014-07-01 Marek Polacek <polacek@redhat.com>
6554
6555 PR c/58286
6556 * c-typeck.c (convert_for_assignment): Pass
6557 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6558
6a7253a4
MP
65592014-06-30 Marek Polacek <polacek@redhat.com>
6560
6561 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6562 has no_sanitize_undefined attribute.
6563
5e88a8f4
IZ
65642014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6565
6566 PR middle-end/57541
6567 * c-array-notation.c (fix_builtin_array_notation_fn):
6568 Check for 0 arguments in builtin call. Check that bultin argument is
6569 correct.
6570 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6571 index.
6572
9698b078
SH
65732014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6574
6575 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6576 qualifiers in __auto_type for atomic types.
6577 (c_parser_typeof_specifier): Discard all type qualifiers in
6578 __typeof__ for atomic types.
6579
6e07c515
MP
65802014-06-25 Marek Polacek <polacek@redhat.com>
6581
6582 PR c/61162
6583 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6584 the return expression to c_finish_return.
6585
da6f124d
JJ
65862014-06-25 Jakub Jelinek <jakub@redhat.com>
6587
6588 * c-typeck.c (c_finish_omp_clauses): Make sure
6589 OMP_CLAUSE_LINEAR_STEP has correct type.
6590
c203e8a7
TS
65912014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6592
6593 * c-decl.c: Adjust.
6594
56ad0e38
JJ
65952014-06-24 Jakub Jelinek <jakub@redhat.com>
6596
6597 * c-parser.c (c_parser_omp_for_loop): For
6598 #pragma omp parallel for simd move lastprivate clause from parallel
6599 to for rather than simd.
6600
47c2554f
MP
66012014-06-23 Marek Polacek <polacek@redhat.com>
6602
6603 * c-typeck.c (parser_build_binary_op): Don't call
6604 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6605
56363ffd
JH
66062014-06-15 Jan Hubicka <hubicka@ucw.cz>
6607
6608 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6609 * c-decl.c (merge_decls): Likewise.
6610
d7ff7ae5
MP
66112014-06-09 Marek Polacek <polacek@redhat.com>
6612
6613 PR c/36446
6614 * c-typeck.c (error_init): Call inform instead of error_at.
6615 (pedwarn_init): Call inform instead of pedwarn.
6616 (warning_init): Call inform instead of warning_at.
6617
24d047a3
JH
66182014-06-07 Jan Hubicka <hubicka@ucw.cz>
6619
6620 * c-decl.c (merge_decls): Use set_decl_section_name.
6621 (duplicate_decls): Remove node if it exists.
6622
9bac5cbb
G
66232014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6624
6625 PR c/53119
6626 * c-typeck.c (push_init_level, process_init_element,
6627 pop_init_level): Correct check for zero initialization, move
6628 missing brace warning to respect zero initialization.
6629
8ffcdea8
MP
66302014-06-05 Marek Polacek <polacek@redhat.com>
6631
6632 PR c/56724
6633 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6634
742938c9
MP
66352014-06-05 Marek Polacek <polacek@redhat.com>
6636
6637 PR c/49706
6638 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6639 on the left hand side operand of a comparison.
742938c9 6640
6447c55d
MP
66412014-06-05 Marek Polacek <polacek@redhat.com>
6642
6643 PR c/48062
6644 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6645 Print note only if the warning was printed.
6646
9dc7743c
IZ
66472014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6648
6649 PR c/58942
6650 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6651 with a pointer.
6652
fedfecef
MP
66532014-06-03 Marek Polacek <polacek@redhat.com>
6654
6655 PR c/60439
6656 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6657 c_start_case.
6658 * c-tree.h (c_start_case): Update.
6659 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6660 switch condition has boolean value.
6661
9b2b7279
AM
66622014-06-02 Andrew MacLeod <amacleod@redhat.com>
6663
6664 * c-decl.c: Include builtins.h.
6665 * c-parser.c: Likewise.
6666
5c1bc275
MP
66672014-05-27 Marek Polacek <polacek@redhat.com>
6668
6669 PR c/56724
6670 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6671 error and warning calls to error_at and warning_at. Pass location of
6672 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6673 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6674 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6675
97563bc8
IZ
66762014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6677
6678 PR c/61191
6679 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6680 function parameters.
6681
aede2c10
JH
66822014-05-23 Jan Hubicka <hubicka@ucw.cz>
6683
6684 * c-decl.c (merge_decls): Preserve symtab node pointers.
6685 (duplicate_decls): Free new decl.
6686
edbba2ce
TS
66872014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6688
f3316c6d
TS
6689 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6690 initialization.
6691
edbba2ce
TS
6692 * c-parser.c (c_parser_omp_target): Return bool values.
6693
68c81f24
TS
66942014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6695
6696 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6697 num_teams_loc variable to num_thread_limit_loc.
6698
632f2871
RS
66992014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6700
6701 * c-array-notation.c (expand_array_notations): Use void_node
6702 instead of void_zero_node.
6703
766090c2
TS
67042014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6705
6706 * c-decl.c (finish_struct): Adjust.
6707 (finish_enum): Likewise.
6708 (bind): Adjust.
6709 (record_inline_static): Likewise.
6710 (push_scope): Likewise.
6711 (make_label): Likewise.
6712 (lookup_label_for_goto): Likewise.
6713 (finish_struct): Likewise.
6714 (finish_enum): Likewise.
6715 (store_parm_decls): Likewise.
6716 (c_push_function_context): Likewise.
6717 * c-lang.h: Remove usage of variable_size gty attribute.
6718 * c-parser.c (c_parse_init): Adjust.
6719 (c_parse_file): Likewise.
6720
2b107f6b
MP
67212014-05-13 Marek Polacek <polacek@redhat.com>
6722
6723 PR c/61162
6724 * c-typeck.c (convert_for_assignment): Pass location to
6725 WARN_FOR_ASSIGNMENT instead of input_location.
6726
d033409e
MP
67272014-05-10 Marek Polacek <polacek@redhat.com>
6728
6729 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6730 maybe_warn_string_init.
6731 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6732 maybe_warn_string_init.
6733 * c-tree.h (maybe_warn_string_init): Update declaration.
6734 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6735 Call pedwarn_init with loc instead of with input_location.
6736 (digest_init): Pass init_loc to maybe_warn_string_init.
6737 (pop_init_level): Call pedwarn_init with loc instead of with
6738 input_location.
6739 (set_init_index): Likewise.
6740 (process_init_element): Likewise.
6741
ea58ef42
MP
67422014-05-09 Marek Polacek <polacek@redhat.com>
6743
6744 PR c/61096
6745 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6746 (c_parser_initelt): Pass location to set_init_label. Pass array index
6747 location to set_init_index.
6748 * c-tree.h (push_init_level): Update declaration.
6749 (pop_init_level): Likewise.
6750 (set_init_index): Likewise.
6751 (set_init_label): Likewise.
6752 * c-typeck.c (error_init): Add location parameter. Call error_at
6753 instead of error.
6754 (digest_init): Pass init_loc to error_init.
6755 (really_start_incremental_init):
6756 (push_init_level): Add location parameter. Pass loc to pop_init_level
6757 and error_init.
6758 (pop_init_level): Likewise.
6759 (set_designator): Add location parameter. Pass loc to pop_init_level,
6760 push_init_level, and error_init.
6761 (set_init_index): Add location parameter. Pass loc to error_init and
6762 set_designator.
6763 (set_init_label): Likewise.
6764 (output_init_element): Pass loc to error_init.
6765 (process_init_element): Pass loc to error_init, pop_init_level,
6766 pedwarn_init, and push_init_level.
6767
661a0813
MP
67682014-05-09 Marek Polacek <polacek@redhat.com>
6769
6770 PR c/50459
6771 * c-parser.c (c_parser_attributes): Parse the arguments as an
6772 expression-list if the attribute takes identifier.
6773
2793eeab
MP
67742014-05-08 Marek Polacek <polacek@redhat.com>
6775
6776 PR c/61053
6777 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6778 TYPE_ALIGN_UNIT.
6779
f827930a
MP
67802014-05-08 Marek Polacek <polacek@redhat.com>
6781
6782 PR c/61077
6783 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6784 of main.
6785
1d60af08
KZ
67862014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6787 Mike Stump <mikestump@comcast.net>
6788 Richard Sandiford <rdsandiford@googlemail.com>
6789
6790 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6791 (finish_enum): Use wide-int interfaces.
6792 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6793 * c-typeck.c (build_c_cast): Likewise.
6794 (set_nonincremental_init_from_string): Likewise.
6795 (c_tree_equal): Likewise.
6796
a0e24419
MP
67972014-05-02 Marek Polacek <polacek@redhat.com>
6798
6799 PR c/25801
6800 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6801 Return size_one_node when the type is not complete.
6802 (pointer_diff): Remove comment.
6803 (build_unary_op): Improve error messages.
6804
19fc9faa
MP
68052014-05-02 Marek Polacek <polacek@redhat.com>
6806
6807 * c-typeck.c (c_finish_return): Separate warning_at calls.
6808
63bc4e87
MP
68092014-05-02 Marek Polacek <polacek@redhat.com>
6810
6811 * c-tree.h (error_init): Remove declaration.
6812 (pedwarn_init): Likewise.
6813 * c-typeck.c (error_init): Make static and move above.
6814 (pedwarn_init): Likewise.
6815 (warning_init): Move above.
6816 (maybe_warn_string_init): Likewise.
6817
4bd2511b
JL
68182014-05-01 Jeff Law <law@redhat.com>
6819
6820 Revert:
6821
6822 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6823 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6824 avoid goto.
6825
6a358dcb
MP
68262014-05-02 Marek Polacek <polacek@redhat.com>
6827
6828 PR c/60784
6829 * c-typeck.c (push_init_level): Set constructor_designated to
6830 p->designated for structures.
6831
ae5ebda4
MP
68322014-05-01 Marek Polacek <polacek@redhat.com>
6833
6834 PR c/60915
6835 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6836 function-definition has an attribute after the declarator.
6837
96b40f8d
MP
68382014-05-01 Marek Polacek <polacek@redhat.com>
6839
6840 PR c/60257
6841 * c-typeck.c (warning_init): Add location_t parameter. Call
6842 warning_at instead of warning.
6843 (push_init_level): Pass input_location to warning_init.
6844 (add_pending_init): Add location_t parameter. Pass loc to
6845 warning_init.
6846 (set_nonincremental_init): Pass input_location to add_pending_init.
6847 (set_nonincremental_init_from_string): Likewise.
6848 (output_init_element): Pass loc to warning_init and to
6849 add_pending_init.
6850
32e00768
MP
68512014-05-01 Marek Polacek <polacek@redhat.com>
6852
6853 PR c/43395
6854 * c-typeck.c (c_finish_return): Distinguish between label and variable
6855 when warning about returning local address.
6856
c9379ce2
MP
68572014-05-01 Marek Polacek <polacek@redhat.com>
6858
6859 PR c/29467
6860 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6861 in C89 mode.
6862
d00887e8
MP
68632014-05-01 Marek Polacek <polacek@redhat.com>
6864
6865 PR c/43245
6866 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6867 instead of 0 to WARN_FOR_QUALIFIERS.
6868
5436fa2e
MP
68692014-05-01 Marek Polacek <polacek@redhat.com>
6870
6871 PR c/56989
6872 * c-typeck.c (default_conversion): Use better location for
6873 error call.
6874
f8ed5150
MP
68752014-04-30 Marek Polacek <polacek@redhat.com>
6876
6877 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6878 also when SANITIZE_FLOAT_DIVIDE is on.
6879
8337d1db
MP
68802014-04-30 Marek Polacek <polacek@redhat.com>
6881
6882 PR c/60139
6883 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6884 and pedwarn_init. Use loc insted of input_location.
6885
c4bdc42f
MP
68862014-04-30 Marek Polacek <polacek@redhat.com>
6887
6888 PR c/60351
6889 * c-typeck.c (build_binary_op): Use location when warning about
6890 shift count.
6891
45484dcf
MP
68922014-04-25 Marek Polacek <polacek@redhat.com>
6893
6894 PR c/18079
6895 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6896 always_inline/noinline and hot/cold attributes.
6897
34cf811f
MP
68982014-04-25 Marek Polacek <polacek@redhat.com>
6899
6900 PR c/60114
6901 * c-parser.c (c_parser_initelt): Pass input_location to
6902 process_init_element.
6903 (c_parser_initval): Pass loc to process_init_element.
6904 * c-tree.h (process_init_element): Adjust declaration.
6905 * c-typeck.c (push_init_level): Pass input_location to
6906 process_init_element.
6907 (pop_init_level): Likewise.
6908 (set_designator): Likewise.
6909 (output_init_element): Add location_t parameter. Pass loc to
6910 digest_init.
6911 (output_pending_init_elements): Pass input_location to
6912 output_init_element.
6913 (process_init_element): Add location_t parameter. Pass loc to
6914 output_init_element.
6915
42056eac
JJ
69162014-04-24 Jakub Jelinek <jakub@redhat.com>
6917
6918 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6919 atomic-clause, allow comma in between atomic-clause and
6920 seq_cst.
6921
e162a134
JJ
69222014-04-22 Jakub Jelinek <jakub@redhat.com>
6923
6924 PR c/59073
6925 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6926 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6927
2f6babac
IZ
69282014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6929
6930 PR middle-end/60469
6931 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6932 create_tmp_var instead build_decl for creating temps.
6933 (build_array_notation_expr): Likewise.
6934 (fix_conditional_array_notations_1): Likewise.
6935 (fix_array_notation_expr): Likewise.
6936 (fix_array_notation_call_expr): Likewise.
6937
8edbfaa6
JJ
69382014-03-28 Jakub Jelinek <jakub@redhat.com>
6939
6940 PR c++/60689
6941 * c-tree.h (c_build_function_call_vec): New prototype.
6942 * c-typeck.c (build_function_call_vec): Don't call
6943 resolve_overloaded_builtin here.
6944 (c_build_function_call_vec): New wrapper function around
6945 build_function_call_vec. Call resolve_overloaded_builtin here.
6946 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6947 Call c_build_function_call_vec instead of build_function_call_vec.
6948 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6949 * c-decl.c (finish_decl): Likewise.
6950
7485aeea
MLI
69512014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6952
6953 PR c/55383
6954 * c-typeck.c: Use correct format string in cast-qual warning
6955
b17a8b07
TS
69562014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6957
6958 * c-decl.c (c_decl_attributes): Use
6959 lang_hooks.types.omp_mappable_type.
6960 * c-typeck.c (c_finish_omp_clauses): Likewise.
6961
3af9c5e9
MP
69622014-03-06 Marek Polacek <polacek@redhat.com>
6963
6964 PR c/60197
6965 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6966 of checking tree code.
6967
1c9f5f33
PK
69682014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6969
6970 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6971 (c_parser_parameter_declaration): Likewise.
6972
cc28fc7f
MP
69732014-02-19 Marek Polacek <polacek@redhat.com>
6974
6975 PR c/60195
6976 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6977 Call mark_exp_read on exp.value.
6978 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6979 TREE_ADDRESSABLE on old instead of val.
6980 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6981
b581c05c
PK
69822014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6983
6984 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6985 C_EXPR_APPEND by vec_safe_push.
6986 * c-tree.h (C_EXPR_APPEND): Remove.
6987
81e5eca8
MP
69882014-01-31 Marek Polacek <polacek@redhat.com>
6989
6990 PR c/59963
6991 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6992 build_function_call_vec.
6993 (build_function_call): Likewise.
6994 (build_atomic_assign): Likewise.
6995 (build_function_call_vec): Add arg_loc parameter. Use it.
6996 (convert_arguments): Likewise.
6997 (convert_for_assignment): Rename rhs_loc to expr_loc.
6998 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6999 (c_parser_objc_keywordexpr): Likewise.
7000 (c_parser_postfix_expression_after_primary): Call
7001 build_function_call_vec with expr_loc rather than op_loc.
7002 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7003 build_function_call_vec.
7004 (c_parser_expr_list): Add locations parameter. Fill it with locations
7005 of function arguments.
7006 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7007
68fca595
MP
70082014-01-30 Marek Polacek <polacek@redhat.com>
7009
7010 PR c/59940
7011 * c-typeck.c (build_function_call_vec): Use loc parameter.
7012 (convert_arguments): Add location parameter. Use it.
7013 (ep_convert_and_check): Likewise.
7014 (build_atomic_assign): Adjust convert_for_assignment call.
7015 (build_modify_expr): Likewise.
7016 (digest_init): Likewise.
7017 (c_finish_return): Likewise.
7018 (build_conditional_expr): Adjust ep_convert_and_check calls.
7019 (convert_for_assignment): Add rhs_loc parameter. Use it.
7020 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7021 calls.
7022
fa337f3a
RB
70232014-01-30 Richard Biener <rguenther@suse.de>
7024
7025 PR c/59905
7026 * c-typeck.c (build_function_call_vec): Do not replace calls
7027 to a function via an incompatible type with a runtime abort.
7028
b72271b9
BI
70292014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7030
7031 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7032 flag_enable_cilkplus with flag_cilkplus.
7033 (c_parser_direct_declarator_inner): Likewise.
7034 (c_parser_attribute_any_word): Likewise.
7035 (c_parser_attributes): Likewise.
7036 (c_parser_compound_statement): Likewise.
7037 (c_parser_statement_after_labels): Likewise.
7038 (c_parser_if_statement): Likewise.
7039 (c_parser_switch_statement): Likewise.
7040 (c_parser_do_statement): Likewise.
7041 (c_parser_for_statement): Likewise.
7042 (c_parser_unary_expression): Likewise.
7043 (c_parser_postfix_expression): Likewise.
7044 (c_parser_postfix_expression_after_primary): Likewise.
7045 (c_parser_postfix_expression_after_primary): Likewise.
7046 (c_parser_omp_clause_name): Likewise.
7047 (c_finish_omp_declare_simd): Likewise.
7048 (c_parser_cilk_verify_simd): Likewise.
7049 * c-typeck.c (build_array_ref): Likewise.
7050 (build_function_call_vec): Likewise.
7051 (convert_arguments): Likewise.
7052 (build_compound_expr): Likewise.
7053 (c_finish_return): Likewise.
7054 (c_finish_if_stmt): Likewise.
7055 (c_finish_loop): Likewise.
7056 (build_binary_op): Likewise.
7057
393e8e8b
MP
70582014-01-23 Marek Polacek <polacek@redhat.com>
7059
7060 PR c/59846
7061 * c-typeck.c (parser_build_binary_op): Use location instead of
7062 input_location.
7063 (build_binary_op): Pass location to shorten_compare.
7064
f04dda30
MP
70652014-01-23 Marek Polacek <polacek@redhat.com>
7066
7067 PR c/58346
7068 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7069 an empty aggregate.
7070
789eadcd
MP
70712014-01-23 Marek Polacek <polacek@redhat.com>
7072
7073 PR c/59871
7074 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7075 of a comma expression.
7076 (emit_side_effect_warnings): Likewise.
7077
40f14e9f
BI
70782014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7079
7080 PR c/59825
7081 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7082 function to use walk_tree and moved a lot of its functionality to
7083 expand_array_notations.
7084 (expand_array_notations): New function.
7085
74558dd9
BI
70862014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7087
7088 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7089 attribute an attribute without value.
7090
652fea39
JJ
70912014-01-23 Jakub Jelinek <jakub@redhat.com>
7092
7093 PR middle-end/58809
7094 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7095 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7096
f34f1c87
MP
70972014-01-22 Marek Polacek <polacek@redhat.com>
7098
7099 PR c/59891
7100 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7101 of remove_c_maybe_const_expr on op1 and op2.
7102
241f845a
JJ
71032014-01-15 Jakub Jelinek <jakub@redhat.com>
7104
7105 PR c/58943
7106 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7107 effects, preevaluate rhs using SAVE_EXPR first.
7108
9a74f20c
BI
71092014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7110
7111 PR c++/59631
7112 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7113 statements with if-elseif statements.
7114
96066ce1
MP
71152014-01-06 Marek Polacek <polacek@redhat.com>
7116
7117 PR c/57773
7118 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7119 defined bit-field types only in ISO C.
7120
23a5b65a
RS
71212014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7122
7123 Update copyright years
7124
f9030485
RS
71252014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7126
7127 * c-array-notation.c: Use the standard form for the copyright notice.
7128
41958c28
BI
71292013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7130
7131 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7132 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7133 field in parser is not empty. If not-empty, call the function
7134 c_parser_finish_omp_declare_simd.
7135 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7136 between SIMD-enabled functions and #pragma simd. Added new parameter.
7137 (c_parser_cilk_all_clauses): Modified the usage of the function
7138 c_parser_cilk_clause_vectorlength as mentioned above.
7139 (c_parser_cilk_simd_fn_vector_attrs): New function.
7140 (c_finish_cilk_simd_fn_tokens): Likewise.
7141 (is_cilkplus_vector_p): Likewise.
7142 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7143 "nomask," and "mask" strings in clause name.
7144 (c_parser_omp_all_clauses): Added 3 new case statements:
7145 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7146 PRAGMA_CILK_CLAUSE_NOMASK.
7147 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7148 check for vector attribute and if so call the function
7149 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7150 called the function c_finish_cilk_simd_fn_tokens.
7151 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7152 parser field is non-empty. If so, parse them as you would parse
7153 the omp declare simd pragma.
7154 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7155 Added a check when step is a parameter and flag it as error.
7156 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7157 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7158 pragma_omp_clause.
7159
cef0fd0e
TS
71602013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7161
7162 * c-parser.c (c_parser_omp_parallel): Fix description.
7163
12893402
BI
71642013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7165
7166 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7167 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7168 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7169 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7170
296674db
JM
71712013-12-04 Joseph Myers <joseph@codesourcery.com>
7172
7173 PR c/52023
7174 * c-parser.c (c_parser_alignas_specifier): Use
7175 c_sizeof_or_alignof_type instead of c_alignof.
7176 (c_parser_alignof_expression): Likewise, with min_alignof
7177 parameter depending on alignof spelling used.
7178
edd28054
MP
71792013-12-04 Marek Polacek <polacek@redhat.com>
7180
7181 PR c/54113
7182 * c-decl.c (start_function): Don't warn for missing prototype for
7183 inline functions.
7184
da0fc454
MP
71852013-12-03 Marek Polacek <polacek@redhat.com>
7186
7187 PR c/59351
7188 * c-decl.c (build_compound_literal): Allow compound literals with
7189 empty initial value.
7190
4c2ecab0
JM
71912013-12-02 Joseph Myers <joseph@codesourcery.com>
7192
7193 PR c/58235
7194 * c-typeck.c (build_modify_expr): Diagnose assignment to
7195 expression with array type.
7196
340baef7
JM
71972013-11-29 Joseph Myers <joseph@codesourcery.com>
7198
7199 PR c/42262
7200 * c-typeck.c (process_init_element): Do not treat a string as
7201 initializing a whole array when used with a designator for an
7202 individual element.
7203
6763b9f7
JM
72042013-11-29 Joseph Myers <joseph@codesourcery.com>
7205
7206 PR c/57574
7207 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7208 an inline function following a static declaration.
7209
e7bd1de1
JJ
72102013-11-28 Jakub Jelinek <jakub@redhat.com>
7211
7212 PR c/59310
7213 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7214 to p_name before calling c_parser_omp_teams instead of after.
7215 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7216 argument. Remove unused p_name variable.
7217
0136f8f0
AH
72182013-11-27 Aldy Hernandez <aldyh@redhat.com>
7219 Jakub Jelinek <jakub@redhat.com>
7220
7221 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7222 external_scope is NULL.
7223
241b71bb
TV
72242013-11-27 Tom de Vries <tom@codesourcery.com>
7225 Marc Glisse <marc.glisse@inria.fr>
7226
7227 PR c++/59032
7228 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7229
2fb9a547
AM
72302013-11-22 Andrew MacLeod <amacleod@redhat.com>
7231
7232 * c-typeck.c: Add required include files from gimple.h.
7233
8400e75e
DM
72342013-11-22 David Malcolm <dmalcolm@redhat.com>
7235
7236 * c-decl.c (define_label, shadow_tag_warned)
7237 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7238 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7239 (declspecs_add_type): Remove use of in_system_header macro.
7240 * c-parser.c (c_parser_unary_expression): Likewise.
7241 * c-typeck.c (store_init_value, process_init_element)
7242 (c_start_case): Likewise.
7243
7244 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7245 macro.
7246
7247 * c-parser.c (c_parser_set_source_position_from_token): Remove
7248 reference to in_system_header from comment.
7249
386b1f1f
RS
72502013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7251
7252 * c-decl.c (grokdeclarator): Update comment to refer to
7253 tree_to_[su]hwi rather than tree_low_cst.
7254
ae7e9ddd
RS
72552013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7256
7257 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7258 tree_to_uhwi throughout.
7259
9439e9a1
RS
72602013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7261
7262 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7263 throughout.
7264
9541ffee
RS
72652013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7266
7267 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7268 throughout.
7269
c02065fc
AH
72702013-11-15 Aldy Hernandez <aldyh@redhat.com>
7271
7272 * c-parser.c (c_parser_cilk_simd): New.
7273 (c_parser_cilk_verify_simd): New.
7274 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7275 (c_parser_omp_for_loop): Add case for NE_EXPR.
7276 Set c_break_label for CILK_SIMD.
7277 (c_parser_cilk_clause_vectorlength): New.
7278 (c_parser_cilk_clause_linear): New.
7279 (c_parser_cilk_clause_name): New.
7280 (c_parser_cilk_all_clauses): New.
7281 * c-typeck.c (build_unary_op): Pass location argument to
7282 readonly_error.
7283 (build_modify_expr): Same.
7284 (build_asm_expr): Same.
7285 (c_finish_bc_stmt): Error on break/continue in loops.
7286
18f429e2
AM
72872013-11-14 Andrew MacLeod <amacleod@redhat.com>
7288
7289 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7290
d8a2d370
DN
72912013-11-14 Diego Novillo <dnovillo@google.com>
7292
7293 * c-decl.c: Include print-tree.h.
7294 Include stor-layout.h.
7295 Include varasm.h.
7296 Include attribs.h.
7297 Include stringpool.h.
7298 * c-lang.c: Include fold-const.h.
7299 * c-parser.c: Include stringpool.h.
7300 Include attribs.h.
7301 Include stor-layout.h.
7302 Include varasm.h.
7303 Include trans-mem.h.
7304 * c-typeck.c: Include stor-layout.h.
7305 Include trans-mem.h.
7306 Include varasm.h.
7307 Include stmt.h.
7308
38b7bc7f
JM
73092013-11-13 Joseph Myers <joseph@codesourcery.com>
7310
7311 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7312 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7313 __auto_type.
7314 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7315 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7316 RID_AUTO_TYPE.
7317 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7318 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7319 (c_parser_declarator, c_parser_direct_declarator_inner)
7320 (c_parser_parameter_declaration, c_parser_type_name): All callers
7321 changed.
7322 (c_parser_declaration_or_fndef): Handle declarations with type
7323 determined from the initializer.
7324
45b0be94
AM
73252013-11-12 Andrew MacLeod <amacleod@redhat.com>
7326
18f429e2 7327 * c-typeck.c: Include gimplify.h.
45b0be94 7328
582d9b50
JM
73292013-11-12 Joseph Myers <joseph@codesourcery.com>
7330
7331 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7332 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7333 comment.
7334 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7335 or _Thread_local as appropriate in diagnostics.
7336 (build_null_declspecs): Initialize ret->thread_gnu_p.
7337 (declspecs_add_scspec): Handle either __thread or _Thread_local
7338 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7339 pedantic. Do not disallow _Thread_local extern and _Thread_local
7340 static.
7341
267bac10
JM
73422013-11-07 Joseph Myers <joseph@codesourcery.com>
7343 Andrew MacLeod <amacleod@redhat.com>
7344
7345 * c-aux-info.c (gen_type): Handle atomic qualifier.
7346 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7347 qualifiers when compating types.
7348 (shadow_tag_warned): Handle atomic_p in declspecs.
7349 (quals_from_declspecs): Likewise.
7350 (start_decl): Use c_type_promotes_to when promoting argument
7351 types.
7352 (grokdeclarator): Handle _Atomic.
7353 (get_parm_info): Diagnose any qualifier on "void" as only
7354 parameter.
7355 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7356 comparing types. Use c_type_promotes_to when promoting argument
7357 types.
7358 (finish_function): Use c_type_promotes_to when promoting argument
7359 types.
7360 (build_null_declspecs): Handle atomic_p in declspecs.
7361 (declspecs_add_qual): Handle RID_ATOMIC.
7362 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7363 (c_token_starts_declspecs): Handle RID_ATOMIC.
7364 (c_parser_declspecs): Handle atomic type specifiers and
7365 qualifiers.
7366 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7367 from types of expressions with atomic type.
7368 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7369 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7370 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7371 (c_parser_statement_after_labels, c_parser_switch_statement)
7372 (c_parser_for_statement, c_parser_expr_no_commas)
7373 (c_parser_conditional_expression, c_parser_binary_expression)
7374 (c_parser_cast_expression, c_parser_unary_expression)
7375 (c_parser_postfix_expression)
7376 (c_parser_postfix_expression_after_primary, c_parser_expression):
7377 Use convert_lvalue_to_rvalue.
7378 (c_parser_expression_conv, c_parser_expr_list): Document
7379 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7380 (c_parser_objc_synchronized_statement): Use
7381 convert_lvalue_to_rvalue.
7382 (c_parser_objc_selector): Handle RID_ATOMIC.
7383 (c_parser_objc_receiver, c_parser_array_notation): Use
7384 convert_lvalue_to_rvalue.
7385 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7386 _Atomic (type-name).
7387 (struct c_declspecs): Add atomic_p field.
7388 (convert_lvalue_to_rvalue): Declare.
7389 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7390 corresponding atomic types.
7391 (qualify_type): Don't add _Atomic qualifiers from second argument.
7392 (comp_target_types): Do not allow _Atomic mismatches.
7393 (type_lists_compatible_p): Do not remove atomic qualifiers when
7394 comparing types.
7395 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7396 (build_atomic_assign): New functions.
7397 (build_unary_op): Use build_atomic_assign for atomic increment and
7398 decrement.
7399 (build_conditional_expr): Do not treat _Atomic void as a qualified
7400 version of void.
7401 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7402 (find_anonymous_field_with_type, convert_to_anonymous_field)
7403 (convert_for_assignment): Do not remove atomic qualifiers when
7404 comparing types.
7405 (digest_init): Do not accept initialization of arrays of atomic
7406 elements by string constants.
7407 (build_asm_expr): Use convert_lvalue_to_rvalue.
7408 (build_binary_op): Do not treat _Atomic void as a qualified
7409 version of void.
7410
0c249d4b
DD
74112013-11-06 DJ Delorie <dj@redhat.com>
7412
7413 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7414 both explicit and builtin, print the location of the explicit one.
7415
6d7f7e0a
TB
74162013-11-05 Tobias Burnus <burnus@net-b.de>
7417
7418 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7419 c_parser_omp_distribute, c_parser_omp_teams,
7420 c_parser_omp_target, c_parser_omp_declare): Handle
7421 -fopenmp-simd.
7422
b906f4ca
MP
74232013-11-03 Marek Polacek <polacek@redhat.com>
7424
7425 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7426
ee1d5a02
JJ
74272013-11-01 Jakub Jelinek <jakub@redhat.com>
7428
7429 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7430 check_dup_generic at the end, unless remove is true.
7431 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7432 remove = true;.
7433 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7434
5a9785fb
JJ
74352013-10-31 Jakub Jelinek <jakub@redhat.com>
7436
7437 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7438 with decl that is not pointer nor array.
7439
939b37da
BI
74402013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7441
7442 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7443 a spawning function is found.
7444 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7445 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7446 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7447 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7448 case.
7449 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7450 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7451 expr.
7452 (c_finish_return): Added a check to reject _Cilk_spawn in return
7453 expression.
7454 (build_cilk_spawn): New function.
7455 (build_cilk_sync): Likewise.
7456 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7457
d4af74d4
TB
74582013-10-27 Tobias Burnus <burnus@net-b.de>
7459
7460 PR other/33426
7461 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7462 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7463 (c_parser_statement_after_labels): Update calls.
7464
d73749df 74652013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7466
7467 PR other/33426
7468 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7469 Handle PRAGMA_IVDEP.
7470 (c_parser_statement_after_labels): Update call.
7471
f28aa681
MP
74722013-10-24 Marek Polacek <polacek@redhat.com>
7473
7474 * c-parser.c (c_parser_struct_declaration): Add a comment.
7475 (c_parser_declarator): Don't allow _Alignas here.
7476
0645c1a2
AM
74772013-10-17 Andrew MacLeod <amacleod@redhat.com>
7478
7479 * c-parser.c: Include omp-low.h.
7480 * c-typeck.c: Likewise.
7481
568a31f2
MP
74822013-10-17 Marek Polacek <polacek@redhat.com>
7483
7484 PR c/58267
7485 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7486 Document syntax of the array-declarator.
7487 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7488 are not permitted.
7489 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7490 (c_parser_struct_declaration): Likewise.
7491 (c_parser_declarator): Likewise.
7492 (c_parser_direct_declarator_inner): Likewise.
7493 (c_parser_parameter_declaration): Likewise.
7494 (c_parser_type_name): Likewise.
7495
acf0174b
JJ
74962013-10-11 Jakub Jelinek <jakub@redhat.com>
7497
7498 * c-lang.h (current_omp_declare_target_attribute): New extern
7499 decl.
7500 * c-parser.c: Include c-lang.h.
7501 (struct c_parser): Change tokens to c_token *.
7502 Add tokens_buf field. Change tokens_avail type to unsigned int.
7503 (c_parser_consume_token): If parser->tokens isn't
7504 &parser->tokens_buf[0], increment parser->tokens.
7505 (c_parser_consume_pragma): Likewise.
7506 (enum pragma_context): Add pragma_struct and pragma_param.
7507 (c_parser_external_declaration): Adjust
7508 c_parser_declaration_or_fndef caller.
7509 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7510 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7511 Adjust recursive call.
7512 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7513 of pragma_external.
7514 (c_parser_parameter_declaration): Use pragma_param instead of
7515 pragma_external.
7516 (c_parser_compound_statement_nostart, c_parser_label,
7517 c_parser_for_statement): Adjust
7518 c_parser_declaration_or_fndef callers.
7519 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7520 it through to c_parser_conditional_expression.
7521 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7522 pass it through to c_parser_binary_expression. Adjust recursive
7523 call.
7524 (c_parser_binary_expression): Remove prec argument, add
7525 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7526 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7527 binop matches it, use build2 instead of parser_build_binary_op.
7528 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7529 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7530 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7531 Handle pragma_struct and pragma_param the same as pragma_external.
7532 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7533 (c_parser_omp_variable_list): Parse array sections for
7534 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7535 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7536 (c_parser_omp_clause_reduction): Handle user defined reductions.
7537 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7538 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7539 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7540 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7541 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7542 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7543 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7544 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7545 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7546 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7547 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7548 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7549 (c_parser_omp_for_loop): Add CODE argument, pass it through
7550 to c_finish_omp_for. Change last argument to cclauses,
7551 and adjust uses to grab parallel clauses from the array of all
7552 the split clauses. Adjust c_parser_binary_expression,
7553 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7554 (omp_split_clauses): New function.
7555 (c_parser_omp_simd): New function.
7556 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7557 Allow the function to be called also when parsing combined constructs,
7558 and call c_parser_omp_simd when parsing for simd.
7559 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7560 #pragma omp section, require exactly one structured-block instead of
7561 sequence of statements.
7562 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7563 Allow the function to be called also when parsing combined constructs.
7564 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7565 Allow the function to be called also when parsing combined
7566 constructs.
7567 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7568 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7569 c_parser_omp_teams, c_parser_omp_target_data,
7570 c_parser_omp_target_update, c_parser_omp_target,
7571 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7572 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7573 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7574 (c_parser_omp_construct): Add p_name and mask vars. Handle
7575 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7576 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7577 and c_parser_omp_sections callers.
7578 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7579 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7580 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7581 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7582 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7583 OMP_CLAUSE_DEPEND.
7584 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7585 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7586 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7587 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7588 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7589 * c-typeck.c: Include tree-inline.h.
7590 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7591 handle_omp_array_sections_1, handle_omp_array_sections,
7592 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7593 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7594 user defined reductions.
7595 (c_tree_equal): New function.
7596 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7597 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7598 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7599 c_check_omp_declare_reduction_r): New prototypes.
7600 * c-decl.c (current_omp_declare_target_attribute): New variable.
7601 (c_decl_attributes): New function.
7602 (start_decl, start_function): Use it instead of decl_attributes.
7603 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7604 c_omp_reduction_decl, c_omp_reduction_lookup,
7605 c_check_omp_declare_reduction_r): New functions.
7606
0a6c2227
TT
76072013-09-25 Tom Tromey <tromey@redhat.com>
7608
7609 * Make-lang.in (c/gccspec.o): Remove.
7610 (CFLAGS-c/gccspec.o): New variable.
7611 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7612 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7613 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7614
f3bc55f0
TT
76152013-09-25 Tom Tromey <tromey@redhat.com>
7616
7617 * Make-lang.in (c/gccspec.o): Don't use subshell.
7618
a24d975c
MP
76192013-09-18 Marek Polacek <polacek@redhat.com>
7620
7621 PR sanitize/58443
7622 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7623 Remove unnecessary check.
7624
ce6923c5
MP
76252013-09-18 Marek Polacek <polacek@redhat.com>
7626
7627 PR sanitizer/58411
7628 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7629 no_sanitize_undefined attribute.
7630
a1e51df9
KT
76312013-09-13 Kai Tietz <ktietz@redhat.com>
7632
7633 PR target/57848
7634 * c-decl.c (c_builtin_function_ext_scope): Remove
7635 wrong assumption that it is never called on prexisting
7636 symbol.
7637
0af94e6f
JR
76382013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7639
7640 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7641
20059c8b
GDR
76422013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7643
7644 * c-objc-common.c (c_tree_printer): Tidy.
7645
de5a5fa1
MP
76462013-08-30 Marek Polacek <polacek@redhat.com>
7647
7648 * c-typeck.c (build_binary_op): Add division by zero and shift
7649 instrumentation.
7650
2531a1d9 76512013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7652 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7653
6e2bcc98 7654 PR c/35649
2531a1d9
JR
7655 * c-typeck.c (c_common_type): Prefer double_type_node over
7656 other REAL_TYPE types with the same precision.
7657 (convert_arguments): Likewise.
7658
025311c4
GDR
76592013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7660
7661 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7662 (c_initialize_diagnostics): Call a destructor for the early printer.
7663
da6ca2b5
GDR
76642013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7665
7666 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7667 printer initialization.
7668
318cda85 76692013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7670
318cda85
BI
7671 PR c/57490
7672 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7673 check for truth values.
7674 (expand_array_notation_exprs): Added truth values case. Removed an
7675 unwanted else. Added for-loop to walk through subtrees in default
7676 case.
7677
b066401f
GDR
76782013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7679
7680 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7681
fb48aadc
JM
76822013-07-23 Joseph Myers <joseph@codesourcery.com>
7683
7684 * c-parser.c (struct c_generic_association): Fix typo.
7685
433cc7b0
TT
76862013-07-23 Tom Tromey <tromey@redhat.com>
7687 Joseph Myers <joseph@codesourcery.com>
7688
7689 * c-parser.c (struct c_generic_association): New.
7690 (c_generic_association_d): New typedef.
7691 (c_parser_generic_selection): New function.
7692 (c_parser_postfix_expression): Handle RID_GENERIC.
7693
26d40c3d
JM
76942013-07-13 Jason Merrill <jason@redhat.com>
7695
7696 PR c++/57793
7697 * c-decl.c (finish_struct): Check for too-large class.
7698
ecdbd01a 76992013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7700
7701 PR c/57821
7702 * c-typeck.c (set_init_index): When folding, check for index overflow.
7703
1141ed3f
BI
77042013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7705
7706 * c-parser.c (c_parser_array_notation): Removed rejection of array
7707 notations in an array of function pointers.
7708
713b46fa
BI
77092013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7710
7711 * c-array-notation.c (make_triplet_val_inv): New function.
7712 (create_cmp_incr): Likewise.
7713 (create_array_refs): Likewise.
7714 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7715 Also modularized common parts between functions and called the function.
7716 (build_array_notation_expr): Likewise.
7717 (fix_conditional_array_notations_1): Likewise.
7718 (fix_array_notation_expr): Likewise.
7719 (fix_array_notation_call_expr): Likewise.
7720
92f20202
MP
77212013-06-18 Marek Polacek <polacek@redhat.com>
7722
7723 PR c/57630
7724 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7725
73a23b06
BI
77262013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7727
7728 * c-array-notation.c (build_array_notation_expr): Reject array notation
7729 mismatch between LHS and RHS even inside a call_expr. Also, removed
7730 a couple while statements that were dead code.
7731
00b8517d
BI
77322013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7733
7734 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7735 excessive precision expressions in function parameters. Also removed
7736 couple unwanted while statements.
7737
1509bdda
BI
77382013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7739
7740 * c-array-notation.c (expand_array_notation_exprs): Added
7741 ARRAY_NOTATION_REF case.
ab20d992 7742
d60f1706
BI
77432013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7744
7745 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7746 function to c-family/array-notation-common.c.
7747 (is_cilkplus_reduce_builtin): Likewise.
7748 (find_rank): Likewise.
7749 (extract_array_notation_exprs): Likewise.
7750 (replace_array_notations): Likewise.
7751 (find_inv_trees): Likewise.
7752 (replace_inv_trees): Likewise.
7753 (contains_array_notation_expr): Likewise.
7754 (find_correct_array_notation_type): Likewise.
7755 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7756 (struct inv_list): Moved this to c-family/array-notation-common.c.
7757 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7758
6d6efbb3
BI
77592013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7760
7761 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7762 reduction functions outside the for-loop. Added a check if the fundecl
7763 is non-NULL. Finally, removed an unwanted if-statement, and made the
7764 body unconditional.
7765
25c22937
BI
77662013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7767
7768 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7769 condition of the if-statement matches the rank of else-block and then-
7770 block when array notations are used.
7771 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7772 expression after the entire function body is parsed.
7773 (c_parser_expr_no_commas): Delayed creating array notation expressions
7774 to the end of function parsing.
7775 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7776 whole if-statement instead of just the condition.
ab20d992 7777 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7778
edd25645
BI
77792013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7780
7781 PR c/57474
7782 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7783 array to NULL_TREE if they are unused. Also added a check for the
7784 field to be NULL before its fields are used in future.
ab20d992 7785
065ce7f1
RO
77862013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7787
7788 PR bootstrap/57450
7789 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7790 (build_array_notation_expr): Likewise.
7791
36536d79
BI
77922013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7793
7794 * c-typeck.c (build_array_ref): Added a check to see if array's
7795 index is greater than one. If true, then emit an error.
7796 (build_function_call_vec): Exclude error reporting and checking
7797 for builtin array-notation functions.
7798 (convert_arguments): Likewise.
7799 (c_finish_return): Added a check for array notations as a return
7800 expression. If true, then emit an error.
7801 (c_finish_loop): Added a check for array notations in a loop
7802 condition. If true then emit an error.
7803 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7804 (build_binary_op): Added a check for array notation expr inside
7805 op1 and op0. If present, we call another function to find correct
7806 type.
7807 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7808 * c-parser.c (c_parser_compound_statement): Check if array
7809 notation code is used in tree, if so, then transform them into
7810 appropriate C code.
7811 (c_parser_expr_no_commas): Check if array notation is used in LHS
7812 or RHS, if so, then build array notation expression instead of
7813 regular modify.
7814 (c_parser_postfix_expression_after_primary): Added a check for
7815 colon(s) after square braces, if so then handle it like an array
7816 notation. Also, break up array notations in unary op if found.
7817 (c_parser_direct_declarator_inner): Added a check for array
7818 notation.
7819 (c_parser_compound_statement): Added a check for array notation in
7820 a stmt. If one is present, then expand array notation expr.
7821 (c_parser_if_statement): Likewise.
7822 (c_parser_switch_statement): Added a check for array notations in
7823 a switch statement's condition. If true, then output an error.
7824 (c_parser_while_statement): Similarly, but for a while.
7825 (c_parser_do_statement): Similarly, but for a do-while.
7826 (c_parser_for_statement): Similarly, but for a for-loop.
7827 (c_parser_unary_expression): Check if array notation is used in a
7828 pre-increment or pre-decrement expression. If true, then expand
7829 them.
7830 (c_parser_array_notation): New function.
7831 * c-array-notation.c: New file.
7832 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7833
cd192ccc
MS
78342013-05-23 Mike Stump <mikestump@comcast.net>
7835
7836 * c-typeck.c (convert_for_assignment): Handle references to memory
7837 spaces better.
7838
427b248d
JM
78392013-05-16 Jason Merrill <jason@redhat.com>
7840
7841 * Make-lang.in (cc1$(exeext)): Use link mutex.
7842
44d90fe1
PC
78432013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7844
7845 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7846 to simply use OPT_Wpointer_arith.
7847 (build_unary_op): Likewise.
7848
4e7d7b3d
JJ
78492013-04-03 Jakub Jelinek <jakub@redhat.com>
7850
7851 PR c/19449
7852 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7853 argument. If set, or it temporarily for parsing of the first
7854 argument into force_folding_builtin_constant_p.
7855 (c_parser_postfix_expression): Adjust callers.
7856
839b422f
RB
78572013-03-21 Richard Biener <rguenther@suse.de>
7858
7859 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7860 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7861
2ee028f1
MP
78622013-02-12 Marek Polacek <polacek@redhat.com>
7863
7864 PR c/44938
7865 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7866 origtypes to NULL.
7867
8824edff
JJ
78682013-01-24 Jakub Jelinek <jakub@redhat.com>
7869
7870 PR c/56078
7871 * c-typeck.c (set_nonincremental_init_from_string): If
7872 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7873 returned false.
7874 (process_init_element): Likewise.
7875
eadd3d0d
JJ
78762012-12-20 Jakub Jelinek <jakub@redhat.com>
7877
7878 PR c++/55619
7879 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7880 argument, don't call default_function_array_conversion
7881 nor c_fully_fold here.
7882 (c_parser_asm_statement): Adjust callers.
7883 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7884 and outputs here, and call default_function_array_conversion
7885 on inputs that don't need to be addressable.
7886
f8a93a2e
JJ
78872012-12-18 Jakub Jelinek <jakub@redhat.com>
7888
7889 PR c/39464
7890 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7891 warning require that both c_common_unsigned_type as well as
7892 c_common_signed_type is the same for both mvl and mvr types.
7893
9771b263
DN
78942012-11-16 Diego Novillo <dnovillo@google.com>
7895
7896 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7897
7898 * c-common.c: Use new vec API in vec.h.
7899 * c-common.h: Likewise.
7900 * c-gimplify.c: Likewise.
7901 * c-pragma.c: Likewise.
7902 * c-pretty-print.c: Likewise.
7903 * c-pretty-print.h: Likewise.
7904 * c-semantics.c: Likewise.
7905 * c-decl.c: Likewise.
7906 * c-parser.c: Likewise.
7907 * c-tree.h: Likewise.
7908 * c-typeck.c: Likewise.
7909
880661a4
JW
79102012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7911
7912 PR c++/54930
7913 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7914
077d1abe
MLI
79152012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7916
7917 PR c/53066
7918 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7919 shadows a function, unless the variable is a function or a
7920 pointer-to-function.
7921
3a785c97
JJ
79222012-10-12 Jakub Jelinek <jakub@redhat.com>
7923
7924 PR c/54381
7925 * c-parser.c (struct c_tree_loc_pair): Removed.
7926 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7927 add location_t * and tree * arguments, fill in array of 3
7928 sizeof_arg trees and corresponding locs.
7929 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7930 c_parser_expr_list callers.
7931 (c_parser_postfix_expression_after_primary): Likewise. Pass
7932 array of 3 sizeof_arg trees and locs (corresponding to first
7933 3 arguments) to sizeof_pointer_memaccess_warning.
7934
703c8606
LC
79352012-10-09 Lawrence Crowl <crowl@google.com>
7936
7937 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7938 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7939 hash table.
7940
5d9de0d0
PC
79412012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7942
7943 PR c++/54194
7944 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7945 call.
7946
a212e43f
MG
79472012-10-09 Marc Glisse <marc.glisse@inria.fr>
7948
7949 PR c++/54427
7950 * c-typeck.c: Include c-common.h.
7951 (enum stv_conv): Moved to c-common.h.
7952 (scalar_to_vector): Moved to c-common.c.
7953 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7954 * Make-lang.in: c-typeck.c depends on c-common.h.
7955
3b78de56
AC
79562012-10-04 Arnaud Charlet <charlet@adacore.com>
7957
7958 * c-decl.c (c_write_global_declarations): Fix handling of
7959 -fdump-ada-spec*.
7960
78c60e3d
SS
79612012-09-30 Sharad Singhai <singhai@google.com>
7962
7963 * c-decl.c (c_write_global_declarations): Use a different method
7964 to determine if the dump has ben initialized.
7965
9f33203d
JM
79662012-09-14 Joseph Myers <joseph@codesourcery.com>
7967
7968 PR c/54552
7969 * c-typeck.c (c_cast_expr): When casting to a type requiring
7970 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7971 c_fully_fold first.
7972
a27d595d
JM
79732012-09-14 Joseph Myers <joseph@codesourcery.com>
7974
7975 PR c/54103
7976 * c-typeck.c (build_unary_op): Pass original argument of
7977 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7978 any C_MAYBE_CONST_EXPR, if it has integer operands.
7979 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7980 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7981 to c_objc_common_truthvalue_conversion, then remove any
7982 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7983 c_objc_common_truthvalue_conversion not
7984 c_common_truthvalue_conversion.
7985 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7986 call note_integer_operands for arguments with integer operands
7987 that are not integer constants.
7988
9feb29df
JJ
79892012-09-13 Jakub Jelinek <jakub@redhat.com>
7990
7991 PR c/54559
7992 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7993 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7994
d409320c
JJ
79952012-08-31 Jakub Jelinek <jakub@redhat.com>
7996
7997 PR c/54428
7998 * c-convert.c (convert): Don't call fold_convert_loc if
7999 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8000 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8001 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8002
6265d07c
JJ
80032012-08-24 Jakub Jelinek <jakub@redhat.com>
8004
8005 PR c/54355
8006 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8007 for nested and empty_ok arguments in the call to
8008 c_parser_declaration_or_fndef.
8009
1a4049e7
JJ
80102012-08-17 Jakub Jelinek <jakub@redhat.com>
8011
8012 * c-tree.h (c_last_sizeof_arg): Declare.
8013 * c-parser.c (struct c_tree_loc_pair): New type.
8014 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8015 non-NULL.
8016 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8017 (c_parser_postfix_expression_after_primary): Likewise. Call
8018 sizeof_pointer_memaccess_warning if needed.
8019 (sizeof_ptr_memacc_comptypes): New function.
8020 * c-typeck.c (c_last_sizeof_arg): New global variable.
8021 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8022
0229aee9
UB
80232012-07-24 Uros Bizjak <ubizjak@gmail.com>
8024
8025 * c-lang.h (lang_decl): Add variable_size GTY option.
8026
7ee2468b
SB
80272012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8028
8029 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8030 * Make-lang.in: Fix dependencies.
8031
d4a10d0a
SB
80322012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8033
8034 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8035 and add language Makefile hooks.
8036 * config-lang.in: New file.
8037 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8038 add the required "normal" config-lang.in rules.
8039 * c-lang.h: Moved from gcc/ to here.
8040 * c-tree.h: Likewise.
8041 * c-objc-common.c: Likewise.
8042 * c-objc-common.h: Likewise.
8043 * c-typeck.c: Likewise.
8044 * c-convert.c: Likewise.
8045 * c-lang.c: Likewise.
8046 * c-aux-info.c: Likewise.
8047 * c-errors.c: Likewise.
8048 * gccspec.c: Likewise.
8049 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8050 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8051\f
c48514be 8052Copyright (C) 2012-2021 Free Software Foundation, Inc.
d4a10d0a
SB
8053
8054Copying and distribution of this file, with or without modification,
8055are permitted in any medium without royalty provided the copyright
8056notice and this notice are preserved.