]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/c/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c / ChangeLog
1 2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
2
3 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
4 orphan loop" checking.
5
6 2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
7 Thomas Schwinge <thomas@codesourcery.com>
8
9 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
10 OpenACC gang reductions.
11
12 2021-11-30 Richard Biener <rguenther@suse.de>
13
14 * gimple-parser.c (c_parser_gimple_postfix_expression):
15 avoid unreachable code after break.
16
17 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
18
19 PR other/103021
20 * Make-lang.in: Use ETAGS variable in TAGS target.
21
22 2021-11-29 Richard Biener <rguenther@suse.de>
23
24 * c-typeck.c (c_tree_equal): Remove unreachable return.
25 * c-parser.c (get_matching_symbol): Likewise.
26
27 2021-11-23 Jakub Jelinek <jakub@redhat.com>
28
29 * c-typeck.c (c_clone_omp_udr): Don't initialize
30 id.transform_lang_insert_block.
31
32 2021-11-19 Martin Sebor <msebor@redhat.com>
33
34 PR c++/33925
35 PR c/102867
36 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
37 code resulting from macro expansion.
38
39 2021-11-19 Martin Liska <mliska@suse.cz>
40
41 Revert:
42 2021-11-19 Martin Liska <mliska@suse.cz>
43
44 * c-parser.c (add_debug_begin_stmt): Use option directly.
45
46 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
47
48 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
49 * c-parser.c (c_parser_postfix_expression): Likewise.
50
51 2021-11-18 Martin Liska <mliska@suse.cz>
52
53 * c-parser.c (add_debug_begin_stmt): Use option directly.
54
55 2021-11-17 Martin Sebor <msebor@redhat.com>
56
57 PR c/101702
58 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
59 bounds before deciding if they're constant.
60
61 2021-11-15 Jakub Jelinek <jakub@redhat.com>
62
63 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
64 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
65
66 2021-11-11 Jakub Jelinek <jakub@redhat.com>
67
68 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
69 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
70 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
71 OMP_CLAUSE_NUM_TEAMS_EXPR.
72 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
73 combined target teams even lower-bound expression.
74
75 2021-11-11 Richard Biener <rguenther@suse.de>
76
77 * gimple-parser.c: Shuffle bitmap.h include.
78
79 2021-11-03 Joseph Myers <joseph@codesourcery.com>
80
81 PR c/103031
82 * c-convert.c (c_convert): New function, based on convert.
83 (convert): Make into wrapper of c_convert.
84 (convert_init): New function.
85 * c-typeck.c (enum impl_conv): Add ic_init_const.
86 (convert_for_assignment): Handle ic_init_const like ic_init. Add
87 new argument to convert_and_check call.
88 (digest_init): Pass ic_init_const to convert_for_assignment for
89 initializers required to be constant.
90
91 2021-11-02 Richard Sandiford <richard.sandiford@arm.com>
92
93 * c-tree.h (c_simulate_record_decl): Declare.
94 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
95 * c-decl.c (c_simulate_record_decl): New function.
96
97 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
98
99 PR other/102663
100 * Make-lang.in: Add dummy c.install-dvi target.
101
102 2021-10-15 Richard Biener <rguenther@suse.de>
103
104 PR c/102763
105 * gimple-parser.c
106 (c_parser_gimple_postfix_expression_after_primary): Check
107 for a pointer do be dereferenced by ->.
108
109 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
110
111 * c-parser.c (c_finish_omp_declare_variant): Change call from
112 c_omp_check_context_selector to omp_check_context_selector. Change
113 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
114
115 2021-10-09 Jakub Jelinek <jakub@redhat.com>
116
117 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
118 (c_parser_omp_scan_loop_body): Use it.
119 (c_parser_omp_sections_scope): Likewise.
120
121 2021-10-07 Richard Biener <rguenther@suse.de>
122
123 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
124
125 2021-10-05 Richard Biener <rguenther@suse.de>
126
127 PR c/102605
128 * gimple-parser.c (c_parser_gimple_postfix_expression):
129 Accept more address _Literals.
130
131 2021-10-04 Marek Polacek <polacek@redhat.com>
132
133 PR c++/97573
134 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
135
136 2021-10-01 Martin Sebor <msebor@redhat.com>
137
138 PR c/102103
139 * c-typeck.c (maybe_warn_for_null_address): New function.
140 (build_binary_op): Call it.
141
142 2021-10-01 Jakub Jelinek <jakub@redhat.com>
143 Richard Biener <rguenther@suse.de>
144
145 PR sanitizer/102515
146 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
147 for division even for SANITIZE_SI_OVERFLOW.
148
149 2021-10-01 Jakub Jelinek <jakub@redhat.com>
150
151 * c-parser.c (c_parser_omp_clause_order): Set
152 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
153
154 2021-09-28 Andrew Pinski <apinski@marvell.com>
155
156 PR c/32122
157 * c-parser.c (c_parser_statement_after_labels): Pass
158 the c_expr instead of the tree to c_finish_goto_ptr.
159 * c-typeck.c (c_finish_goto_ptr): Change the second
160 argument type to c_expr.
161 * c-tree.h (c_finish_goto_ptr): Likewise.
162 Error out if the expression was not of a pointer type.
163
164 2021-09-22 Jakub Jelinek <jakub@redhat.com>
165
166 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
167 modifiers.
168
169 2021-09-18 Jakub Jelinek <jakub@redhat.com>
170
171 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
172 and reproducible modifiers.
173 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
174
175 2021-09-18 Jakub Jelinek <jakub@redhat.com>
176
177 * c-parser.c (c_parser_omp_clause_default): Handle private and
178 firstprivate arguments, adjust diagnostics on unknown argument.
179
180 2021-09-17 Jakub Jelinek <jakub@redhat.com>
181
182 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
183 is true.
184
185 2021-09-10 Jakub Jelinek <jakub@redhat.com>
186
187 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
188 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
189 don't call build_conditional_expr, instead build a COND_EXPR directly.
190 (c_parser_binary_expression): Avoid calling parser_build_binary_op
191 if omp_atomic_lhs even in more cases for >, < or ==.
192 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
193 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
194 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
195 * c-typeck.c (build_binary_op): For flag_openmp only handle
196 MIN_EXPR/MAX_EXPR.
197
198 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
199
200 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
201 directive.
202
203 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
204
205 * c-decl.c (enum deprecated_states): Add unavailable state.
206 (merge_decls): Copy unavailability.
207 (quals_from_declspecs): Handle unavailable case.
208 (start_decl): Amend the logic handling suppression of nested
209 deprecation states to include unavailability.
210 (smallest_type_quals_location): Amend comment.
211 (grokdeclarator): Handle the unavailable deprecation state.
212 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
213 * c-tree.h (struct c_declspecs): Add unavailable_p.
214 * c-typeck.c (build_component_ref): Handle unavailability.
215 (build_external_ref): Likewise.
216
217 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
218 Joseph Myers <joseph@codesourcery.com>
219
220 PR c/79412
221 * c-decl.c (duplicate_decls): On significant mismatches, mark the
222 types of both (non-function) decls as error_mark_node, so that the
223 middle-end can see the code is malformed.
224 (free_attr_access_data): Don't process if the type has been set to
225 error_mark_node.
226
227 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
228
229 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
230 and 'ancestor' in 'target device' clauses.
231
232 2021-08-23 Jakub Jelinek <jakub@redhat.com>
233
234 * c-parser.c (c_parser_omp_clause_num_tasks,
235 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
236
237 2021-08-22 Martin Uecker <muecker@gwdg.de>
238
239 PR c/98397
240 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
241 for pointers to arrays with qualifiers.
242 (build_conditional_expr): For C23 don't lose qualifiers for pointers
243 to arrays when the other pointer is a void pointer. Update warnings.
244 (convert_for_assignment): Update warnings for C2X when converting from
245 void* with qualifiers to a pointer to array with the same qualifiers.
246
247 2021-08-20 Jakub Jelinek <jakub@redhat.com>
248
249 * c-parser.c (c_parser_omp_error): New function.
250 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
251
252 2021-08-20 Jakub Jelinek <jakub@redhat.com>
253
254 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
255 comma at the end of list.
256 (c_parser_omp_requires): Likewise.
257
258 2021-08-19 Jakub Jelinek <jakub@redhat.com>
259
260 * c-parser.c (c_parser_omp_requires): Don't call
261 c_parser_peek_2nd_token and optionally consume token if current
262 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
263
264 2021-08-18 Jakub Jelinek <jakub@redhat.com>
265
266 * c-parser.c (c_parser_omp_nothing): New function.
267 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
268
269 2021-08-18 Jakub Jelinek <jakub@redhat.com>
270
271 * c-parser.c (c_parser_statement_after_labels): Add restart label
272 near the start of the function. If c_parser_pragma returns false,
273 goto restart.
274 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
275 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
276 return what c_parser_omp_declare returned. Return true instead of
277 false after emitting errors that the directive is not allowed in
278 pragma_stmt context.
279 (c_parser_omp_ordered): Return true instead of
280 false after emitting errors that the directive is not allowed in
281 pragma_stmt context.
282 (c_parser_omp_target_update): Likewise.
283 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
284 Change return type from tree to bool, return false if the
285 directive should be ignored in pragma_stmt contexts.
286 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
287 return their result directly.
288 (c_parser_omp_cancellation_point): Change return type from void to
289 bool, return false if the directive should be ignored in pragma_stmt
290 contexts.
291 (c_parser_omp_declare): Likewise.
292
293 2021-08-17 Jakub Jelinek <jakub@redhat.com>
294
295 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
296 (c_parser_omp_scope): New function.
297 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
298
299 2021-08-12 Jakub Jelinek <jakub@redhat.com>
300
301 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
302 (c_parser_omp_clause_filter): New function.
303 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
304 (OMP_MASKED_CLAUSE_MASK): Define.
305 (c_parser_omp_masked): New function.
306 (c_parser_omp_parallel): Handle parallel masked.
307 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
308 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
309
310 2021-08-12 Martin Uecker <muecker@gwdg.de>
311
312 PR c/101838
313 PR c/29970
314 * c-typeck.c (c_expr_sizeof_type): Evaluate
315 size expressions for structs of variable size.
316
317 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
318
319 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
320 'primary' as alias for 'master'.
321
322 2021-08-10 Martin Uecker <muecker@gwdg.de>
323
324 PR c/29970
325 * c-typeck.c (c_expr_sizeof_expr): Evaluate
326 size expressions for structs of variable size.
327
328 2021-08-06 Tamar Christina <tamar.christina@arm.com>
329
330 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
331 * c-tree.h (c_simulate_enum_decl): Likewise.
332
333 2021-08-06 Martin Sebor <msebor@redhat.com>
334
335 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
336 vec arguments to by-reference.
337 (c_finish_omp_declare_simd): Same.
338 (c_parser_compound_statement_nostart): Same.
339 (c_parser_for_statement): Same.
340 (c_parser_objc_methodprotolist): Same.
341 (c_parser_oacc_routine): Same.
342 (c_parser_omp_for_loop): Same.
343 (c_parser_omp_declare_simd): Same.
344
345 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
346 Joseph Myers <joseph@codesourcery.com>
347 Cesar Philippidis <cesar@codesourcery.com>
348
349 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
350 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
351 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
352 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
353
354 2021-07-20 Martin Sebor <msebor@redhat.com>
355
356 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
357 by-const-reference.
358 * c-typeck.c (c_build_function_call_vec): Same.
359
360 2021-07-15 Martin Sebor <msebor@redhat.com>
361
362 PR c/101289
363 PR c/97548
364 * c-decl.c (get_parm_array_spec): Strip nops.
365
366 2021-07-06 Martin Sebor <msebor@redhat.com>
367
368 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
369
370 2021-07-02 Jakub Jelinek <jakub@redhat.com>
371
372 PR c/101297
373 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
374 appears before a CPP_NAME.
375
376 2021-06-25 Martin Sebor <msebor@redhat.com>
377
378 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
379 warning_suppressed_p, suppress_warning, and copy_no_warning.
380 (diagnose_mismatched_decls): Same.
381 (duplicate_decls): Same.
382 (grokdeclarator): Same.
383 (finish_function): Same.
384 (c_write_global_declarations_1): Same.
385 * c-fold.c (c_fully_fold_internal): Same.
386 * c-parser.c (c_parser_expr_no_commas): Same.
387 (c_parser_postfix_expression): Same.
388 * c-typeck.c (array_to_pointer_conversion): Same.
389 (function_to_pointer_conversion): Same.
390 (default_function_array_conversion): Same.
391 (convert_lvalue_to_rvalue): Same.
392 (default_conversion): Same.
393 (build_indirect_ref): Same.
394 (build_function_call_vec): Same.
395 (build_atomic_assign): Same.
396 (build_unary_op): Same.
397 (c_finish_return): Same.
398 (emit_side_effect_warnings): Same.
399 (c_finish_stmt_expr): Same.
400 (c_omp_clause_copy_ctor): Same.
401
402 2021-06-24 Jakub Jelinek <jakub@redhat.com>
403
404 PR c/101176
405 * c-parser.c (c_parser_has_attribute_expression): Set source range for
406 the result.
407
408 2021-06-24 Jakub Jelinek <jakub@redhat.com>
409
410 PR c/101171
411 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
412 error_mark_node.
413
414 2021-06-24 Jakub Jelinek <jakub@redhat.com>
415
416 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
417 C_ORT_OMP for clauses on target construct.
418 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
419 (c_parser_omp_target): For non-combined target add
420 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
421 C_ORT_OMP_TARGET to c_finish_omp_clauses.
422 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
423 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
424 never present on C_ORT_*DECLARE_SIMD.
425 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
426 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
427 corresponding map clauses.
428
429 2021-06-21 Jakub Jelinek <jakub@redhat.com>
430
431 PR inline-asm/100785
432 * c-typeck.c (c_mark_addressable): Diagnose trying to make
433 bit-fields addressable.
434
435 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
436
437 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
438 similar.
439
440 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
441
442 PR c/100913
443 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
444 var in the error case.
445
446 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
447
448 PR c/100920
449 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
450 spot built-in functions.
451
452 2021-06-06 Jakub Jelinek <jakub@redhat.com>
453
454 PR c/100902
455 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
456 even when target is combined with other constructs.
457
458 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
459
460 PR c/100920
461 * c-decl.c (finish_struct): Fix thinko in previous change.
462 * c-typeck.c (convert_for_assignment): Do not warn on pointer
463 assignment and initialization for storage order purposes if the
464 RHS is a call to a DECL_IS_MALLOC function.
465
466 2021-06-04 Martin Sebor <msebor@redhat.com>
467
468 PR c/100783
469 * c-objc-common.c (print_type): Handle erroneous types.
470
471 2021-06-03 Jakub Jelinek <jakub@redhat.com>
472
473 PR c++/100859
474 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
475 after depend only cases.
476
477 2021-05-31 Richard Biener <rguenther@suse.de>
478
479 PR c++/88601
480 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
481 * c-parser.c (c_parser_postfix_expression): Likewise.
482
483 2021-05-28 Richard Biener <rguenther@suse.de>
484
485 PR c/100803
486 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
487 invalid if conditions.
488
489 2021-05-28 Jakub Jelinek <jakub@redhat.com>
490
491 PR middle-end/99928
492 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
493 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
494 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
495 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
496 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
497 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
498 if present in map_head, map_field_head or map_firstprivate_head
499 bitmaps.
500
501 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
502
503 * c-parser.c (c_parser_omp_clause_affinity): New.
504 (c_parser_omp_clause_name, c_parser_omp_variable_list,
505 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
506 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
507 c_finish_omp_clauses): Likewise.
508
509 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
510
511 PR c/100653
512 * c-decl.c (finish_struct): Warn for a union containing an aggregate
513 field with a differing scalar storage order.
514
515 2021-05-21 Jakub Jelinek <jakub@redhat.com>
516
517 PR middle-end/99928
518 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
519 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
520 if a decl is mentioned both in map clause and in such firstprivate
521 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
522
523 2021-05-19 Jakub Jelinek <jakub@redhat.com>
524
525 PR middle-end/99928
526 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
527 master when combined with taskloop.
528 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
529 parallel master when not combined with taskloop.
530
531 2021-05-18 Richard Biener <rguenther@suse.de>
532
533 PR c/100522
534 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
535 Diagnose calls to non-functions.
536 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
537
538 2021-05-17 Richard Biener <rguenther@suse.de>
539
540 PR c/100625
541 * gimple-parser.c (c_parser_gimple_label): Avoid building
542 a GIMPLE label with NULL label decl.
543
544 2021-05-13 Martin Sebor <msebor@redhat.com>
545
546 PR c/100550
547 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
548
549 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
550
551 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
552 'close'.
553
554 2021-05-10 Martin Liska <mliska@suse.cz>
555
556 * c-aux-info.c (affix_data_type): Use startswith
557 function instead of strncmp.
558 * c-typeck.c (build_function_call_vec): Likewise.
559 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
560
561 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
562
563 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
564 on the address of a pointer field in a record with reverse SSO.
565
566 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
567
568 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
569 for || and && reductions.
570
571 2021-04-29 Joseph Myers <joseph@codesourcery.com>
572
573 * c-typeck.c (function_types_compatible_p): For C2X, treat
574 unprototyped function as compatible with non-variadic prototyped
575 function even if some argument types are changed by the default
576 argument promotions.
577
578 2021-04-15 Martin Sebor <msebor@redhat.com>
579
580 PR c/99420
581 PR c/99972
582 * c-decl.c (pushdecl): Always propagate type attribute.
583
584 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
585
586 PR c/98852
587 * c-typeck.c (c_common_type): Do not drop attributes that
588 affect type identity.
589
590 2021-04-10 Jakub Jelinek <jakub@redhat.com>
591
592 PR c/99990
593 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
594 error_mark_node.
595
596 2021-03-25 Jakub Jelinek <jakub@redhat.com>
597
598 PR c++/99565
599 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
600 to operand_equal_p.
601
602 2021-03-19 Jakub Jelinek <jakub@redhat.com>
603
604 PR c/99588
605 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
606 with modifycode NOP_EXPR produces and mark the _Atomic var as read
607 if found.
608 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
609 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
610 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
611
612 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
613
614 PR c++/99509
615 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
616 ensure that the varpool node is marked as offloadable.
617
618 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
619
620 PR c/99137
621 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
622
623 2021-02-24 Martin Sebor <msebor@redhat.com>
624
625 PR middle-end/97172
626 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
627
628 2021-02-18 Jakub Jelinek <jakub@redhat.com>
629
630 PR c/99136
631 * c-typeck.c (c_finish_return): Don't wrap retval into
632 EXCESS_PRECISION_EXPR in functions that return void.
633
634 2021-02-11 Marek Polacek <polacek@redhat.com>
635
636 * c-parser.c (c_parser_if_statement): Use vec_free.
637
638 2021-02-04 Martin Sebor <msebor@redhat.com>
639
640 PR c/97882
641 * c-decl.c (locate_old_decl): Add type to diagnostic output.
642 (diagnose_mismatched_decls): Same.
643 (start_function): Introduce temporaries for better readability.
644 * c-typeck.c (comptypes_internal): Only consider complete enum
645 types in comparisons with integers.
646
647 2021-02-01 Martin Sebor <msebor@redhat.com>
648
649 PR middle-end/97172
650 * c-decl.c (free_attr_access_data): New function.
651 (c_parse_final_cleanups): Call free_attr_access_data.
652
653 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
654
655 * c-parser.c (c_parser_omp_clause_detach): New.
656 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
657 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
658 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
659 clause. Prevent use of detach with mergeable and overriding the
660 data sharing mode of the event handle.
661
662 2021-01-15 Jakub Jelinek <jakub@redhat.com>
663
664 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
665 unqualified element type and then call c_build_qualified_type on the
666 ARRAY_TYPE.
667
668 2021-01-07 Richard Biener <rguenther@suse.de>
669
670 * gimple-parser.c (c_parser_gimple_compound_statement): Only
671 reallocate loop array if it is too small.
672
673 2020-12-16 Martin Uecker <muecker@gwdg.de>
674
675 PR c/98047
676 * c-typeck.c (build_modify_expr): Drop qualifiers.
677
678 2020-12-16 Martin Uecker <muecker@gwdg.de>
679
680 PR c/98260
681 * c-parser.c (c_parser_expression): Look into
682 nop expression when marking expressions as read.
683
684 2020-12-14 Martin Liska <mliska@suse.cz>
685
686 PR sanitizer/98204
687 * c-typeck.c (pointer_diff): Do not emit a top-level
688 sanitization.
689 (build_binary_op): Likewise.
690
691 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
692
693 * c-parser.c (c_parser_omp_allocate): New.
694 (c_parser_omp_construct): Call it.
695
696 2020-12-09 Richard Biener <rguenther@suse.de>
697
698 PR c/98200
699 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
700 early on error.
701
702 2020-12-07 Martin Uecker <muecker@gwdg.de>
703
704 PR c/97981
705 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
706 that drops qualifiers to the end of the function.
707
708 2020-11-26 Martin Uecker <muecker@gwdg.de>
709
710 PR c/65455
711 PR c/92935
712 * c-parser.c (c_parser_declaration_or_fndef): Remove
713 redundant code to drop qualifiers of _Atomic types for __auto_type.
714 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
715 types for __typeof__.
716
717 2020-11-24 Jakub Jelinek <jakub@redhat.com>
718
719 PR c/97958
720 * c-parser.c (c_parser_binary_expression): For omp atomic binary
721 expressions, use make_node instead of build2 to avoid checking build2
722 performs.
723
724 2020-11-23 Joseph Myers <joseph@codesourcery.com>
725
726 PR c/95630
727 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
728 for comparisons of complete and incomplete pointers.
729
730 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
731
732 * c-aux-info.c (gen_type): Support opaque types.
733
734 2020-11-20 Martin Sebor <msebor@redhat.com>
735
736 PR middle-end/97879
737 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
738
739 2020-11-20 Jakub Jelinek <jakub@redhat.com>
740
741 PR other/97911
742 * Make-lang.in (c.serial): Change from goal to a variable.
743 (.PHONY): Drop c.serial.
744
745 2020-11-20 Martin Uecker <muecker@gwdg.de>
746
747 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
748
749 2020-11-19 Jakub Jelinek <jakub@redhat.com>
750
751 PR c/97860
752 * c-decl.c (get_parm_array_spec): Bail out of nelts is
753 error_operand_p.
754
755 2020-11-18 Jakub Jelinek <jakub@redhat.com>
756
757 * Make-lang.in (c.serial): New goal.
758 (.PHONY): Add c.serial c.prev.
759 (cc1$(exeext)): Call LINK_PROGRESS.
760
761 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
762
763 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
764 goto too.
765 * c-typeck.c (build_asm_expr): Remove an assert checking output
766 absence for asm goto.
767
768 2020-11-13 Jakub Jelinek <jakub@redhat.com>
769
770 * c-typeck.c (c_finish_omp_clauses): Don't clear
771 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
772
773 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
774
775 PR objc/77404
776 * c-parser.c (c_parser_objc_class_definition): Pass the
777 location of the class name to the interface declaration.
778
779 2020-11-10 Strager Neds <strager.nds@gmail.com>
780
781 * c-decl.c (merge_decls): Use new overload of
782 set_decl_section_name.
783
784 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
785
786 * c-parser.c (c_parser_omp_target_data): Add use of
787 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
788 handled map clause kind.
789 (c_parser_omp_target_enter_data): Likewise.
790 (c_parser_omp_target_exit_data): Likewise.
791 (c_parser_omp_target): Likewise.
792 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
793 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
794 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
795 same struct field access to co-exist on OpenMP construct.
796
797 2020-11-07 Martin Uecker <muecker@gwdg.de>
798
799 * c-parser.c (c_parser_label): Implement mixing of labels and code.
800 (c_parser_all_labels): Likewise.
801
802 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
803
804 * c-parser.c (c_parser_objc_at_property_declaration):
805 Improve parsing fidelity. Associate better location info
806 with @property attributes. Clean up the interface to
807 objc_add_property_declaration ().
808
809 2020-11-06 Nathan Sidwell <nathan@acm.org>
810
811 * c-decl.c (diagnose_mismatched_decls): Rename
812 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
813 (warn_if_shadowing, implicitly_declare, names_builtin_p)
814 (collect_source_refs): Likewise.
815 * c-typeck.c (inform_declaration, inform_for_arg)
816 (convert_for_assignment): Likewise.
817
818 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
819
820 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
821 OpenACC matching.
822 (c_parser_omp_construct): Update call.
823
824 2020-11-04 Jakub Jelinek <jakub@redhat.com>
825
826 PR c++/97670
827 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
828 find underlying decl to clear in the aligned_head bitmap.
829
830 2020-11-04 Joseph Myers <joseph@codesourcery.com>
831
832 * c-decl.c (handle_nodiscard_attribute): New.
833 (std_attribute_table): Add nodiscard.
834 * c-parser.c (c_parser_std_attribute): Expect argument to
835 nodiscard attribute to be a string. Do not special-case ignoring
836 nodiscard.
837 * c-typeck.c (maybe_warn_nodiscard): New.
838 (build_compound_expr, emit_side_effect_warnings): Call
839 maybe_warn_nodiscard.
840 (c_process_expr_stmt, c_finish_stmt_expr): Also call
841 emit_side_effect_warnings if warn_unused_result.
842
843 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
844
845 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
846 with XDELETE.
847 (finish_init): Likewise.
848 (pop_init_level): Likewise.
849
850 2020-10-28 Joseph Myers <joseph@codesourcery.com>
851
852 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
853 error_at for omitted parameter name.
854
855 2020-10-28 Jakub Jelinek <jakub@redhat.com>
856
857 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
858 (c_parser_omp_clause_allocate): New function.
859 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
860 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
861 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
862 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
863 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
864 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
865 PRAGMA_OMP_CLAUSE_ALLOCATE.
866 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
867
868 2020-10-27 Joseph Myers <joseph@codesourcery.com>
869
870 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
871 standard attributes.
872
873 2020-10-23 Marek Polacek <polacek@redhat.com>
874
875 PR c++/91741
876 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
877 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
878 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
879 * c-tree.h (char_type_p): Declare.
880 * c-typeck.c (char_type_p): No longer static.
881
882 2020-10-23 Martin Sebor <msebor@redhat.com>
883
884 PR middle-end/97552
885 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
886
887 2020-09-19 Martin Sebor <msebor@redhat.com>
888
889 PR c/50584
890 * c-decl.c (lookup_last_decl): Define new function.
891 (c_decl_attributes): Call it.
892 (start_decl): Add argument and use it.
893 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
894 (get_parm_array_spec): Define new function.
895 (push_parm_decl): Call get_parm_array_spec.
896 (start_function): Call warn_parm_array_mismatch. Build attribute
897 access and add it to current function.
898 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
899 in forms of array parameters.
900 * c-tree.h (start_decl): Add argument.
901
902 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
903
904 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
905 with...
906 (in_statement): New.
907 (start_function): Adjust for above change.
908 (c_push_function_context, c_pop_function_context): Likewise.
909 * c-lang.h (struct language_function): Likewise.
910 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
911 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
912 New.
913 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
914 (c_parser_switch_statement): Adjust break/switch context handling
915 and calls to renamed functions.
916 (c_parser_while_statement): Adjust break/switch context handling and
917 build a WHILE_STMT.
918 (c_parser_do_statement): Ditto, with DO_STMT respectively.
919 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
920 (c_parser_omp_for_loop): Adjust break/switch context handling.
921 * c-tree.h (c_break_label, c_cont_label): Delete.
922 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
923 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
924 (in_statement, switch_statement_break_seen_p): Declare.
925 (c_start_case, c_finish_case): Renamed to...
926 (c_start_switch, c_finish_switch).
927 (c_finish_bc_stmt): Adjust arguments.
928 * c-typeck.c (build_function_call_vec): Don't try to print
929 statements with %qE format.
930 (struct c_switch): Rename switch_expr field to switch_stmt.
931 Add break_stmt_seen_p field.
932 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
933 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
934 (do_case): Update for changes to struct c_switch.
935 (c_finish_case): Rename to c_finish_switch. Update for changes to
936 struct c_switch and change of representation from SWITCH_EXPR to
937 SWITCH_STMT.
938 (c_finish_loop): Delete.
939 (c_finish_bc_stmt): Update to reflect changes to break/continue
940 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
941 of a GOTO_EXPR except for objc foreach loops.
942
943 2020-09-01 Jakub Jelinek <jakub@redhat.com>
944
945 PR c++/96867
946 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
947 only on PARM_DECLs.
948
949 2020-08-28 Martin Sebor <msebor@redhat.com>
950
951 PR c/96596
952 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
953 argument type.
954
955 2020-08-27 Martin Liska <mliska@suse.cz>
956
957 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
958 growth function to true.
959
960 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
961
962 PR c/96678
963 * c-typeck.c (handle_omp_array_sections_1): Talk about
964 array function parameter in the error message.
965
966 2020-08-18 Jakub Jelinek <jakub@redhat.com>
967
968 PR c/96571
969 * c-parser.c (c_parser_generic_selection): Change match_found from bool
970 to int, holding index of the match. Call mark_exp_read on the selector
971 expression and on expressions other than the selected one.
972
973 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
974
975 PR c/96377
976 * c-typeck.c (process_init_element): Split test for whether to
977 recurse into a record, union or array into...
978 (initialize_elementwise_p): ...this new function. Don't recurse
979 into a vector type if the initialization value is also a vector.
980
981 2020-07-31 Richard Biener <rguenther@suse.de>
982
983 PR debug/96383
984 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
985 Define to c_common_finalize_early_debug.
986
987 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
988
989 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
990 (c_parser_omp_critical): Permit hint(0) clause without named critical.
991 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
992
993 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
994
995 PR target/95237
996 * c-decl.c (finish_decl): Call target hook
997 lower_local_decl_alignment to lower local decl alignment.
998
999 2020-07-09 Julian Brown <julian@codesourcery.com>
1000 Thomas Schwinge <thomas@codesourcery.com>
1001
1002 PR middle-end/95270
1003 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1004 for standalone attach/detach clauses.
1005
1006 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
1007
1008 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1009 set, warn for conversion between pointers that point to incompatible
1010 scalar storage orders.
1011
1012 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1013
1014 * c-parser.c (c_parser_statement_after_labels): Pass correct
1015 parameters to c_parser_do_statement.
1016
1017 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1018
1019 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1020 c_in_omp_for.
1021 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1022 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1023 c_finish_omp_for.
1024 * c-tree.h (c_in_omp_for): Declare.
1025 * c-typeck.c (c_in_omp_for): Define.
1026 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1027 (digest_init): Likewise.
1028 (build_binary_op): Likewise.
1029
1030 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1031
1032 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1033 from kind by comma rather than colon.
1034
1035 2020-06-05 Mark Wielaard <mark@klomp.org>
1036
1037 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1038 an undeclared builtin, then add a fixit header hint, if found.
1039 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1040 warning_at about implicit builtin declaration type mismatch.
1041
1042 2020-06-03 Mark Wielaard <mark@klomp.org>
1043
1044 * c-parser.c (struct c_parser): Add seen_string_literal
1045 bitfield.
1046 (c_parser_consume_token): Reset seen_string_literal.
1047 (c_parser_error_richloc): Add name_hint if seen_string_literal
1048 and next token is a CPP_NAME and we have a missing header
1049 suggestion for the name.
1050 (c_parser_string_literal): Set seen_string_literal.
1051
1052 2020-06-03 Mark Wielaard <mark@klomp.org>
1053
1054 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1055 scope with matching_parens after CPP_OPEN_PAREN.
1056
1057 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
1058
1059 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1060
1061 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1062
1063 * Make-lang.in: Remove extra slash.
1064
1065 2020-05-19 Martin Liska <mliska@suse.cz>
1066
1067 * c-parser.c: Fix typo.
1068
1069 2020-05-14 Jakub Jelinek <jakub@redhat.com>
1070
1071 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1072
1073 2020-05-07 Richard Biener <rguenther@suse.de>
1074
1075 PR middle-end/94703
1076 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1077 DECL_GIMPLE_REG_P.
1078
1079 2020-04-30 Jakub Jelinek <jakub@redhat.com>
1080
1081 PR c/94842
1082 * c-decl.c (set_labels_context_r): In addition to context-less
1083 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1084 parent function if any.
1085 (store_parm_decls): Adjust comment.
1086
1087 2020-04-19 Jakub Jelinek <jakub@redhat.com>
1088
1089 PR objc/94637
1090 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1091 two CPP_COLON tokens.
1092
1093 2020-04-17 Jakub Jelinek <jakub@redhat.com>
1094
1095 PR other/94629
1096 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1097 to data.clauses.
1098
1099 2020-04-15 Jakub Jelinek <jakub@redhat.com>
1100
1101 PR c/94593
1102 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1103 requires directive when not at file scope.
1104
1105 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
1106
1107 PR middle-end/94120
1108 * c-decl.c (c_check_in_current_scope): New function.
1109 * c-tree.h (c_check_in_current_scope): Declare it.
1110 * c-parser.c (c_parser_oacc_declare): Add check that variables
1111 are declared in the same scope as the directive. Fix handling
1112 of namespace vars.
1113
1114 2020-04-07 Jakub Jelinek <jakub@redhat.com>
1115
1116 PR c++/94512
1117 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1118 if c_parser_omp_master succeeded.
1119
1120 2020-03-23 Jakub Jelinek <jakub@redhat.com>
1121
1122 PR gcov-profile/94029
1123 PR c/94239
1124 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1125 the function_start_locus location. Don't do that afterwards for the
1126 __GIMPLE body parsing.
1127
1128 2020-03-19 Jakub Jelinek <jakub@redhat.com>
1129
1130 PR gcov-profile/94029
1131 * c-tree.h (finish_function): Add location_t argument defaulted to
1132 input_location.
1133 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1134 set it to the locus of closing } if non-NULL.
1135 (c_parser_compound_statement_nostart): Return locus of closing }.
1136 (c_parser_parse_rtl_body): Likewise.
1137 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1138 finish_function.
1139 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1140 input_location to set function_end_locus.
1141
1142 2020-03-17 Jakub Jelinek <jakub@redhat.com>
1143
1144 PR c/94172
1145 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1146 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1147 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1148 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1149 ENUMERAL_TYPEs.
1150 (finish_incomplete_vars): New function, moved from finish_struct. Use
1151 relayout_decl instead of layout_decl.
1152 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1153 being TYPE_VFIELD. Use finish_incomplete_vars.
1154 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1155 finish_incomplete_vars.
1156 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1157 also on ENUMERAL_TYPEs.
1158
1159 2020-03-16 Jakub Jelinek <jakub@redhat.com>
1160
1161 PR c/94179
1162 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1163
1164 2020-03-13 Martin Sebor <msebor@redhat.com>
1165
1166 PR c/94040
1167 * c-decl.c (builtin_structptr_type_count): New constant.
1168 (match_builtin_function_types): Reject decls that are incompatible
1169 in types pointed to by pointers.
1170 (diagnose_mismatched_decls): Adjust comments.
1171
1172 2020-03-05 Joseph Myers <joseph@codesourcery.com>
1173
1174 PR c/93577
1175 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1176 empty when initialized type is error_mark_node.
1177 (set_designator, process_init_element): Ignore initializers for
1178 elements of a variable-size type or of error_mark_node.
1179
1180 2020-03-01 Martin Sebor <msebor@redhat.com>
1181
1182 PR middle-end/93926
1183 * c-decl.c (types_close_enough_to_match): New function.
1184 (match_builtin_function_types):
1185 (diagnose_mismatched_decls): Add missing inform call to a warning.
1186
1187 2020-03-01 Martin Sebor <msebor@redhat.com>
1188
1189 PR c/93812
1190 * c-typeck.c (build_functype_attribute_variant): New function.
1191 (composite_type): Call it.
1192
1193 2020-02-25 Jakub Jelinek <jakub@redhat.com>
1194
1195 PR other/93912
1196 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1197 Rename last argument from probablity to probability.
1198
1199 2020-02-13 Jakub Jelinek <jakub@redhat.com>
1200
1201 PR c/93576
1202 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1203 *expr if it has side effects.
1204
1205 2020-01-30 Jeff Law <law@redhat.com>
1206
1207 PR c/88660
1208 * c-parser.c (c_parser_switch_statement): Make sure to request
1209 marking the switch expr as used.
1210
1211 2020-01-22 Joseph Myers <joseph@codesourcery.com>
1212
1213 PR c/93348
1214 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1215 argument with integer operands.
1216
1217 2020-01-16 Kerem Kat <keremkat@gmail.com>
1218
1219 PR c/92833
1220 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1221 to support 4 available tokens.
1222
1223 2020-01-15 Joseph Myers <joseph@codesourcery.com>
1224
1225 PR c/93072
1226 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1227 determine whether to set DECL_CONTEXT.
1228
1229 2020-01-13 Joseph Myers <joseph@codesourcery.com>
1230
1231 PR c/93241
1232 * c-typeck.c (build_c_cast): Check for expressions with integer
1233 operands that can occur in an unevaluated part of an integer
1234 constant expression and call note_integer_operands as needed.
1235
1236 2019-01-08 Richard Biener <rguenther@suse.de>
1237
1238 PR middle-end/93199
1239 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1240 permanently.
1241
1242 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1243
1244 Update copyright years.
1245
1246 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1247
1248 * c-decl.c (collect_source_ref_cb): Delete.
1249 (for_each_global_decl): Rename into...
1250 (collect_source_refs): ...this. Call collect_source_ref directly.
1251 (c_parse_final_cleanups): Always call collect_source_ref on the main
1252 input filename.
1253
1254 2019-12-19 Julian Brown <julian@codesourcery.com>
1255 Cesar Philippidis <cesar@codesourcery.com>
1256
1257 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1258 detach clauses.
1259 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1260 Allow deref (->) in variable lists if true.
1261 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1262 Pass to c_parser_omp_variable_list.
1263 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1264 call to c_parser_omp_variable_list.
1265 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1266 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1267 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1268 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1269 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1270 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1271 and detach. Support deref.
1272 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1273 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1274 (c_oacc_check_attachments): New function.
1275 (c_finish_omp_clauses): Check attach/detach arguments for being
1276 pointers using above. Support deref.
1277
1278 2019-12-19 Julian Brown <julian@codesourcery.com>
1279 Maciej W. Rozycki <macro@codesourcery.com>
1280 Tobias Burnus <tobias@codesourcery.com>
1281 Thomas Schwinge <thomas@codesourcery.com>
1282
1283 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1284 (c_parser_oacc_data_clause): Likewise.
1285 (c_parser_oacc_all_clauses): Likewise.
1286 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1287 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1288 PRAGMA_OACC_CLAUSE_NO_CREATE.
1289 * c-typeck.c (handle_omp_array_sections): Support
1290 GOMP_MAP_NO_ALLOC.
1291
1292 2019-12-09 David Malcolm <dmalcolm@redhat.com>
1293
1294 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1295 Replace label_text ctor calls.
1296
1297 2019-12-04 Joseph Myers <joseph@codesourcery.com>
1298
1299 PR c/36941
1300 PR c/88827
1301 * c-typeck.c (convert_lvalue_to_rvalue): Call
1302 require_complete_type for arguments not of void types.
1303 (build_indirect_ref): Do not diagnose dereferencing pointers to
1304 incomplete types.
1305 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1306
1307 2019-12-03 Joseph Myers <joseph@codesourcery.com>
1308
1309 PR c/88704
1310 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1311 old-style parameter definitions.
1312
1313 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1314
1315 PR target/92499
1316
1317 * c-decl.c (flexible_array_type_p): Move to common code.
1318
1319 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1320
1321 * c-decl.c (start_decl): Allow initialization of variables whose
1322 size is a POLY_INT_CST.
1323 (finish_decl): Use verify_type_context to check whether the target
1324 allows variables with a particular type to have static or thread-local
1325 storage duration. Don't raise a second error if such variables do
1326 not have a constant size.
1327 (grokdeclarator): Use verify_type_context to check whether the
1328 target allows fields or array elements to have a particular type.
1329 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1330 the target allows pointer difference for the types involved.
1331 (build_unary_op): Likewise for pointer increment and decrement.
1332
1333 2019-11-29 Joseph Myers <joseph@codesourcery.com>
1334
1335 * c-parser.c (struct c_parser): Add members raw_tokens and
1336 raw_tokens_used.
1337 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1338 using previously-lexed raw tokens.
1339 (c_parser_peek_nth_token_raw)
1340 (c_parser_check_balanced_raw_token_sequence): New functions.
1341 (c_parser_nth_token_starts_std_attributes): Use
1342 c_parser_check_balanced_raw_token_sequence for Objective-C.
1343
1344 2019-11-25 Joseph Myers <joseph@codesourcery.com>
1345
1346 PR c/91985
1347 * c-decl.c (finish_declspecs): Use int instead of decimal
1348 floating-point types if decimal floating-point not supported.
1349
1350 2019-11-25 Joseph Myers <joseph@codesourcery.com>
1351
1352 * c-tree.h (struct c_declarator): Use a structure for id member.
1353 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1354 declarators at the start, not when handling individual declarators
1355 later. Use u.id.id instead of u.id.
1356 (grokfield): Use u.id.id instead of u.id.
1357 (build_id_declarator): Set u.id.id and u.id.attrs.
1358 (finish_declspecs): Handle postfix attributes in case of typedef
1359 name or typeof used.
1360 * c-parser.c (c_parser_direct_declarator)
1361 (c_parser_direct_declarator_inner): Place declarator for
1362 attributes inside that for function or array, not outside. Set
1363 u.id.attrs for identifiers.
1364 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1365 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1366 instead of u.id.
1367
1368 2019-11-22 Jakub Jelinek <jakub@redhat.com>
1369
1370 PR c/90677
1371 * c-decl.c (identifier_global_tag): Define.
1372
1373 2019-11-20 Richard Biener <rguenther@suse.de>
1374
1375 PR c/92088
1376 * c-decl.c (grokdeclarator): Prevent inlining of nested
1377 function with VLA arguments.
1378
1379 2019-11-20 Joseph Myers <joseph@codesourcery.com>
1380
1381 * c-decl.c (c_warn_type_attributes): New function.
1382 (groktypename, grokdeclarator, finish_declspecs): Call
1383 c_warn_type_attributes before applying attributes to types.
1384 * c-tree.h (c_warn_type_attributes): Declare.
1385
1386 2019-11-19 Joseph Myers <joseph@codesourcery.com>
1387
1388 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1389 standard attributes.
1390 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1391 pedwarn for unknown standard attributes and return error_mark_node
1392 for them.
1393
1394 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1395
1396 * c-parser.c (c_parser_parse_rtl_body): Always call
1397 run_rtl_passes, even if startwith pass is not provided.
1398
1399 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1400
1401 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1402 duplicate standard attributes.
1403
1404 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1405
1406 * c-decl.c (std_attribute_table): Add maybe_unused.
1407
1408 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1409
1410 * c-decl.c (std_attribute_table): Add fallthrough.
1411 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1412 attribute at top level.
1413
1414 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1415
1416 * c-decl.c (std_attribute_table): New.
1417 (c_init_decl_processing): Register attributes from
1418 std_attribute_table.
1419 * c-parser.c (c_parser_attribute_arguments): Add arguments
1420 require_string and allow_empty_args. All callers changed.
1421 (c_parser_std_attribute): Set require_string argument for
1422 "deprecated" attribute.
1423
1424 2019-11-14 Joseph Myers <joseph@codesourcery.com>
1425
1426 * c-parser.c (c_parser_postfix_expression)
1427 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1428 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1429
1430 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1431
1432 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1433 of build_same_sized_truth_vector_type.
1434 (build_vec_cmp): Likewise.
1435
1436 2019-11-14 Jakub Jelinek <jakub@redhat.com>
1437
1438 * c-parser.c (c_parser_omp_context_selector): Don't require score
1439 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1440 negative score.
1441
1442 * c-parser.c (c_parser_omp_context_selector): Rename
1443 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1444 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1445 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1446 and string literals.
1447
1448 2019-11-14 Joseph Myers <joseph@codesourcery.com>
1449
1450 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1451 ctsk_tagfirstref_attrs.
1452 (struct c_declspecs): Update description of attrs. Add
1453 postfix_attrs and non_std_attrs_seen_p. Increase size of
1454 typespec_kind bit-field.
1455 (c_warn_unused_attributes): New declaration.
1456 (parser_xref_tag): Update prototype.
1457 * c-decl.c (c_warn_unused_attributes): New function.
1458 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1459 ctsk_tagref_attrs. Handle attribute declarations.
1460 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1461 (grokdeclarator): Handle standard attributes.
1462 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1463 attributes to incomplete type reference.
1464 (xref_tag): Update call to parser_xref_tag.
1465 (declspecs_add_addrspace, declspecs_add_type)
1466 (declspecs_add_scspec, declspecs_add_attrs): Set
1467 non_std_attrs_seen_p.
1468 (finish_declspecs): Apply postfix standard attributes to type.
1469 * c-parser.c (c_token_starts_declspecs)
1470 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1471 (c_parser_next_tokens_start_declaration): Update comments.
1472 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1473 parser->tokens[2] to parser->tokens[1].
1474 (c_parser_nth_token_starts_std_attributes)
1475 (c_parser_std_attribute_specifier_sequence): New functions.
1476 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1477 attrs. All callers changed. Handle standard attributes.
1478 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1479 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1480 All callers changed.
1481 (c_parser_declspecs): Add arguments start_std_attr_ok and
1482 end_std_attr_ok. All callers changed. Handle standard
1483 attributes.
1484 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1485 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1486 (c_parser_compound_statement_nostart, c_parser_all_labels)
1487 (c_parser_label, c_parser_statement, c_parser_for_statement):
1488 Handle standard attributes.
1489 * c-parser.h (c_parser_declspecs): Update prototype.
1490 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1491 c_parser_declspecs.
1492
1493 2019-11-12 Martin Liska <mliska@suse.cz>
1494
1495 * gimple-parser.c: Do not include params.h.
1496
1497 2019-11-12 Martin Liska <mliska@suse.cz>
1498
1499 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1500 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1501 macro.
1502
1503 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1504 Frederik Harwath <frederik@codesourcery.com>
1505
1506 gcc/c/
1507 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1508 (c_parser_oacc_kernels_parallel): Rename function to...
1509 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1510 (c_parser_omp_construct): Update accordingly.
1511
1512
1513 2019-11-11 Jakub Jelinek <jakub@redhat.com>
1514
1515 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1516 without corresponding end declare target.
1517
1518 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1519
1520 * c-convert.c (convert): Only handle vector conversions if one of
1521 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1522 allows it.
1523 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1524 vectors satisfy gnu_vector_type_p.
1525 (build_unary_op): Only allow unary operators to be applied to
1526 vectors if they satisfy gnu_vector_type_p.
1527 (digest_init): Only allow by-element initialization of vectors
1528 if they satisfy gnu_vector_type_p.
1529 (really_start_incremental_init): Likewise.
1530 (push_init_level): Likewise.
1531 (pop_init_level): Likewise.
1532 (process_init_element): Likewise.
1533 (build_binary_op): Only allow binary operators to be applied to
1534 vectors if they satisfy gnu_vector_type_p.
1535
1536 2019-11-08 Joseph Myers <joseph@codesourcery.com>
1537
1538 * c-decl.c (grokparms): Convert () in a function definition to
1539 (void) for C2x.
1540 (store_parm_decls_oldstyle): Pedwarn for C2x.
1541 (store_parm_decls): Update comment about () not generating a
1542 prototype.
1543
1544 2019-11-07 Joseph Myers <joseph@codesourcery.com>
1545
1546 * c-parser.c (c_parser_attribute_arguments): New function.
1547 Factored out of c_parser_gnu_attribute.
1548 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1549 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1550 (c_parser_std_attribute_specifier): New functions.
1551 (c_parser_transaction_attributes): Use
1552 c_parser_std_attribute_specifier.
1553
1554 2019-11-07 Joseph Myers <joseph@codesourcery.com>
1555
1556 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1557 lex_joined_string and translate_strings_p.
1558 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1559 c_lex_with_flags.
1560 (c_parser_string_literal): New function.
1561 (c_parser_static_assert_declaration_no_semi): Use
1562 c_parser_string_literal. Do not set lex_untranslated_string.
1563 (c_parser_asm_string_literal): Use c_parser_string_literal.
1564 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1565 (c_parser_gnu_attributes): Set and restore translate_strings_p
1566 instead of lex_untranslated_string.
1567 (c_parser_asm_statement): Do not set lex_untranslated_string.
1568 (c_parser_asm_operands): Likewise.
1569 (c_parser_has_attribute_expression): Set and restore
1570 translate_strings_p instead of lex_untranslated_string.
1571 (c_parser_postfix_expression): Use c_parser_string_literal.
1572 (pragma_lex): Likewise.
1573 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1574 (c_parse_file): Set translate_strings_p.
1575 * gimple-parser.c (c_parser_gimple_postfix_expression)
1576 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1577 * c-parser.c (c_parser_string_literal): Declare function.
1578
1579 2019-11-02 Jakub Jelinek <jakub@redhat.com>
1580
1581 * c-parser.c (c_finish_omp_declare_variant): Use
1582 omp_get_context_selector instead of c_omp_get_context_selector.
1583
1584 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1585
1586 * c-tree.h (c_simulate_enum_decl): Declare.
1587 * c-decl.c (c_simulate_enum_decl): New function.
1588 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1589
1590 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1591
1592 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1593 * c-decl.c (c_simulate_builtin_function_decl): New function.
1594 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1595 to the above.
1596
1597 2019-10-28 Martin Sebor <msebor@redhat.com>
1598
1599 PR c/66970
1600 * c-decl.c (names_builtin_p): Define a new function.
1601
1602 2019-10-28 Richard Biener <rguenther@suse.de>
1603
1604 PR c/92249
1605 * gimple-parser.c (c_parser_parse_gimple_body): Make
1606 current_bb the entry block initially to easier recover
1607 from errors.
1608 (c_parser_gimple_compound_statement): Adjust.
1609
1610 2019-10-24 Jakub Jelinek <jakub@redhat.com>
1611
1612 * c-parser.c (c_finish_omp_declare_variant): Use
1613 omp_context_selector_matches instead of
1614 c_omp_context_selector_matches.
1615 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1616 attribute in between declare target and end declare target
1617 pragmas.
1618
1619 2019-10-15 Joseph Myers <joseph@codesourcery.com>
1620
1621 * c-parser.c (c_parser_attribute_any_word): Rename to
1622 c_parser_gnu_attribute_any_word. All callers changed.
1623 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1624 callers changed.
1625 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1626 callers changed.
1627 (c_parser_declaration_or_fndef, c_parser_declspecs)
1628 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1629 (c_parser_struct_declaration, c_parser_declarator)
1630 (c_parser_gnu_attribute, c_parser_compound_statement)
1631 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1632 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1633 attribute-related syntax productions.
1634
1635 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1636
1637 * c-objc-common.c (useful_aka_type_p): Replace with...
1638 (get_aka_type): ...this new function. Given the original type,
1639 decide which aka type to print (if any). Only look through typedefs
1640 if user_facing_original_type_p.
1641 (print_type): Update accordingly.
1642
1643 2019-10-14 Jakub Jelinek <jakub@redhat.com>
1644
1645 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1646 into int NESTED, if it is 2, diagnose missing commas in between
1647 clauses.
1648 (c_parser_omp_context_selector): Pass 2 as last argument to
1649 c_parser_omp_all_clauses.
1650
1651 2019-10-12 Jakub Jelinek <jakub@redhat.com>
1652
1653 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1654 For simd properties, put them directly into TREE_VALUE.
1655 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1656 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1657 add "omp declare variant base" attribute rather than
1658 "omp declare variant".
1659
1660 2019-10-11 Joseph Myers <joseph@codesourcery.com>
1661
1662 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1663
1664 2019-10-10 Jakub Jelinek <jakub@redhat.com>
1665
1666 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1667 true, terminate processing on closing paren and don't skip to end of
1668 pragma line.
1669 (c_parser_omp_declare_simd): Handle also declare variant.
1670 (omp_construct_selectors, omp_device_selectors,
1671 omp_implementation_selectors, omp_user_selectors): New variables.
1672 (c_parser_omp_context_selector,
1673 c_parser_omp_context_selector_specification,
1674 c_finish_omp_declare_variant): New functions.
1675 (c_finish_omp_declare_simd): Handle both declare simd and
1676 declare variant.
1677 (c_parser_omp_declare): Handle declare variant.
1678
1679 2019-10-02 Joseph Myers <joseph@codesourcery.com>
1680
1681 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1682 CPP_COLON tokens.
1683
1684 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1685
1686 * c-objc-common.c (useful_aka_type_p): New function.
1687 (print_type): Use it to decide whether an aka type is worth printing.
1688
1689 2019-09-27 Jakub Jelinek <jakub@redhat.com>
1690
1691 PR c++/88203
1692 * c-parser.c (c_parser_predefined_identifier): New function.
1693 (c_parser_postfix_expression): Use it.
1694 (c_parser_omp_variable_list): Parse predefined identifiers.
1695 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1696 in shared and firstprivate clauses, even when they are predetermined
1697 shared.
1698
1699 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1700
1701 * c-typeck.c (build_function_call_vec): Take the original function
1702 decl as an optional final parameter. Pass all built-in calls to
1703 check_builtin_function_arguments.
1704
1705 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1706
1707 PR c/91815
1708 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1709 of identifiers in the external scope only for variables and functions.
1710
1711 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1712
1713 PR c/78736
1714 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1715
1716 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1717
1718 PR pch/61250
1719 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1720 after determining that the first token is not
1721 PRAGMA_GCC_PCH_PREPROCESS.
1722
1723 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1724
1725 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1726 FUNCTION_DECL to the right value in the presence of nested declarators.
1727
1728 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1729
1730 PR middle-end/91421
1731 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1732
1733 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1734
1735 PR middle-end/91421
1736 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1737 of a built_in_function.
1738 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1739
1740 2019-08-10 Jakub Jelinek <jakub@redhat.com>
1741
1742 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1743 (c_parser_omp_clause_device_type): New function.
1744 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1745 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1746 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1747 diagnostics for declare target with clauses nested in clause-less
1748 declare target declaration-definition-seq.
1749 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1750
1751 2019-08-09 Jakub Jelinek <jakub@redhat.com>
1752
1753 * c-parser.c (check_no_duplicate_clause): Simplify using
1754 omp_find_clause.
1755 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1756 directive name modifiers.
1757 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1758
1759 PR c/91401
1760 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1761 check_no_duplicate_clause call. Comment it out, instead emit a
1762 warning for duplicate dist_schedule clauses.
1763
1764 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1765
1766 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1767
1768 2019-08-08 Jakub Jelinek <jakub@redhat.com>
1769
1770 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1771 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1772 instead of generic_head to track duplicates.
1773
1774 2019-08-07 Jakub Jelinek <jakub@redhat.com>
1775
1776 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1777 (c_parser_omp_clause_use_device_addr): New function.
1778 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1779 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1780 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1781 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1782 map or use_device_* clauses.
1783 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1784 in OpenMP, require pointer type rather than pointer or array type.
1785 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1786
1787 2019-07-31 Jakub Jelinek <jakub@redhat.com>
1788
1789 PR c/91192
1790 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1791 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1792 case.
1793
1794 2019-07-25 Martin Liska <mliska@suse.cz>
1795 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1796
1797 PR c++/23383
1798 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1799
1800 2019-07-25 Martin Liska <mliska@suse.cz>
1801
1802 * c-decl.c (merge_decls): Use new macros
1803 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1804
1805 2019-07-23 Richard Biener <rguenther@suse.de>
1806
1807 PR tree-optimization/83518
1808 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1809 a CFG also rebuild cgraph edges.
1810
1811 2019-07-20 Jakub Jelinek <jakub@redhat.com>
1812
1813 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1814 (c_parser_omp_clause_bind): New function.
1815 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1816 (OMP_LOOP_CLAUSE_MASK): Define.
1817 (c_parser_omp_loop): New function.
1818 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1819 loop combined with parallel or teams.
1820 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1821 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1822
1823 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1824
1825 PR c/53633
1826 * c-decl.c (finish_function): Check targetm.warn_func_return
1827 before issuing a -Wreturn-type warning.
1828
1829 2019-07-12 Alexandre Oliva <oliva@adacore.com>
1830
1831 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1832 (c_parser_compound_statement): Call it.
1833
1834 2019-07-12 Jakub Jelinek <jakub@redhat.com>
1835
1836 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1837 (c_parser_omp_clause_order): New function.
1838 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1839 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1840 PRAGMA_OMP_CLAUSE_ORDER.
1841 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1842
1843 2019-07-10 Richard Biener <rguenther@suse.de>
1844
1845 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1846 _Literal (int *) &x for address literals.
1847
1848 2019-07-09 Martin Sebor <msebor@redhat.com>
1849
1850 PR c++/61339
1851 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1852 to class.
1853 (field_decl_cmp): Same.
1854 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1855 * c-tree.h: Same.
1856 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1857
1858 2019-07-09 Martin Sebor <msebor@redhat.com>
1859
1860 PR c++/61339
1861 * c-decl.c: Change class-key from class to struct and vice versa
1862 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1863 * gimple-parser.c: Same.
1864
1865 2019-07-01 Richard Biener <rguenther@suse.de>
1866
1867 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1868 _Literal (char *) &"foo" for address literals pointing to
1869 STRING_CSTs.
1870
1871 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1872
1873 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1874 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1875 C incompatibility if alternate "__intN__" form is used.
1876
1877 2019-06-24 Martin Sebor <msebor@redhat.com>
1878
1879 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1880
1881 2019-06-10 Jakub Jelinek <jakub@redhat.com>
1882
1883 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1884 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1885 (c_parser_omp_scan_loop_body): New function.
1886 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1887 inscan reduction clauses.
1888 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1889 non-inscan reductions on the same construct, or inscan reductions with
1890 ordered or schedule clauses, or inscan array reductions.
1891
1892 2019-06-05 Martin Sebor <msebor@redhat.com>
1893
1894 PR c/90737
1895 * c-typeck.c (c_finish_return): Only consider functions returning
1896 pointers as candidates for -Wreturn-local-addr.
1897
1898 2019-06-05 Martin Sebor <msebor@redhat.com>
1899
1900 * c-decl.c (start_decl): Adjust quoting and hyphenation
1901 in diagnostics.
1902 (finish_decl): Same.
1903 (finish_enum): Same.
1904 (start_function): Same.
1905 (declspecs_add_type): Same.
1906 * c-parser.c (warn_for_abs): Same.
1907 * c-typeck.c (build_binary_op): Same.
1908
1909 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1910
1911 PR c/89433
1912 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1913 marked with an OpenACC 'routine' directive.
1914
1915 PR c/89433
1916 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1917 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1918
1919 PR c/89433
1920 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1921 clauses from "omp declare target" attribute.
1922
1923 2019-05-16 Martin Sebor <msebor@redhat.com>
1924
1925 * c-decl.c (start_decl): Quote keywords, operators, and
1926 types in diagnostics.
1927 (finish_decl): Same.
1928 * c-parser.c (c_parser_asm_statement): Same.
1929 (c_parser_conditional_expression): Same.
1930 (c_parser_transaction_cancel): Same.
1931 * c-typeck.c (c_common_type): Same.
1932 (build_conditional_expr): Same.
1933 (digest_init): Same.
1934 (process_init_element): Same.
1935 (build_binary_op): Same.
1936
1937 2019-05-17 Richard Biener <rguenther@suse.de>
1938
1939 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1940 (c_parser_gimple_unary_expression): Likewise.
1941 (c_parser_gimple_parentized_ternary_expression): New function.
1942
1943 2019-05-16 Richard Biener <rguenther@suse.de>
1944
1945 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1946 (c_parser_gimple_unary_expression): Likewise.
1947
1948 2019-05-15 Richard Biener <rguenther@suse.de>
1949
1950 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1951 __BIT_FIELD_REF.
1952
1953 2019-05-14 Richard Biener <rguenther@suse.de>
1954
1955 * gimple-parser.c (c_parser_gimple_statement): Remove
1956 questionable auto-promotion to VIEW_CONVERT_EXPR.
1957 (c_parser_gimple_typespec): Split out from __MEM parsing.
1958 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1959 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1960 as __VIEW_CONVERT with -gimple.
1961
1962 2019-05-09 Martin Liska <mliska@suse.cz>
1963
1964 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1965 __MAX.
1966 (c_parser_gimple_unary_expression): Parse also binary expression
1967 __MIN and __MAX.
1968 (c_parser_gimple_parentized_binary_expression): New function.
1969
1970 2019-05-09 Martin Liska <mliska@suse.cz>
1971
1972 * gimple-parser.c (struct gimple_parser): Add probability.
1973 for gimple_parser_edge.
1974 (gimple_parser::push_edge): Add new argument probability.
1975 (c_parser_gimple_parse_bb_spec): Parse also probability
1976 if present.
1977 (c_parser_parse_gimple_body): Set edge probability.
1978 (c_parser_gimple_compound_statement): Consume token
1979 before calling c_parser_gimple_goto_stmt.
1980 Parse BB counts.
1981 (c_parser_gimple_statement): Pass new argument.
1982 (c_parser_gimple_goto_stmt): Likewise.
1983 (c_parser_gimple_if_stmt): Likewise.
1984 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1985 * c-parser.c (c_parser_declaration_or_fndef): Pass
1986 hot_bb_threshold argument.
1987 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1988 field.
1989 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1990
1991 2019-04-26 Jakub Jelinek <jakub@redhat.com>
1992
1993 PR debug/90197
1994 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1995 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1996 (c_parser_do_statement): Likewise.
1997 (c_parser_for_statement): Likewise. Formatting fixes.
1998 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1999 emit DEBUG_BEGIN_STMTs if needed.
2000
2001 2019-04-19 Jakub Jelinek <jakub@redhat.com>
2002
2003 PR c/89888
2004 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2005 (c_start_case): Don't clear it.
2006 (do_case): Adjust c_add_case_label caller.
2007 (c_finish_case): Adjust c_do_switch_warnings caller.
2008
2009 PR c++/90108
2010 * c-decl.c (merge_decls): If remove is main variant and
2011 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2012 variant that has newdecl as TYPE_NAME if any.
2013
2014 2019-04-12 Jakub Jelinek <jakub@redhat.com>
2015
2016 PR c/89933
2017 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2018 don't try to remove it from the variant list, but instead assert
2019 it has no variants.
2020
2021 2019-04-01 Richard Biener <rguenther@suse.de>
2022
2023 PR c/71598
2024 * c-tree.h (c_get_alias_set): Declare.
2025 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2026 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2027 as the underlying integer type.
2028
2029 2019-03-19 Martin Sebor <msebor@redhat.com>
2030
2031 PR tree-optimization/89688
2032 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2033 kinds of initializers.
2034
2035 2019-03-19 Jakub Jelinek <jakub@redhat.com>
2036
2037 PR c/89734
2038 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2039 return type even if quals_used is 0. Formatting fixes.
2040
2041 2019-03-14 Richard Biener <rguenther@suse.de>
2042
2043 * c-tree.h (enum c_declspec_il): New.
2044 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2045 enum bitfield.
2046 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2047 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2048 (c_parser_declspecs): Adjust.
2049 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2050 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2051 and bitmap.h.
2052 (struct gimple_parser): New.
2053 (gimple_parser::push_edge): New method.
2054 (c_parser_gimple_parse_bb_spec): New helper.
2055 (c_parser_parse_gimple_body): Get start pass and IL specification.
2056 Initialize SSA and CFG.
2057 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2058 Build a gimple_parser parsing state and pass it along.
2059 (c_parser_gimple_statement): Change intermittend __PHI internal
2060 function argument for the edge.
2061 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2062 (c_parser_gimple_goto_stmt): Record edges to build.
2063 (c_parser_gimple_if_stmt): Likewise.
2064 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2065 (c_parser_gimple_or_rtl_pass_list): Likewise.
2066
2067 2019-03-11 Martin Liska <mliska@suse.cz>
2068
2069 * c-decl.c (check_for_loop_decls): Wrap an option name
2070 in a string format message and fix GNU coding style.
2071 * c-parser.c (c_parser_declspecs): Likewise.
2072
2073 2019-03-08 Jakub Jelinek <jakub@redhat.com>
2074
2075 PR tree-optimization/89550
2076 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2077 returned true.
2078 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2079 or warning returned true.
2080
2081 2019-02-28 Jakub Jelinek <jakub@redhat.com>
2082
2083 PR c/89525
2084 * c-typeck.c (convert_arguments): Call inform_declaration only if
2085 the previous warning_at call returned true.
2086
2087 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2088
2089 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2090 parameter. Adjust all users.
2091 (c_parser_oacc_simple_clause): Replace parser with loc formal
2092 parameter. Adjust all users.
2093
2094 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
2095
2096 PR c/87924
2097 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2098 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2099
2100 2019-02-15 Jakub Jelinek <jakub@redhat.com>
2101
2102 PR c/89340
2103 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2104 before c_decl_attributes rather than after it.
2105
2106 2019-02-06 Jakub Jelinek <jakub@redhat.com>
2107
2108 PR c/89211
2109 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2110 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2111 instead of 3 nested ifs.
2112
2113 2019-02-06 Joseph Myers <joseph@codesourcery.com>
2114
2115 PR c/88584
2116 * c-decl.c (finish_decl): Do not complete array types for arrays
2117 with external linkage not at file scope.
2118
2119 2019-02-05 Richard Biener <rguenther@suse.de>
2120
2121 PR c/88606
2122 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2123 all type variants when not supported.
2124
2125 2019-01-30 Jakub Jelinek <jakub@redhat.com>
2126
2127 PR c/89061
2128 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2129 * c-decl.c (decl_jump_unsafe): Return false for
2130 C_DECL_COMPOUND_LITERAL_P decls.
2131 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2132
2133 2019-01-29 Jakub Jelinek <jakub@redhat.com>
2134
2135 PR c/89045
2136 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2137 scope.
2138
2139 PR c/86125
2140 * c-decl.c (last_fileptr_type): Remove.
2141 (last_structptr_types): New variable.
2142 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2143 {old,new}rettype instead of the types themselves. Assert
2144 last_structptr_types array has the same number of elements
2145 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2146 argument oldtype and newtype. Instead of handling
2147 just fileptr_type_node specially, handle all builtin_structptr_types
2148 pointer nodes. Formatting fix.
2149
2150 2019-01-24 Martin Sebor <msebor@redhat.com>
2151
2152 PR c/86125
2153 PR c/88886
2154 PR middle-end/86308
2155 * c-decl.c (match_builtin_function_types): Add arguments.
2156 (diagnose_mismatched_decls): Diagnose mismatched declarations
2157 of built-ins more strictly.
2158
2159 2019-01-24 Jakub Jelinek <jakub@redhat.com>
2160
2161 PR c++/88976
2162 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2163 on #pragma omp cancel with different modifiers.
2164
2165 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2166
2167 PR c/51628
2168 PR c/88664
2169 * c-typeck.c (convert_for_assignment): Upate the
2170 warn_for_address_or_pointer_of_packed_member call.
2171
2172 2019-01-16 Tom Honermann <tom@honermann.net>
2173 Jason Merrill <jason@redhat.com>
2174
2175 * c-typeck.c (digest_init): Revised the error message produced for
2176 ill-formed cases of array initialization with a string literal.
2177 (error_init): Make variadic.
2178
2179 2019-01-12 Jakub Jelinek <jakub@redhat.com>
2180
2181 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2182
2183 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2184
2185 PR c/88701
2186 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2187 if current_function_decl is non-NULL.
2188
2189 2019-01-07 Joseph Myers <joseph@codesourcery.com>
2190
2191 PR c/88720
2192 PR c/88726
2193 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2194 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2195 functions declared but never defined only for external scope, not
2196 for other scopes.
2197
2198 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2199
2200 PR c++/85052
2201 * c-parser.c (c_parser_postfix_expression): Parse
2202 __builtin_convertvector.
2203
2204 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2205
2206 Update copyright years.
2207
2208 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2209
2210 PR c/51628
2211 * c-typeck.c (convert_for_assignment): Call
2212 warn_for_address_or_pointer_of_packed_member.
2213
2214 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2215
2216 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2217 a more specific error message (instead of just falling through).
2218
2219 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2220
2221 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2222 asm qualifier is first seen; use that to give nicer "duplicate asm
2223 qualifier" messages. Delete 'quals" variable, instead pass the
2224 "is_volatile_ flag to build_asm_stmt directly.
2225 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2226 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2227
2228 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2229
2230 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2231 "done" boolean variable.
2232
2233 2018-12-19 David Malcolm <dmalcolm@redhat.com>
2234
2235 PR c++/87504
2236 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2237 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2238 (build_binary_op): Use struct op_location_t and
2239 class binary_op_rich_location.
2240
2241 2018-12-11 Jakub Jelinek <jakub@redhat.com>
2242
2243 PR sanitizer/88426
2244 * c-convert.c (convert): Call c_fully_fold before calling
2245 ubsan_instrument_float_cast.
2246
2247 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2248
2249 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2250 setting "quals".
2251
2252 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2253
2254 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2255 after asm. Pass a flag for it to build_asm_expr.
2256 * c-tree.h (build_asm_expr): Update declaration.
2257 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2258 set ASM_INLINE_P.
2259
2260 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2261
2262 PR inline-asm/55681
2263 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2264 combination of volatile and goto, in any order, without repetitions.
2265
2266 2018-12-04 James Norris <jnorris@codesourcery.com>
2267 Cesar Philippidis <cesar@codesourcery.com>
2268 Julian Brown <julian@codesourcery.com>
2269
2270 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2271 code.
2272
2273 2018-11-30 Richard Biener <rguenther@suse.de>
2274
2275 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2276 _Literal (type) { ... } as empty aggregate or vector constructor.
2277
2278 2018-11-29 Martin Sebor <msebor@redhat.com>
2279
2280 PR c/88091
2281 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2282 (convert_arguments): Add comments. Pass additional argument to
2283 the function above.
2284
2285 2018-11-29 Martin Sebor <msebor@redhat.com>
2286
2287 PR c/88172
2288 PR testsuite/88208
2289 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2290
2291 2018-11-23 Martin Sebor <msebor@redhat.com>
2292
2293 PR testsuite/88098
2294 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2295 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2296
2297 2018-11-20 Martin Sebor <msebor@redhat.com>
2298
2299 * c-parser.c (c_parser_has_attribute_expression): New function.
2300 (c_parser_attribute): New function.
2301 (c_parser_attributes): Move code into c_parser_attribute.
2302 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2303
2304 2018-11-15 Martin Sebor <msebor@redhat.com>
2305
2306 PR c/83656
2307 * c-decl.c (header_for_builtin_fn): Declare.
2308 (diagnose_mismatched_decls): Diagnose declarations of built-in
2309 functions without a prototype.
2310 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2311 (convert_argument): Same.
2312 (convert_arguments): Factor code out into convert_argument.
2313 Detect mismatches between built-in formal arguments in calls
2314 to built-in without prototype.
2315 (build_conditional_expr): Same.
2316 (type_or_builtin_type): New function.
2317 (convert_for_assignment): Add argument. Conditionally issue
2318 warnings instead of errors for mismatches.
2319
2320 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2321
2322 * c-decl.c: Replace "source_location" with "location_t".
2323 * c-tree.h: Likewise.
2324 * c-typeck.c: Likewise.
2325 * gimple-parser.c: Likewise.
2326
2327 2018-11-09 Jakub Jelinek <jakub@redhat.com>
2328
2329 * c-parser.c (c_parser_omp_clause_final): Use
2330 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2331 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2332 parsing instead of c_parser_paren_condition.
2333 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2334 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2335 c_fully_fold instead of c_parser_condition.
2336 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2337 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2338 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2339 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2340 c_parser_expr_no_commas instead of c_parser_expression.
2341
2342 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2343 reduction clause with inscan modifier.
2344
2345 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2346 clauses other than atomic_default_mem_order.
2347
2348 2018-11-08 Jakub Jelinek <jakub@redhat.com>
2349
2350 * c-parser.c: Include memmode.h.
2351 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2352 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2353 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2354 task_reduction clauses.
2355 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2356 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2357 section, or lvalue assignment expression.
2358 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2359 (c_parser_omp_clause_lastprivate): Parse optional
2360 conditional: modifier.
2361 (c_parser_omp_clause_hint): Require constant integer expression rather
2362 than just integer expression.
2363 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2364 clause.
2365 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2366 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2367 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2368 functions.
2369 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2370 iterators. Parse mutexinoutset and depobj kinds.
2371 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2372 callers.
2373 (c_parser_omp_all_clauses): Likewise. Handle
2374 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2375 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2376 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2377 default memory order from requires directive if any. Adjust
2378 c_finish_omp_atomic caller.
2379 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2380 (c_parser_omp_flush): Parse flush with memory-order-clause.
2381 (c_parser_omp_for_loop): Allow NE_EXPR even in
2382 OpenMP loops, adjust c_finish_omp_for caller.
2383 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2384 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2385 Allow to be called while parsing combined parallel master.
2386 Parse combined master taskloop{, simd}.
2387 (c_parser_omp_parallel): Parse combined
2388 parallel master{, taskloop{, simd}} constructs.
2389 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2390 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2391 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2392 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2393 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2394 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2395 around teams body. Use SET_EXPR_LOCATION.
2396 (c_parser_omp_target_data): Allow target data
2397 with only use_device_ptr clauses.
2398 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2399 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2400 (c_parser_omp_requires): New function.
2401 (c_finish_taskloop_clauses): New function.
2402 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2403 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2404 declaration. Disallow in_reduction clause when combined with parallel
2405 master.
2406 (c_parser_omp_construct): Adjust c_parser_omp_master and
2407 c_parser_omp_taskgroup callers.
2408 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2409 other than cancel.
2410 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2411 like OMP_CLAUSE_REDUCTION.
2412 (handle_omp_array_sections): Likewise. Call save_expr on array
2413 reductions before calling build_index_type. Handle depend clauses
2414 with iterators.
2415 (struct c_find_omp_var_s): New type.
2416 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2417 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2418 with static, runtime or auto schedule kinds. Call save_expr for whole
2419 array reduction sizes. Diagnose reductions with zero sized elements
2420 or variable length structures. Diagnose nogroup clause used with
2421 reduction clause(s). Handle depend clause with
2422 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2423 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2424 some different type for other kinds. Use build_unary_op with
2425 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2426 Handle depend clauses with iterators. Remove no longer needed special
2427 case that predetermined const qualified vars may be specified in
2428 firstprivate clause. Complain if const qualified vars are mentioned
2429 in data-sharing clauses other than firstprivate or shared. Use
2430 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2431 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2432 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2433 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2434
2435 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2436
2437 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2438 logic for change to name_hint::operator bool.
2439 (undeclared_variable): Likewise.
2440 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2441 (c_parser_parameter_declaration): Likewise.
2442
2443 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2444
2445 * c-errors.c (pedwarn_c11): New function.
2446 * c-parser.c (disable_extension_diagnostics): Save
2447 warn_c11_c2x_compat and set it to 0.
2448 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2449 (c_parser_static_assert_declaration_no_semi): Handle
2450 _Static_assert without string constant.
2451 * c-tree.h (pedwarn_c11): New prototype.
2452
2453 2018-10-17 David Malcolm <dmalcolm@redhat.com>
2454
2455 * Make-lang.in (selftest-c): New.
2456 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2457 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2458 from gcc/Makefile.in.
2459
2460 2018-10-02 Richard Biener <rguenther@suse.de>
2461
2462 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2463
2464 2018-09-26 Joseph Myers <joseph@codesourcery.com>
2465
2466 PR c/87390
2467 * c-typeck.c (build_binary_op): Use excess precision for
2468 comparisons of integers and floating-point for C11 and later.
2469
2470 2018-09-26 Martin Jambor <mjambor@suse.cz>
2471
2472 PR c/87347
2473 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
2474 comment.
2475
2476 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2477
2478 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2479 Update for new param.
2480 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2481 Likewise.
2482
2483 2018-09-17 Martin Jambor <mjambor@suse.cz>
2484
2485 PR c/63886
2486 * c-parser.c: (warn_for_abs): New function.
2487 (c_parser_postfix_expression_after_primary): Call it.
2488
2489 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2490
2491 * c-typeck.c (digest_init): Shorten overlength strings.
2492
2493 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2494
2495 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2496
2497 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2498
2499 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2500 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2501
2502 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
2503
2504 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2505 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2506
2507 2018-08-27 David Malcolm <dmalcolm@redhat.com>
2508
2509 PR 87091
2510 * c-decl.c (implicitly_declare): Update call to
2511 maybe_add_include_fixit to suggest overriding the location, as it
2512 is for a note.
2513 * c-objc-common.c (c_tree_printer): Update for conversion of
2514 show_caret_p to a tri-state.
2515
2516 2018-08-27 Martin Liska <mliska@suse.cz>
2517
2518 * c-decl.c (locate_old_decl): Use new function
2519 fndecl_built_in_p and remove check for FUNCTION_DECL if
2520 possible.
2521 (diagnose_mismatched_decls): Likewise.
2522 (merge_decls): Likewise.
2523 (warn_if_shadowing): Likewise.
2524 (pushdecl): Likewise.
2525 (implicitly_declare): Likewise.
2526 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2527 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2528 * c-typeck.c (build_function_call_vec): Likewise.
2529 (convert_arguments): Likewise.
2530
2531 2018-08-20 David Malcolm <dmalcolm@redhat.com>
2532
2533 PR other/84889
2534 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2535 (diagnose_mismatched_decls): Likewise, in various places.
2536 (warn_if_shadowing): Likewise.
2537 (implicit_decl_warning): Likewise.
2538 (implicitly_declare): Likewise.
2539 (undeclared_variable): Likewise.
2540 (declare_label): Likewise.
2541 (grokdeclarator): Likewise.
2542 (start_function): Likewise.
2543 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2544 (c_parser_parameter_declaration): Likewise.
2545 (c_parser_binary_expression): Likewise.
2546 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2547 (parser_build_binary_op): Likewise.
2548 (build_unary_op): Likewise.
2549 (error_init): Likewise.
2550 (pedwarn_init): Likewise.
2551 (warning_init): Likewise.
2552 (convert_for_assignment): Likewise.
2553
2554 2018-08-15 David Malcolm <dmalcolm@redhat.com>
2555
2556 * c-objc-common.c: Include "gcc-rich-location.h".
2557 (c_tree_printer): Move implemenation of '%T' to...
2558 (print_type): ...this new function.
2559 (range_label_for_type_mismatch::get_text): New function.
2560 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2561 range for the various ic_argpass cases.
2562 (class maybe_range_label_for_tree_type_mismatch): New class.
2563 (build_binary_op): Use it when calling binary_op_error.
2564
2565 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2566
2567 * c-decl.c (start_decl): Do not warn if variables is named as main
2568 and is a local variable.
2569
2570 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2571
2572 PR c/19315
2573 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2574 objects of unknown size.
2575
2576 2018-08-13 Martin Sebor <msebor@redhat.com>
2577
2578 PR tree-optimization/71625
2579 * c-parser.c (c_parser_declaration_or_fndef): Call
2580 braced_list_to_string.
2581
2582 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2583
2584 PR c/86690
2585 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2586 errors.
2587
2588 2018-08-01 Martin Sebor <msebor@redhat.com>
2589
2590 PR tree-optimization/86650
2591 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2592 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2593
2594 2018-08-01 Jakub Jelinek <jakub@redhat.com>
2595
2596 PR c/85704
2597 * c-typeck.c (init_field_decl_cmp): New function.
2598 (output_pending_init_elements): Use it for field comparisons
2599 instead of pure bit_position comparisons.
2600
2601 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2602
2603 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2604 type here, instead add "omp declare target implicit" attribute.
2605 (finish_decl): Diagnose vars without mappable type here.
2606
2607 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2608 Thomas Schwinge <thomas@codesourcery.com>
2609 Cesar Philippidis <cesar@codesourcery.com>
2610
2611 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2612 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2613 to their non-present_or_* counterparts. Make 'self' an alias to
2614 PRAGMA_OACC_CLAUSE_HOST.
2615 (c_parser_oacc_data_clause): Update GOMP mappings for
2616 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2617 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2618 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2619 Remove support for present_or_* clauses.
2620 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2621 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2622 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2623 (OACC_DATA_CLAUSE_MASK): Likewise.
2624 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2625 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2626 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2627 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2628 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2629
2630 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2631
2632 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2633 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2634 (c_parser_gimple_unary_expression): Likewise.
2635
2636 2018-06-15 Jakub Jelinek <jakub@redhat.com>
2637
2638 PR c/86093
2639 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2640 before doing POINTER_DIFF_EXPR.
2641
2642 2018-06-07 Marek Polacek <polacek@redhat.com>
2643
2644 PR c/85318
2645 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2646 for loop initial declarations.
2647
2648 2018-05-30 David Pagan <dave.pagan@oracle.com>
2649
2650 PR c/55976
2651 * c-decl.c (grokdeclarator): Update check for return type warnings.
2652 (start_function): Likewise.
2653 (finish_function): Likewise.
2654 * c-typeck.c (c_finish_return): Update check for return type warnings.
2655 Pass OPT_Wreturn_type to pedwarn when appropriate.
2656
2657 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2658
2659 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2660 __FMA_EXPR handlng.
2661
2662 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2663
2664 * gimple-parser.c: Include internal-fn.h.
2665 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2666 (c_parser_gimple_call_internal): New function.
2667 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2668 Fix typos in comment.
2669
2670 2018-05-10 Jakub Jelinek <jakub@redhat.com>
2671
2672 PR c++/85662
2673 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2674 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2675 fold_convert_loc.
2676 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2677 fold_offsetof_1, pass argtype as TYPE to it and drop the
2678 fold_convert_loc.
2679
2680 2018-05-02 David Pagan <dave.pagan@oracle.com>
2681
2682 PR c/30552
2683 * c-decl.c (old_style_parameter_scope): New function.
2684 * c-parser.c (c_parser_postfix_expression): Check for statement
2685 expressions in old-style function parameter list declarations.
2686 * c-parser.h (old_style_parameter_scope): New extern declaration.
2687
2688 2018-04-25 Jakub Jelinek <jakub@redhat.com>
2689
2690 PR sanitizer/84307
2691 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2692 it is not TREE_STATIC.
2693 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2694 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2695 its COMPOUND_LITERAL_EXPR_DECL.
2696
2697 2018-03-21 Joseph Myers <joseph@codesourcery.com>
2698
2699 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2700 where all functions return the same _FloatN or _FloatNx type,
2701 treat integer types as _Float64 instead of double.
2702
2703 2018-03-21 Jakub Jelinek <jakub@redhat.com>
2704
2705 PR c/84999
2706 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2707 building vector comparison, diagnose it and return error_mark_node.
2708
2709 2018-03-15 Jakub Jelinek <jakub@redhat.com>
2710
2711 PR c/84853
2712 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2713 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2714 INTEGER_TYPE element type.
2715
2716 2018-03-13 David Pagan <dave.pagan@oracle.com>
2717
2718 PR c/46921
2719 * c-typeck.c (output_init_element): Ensure field initializer
2720 expression is always evaluated if there are side effects.
2721
2722 2018-03-06 Jakub Jelinek <jakub@redhat.com>
2723
2724 PR c/84721
2725 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2726 !building_stmt_list_p ().
2727
2728 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2729
2730 PR c/84305
2731 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2732 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2733 and include the BIND_EXPR in the list of things that need to be
2734 pre-evaluated.
2735
2736 2018-02-09 Nathan Sidwell <nathan@acm.org>
2737
2738 PR c/84293
2739 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2740 to strict_aliasing_warning.
2741
2742 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2743
2744 * c-typeck.c (really_start_incremental_init, push_init_level,
2745 set_nonincremental_init, output_init_element, process_init_element):
2746 Use DECL_UNNAMED_BIT_FIELD.
2747
2748 2018-01-31 Marek Polacek <polacek@redhat.com>
2749
2750 PR c/81779
2751 * c-parser.c (c_parser_compound_statement_nostart): Call
2752 expansion_point_location_if_in_system_header.
2753
2754 2018-01-17 David Malcolm <dmalcolm@redhat.com>
2755
2756 PR c++/83814
2757 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2758 the C part.
2759
2760 2018-01-13 Jakub Jelinek <jakub@redhat.com>
2761
2762 PR c/83801
2763 * c-tree.h (decl_constant_value_1): Add a bool argument.
2764 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2765 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2766 (decl_constant_value): Adjust caller.
2767 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2768 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2769 decl_constant_value returns initializer that has BLKmode or
2770 array type.
2771 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2772
2773 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2774 Alan Hayward <alan.hayward@arm.com>
2775 David Sherwood <david.sherwood@arm.com>
2776
2777 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2778 TYPE_VECTOR_SUBPARTS.
2779
2780 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2781
2782 Update copyright years.
2783
2784 2018-01-01 Jakub Jelinek <jakub@redhat.com>
2785
2786 PR c/83595
2787 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2788 c_parser_conditional_expression, c_parser_cast_expression,
2789 c_parser_sizeof_expression, c_parser_alignof_expression,
2790 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2791 c_parser_transaction_expression): Use set_error () method instead
2792 of setting value member to error_mark_node.
2793
2794 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2795
2796 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2797 and _Float<N>X built-in functions.
2798
2799 2017-12-22 Jakub Jelinek <jakub@redhat.com>
2800
2801 PR debug/83550
2802 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2803 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2804 incomplete vars rather than after it.
2805
2806 PR debug/83547
2807 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2808 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2809 and consider empty ones if there are no other stmts. For
2810 -Wunused-value walk all statements before the one only followed by
2811 DEBUG_BEGIN_STMTs.
2812
2813 2017-12-22 Mike Stump <mikestump@comcast.net>
2814 Eric Botcazou <ebotcazou@adacore.com>
2815
2816 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2817 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2818 (c_parser_do_statement): Likewise.
2819 (c_parser_for_statement): Likewise.
2820 (c_parser_statement_after_labels): Adjust calls to above.
2821 (c_parse_pragma_ivdep): New static function.
2822 (c_parser_pragma_unroll): Likewise.
2823 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2824 <PRAGMA_UNROLL>: New case.
2825
2826 2017-12-19 Jakub Jelinek <jakub@redhat.com>
2827
2828 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2829 perform_integral_promotions, digest_init): Replace Yoda conditions
2830 with typical order conditions.
2831 * c-decl.c (check_bitfield_type_and_width): Likewise.
2832
2833 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2834
2835 * c-typeck.c (c_safe_arg_type_equiv_p,
2836 c_safe_function_type_cast_p): New function.
2837 (build_c_cast): Implement -Wcast-function-type.
2838
2839 2017-12-14 Richard Biener <rguenther@suse.de>
2840
2841 PR c/83415
2842 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2843 like REALPART_EXPR for the behavior of whether its operand
2844 is an lvalue.
2845
2846 2017-12-12 Marek Polacek <polacek@redhat.com>
2847
2848 PR c/82679
2849 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2850
2851 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
2852
2853 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2854 * c-parser.c (add_debug_begin_stmt): New.
2855 (c_parser_declaration_or_fndef): Call it.
2856 (c_parser_compound_statement_nostart): Likewise.
2857 (c_parser_statement_after_labels): Likewise.
2858 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2859
2860 2017-12-07 Joseph Myers <joseph@codesourcery.com>
2861
2862 * c-decl.c (build_compound_literal): Add parameter alignas_align
2863 and set alignment of decl if nonzero.
2864 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2865 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2866 qualifier.
2867 (c_parser_struct_declaration): Update syntax comment.
2868 (c_parser_type_name): Add alignas_ok argument and pass it to
2869 c_parser_declspecs.
2870 (c_parser_cast_expression): Pass true to c_parser_type_name and
2871 give error if a cast used an _Alignas specifier.
2872 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2873 give error if sizeof (type-name) used an _Alignas specifier.
2874 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2875 give error if _Alignof (type-name) used an _Alignas specifier.
2876 (c_parser_postfix_expression_after_paren_type): Check specified
2877 alignment for a compound literal and pass it to
2878 build_compound_literal.
2879 * c-parser.h (c_parser_type_name): Update prototype.
2880 * c-tree.h (build_compound_literal): Update prototype.
2881
2882 2017-12-07 Martin Sebor <msebor@redhat.com>
2883
2884 PR c/81544
2885 * c-decl.c (c_decl_attributes): Look up existing declaration and
2886 pass it to decl_attributes.
2887
2888 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2889
2890 PR c/83236
2891 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2892 reserved for use by the implementation.
2893
2894 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2895
2896 * c-decl.c: Include "c-family/c-spellcheck.h".
2897
2898 2017-12-05 Martin Liska <mliska@suse.cz>
2899 Jakub Jelinek <jakub@redhat.com>
2900
2901 * c-typeck.c (pointer_diff): Add new argument and instrument
2902 pointer subtraction.
2903 (build_binary_op): Similar for pointer comparison.
2904
2905 2017-12-01 Jakub Jelinek <jakub@redhat.com>
2906
2907 PR c/79153
2908 * c-parser.c: Include tree-iterator.h.
2909 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2910 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2911 on it.
2912
2913 PR c/83222
2914 * c-tree.h (decl_constant_value_1): Declare.
2915 * c-typeck.c (decl_constant_value_1): New function.
2916 (decl_constant_value): Use it.
2917 * c-fold.c (c_fully_fold_internal): If in_init, use
2918 decl_constant_value_1 instead of decl_constant_value.
2919
2920 2017-11-30 Jakub Jelinek <jakub@redhat.com>
2921
2922 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2923
2924 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2925
2926 PR sanitizer/81275
2927 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2928 c_switch_covers_all_cases_p returns true.
2929
2930 2017-11-28 Julia Koval <julia.koval@intel.com>
2931 Sebastian Peryt <sebastian.peryt@intel.com>
2932
2933 * Make-lang.in (c/c-array-notation.o): Remove.
2934 * c-array-notation.c: Delete.
2935 * c-decl.c: Remove cilkplus condition.
2936 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2937 c_parser_cilk_verify_simd, c_parser_array_notation,
2938 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2939 c_parser_cilk_simd_fn_vector_attrs,
2940 c_finish_cilk_simd_fn_tokens): Delete.
2941 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2942 (c_parser_direct_declarator_inner): Ditto.
2943 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2944 (c_parser_attributes, c_parser_compound_statement,
2945 c_parser_statement_after_labels, c_parser_if_statement,
2946 c_parser_switch_statement, c_parser_while_statement,
2947 c_parser_do_statement, c_parser_for_statement,
2948 c_parser_unary_expression, c_parser_postfix_expression,
2949 c_parser_postfix_expression_after_primary,
2950 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2951 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2952 support.
2953 * c-typeck.c (build_array_ref, build_function_call_vec,
2954 convert_arguments,
2955 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2956 c_finish_loop, build_binary_op): Remove cilkplus support.
2957
2958 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2959
2960 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2961 of build3.
2962
2963 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
2964
2965 * Make-lang.in (c.install-plugin): Install backend import library.
2966
2967 2017-11-23 Jakub Jelinek <jakub@redhat.com>
2968
2969 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2970 pragma_stmt context.
2971
2972 2017-11-23 Mike Stump <mikestump@comcast.net>
2973 Eric Botcazou <ebotcazou@adacore.com>
2974
2975 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2976 ANNOTATE_EXPR.
2977 (c_parser_do_statement): Likewise.
2978 (c_parser_for_statement): Likewise.
2979
2980 2017-11-22 David Malcolm <dmalcolm@redhat.com>
2981
2982 PR c++/62170
2983 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2984 bool to bool *. Within '%T' handling, if showing an "aka", use
2985 "quoted" param to add appropriate quoting.
2986
2987 2017-11-22 Marek Polacek <polacek@redhat.com>
2988
2989 PR c++/60336
2990 PR middle-end/67239
2991 PR target/68355
2992 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2993
2994 2017-11-21 David Malcolm <dmalcolm@redhat.com>
2995
2996 PR c/83056
2997 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2998 earlier failed lookups.
2999
3000 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
3001
3002 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3003 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3004
3005 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3006
3007 PR c/81404
3008 * c-decl.c: Include "c-family/known-headers.h".
3009 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3010 to known-headers.cc.
3011 (class suggest_missing_header): Move to known-header.h.
3012 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3013 than get_c_name_hint.
3014
3015 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3016
3017 * c-decl.c (get_c_name_hint): New function.
3018 (class suggest_missing_header): New class.
3019 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3020 suggest missing headers to the user.
3021
3022 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3023
3024 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3025 Include "c-family/name-hint.h"
3026 (implicit_decl_warning): Convert "hint" from
3027 const char * to name_hint. Pass location to
3028 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3029 warning was not printed.
3030 (undeclared_variable): Likewise for "guessed_id".
3031 (lookup_name_fuzzy): Convert return type from const char *
3032 to name_hint. Add location_t param.
3033 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3034 Include "c-family/name-hint.h"
3035 (c_parser_declaration_or_fndef): Convert "hint" from
3036 const char * to name_hint. Pass location to lookup_name_fuzzy.
3037 (c_parser_parameter_declaration): Likewise.
3038
3039 2017-11-19 Jakub Jelinek <jakub@redhat.com>
3040
3041 PR c/66618
3042 PR c/69960
3043 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3044 where needed.
3045 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3046 handle_omp_array_sections): Likewise.
3047 (digest_init): Don't call decl_constant_value_for_optimization.
3048 * c-tree.h (decl_constant_value_for_optimization): Removed.
3049 * c-fold.c (c_fold_array_ref): New function.
3050 (c_fully_fold_internal): Add LVAL argument, propagate it through
3051 recursive calls. For VAR_P call decl_constant_value and
3052 unshare if not LVAL and either optimizing or IN_INIT. Remove
3053 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3054 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3055 (c_fully_fold): Add LVAL argument, pass it through to
3056 c_fully_fold_internal.
3057 (decl_constant_value_for_optimization): Removed.
3058
3059 2017-11-15 Joseph Myers <joseph@codesourcery.com>
3060
3061 PR c/81156
3062 * c-parser.c (check_tgmath_function): New function.
3063 (enum tgmath_parm_kind): New enum.
3064 (c_parser_postfix_expression): Handle __builtin_tgmath.
3065
3066 2017-10-31 David Malcolm <dmalcolm@redhat.com>
3067
3068 * c-decl.c (implicit_decl_warning): Update for renaming of
3069 pedwarn_at_rich_loc and warning_at_rich_loc.
3070 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3071 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3072 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3073 (c_parser_struct_or_union_specifier): Likewise for renaming of
3074 pedwarn_at_rich_loc.
3075 (c_parser_parameter_declaration): Likewise for renaming of
3076 error_at_rich_loc.
3077 * c-typeck.c (build_component_ref): Likewise.
3078 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3079 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3080 (set_init_label): Likewise for renaming of error_at_rich_loc.
3081
3082 2017-10-30 Richard Biener <rguenther@suse.de>
3083
3084 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3085 stmts.
3086
3087 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3088
3089 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3090 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3091
3092 2017-10-25 David Malcolm <dmalcolm@redhat.com>
3093
3094 PR c/7356
3095 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3096 semicolons.
3097
3098 2017-10-25 Jakub Jelinek <jakub@redhat.com>
3099
3100 PR libstdc++/81706
3101 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3102 newdecl to corresponding __builtin_ if any.
3103
3104 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3105
3106 PR c++/82466
3107 * c-decl.c (diagnose_mismatched_decls): Use
3108 OPT_Wbuiltin_declaration_mismatch.
3109
3110 2017-10-12 David Malcolm <dmalcolm@redhat.com>
3111
3112 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3113 use it to guard calls to maybe_suggest_missing_token_insertion.
3114 (c_parser_parms_list_declarator): Override default value of new
3115 "type_is_unique" param to c_parser_require.
3116 (c_parser_asm_statement): Likewise.
3117 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3118 defaulting to true.
3119
3120 2017-10-11 Nathan Sidwell <nathan@acm.org>
3121
3122 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3123
3124 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3125
3126 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3127 operating on trees as wide_ints.
3128 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3129 (c_tree_equal): Likewise.
3130
3131 2017-10-04 David Malcolm <dmalcolm@redhat.com>
3132
3133 * c-decl.c (push_parm_decl): Store c_parm's location into the
3134 PARAM_DECL.
3135 (build_c_parm): Add "loc" param and store it within the c_parm.
3136 * c-parser.c (struct c_parser): Add "last_token_location" field.
3137 (c_parser_consume_token): Store location of the token into the
3138 new field.
3139 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3140 when handling a FUNCTION_DECL, if it doesn't already have them.
3141 (c_parser_parameter_declaration): Generate a location for the
3142 parameter, and pass it to the call to build_c_parm.
3143 * c-tree.h (struct c_parm): Add field "loc".
3144 (build_c_parm): Add location_t param.
3145 * c-typeck.c (get_fndecl_argument_location): New function.
3146 (inform_for_arg): New function.
3147 (convert_for_assignment): Use inform_for_arg when dealing with
3148 ic_argpass.
3149
3150 2017-09-29 Jakub Jelinek <jakub@redhat.com>
3151
3152 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3153 width is non-NULL.
3154 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3155 don't SET_DECL_C_BIT_FIELD here.
3156
3157 PR c/82340
3158 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3159 instead of trying to set just TREE_READONLY manually.
3160
3161 2017-09-16 Tom de Vries <tom@codesourcery.com>
3162
3163 PR c/81875
3164 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3165 cond itself.
3166
3167 2017-09-15 Joseph Myers <joseph@codesourcery.com>
3168
3169 PR c/82071
3170 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3171 for C11.
3172 (build_conditional_expr): For C11, generate result with excess
3173 precision when one argument is an integer and the other is of a
3174 type using excess precision.
3175
3176 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3177
3178 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3179
3180 2017-09-13 Marek Polacek <polacek@redhat.com>
3181
3182 PR c/82167
3183 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3184 than expr.original_type.
3185
3186 2017-09-12 Nathan Sidwell <nathan@acm.org>
3187
3188 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3189 resort_sorted_fields): Moved from c-family/c-common.c.
3190 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3191
3192 2017-09-01 Joseph Myers <joseph@codesourcery.com>
3193
3194 PR c/82071
3195 * c-typeck.c (build_atomic_assign): Handle argument with excess
3196 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3197 argument passed to build_binary_op and convert_for_assignment but
3198 not for call to c_fully_fold.
3199 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3200 Ensure build_binary_op is called with argument with original
3201 semantic type. Avoid calling c_fully_fold with an
3202 EXCESS_PRECISION_EXPR from build_binary_op.
3203
3204 2017-09-01 Jakub Jelinek <jakub@redhat.com>
3205
3206 PR c/81887
3207 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3208
3209 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3210 Alan Hayward <alan.hayward@arm.com>
3211 David Sherwood <david.sherwood@arm.com>
3212
3213 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3214 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3215 m1 and m2 to the signed equivalent of a fixed-point
3216 SCALAR_TYPE_MODE.
3217
3218 2017-08-24 David Malcolm <dmalcolm@redhat.com>
3219
3220 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3221 than CAN_HAVE_LOCATION_P when determining whether to use the
3222 location_t value within "value".
3223
3224 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3225
3226 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3227 rather than peeking the location of the first token.
3228 * c-tree.h (c_expr::get_location): New method.
3229
3230 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3231
3232 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3233 to check_function_arguments.
3234
3235 2017-08-18 Marek Polacek <polacek@redhat.com>
3236
3237 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3238 commentary.
3239
3240 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3241
3242 PR c/53037
3243 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3244 (check_bitfield_type_and_width): Don't allow bit-field with
3245 warn_if_not_aligned type.
3246
3247 2017-08-14 Martin Sebor <msebor@redhat.com>
3248
3249 PR c/81117
3250 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3251
3252 2017-08-11 Marek Polacek <polacek@redhat.com>
3253
3254 PR c/81795
3255 * c-decl.c (pushtag): Only print inform if the warning was printed.
3256 (grokdeclarator): Likewise.
3257
3258 2017-08-10 David Malcolm <dmalcolm@redhat.com>
3259
3260 * c-parser.c (c_parser_error): Rename to...
3261 (c_parser_error_richloc): ...this, making static, and adding
3262 "richloc" parameter, passing it to the c_parse_error call,
3263 rather than calling c_parser_set_source_position_from_token.
3264 (c_parser_error): Reintroduce, reimplementing in terms of the
3265 above, converting return type from void to bool.
3266 (class token_pair): New class.
3267 (struct matching_paren_traits): New struct.
3268 (matching_parens): New typedef.
3269 (struct matching_brace_traits): New struct.
3270 (matching_braces): New typedef.
3271 (get_matching_symbol): New function.
3272 (c_parser_require): Add param MATCHING_LOCATION, using it to
3273 highlight matching "opening" tokens for missing "closing" tokens.
3274 (c_parser_skip_until_found): Likewise.
3275 (c_parser_static_assert_declaration_no_semi): Convert explicit
3276 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3277 class matching_parens, so that the pertinent open parenthesis is
3278 highlighted when there are problems locating the close
3279 parenthesis.
3280 (c_parser_struct_or_union_specifier): Likewise.
3281 (c_parser_typeof_specifier): Likewise.
3282 (c_parser_alignas_specifier): Likewise.
3283 (c_parser_simple_asm_expr): Likewise.
3284 (c_parser_braced_init): Likewise, for matching_braces.
3285 (c_parser_paren_condition): Likewise, for matching_parens.
3286 (c_parser_switch_statement): Likewise.
3287 (c_parser_for_statement): Likewise.
3288 (c_parser_asm_statement): Likewise.
3289 (c_parser_asm_operands): Likewise.
3290 (c_parser_cast_expression): Likewise.
3291 (c_parser_sizeof_expression): Likewise.
3292 (c_parser_alignof_expression): Likewise.
3293 (c_parser_generic_selection): Likewise.
3294 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3295 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3296 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3297 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3298 c_parser_skip_until_found call.
3299 (c_parser_objc_class_definition): Use class matching_parens as
3300 above.
3301 (c_parser_objc_method_decl): Likewise.
3302 (c_parser_objc_try_catch_finally_statement): Likewise.
3303 (c_parser_objc_synchronized_statement): Likewise.
3304 (c_parser_objc_at_property_declaration): Likewise.
3305 (c_parser_oacc_wait_list): Likewise.
3306 (c_parser_omp_var_list_parens): Likewise.
3307 (c_parser_omp_clause_collapse): Likewise.
3308 (c_parser_omp_clause_default): Likewise.
3309 (c_parser_omp_clause_if): Likewise.
3310 (c_parser_omp_clause_num_threads): Likewise.
3311 (c_parser_omp_clause_num_tasks): Likewise.
3312 (c_parser_omp_clause_grainsize): Likewise.
3313 (c_parser_omp_clause_priority): Likewise.
3314 (c_parser_omp_clause_hint): Likewise.
3315 (c_parser_omp_clause_defaultmap): Likewise.
3316 (c_parser_oacc_single_int_clause): Likewise.
3317 (c_parser_omp_clause_ordered): Likewise.
3318 (c_parser_omp_clause_reduction): Likewise.
3319 (c_parser_omp_clause_schedule): Likewise.
3320 (c_parser_omp_clause_num_teams): Likewise.
3321 (c_parser_omp_clause_thread_limit): Likewise.
3322 (c_parser_omp_clause_aligned): Likewise.
3323 (c_parser_omp_clause_linear): Likewise.
3324 (c_parser_omp_clause_safelen): Likewise.
3325 (c_parser_omp_clause_simdlen): Likewise.
3326 (c_parser_omp_clause_depend): Likewise.
3327 (c_parser_omp_clause_map): Likewise.
3328 (c_parser_omp_clause_device): Likewise.
3329 (c_parser_omp_clause_dist_schedule): Likewise.
3330 (c_parser_omp_clause_proc_bind): Likewise.
3331 (c_parser_omp_clause_uniform): Likewise.
3332 (c_parser_omp_for_loop): Likewise.
3333 (c_parser_cilk_clause_vectorlength): Likewise.
3334 (c_parser_cilk_clause_linear): Likewise.
3335 (c_parser_transaction_expression): Likewise.
3336 * c-parser.h (c_parser_require): Add param matching_location with
3337 default UNKNOWN_LOCATION.
3338 (c_parser_error): Convert return type from void to bool.
3339 (c_parser_skip_until_found): Add param matching_location with
3340 default UNKNOWN_LOCATION.
3341
3342 2017-08-09 Marek Polacek <polacek@redhat.com>
3343
3344 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3345 * c-tree.h (build_external_ref): Update declaration.
3346 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3347 (build_external_ref): Change the type of a parameter to bool.
3348 (parser_build_binary_op): Use true/false instead of 1/0.
3349 (pointer_diff): Likewise.
3350 (build_modify_expr): Likewise.
3351 (set_designator): Change the type of a parameter to bool.
3352 (set_init_index): Use true/false instead of 1/0.
3353 (set_init_label): Likewise.
3354 (output_init_element): Change the type of a parameter to bool.
3355 (output_pending_init_elements): Use true/false instead of 1/0.
3356 (process_init_element): Likewise.
3357 (build_binary_op): Change the type of a parameter to bool.
3358
3359 2017-08-09 Marek Polacek <polacek@redhat.com>
3360
3361 PR c/81233
3362 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3363 Call emit_diagnostic_valist instead of pedwarn.
3364 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3365 Print the relevant types in diagnostics.
3366
3367 2017-08-09 Marek Polacek <polacek@redhat.com>
3368
3369 PR c/81417
3370 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
3371 build_conditional_expr.
3372 * c-parser.c (c_parser_conditional_expression): Create locations for
3373 EXP1 and EXP2 from their source ranges. Pass the locations down to
3374 build_conditional_expr.
3375 * c-tree.h (build_conditional_expr): Update declaration.
3376 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3377 For -Wsign-compare, also print the types.
3378
3379 2017-08-08 Martin Liska <mliska@suse.cz>
3380
3381 * c-convert.c: Include header files.
3382 * c-typeck.c: Likewise.
3383
3384 2017-08-07 Martin Liska <mliska@suse.cz>
3385
3386 * c-parser.c (c_parser_attributes): Canonicalize name of an
3387 attribute.
3388
3389 2017-08-02 Marek Polacek <polacek@redhat.com>
3390
3391 PR c/81289
3392 * c-parser.c (c_parser_unary_expression): Use set_error.
3393
3394 PR c/81448
3395 PR c/81306
3396 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3397 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3398
3399 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
3400 Martin Liska <mliska@suse.cz>
3401
3402 * c-typeck.c (c_finish_goto_label): Build gimple predict
3403 statement.
3404
3405 2017-07-31 Martin Liska <mliska@suse.cz>
3406
3407 PR sanitize/81530
3408 * c-convert.c (convert): Guard condition with flag_sanitize_p
3409 also with current_function_decl non-null equality.
3410 * c-decl.c (grokdeclarator): Likewise.
3411 * c-typeck.c (build_binary_op): Likewise.
3412
3413 2017-07-25 Marek Polacek <polacek@redhat.com>
3414
3415 * c-decl.c (grokfield): Remove local variable.
3416
3417 2017-07-25 Marek Polacek <polacek@redhat.com>
3418
3419 PR c/81364
3420 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3421 macro expansion if the body is in { }.
3422 (c_parser_while_statement): Likewise.
3423 (c_parser_for_statement): Likewise.
3424
3425 2017-07-18 Nathan Sidwell <nathan@acm.org>
3426
3427 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3428
3429 2017-07-14 David Malcolm <dmalcolm@redhat.com>
3430
3431 * c-decl.c (implicitly_declare): When suggesting a missing
3432 #include, provide a fix-it hint.
3433
3434 2017-07-06 David Malcolm <dmalcolm@redhat.com>
3435
3436 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3437 and call that instead.
3438 * c-tree.h (selftest::run_c_tests): New decl.
3439
3440 2017-06-26 Marek Polacek <polacek@redhat.com>
3441
3442 PR c/80116
3443 * c-parser.c (c_parser_if_body): Set the location of the
3444 body of the conditional after parsing all the labels. Call
3445 warn_for_multistatement_macros.
3446 (c_parser_else_body): Likewise.
3447 (c_parser_switch_statement): Likewise.
3448 (c_parser_while_statement): Likewise.
3449 (c_parser_for_statement): Likewise.
3450 (c_parser_statement): Add a default argument. Save the location
3451 after labels have been parsed.
3452 (c_parser_c99_block_statement): Likewise.
3453
3454 2017-06-19 Richard Biener <rguenther@suse.de>
3455
3456 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3457 negated _Literals to parse _Literal (int) -1.
3458
3459 2017-06-13 Martin Liska <mliska@suse.cz>
3460
3461 PR sanitize/78204
3462 * c-convert.c (convert): Use sanitize_flags_p.
3463 * c-decl.c (grokdeclarator): Likewise.
3464 * c-typeck.c (convert_for_assignment): Likewise.
3465 (c_finish_return): Likewise.
3466 (build_binary_op): Likewise.
3467
3468 2017-06-08 Jakub Jelinek <jakub@redhat.com>
3469
3470 PR c/81006
3471 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3472 to sizetype before size_binop.
3473
3474 2017-06-07 Jakub Jelinek <jakub@redhat.com>
3475
3476 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3477 of TDI_generic.
3478
3479 2017-06-06 Marek Polacek <polacek@redhat.com>
3480
3481 PR c/79983
3482 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3483 ref.
3484 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3485
3486 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3487
3488 * c-parser.c (c_parser_binary_expression): Implement the
3489 -Wsizeof_pointer_div warning.
3490 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3491 from a parenthesized expression.
3492 (c_parser_expr_list): Use c_last_sizeof_loc.
3493 * c-tree.h (c_last_sizeof_loc): New external.
3494 * c-typeck.c (c_last_sizeof_loc): New variable.
3495 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3496
3497 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3498
3499 PR testsuite/80580
3500 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3501
3502 2017-05-30 David Malcolm <dmalcolm@redhat.com>
3503
3504 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3505 parameters.
3506
3507 2017-05-24 Martin Sebor <msebor@redhat.com>
3508
3509 PR c/80731
3510 * c-fold.c (c_fully_fold_internal): Adjust.
3511 * c-typeck.c (parser_build_unary_op): Adjust.
3512
3513 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3514
3515 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3516 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3517 "VECTOR_LENGTH".
3518
3519 2017-05-23 Marek Polacek <polacek@redhat.com>
3520
3521 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3522 quotes.
3523
3524 2017-05-22 Jakub Jelinek <jakub@redhat.com>
3525
3526 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3527 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3528 it returned invariant. Call tree_invariant_p unconditionally
3529 afterwards to decide whether to return expr or op0.
3530
3531 2017-05-22 Nathan Sidwell <nathan@acm.org>
3532
3533 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3534
3535 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3536
3537 * c-parser.c (c_parser_omp_clause_default): Handle
3538 "OMP_CLAUSE_DEFAULT_PRESENT".
3539
3540 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3541
3542 * config-lang.in (gtfiles): Add c-family/c-format.c.
3543
3544 2017-05-18 Nathan Sidwell <nathan@acm.org>
3545
3546 * c-decl.c (pushdecl_top_level): Delete unused function.
3547
3548 2017-05-18 Marek Polacek <polacek@redhat.com>
3549
3550 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3551 (check_earlier_gotos): Likewise.
3552 (define_label): Likewise.
3553 (pending_xref_error): Likewise.
3554 (smallest_type_quals_location): Likewise.
3555 (grokdeclarator): Likewise.
3556 (grokparms): Likewise.
3557 (identifier_global_value): Likewise.
3558 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3559 (find_init_member): Likewise.
3560
3561 2017-05-18 Marek Polacek <polacek@redhat.com>
3562
3563 * c-decl.c (start_decl): Use false/true instead of 0/1.
3564 (grokdeclarator): Likewise.
3565 (finish_struct): Likewise.
3566 (start_function): Change the return type to bool. Use false/true
3567 instead of 0/1.
3568 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3569 * c-tree.h (start_function): Update.
3570 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3571 (set_designator): Change the return type to bool. Use false/true
3572 instead of 0/1.
3573
3574 2017-05-17 Marek Polacek <polacek@redhat.com>
3575
3576 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3577 * c-typeck.c: Likewise.
3578
3579 2017-05-17 Marek Polacek <polacek@redhat.com>
3580
3581 PR sanitizer/80659
3582 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3583 DECL_IGNORED_P even for non-static compound literals.
3584
3585 2017-05-17 Martin Liska <mliska@suse.cz>
3586
3587 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3588 use it instead of int type.
3589
3590 2017-05-17 Marek Polacek <polacek@redhat.com>
3591
3592 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3593 call c_fully_fold.
3594 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
3595 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
3596 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3597 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3598 save_expr.
3599 (c_parser_conditional_expression): Likewise.
3600 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3601 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3602 (process_init_element): Likewise.
3603 (build_binary_op): Likewise.
3604 (handle_omp_array_sections_1): Likewise.
3605
3606 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3607
3608 * c-parser.c (c_parser_omp_clause_num_gangs)
3609 (c_parser_omp_clause_num_workers)
3610 (c_parser_omp_clause_vector_length): Merge functions into...
3611 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3612 all users.
3613
3614 2017-05-11 Nathan Sidwell <nathan@acm.org>
3615
3616 * gimple-parser.c: Don't #include tree-dump.h.
3617
3618 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3619
3620 PR testsuite/80580
3621 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3622
3623 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3624
3625 PR testsuite/80580
3626 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3627 incorrect __MEM syntax.
3628
3629 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3630
3631 PR testsuite/80580
3632 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3633 type of unary '*'.
3634
3635 2017-05-09 Nathan Sidwell <nathan@acm.org>
3636
3637 * c-tree.h (pushdecl): Declare.
3638
3639 2017-05-05 David Malcolm <dmalcolm@redhat.com>
3640
3641 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3642 with diagnostic_report_diagnostic.
3643 * c-errors.c (pedwarn_c99): Likewise.
3644 (pedwarn_c90): Likewise.
3645
3646 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3647
3648 PR c++/80038
3649 * c-gimplify.c (c_gimplify_expr): Remove calls to
3650 cilk_gimplifY_call_params_in_spawned_fn.
3651
3652 2017-04-25 David Malcolm <dmalcolm@redhat.com>
3653
3654 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3655 hint for removing extra semicolon.
3656
3657 2017-04-21 Jakub Jelinek <jakub@redhat.com>
3658
3659 PR c/80468
3660 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3661 enabled, set specs->type to integer_type_node.
3662
3663 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
3664
3665 * c-array-notation.c: Fix typo in comment.
3666
3667 2017-03-29 Marek Polacek <polacek@redhat.com>
3668
3669 PR c/79730
3670 * c-decl.c (finish_decl): Check VAR_P.
3671
3672 2017-03-27 Jakub Jelinek <jakub@redhat.com>
3673
3674 PR middle-end/80162
3675 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3676 * c-typeck.c (c_mark_addressable): Likewise. Look through
3677 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3678 to ARRAY_TYPE.
3679 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3680
3681 2017-03-23 Marek Polacek <polacek@redhat.com>
3682
3683 * c-tree.h: Remove a C_RID_YYCODE reference.
3684
3685 2017-03-21 Jakub Jelinek <jakub@redhat.com>
3686
3687 PR c/80097
3688 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3689 optional COMPOUND_EXPR with ubsan instrumentation.
3690
3691 2017-03-17 Marek Polacek <polacek@redhat.com>
3692
3693 * c-parser.c: Add C11 references.
3694
3695 2017-03-15 Marek Polacek <polacek@redhat.com>
3696
3697 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3698
3699 2017-03-11 Marek Polacek <polacek@redhat.com>
3700
3701 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3702
3703 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3704
3705 PR translation/79848
3706 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3707 "%qs".
3708 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3709
3710 2017-03-09 Marek Polacek <polacek@redhat.com>
3711
3712 PR sanitizer/79757
3713 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3714 parameter declarations with initializers.
3715
3716 2017-03-09 Jakub Jelinek <jakub@redhat.com>
3717
3718 PR c/79969
3719 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3720 TYPE_STUB_DECL.
3721
3722 2017-03-07 Jakub Jelinek <jakub@redhat.com>
3723
3724 PR c/79834
3725 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3726 for "may only be used in compound statements" diagnostics, change it
3727 such that the same translatable string is used for all pragmas. For
3728 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3729 diagnostics.
3730 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3731 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3732 "may only be used in compound statements" diagnostics, such that the
3733 same translatable string is used for all pragmas.
3734
3735 2017-03-04 Marek Polacek <polacek@redhat.com>
3736
3737 PR c/79847
3738 * c-decl.c (implicit_decl_warning): Add missing space.
3739
3740 2017-03-03 Marek Polacek <polacek@redhat.com>
3741
3742 PR c/79758
3743 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3744 current_function_prototype_arg_types is error_mark_node. Fix
3745 formatting. Use TREE_VALUE instead of TREE_TYPE.
3746
3747 2017-03-03 Jakub Jelinek <jakub@redhat.com>
3748
3749 PR c/79837
3750 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3751 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3752 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3753 diagnostics.
3754
3755 PR c/79836
3756 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3757 instead of %<_Generic>.
3758 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3759 (c_parser_omp_target_exit_data): Use %<release%> instead of
3760 %<release>.
3761
3762 2017-02-28 Jakub Jelinek <jakub@redhat.com>
3763
3764 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3765 instead of just cond ? "..." : "...".
3766 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3767 for "enter"/"exit" keyword.
3768 (c_finish_oacc_routine): Don't use %s to supply portions of the
3769 message.
3770
3771 2017-02-24 Jakub Jelinek <jakub@redhat.com>
3772
3773 PR c++/79588
3774 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3775 handle -Wrestrict here.
3776 * c-typeck.c (build_function_call_vec): Adjust
3777 check_function_arguments caller.
3778
3779 2017-02-23 Richard Biener <rguenther@suse.de>
3780
3781 PR c/79684
3782 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3783 to initialize c_exprs to return.
3784 (c_parser_gimple_binary_expression): Likewise.
3785 (c_parser_gimple_unary_expression): Likewise.
3786 (c_parser_gimple_postfix_expression): Likewise.
3787
3788 2017-02-22 Marek Polacek <polacek@redhat.com>
3789
3790 PR c/79662
3791 * c-typeck.c (convert_arguments): Handle error_mark_node.
3792
3793 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3794
3795 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3796 value of c_parser_parse_ssa_name against error_mark_node and emit
3797 error if ssa name is anonymous and written as default definition.
3798
3799 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3800
3801 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3802 FMA_EXPR.
3803
3804 2017-02-16 Jakub Jelinek <jakub@redhat.com>
3805
3806 PR c++/79512
3807 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3808 ignore #pragma omp target even when not followed by identifier.
3809
3810 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3811
3812 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3813 (c_parser_gimple_unary_expression): Likewise.
3814
3815 2017-02-13 Jakub Jelinek <jakub@redhat.com>
3816
3817 * c-parser.c (c_parser_oacc_declare): Add missing space in
3818 diagnostics.
3819
3820 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3821
3822 PR c/79478
3823 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3824 set_c_expr_source_range when parsing ssa-name.
3825
3826 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
3827 Richard Biener <rguenther@suse.de>
3828
3829 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3830 building IL when arguments are error_mark_node.
3831 (c_parser_gimple_unary_expression): Likewise.
3832 (c_parser_gimple_if_stmt): Likewise.
3833 (c_parser_gimple_switch_stmt): Likewise.
3834 (c_parser_gimple_return_stmt): Likewise.
3835 (c_parser_parse_ssa_name): When name lookup fails do not build
3836 an SSA name. Use undeclared rather than not declared in error
3837 reporting.
3838
3839 2017-02-09 Marek Polacek <polacek@redhat.com>
3840
3841 PR c/79428
3842 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3843 instead of c_parser_skip_until_found.
3844
3845 2017-02-09 Jakub Jelinek <jakub@redhat.com>
3846
3847 PR c/79431
3848 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3849 symtab_node::get on automatic variables.
3850
3851 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3852 Chung-Lin Tang <cltang@codesourcery.com>
3853
3854 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3855 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3856 semantic checking.
3857 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3858
3859 2017-02-07 Richard Biener <rguenther@suse.de>
3860
3861 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3862 (c_parser_gimple_postfix_expression_after_primary):
3863 Do not use c_build_function_call_vec to avoid folding and promotion.
3864 Simplify.
3865
3866 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3867
3868 PR lto/79061
3869 * c-decl.c (pop_scope): Pass main_input_filename to
3870 build_translation_unit_decl.
3871
3872 2017-01-24 David Malcolm <dmalcolm@redhat.com>
3873
3874 * c-parser.c: Include "read-rtl-function.h" and
3875 "run-rtl-passes.h".
3876 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3877 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3878 production. Update for renaming of field "gimple_pass" to
3879 "gimple_or_rtl_pass". If __RTL was seen, call
3880 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3881 to an auto_timevar, to cope with early exit.
3882 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3883 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3884 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3885 Handle RID_RTL.
3886 (c_parser_parse_rtl_body): New function.
3887 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3888 (struct c_declspecs): Rename field "gimple_pass" to
3889 "gimple_or_rtl_pass". Add field "rtl_p".
3890 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3891 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3892 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3893 (c_parser_gimple_or_rtl_pass_list): ...this.
3894
3895 2017-01-20 Marek Polacek <polacek@redhat.com>
3896
3897 PR c/64279
3898 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3899
3900 2017-01-13 Richard Biener <rguenther@suse.de>
3901
3902 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3903 nops.
3904
3905 2017-01-13 Richard Biener <rguenther@suse.de>
3906
3907 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3908 _Literal ( type-name ) number.
3909
3910 2017-01-12 Richard Biener <rguenther@suse.de>
3911
3912 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3913 __MEM.
3914
3915 2017-01-11 Jakub Jelinek <jakub@redhat.com>
3916
3917 PR c++/72813
3918 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3919 PCH file.
3920
3921 2017-01-11 Richard Biener <rguenther@suse.de>
3922
3923 PR bootstrap/79052
3924 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3925 returns on parse errors.
3926
3927 2017-01-04 Marek Polacek <polacek@redhat.com>
3928
3929 PR c++/64767
3930 * c-parser.c (c_parser_postfix_expression): Mark zero character
3931 constants by setting original_type in c_expr.
3932 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3933 with a zero character constant.
3934 (char_type_p): New function.
3935
3936 2017-01-04 David Malcolm <dmalcolm@redhat.com>
3937
3938 * c-parser.c (c_parser_declaration_or_fndef): Create a
3939 rich_location at init_loc and parse it to start_init.
3940 (last_init_list_comma): New global.
3941 (c_parser_braced_init): Update last_init_list_comma when parsing
3942 commas. Pass it to pop_init_level. Pass location of closing
3943 brace to pop_init_level.
3944 (c_parser_postfix_expression_after_paren_type): Create a
3945 rich_location at type_loc and parse it to start_init.
3946 (c_parser_omp_declare_reduction): Likewise for loc.
3947 * c-tree.h (start_init): Add rich_location * param.
3948 (pop_init_level): Add location_t param.
3949 * c-typeck.c (struct initializer_stack): Add field
3950 "missing_brace_richloc".
3951 (start_init): Add richloc param, use it to initialize
3952 the stack node's missing_brace_richloc.
3953 (last_init_list_comma): New decl.
3954 (finish_implicit_inits): Pass last_init_list_comma to
3955 pop_init_level.
3956 (push_init_level): When finding missing open braces, add fix-it
3957 hints to the richloc.
3958 (pop_init_level): Add "insert_before" param and pass it
3959 when calling pop_init_level. Add fixits about missing
3960 close braces to any richloc. Use the richloc for the
3961 -Wmissing-braces warning.
3962 (set_designator): Pass last_init_list_comma to pop_init_level.
3963 (process_init_element): Likewise.
3964
3965 2017-01-01 Jakub Jelinek <jakub@redhat.com>
3966
3967 Update copyright years.
3968
3969 2016-12-21 Jakub Jelinek <jakub@redhat.com>
3970
3971 PR bootstrap/78817
3972 * c-typeck.c (build_function_call_vec): If check_function_arguments
3973 returns true, set TREE_NO_WARNING on CALL_EXPR.
3974
3975 PR c/77767
3976 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3977 to *expr instead of overwriting it.
3978
3979 2016-12-20 Richard Biener <rguenther@suse.de>
3980
3981 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3982 error recovery.
3983 (c_parser_gimple_statement): Only build assigns for non-error
3984 stmts.
3985 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3986
3987 2016-12-14 Martin Jambor <mjambor@suse.cz>
3988
3989 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3990 omp-low.h.
3991 (c_finish_oacc_routine): Adjusted call to
3992 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3993 to use their new names.
3994 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3995 use its new name.
3996 (c_parser_oacc_update): Likewise.
3997 (c_parser_omp_simd): Likewise.
3998 (c_parser_omp_target_update): Likewise.
3999 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4000 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4001 name.
4002 (c_finish_omp_cancellation_point): Likewise.
4003 * gimple-parser.c: Do not include omp-low.h
4004
4005 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4006 James Norris <jnorris@codesourcery.com>
4007
4008 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4009 EXIT_DATA,WAIT} are not used in compound statements.
4010 (c_parser_oacc_enter_exit_data): Update diagnostics.
4011
4012 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4013
4014 PR c++/71973
4015 * c-decl.c (diagnose_mismatched_decls): Use
4016 OPT_Wbuiltin_declaration_mismatch here too.
4017
4018 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
4019 Alan Hayward <alan.hayward@arm.com>
4020 David Sherwood <david.sherwood@arm.com>
4021
4022 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4023 (make_label, finish_struct): Likewise.
4024
4025 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
4026 Richard Biener <rguenther@suse.de>
4027
4028 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4029 * config-lang.in (gtfiles): Add c/c-parser.h.
4030 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4031 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4032 * c-parser.c (enum c_id_kind, struct c_token,
4033 c_parser_next_token_is, c_parser_next_token_is_not,
4034 c_parser_next_token_is_keyword,
4035 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4036 Split out to ...
4037 * c-parser.h: ... new header.
4038 * c-parser.c: Include c-parser.h and gimple-parser.h.
4039 (c_parser_peek_token, c_parser_peek_2nd_token,
4040 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4041 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4042 c_parser_error, c_parser_require, c_parser_skip_until_found,
4043 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4044 c_parser_type_name): Export.
4045 (c_parser_tokens_buf): New function.
4046 (c_parser_error): Likewise.
4047 (c_parser_set_error): Likewise.
4048 (c_parser_declspecs): Handle RID_GIMPLE.
4049 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4050 via c_parser_parse_gimple_body.
4051 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4052 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4053 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4054 c_parser_error, c_parser_require, c_parser_skip_until_found,
4055 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4056 c_parser_type_name): Declare.
4057 (struct c_parser): Declare forward.
4058 (c_parser_tokens_buf): Declare.
4059 (c_parser_error): Likewise.
4060 (c_parser_set_error): Likewise.
4061 * gimple-parser.c: New file.
4062 * gimple-parser.h: Likewise.
4063
4064 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4065
4066 PR c/35503
4067 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4068 warn_for_restrict.
4069
4070 2016-09-11 Le-Chun Wu <lcwu@google.com>
4071 Mark Wielaard <mjw@redhat.com>
4072
4073 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4074 to the given -Wshadow= variant.
4075
4076 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4077
4078 * c-typeck.c: Include memmodel.h.
4079
4080 2016-10-13 Jakub Jelinek <jakub@redhat.com>
4081
4082 PR target/77957
4083 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4084 instead of lhd_return_null_tree_v.
4085
4086 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4087
4088 PR c++/69733
4089 * c-decl.c (smallest_type_quals_location): New static function.
4090 (grokdeclarator): Try to find the correct location for an ignored
4091 qualifier.
4092
4093 2016-09-26 Marek Polacek <polacek@redhat.com>
4094
4095 PR c/7652
4096 * c-decl.c (pop_scope): Add gcc_fallthrough.
4097
4098 2016-09-26 Marek Polacek <polacek@redhat.com>
4099
4100 PR c/7652
4101 * c-parser.c (struct c_token): Add flags field.
4102 (c_lex_one_token): Pass it to c_lex_with_flags.
4103 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4104 into IFN_FALLTHROUGH.
4105 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4106 attribute fallthrough after a case label or default label.
4107 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4108
4109 2016-09-24 Marek Polacek <polacek@redhat.com>
4110
4111 PR c/77490
4112 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4113 have boolean value. Warn about ++/-- on booleans.
4114
4115 2016-09-23 Jakub Jelinek <jakub@redhat.com>
4116
4117 * c-parser.c (incomplete_record_decls): Remove unnecessary
4118 = vNULL initialization of file scope vec.
4119
4120 2016-09-16 Marek Polacek <polacek@redhat.com>
4121
4122 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4123
4124 2016-09-14 Marek Polacek <polacek@redhat.com>
4125
4126 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4127 (fix_array_notation_expr): Likewise.
4128 * c-decl.c (finish_decl): Likewise.
4129 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4130 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4131 (function_to_pointer_conversion): Use false instead of 0.
4132 (convert_lvalue_to_rvalue): Likewise.
4133 (parser_build_unary_op): Likewise.
4134 (build_atomic_assign): Likewise.
4135 (build_unary_op): Change nonconvert parameter type to bool, use
4136 true/false instead of 1/0.
4137 (build_binary_op): Use true instead of 1.
4138
4139 2016-09-13 David Malcolm <dmalcolm@redhat.com>
4140
4141 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4142 of add_fixit_insert to add_fixit_insert_before.
4143
4144 2016-09-13 Marek Polacek <polacek@redhat.com>
4145
4146 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4147 it.
4148
4149 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4150
4151 PR c++/77496
4152 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4153 COMPOUND_EXPR to warn_for_omitted_condop.
4154
4155 2016-09-07 David Malcolm <dmalcolm@redhat.com>
4156
4157 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4158 c_get_substring_location for this new langhook.
4159
4160 2016-09-02 Jakub Jelinek <jakub@redhat.com>
4161
4162 PR c/65467
4163 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4164 flag_openmp.
4165 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4166 instead of mark_exp_read on low_bound/length expression.
4167 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4168 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4169 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4170 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4171 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4172 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4173 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4174 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4175 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4176 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4177 instead of mark_expr_read.
4178 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4179 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4180 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4181 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4182 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4183 array section bases outside of depend clause, for depend clause
4184 use convert_lvalue_to_rvalue on the base.
4185 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4186 linear, aligned, map, to and from clauses.
4187 (c_omp_clause_copy_ctor): New function.
4188
4189 2016-09-01 Marek Polacek <polacek@redhat.com>
4190
4191 PR c/7652
4192 * c-typeck.c (composite_type): Add FALLTHRU comment.
4193
4194 2016-08-31 David Malcolm <dmalcolm@redhat.com>
4195
4196 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4197 to the insertion fixits for "struct", "union", and "enum".
4198
4199 2016-08-30 David Malcolm <dmalcolm@redhat.com>
4200
4201 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4202 rather than add_fixit_misspelled_id.
4203 (undeclared_variable): Likewise.
4204 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4205 now-redundant "here" params from add_fixit_insert method calls.
4206 (c_parser_parameter_declaration): Likewise.
4207 * c-typeck.c (build_component_ref): Remove now-redundant range
4208 param from add_fixit_replace method calls.
4209
4210 2016-08-25 Marek Polacek <polacek@redhat.com>
4211
4212 * c-typeck.c (parser_build_binary_op): Pass LHS to
4213 warn_logical_not_parentheses.
4214
4215 2016-08-25 Marek Polacek <polacek@redhat.com>
4216
4217 PR c/77323
4218 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4219 or _FloatN or _FloatNx is not supported.
4220 (finish_declspecs): Set type to integer_type_node when _FloatN or
4221 _FloatNx is not supported.
4222
4223 2016-08-19 Joseph Myers <joseph@codesourcery.com>
4224
4225 PR c/32187
4226 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4227 (struct c_declspecs): Add field floatn_nx_idx.
4228 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4229 and _FloatNx type specifiers.
4230 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4231 (c_parser_declspecs, c_parser_attribute_any_word)
4232 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4233 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4234 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4235 narrower than double.
4236
4237 2016-08-12 Jakub Jelinek <jakub@redhat.com>
4238 Martin Liska <mliska@suse.cz>
4239
4240 PR c/67410
4241 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4242 % to determine val element to change. Assert that
4243 wchar_bytes * charwidth fits into val array.
4244
4245 2016-08-12 Marek Polacek <polacek@redhat.com>
4246
4247 PR c/7652
4248 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4249 (c_parser_postfix_expression): Likewise.
4250 * c-typeck.c (build_unary_op): Adjust fall through comment.
4251 (c_mark_addressable): Likewise.
4252
4253 2016-08-11 Jakub Jelinek <jakub@redhat.com>
4254
4255 PR c/72816
4256 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4257 array member through typedef, for orig_qual_indirect == 0 clear
4258 orig_qual_type.
4259
4260 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4261
4262 PR c/64955
4263 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4264 this up to selftest::run_c_tests.
4265 (selftest::run_c_tests): New function.
4266
4267 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4268
4269 * c-parser.c (struct oacc_routine_data): Add error_seen and
4270 fndecl_seen members.
4271 (c_finish_oacc_routine): Use these.
4272 (c_parser_declaration_or_fndef): Adjust.
4273 (c_parser_oacc_routine): Likewise. Support more C language
4274 constructs, and improve diagnostics. Move pragma context
4275 checking...
4276 (c_parser_pragma): ... here.
4277
4278 * c-parser.c (struct oacc_routine_data): New.
4279 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4280 Simplify code.
4281 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4282 declare target" attribute.
4283
4284 2016-08-01 Jan Beulich <jbeulich@suse.com>
4285
4286 * c-fold.c (c_fully_fold_internal): Also emit shift count
4287 warnings for vector types.
4288 * c-typeck.c (build_binary_op): Likewise.
4289
4290 2016-07-29 Marek Polacek <polacek@redhat.com>
4291
4292 PR c/71742
4293 * c-decl.c (finish_struct): Rephrase an error message.
4294
4295 PR c/71853
4296 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4297 to error node for invalid code.
4298
4299 PR c/71573
4300 * c-decl.c (implicitly_declare): Return decl early not only for
4301 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4302
4303 2016-07-29 Jakub Jelinek <jakub@redhat.com>
4304
4305 PR c/71969
4306 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4307 on GNU extern inline functions.
4308
4309 2016-07-29 Marek Polacek <polacek@redhat.com>
4310
4311 PR c/71583
4312 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4313 check expr.value.
4314
4315 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
4316
4317 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4318
4319 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4320
4321 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4322 spellcheck-tree.h
4323 (best_macro_match): Likewise, converting from a typedef to a
4324 subclass.
4325 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4326 (lookup_name_fuzzy): Update for change of best_macro_match to a
4327 subclass with a ctor that calls cpp_forall_identifiers.
4328
4329 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4330
4331 * c-decl.c (implicit_decl_warning): Update for conversion of
4332 return type of lookup_name_fuzzy to const char *.
4333 (undeclared_variable): Likewise.
4334 (lookup_name_fuzzy): Convert return type from tree to
4335 const char *.
4336 * c-parser.c (c_parser_declaration_or_fndef): Update for
4337 conversion of return type of lookup_name_fuzzy to const char *.
4338 (c_parser_parameter_declaration): Likewise.
4339
4340 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4341
4342 * c-parser.c (c_parser_oacc_declare): Don't scan for
4343 GOMP_MAP_POINTER.
4344 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4345 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4346 zero-length subarrays.
4347
4348 2016-07-15 Jakub Jelinek <jakub@redhat.com>
4349
4350 PR c/71858
4351 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4352 instead of FUZZY_LOOKUP_NAME.
4353 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4354 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4355
4356 2016-07-14 Jakub Jelinek <jakub@redhat.com>
4357
4358 PR c/71858
4359 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4360
4361 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4362
4363 * c-parser.c (c_parser_generic_selection): Make type of variable
4364 auto_vec.
4365 (c_parser_omp_declare_simd): Likewise.
4366
4367 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4368
4369 * c-decl.c (struct c_struct_parse_info): Change member types
4370 from vec to auto_vec.
4371 (start_struct): Adjust.
4372 (finish_struct): Likewise.
4373
4374 2016-07-02 Jakub Jelinek <jakub@redhat.com>
4375
4376 PR c/71719
4377 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4378
4379 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4380
4381 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4382 Move pragma context checking into...
4383 (c_parser_omp_cancellation_point): ... here, and improve
4384 diagnostic messages.
4385 * c-typeck.c (c_finish_omp_cancel)
4386 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4387
4388 2016-06-29 Jakub Jelinek <jakub@redhat.com>
4389
4390 PR c/71685
4391 * c-typeck.c (c_build_qualified_type): Don't clear
4392 C_TYPE_INCOMPLETE_VARS for the main variant.
4393
4394 2016-06-28 Martin Sebor <msebor@redhat.com>
4395
4396 PR c/71552
4397 * c-typeck.c (output_init_element): Diagnose incompatible types
4398 before non-constant initializers.
4399
4400 2016-06-28 Jakub Jelinek <jakub@redhat.com>
4401
4402 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4403
4404 2016-06-23 Andi Kleen <ak@linux.intel.com>
4405
4406 * Make-lang.in: Add support for autofdo.
4407
4408 2016-06-22 David Malcolm <dmalcolm@redhat.com>
4409
4410 PR c/70339
4411 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4412 (implicit_decl_warning): When issuing warnings for implicit
4413 declarations, attempt to provide a suggestion via
4414 lookup_name_fuzzy.
4415 (undeclared_variable): Likewise when issuing errors.
4416 (lookup_name_in_scope): Likewise.
4417 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4418 (best_macro_match): New typedef.
4419 (find_closest_macro_cpp_cb): New function.
4420 (lookup_name_fuzzy): New function.
4421 * c-parser.c: Include gcc-rich-location.h.
4422 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4423 (c_keyword_starts_typename): ...this new function.
4424 (c_parser_declaration_or_fndef): When issuing errors about
4425 missing "struct" etc, add a fixit. For other kinds of errors,
4426 attempt to provide a suggestion via lookup_name_fuzzy.
4427 (c_parser_parms_declarator): When looking ahead to detect typos in
4428 type names, also reject CPP_KEYWORD.
4429 (c_parser_parameter_declaration): When issuing errors about
4430 unknown type names, attempt to provide a suggestion via
4431 lookup_name_fuzzy.
4432 * c-tree.h (c_keyword_starts_typename): New prototype.
4433
4434 2016-06-20 Joseph Myers <joseph@codesourcery.com>
4435
4436 PR c/71601
4437 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4438 c_common_type returns error_mark_node.
4439
4440 2016-06-19 Martin Sebor <msebor@redhat.com>
4441
4442 PR c/69507
4443 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4444 __alignof__ (expression).
4445
4446 2016-06-14 David Malcolm <dmalcolm@redhat.com>
4447
4448 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4449
4450 2016-06-14 David Malcolm <dmalcolm@redhat.com>
4451
4452 * c-typeck.c (build_component_ref): Simplify fixit code by
4453 using gcc_rich_location::add_fixit_misspelled_id.
4454 (set_init_label): Likewise.
4455
4456 2016-06-13 David Malcolm <dmalcolm@redhat.com>
4457
4458 * c-parser.c (c_parser_initelt): Provide location of name for new
4459 location_t param of set_init_label.
4460 * c-tree.h (set_init_label): Add location_t param.
4461 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4462 param and use it when issuing error messages about unrecognized
4463 field names. Attempt to provide a fixit hint if appropriate,
4464 otherwise update the error message to provide the type name.
4465
4466 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4467
4468 PR c/71381
4469 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4470 Loosen checking.
4471
4472 2016-06-08 Martin Sebor <msebor@redhat.com>
4473 Jakub Jelinek <jakub@redhat.com>
4474
4475 PR c++/70507
4476 PR c/68120
4477 * c-typeck.c (convert_arguments): Don't promote last argument
4478 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4479
4480 2016-06-08 Marek Polacek <polacek@redhat.com>
4481
4482 PR c/71418
4483 * c-decl.c (grokdeclarator): Check TYPE_P.
4484
4485 PR c/71426
4486 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4487 code.
4488
4489 2016-06-07 David Malcolm <dmalcolm@redhat.com>
4490
4491 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4492 and structure element reference, capture the location of the
4493 element name token and pass it to build_component_ref.
4494 (c_parser_postfix_expression_after_primary): Likewise for
4495 structure element dereference.
4496 (c_parser_omp_variable_list): Likewise for
4497 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4498 * c-tree.h (build_component_ref): Add location_t param.
4499 * c-typeck.c (build_component_ref): Add location_t param
4500 COMPONENT_LOC. Use it, if available, when issuing hints about
4501 mispelled member names to provide a fixit replacement hint.
4502
4503 2016-06-06 Marek Polacek <polacek@redhat.com>
4504
4505 PR c/71362
4506 * c-parser.c (c_parser_direct_declarator): Set location.
4507
4508 2016-06-06 Marek Polacek <polacek@redhat.com>
4509
4510 * c-typeck.c (comptypes_internal): Handle comparisons of
4511 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4512 TYPE_REF_CAN_ALIAS_ALL.
4513
4514 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4515
4516 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4517 arguments as addressable when async clause exists.
4518
4519 2016-05-30 Jakub Jelinek <jakub@redhat.com>
4520
4521 PR c++/71349
4522 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4523 when combined with target construct.
4524
4525 2016-05-26 Jakub Jelinek <jakub@redhat.com>
4526
4527 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4528 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4529
4530 2016-05-25 Marek Polacek <polacek@redhat.com>
4531
4532 PR c/71265
4533 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4534
4535 PR c/71266
4536 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4537
4538 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4539
4540 * c-parser.c (c_parser_oacc_declare): Add support for
4541 GOMP_MAP_FIRSTPRIVATE_POINTER.
4542 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4543 argument with enum c_omp_region_type ort.
4544 (handle_omp_array_sections): Likewise. Update call to
4545 handle_omp_array_sections_1.
4546 (c_finish_omp_clauses): Add specific errors and warning messages for
4547 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4548 call to handle_omp_array_sections.
4549
4550 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4551
4552 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4553
4554 2016-05-24 Richard Biener <rguenther@suse.de>
4555
4556 PR middle-end/70434
4557 PR c/69504
4558 * c-typeck.c (build_array_ref): Do not complain about indexing
4559 non-lvalue vectors. Adjust for function name change.
4560
4561 2016-05-20 Martin Sebor <msebor@redhat.com>
4562
4563 PR c/71115
4564 * c-typeck.c (error_init): Use
4565 expansion_point_location_if_in_system_header.
4566 (warning_init): Same.
4567
4568 2016-05-19 David Malcolm <dmalcolm@redhat.com>
4569
4570 PR c/71171
4571 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4572 in error-handling.
4573 (c_parser_postfix_expression): Likewise.
4574 * c-tree.h (c_expr::set_error): New method.
4575 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4576 that result's range is initialized.
4577
4578 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4579
4580 * c-typeck.c (parser_build_unary_op): Fix formatting.
4581
4582 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4583
4584 * c-decl.c (grokdeclarator): Remove errmsg and use of
4585 targetm.invalid_return_type.
4586 (grokparms): Remove errmsg and use of
4587 targetm.invalid_parameter_type.
4588
4589 2016-05-13 Joseph Myers <joseph@codesourcery.com>
4590
4591 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4592 function return type.
4593
4594 2016-05-12 Marek Polacek <polacek@redhat.com>
4595
4596 PR c/70756
4597 * c-decl.c (build_compound_literal): Pass LOC down to
4598 c_incomplete_type_error.
4599 * c-tree.h (require_complete_type): Adjust declaration.
4600 (c_incomplete_type_error): Likewise.
4601 * c-typeck.c (require_complete_type): Add location parameter, pass it
4602 down to c_incomplete_type_error.
4603 (c_incomplete_type_error): Add location parameter, pass it down to
4604 error_at.
4605 (build_component_ref): Pass location down to c_incomplete_type_error.
4606 (default_conversion): Pass location down to require_complete_type.
4607 (build_array_ref): Likewise.
4608 (build_function_call_vec): Likewise.
4609 (convert_arguments): Likewise.
4610 (build_unary_op): Likewise.
4611 (build_c_cast): Likewise.
4612 (build_modify_expr): Likewise.
4613 (convert_for_assignment): Likewise.
4614 (c_finish_omp_clauses): Likewise.
4615
4616 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4617
4618 PR c/43651
4619 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4620 is enabled.
4621 * c-errors.c (pedwarn_c90): Return true if warned.
4622 * c-tree.h (pedwarn_c90): Change return type to bool.
4623 (enum c_declspec_word): Add new enumerator cdw_atomic.
4624
4625 2016-05-11 Marek Polacek <polacek@redhat.com>
4626
4627 PR c++/71024
4628 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4629 diagnose_mismatched_attributes and call it.
4630
4631 2016-05-10 Marek Polacek <polacek@redhat.com>
4632
4633 PR c/70255
4634 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4635 on a declaration following the definition.
4636
4637 2016-05-05 Jakub Jelinek <jakub@redhat.com>
4638
4639 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4640 parse it through to c_parser_c99_block_statement.
4641 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4642 caller.
4643
4644 2016-05-04 Marek Polacek <polacek@redhat.com>
4645
4646 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4647 OPT_Wdangling_else.
4648
4649 2016-05-04 Marek Polacek <polacek@redhat.com>
4650
4651 PR c/48778
4652 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4653 for macro expansions.
4654
4655 2016-05-03 Marek Polacek <polacek@redhat.com>
4656
4657 PR c/70859
4658 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4659 check_builtin_function_arguments.
4660
4661 2016-05-03 Richard Biener <rguenther@suse.de>
4662
4663 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4664 the checksum from the previous stage.
4665
4666 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4667
4668 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4669 c_finish_omp_clauses.
4670 (c_parser_omp_all_clauses): Likewise.
4671 (c_parser_oacc_cache): Likewise.
4672 (c_parser_oacc_loop): Likewise.
4673 (omp_split_clauses): Likewise.
4674 (c_parser_omp_declare_target): Likewise.
4675 (c_parser_cilk_all_clauses): Likewise.
4676 (c_parser_cilk_for): Likewise.
4677 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4678 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4679
4680 2016-05-02 Marek Polacek <polacek@redhat.com>
4681
4682 PR c/70851
4683 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4684 incomplete type.
4685
4686 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4687
4688 PR middle-end/70626
4689 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4690 OACC_LOOP_CLAUSE_MASK.
4691 (c_parser_oacc_kernels_parallel): Update call to
4692 c_oacc_split_loop_clauses.
4693
4694 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
4695
4696 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4697 argument to build_modify_expr in two cases.
4698
4699 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4700
4701 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4702 warn_for_memset instead of warning directly here.
4703
4704 2016-04-26 Marek Polacek <polacek@redhat.com>
4705
4706 PR c/67784
4707 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4708 out of ...
4709 (c_parser_for_statement): ... here.
4710 (c_parser_if_statement): Use it.
4711 (c_parser_switch_statement): Use it.
4712 (c_parser_while_statement): Use it.
4713
4714 PR c/70791
4715 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4716
4717 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4718
4719 PR c++/69363
4720 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4721 instead of c_finish_cilk_clauses.
4722 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4723 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4724 floating-point variables in the linear clause for Cilk Plus.
4725
4726 2016-04-18 Michael Matz <matz@suse.de>
4727
4728 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4729 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4730
4731 2016-04-15 Marek Polacek <polacek@redhat.com>
4732
4733 PR c/70671
4734 * c-typeck.c (build_unary_op): Pass location down to error and
4735 warning call.
4736
4737 2016-04-15 Jakub Jelinek <jakub@redhat.com>
4738
4739 PR c/70436
4740 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4741 where needed.
4742 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4743 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4744 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4745 Adjust c_parser_pragma callers.
4746 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4747 caller.
4748 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4749 c_parser_statement.
4750 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4751 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4752 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4753 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4754 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4755 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4756 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4757 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4758 down where needed.
4759 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4760 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4761 calls.
4762
4763 2016-04-13 Marek Polacek <polacek@redhat.com>
4764
4765 PR c/70436
4766 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4767 adjust callers.
4768 (c_parser_statement): Likewise.
4769 (c_parser_c99_block_statement): Likewise.
4770 (c_parser_while_statement): Likewise.
4771 (c_parser_for_statement): Likewise.
4772 (c_parser_if_body): Don't set IF_P here.
4773 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4774 about dangling else here.
4775 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4776 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4777 warn about dangling else here.
4778
4779 2016-04-04 Marek Polacek <polacek@redhat.com>
4780
4781 PR c/70307
4782 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4783
4784 2016-03-31 Marek Polacek <polacek@redhat.com>
4785
4786 PR c/70297
4787 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4788
4789 2016-03-18 David Malcolm <dmalcolm@redhat.com>
4790
4791 PR c/70281
4792 * c-parser.c (c_parser_postfix_expression): Set the source range
4793 for uses of "__builtin_types_compatible_p".
4794
4795 2016-03-17 Jakub Jelinek <jakub@redhat.com>
4796
4797 PR c/70280
4798 * c-typeck.c (composite_type): Don't count void_list_node
4799 into len, if the list is terminated by void_list_node, start
4800 with void_list_node instead of NULL for newargs. Stop
4801 at void_list_node.
4802
4803 2016-03-16 Marek Polacek <polacek@redhat.com>
4804
4805 PR c/70093
4806 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4807 nested functions returning VM types.
4808
4809 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4810
4811 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4812 when calling c_finish_omp_clauses.
4813
4814 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4815
4816 PR c/69824
4817 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4818 for later.
4819
4820 2016-03-04 Marek Polacek <polacek@redhat.com>
4821
4822 PR c/69798
4823 * c-parser.c (c_parser_postfix_expression): Call
4824 c_parser_cast_expression rather than c_parser_postfix_expression.
4825
4826 2016-03-01 Jakub Jelinek <jakub@redhat.com>
4827
4828 PR c/69796
4829 PR c/69974
4830 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4831 of incomplete decls to error_mark_node.
4832
4833 2016-02-24 Marek Polacek <polacek@redhat.com>
4834
4835 PR c/69819
4836 * c-decl.c (finish_decl): Don't update the copy of the type of a
4837 different decl type.
4838
4839 2016-02-23 Jakub Jelinek <jakub@redhat.com>
4840
4841 PR objc/69844
4842 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4843 in id_kind reclassification.
4844
4845 2016-02-16 Jakub Jelinek <jakub@redhat.com>
4846
4847 PR c/69835
4848 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4849
4850 2016-02-16 James Norris <jnorris@codesourcery.com>
4851
4852 PR c/64748
4853 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4854
4855 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4856
4857 * c-decl.c (build_null_declspecs): Zero the entire struct.
4858
4859 PR c/69522
4860 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4861 callers changed. If nested_p is true, use it to call
4862 finish_implicit_inits.
4863 * c-tree.h (finish_implicit_inits): Declare.
4864 * c-typeck.c (finish_implicit_inits): New function. Move code
4865 from ...
4866 (push_init_level): ... here.
4867 (set_designator, process_init_element): Call finish_implicit_inits.
4868
4869 2016-02-11 Jakub Jelinek <jakub@redhat.com>
4870
4871 PR c/69768
4872 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4873 arguments for -Waddress warning.
4874
4875 2016-02-04 Jakub Jelinek <jakub@redhat.com>
4876
4877 PR c/69669
4878 * c-decl.c (finish_enum): When honoring mode attribute,
4879 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4880
4881 2016-01-29 Jakub Jelinek <jakub@redhat.com>
4882
4883 PR debug/69518
4884 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4885 all type variants, not just TYPE_MAIN_VARIANT.
4886
4887 2016-01-27 Jakub Jelinek <jakub@redhat.com>
4888
4889 PR debug/66869
4890 * c-decl.c (c_write_global_declarations_1): Warn with
4891 warn_unused_function if static prototype without definition
4892 is not C_DECL_USED.
4893
4894 2016-01-27 Marek Polacek <polacek@redhat.com>
4895
4896 PR c/68062
4897 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4898 to unsigned, if needed. Add -Wsign-compare warning.
4899
4900 2016-01-26 Jakub Jelinek <jakub@redhat.com>
4901
4902 PR tree-optimization/69483
4903 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4904
4905 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4906
4907 PR c/24293
4908 * c-tree.h (incomplete_record_decls): Declare.
4909 * c-parser.c (incomplete_record_decls): Define.
4910 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4911 report error if any decl has zero size.
4912 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4913 or enum type to incomplete_record_decls.
4914
4915 2016-01-14 Tom de Vries <tom@codesourcery.com>
4916
4917 PR tree-optimization/68773
4918 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4919 set force_output.
4920
4921 2016-01-14 Marek Polacek <polacek@redhat.com>
4922
4923 PR c/69262
4924 * c-decl.c (grokdeclarator): Provide more information for invalid
4925 array declarations.
4926
4927 2016-01-06 David Malcolm <dmalcolm@redhat.com>
4928
4929 * c-parser.c (c_parser_unary_expression): For dereferences, build
4930 a combined location before calling build_indirect_ref, so that
4931 error reports cover the full range, manually updating the c_expr
4932 src_range.
4933
4934 2016-01-06 Marek Polacek <polacek@redhat.com>
4935
4936 PR sanitizer/69099
4937 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4938 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4939 NULL.
4940
4941 2016-01-04 Jakub Jelinek <jakub@redhat.com>
4942
4943 Update copyright years.
4944
4945 2016-01-04 Marek Polacek <polacek@redhat.com>
4946
4947 PR c/68908
4948 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4949 optimization to use __atomic_fetch_* built-in if possible.
4950
4951 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4952
4953 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4954 into...
4955 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4956 all users.
4957
4958 2015-12-22 Marek Polacek <polacek@redhat.com>
4959
4960 PR c/69002
4961 * c-typeck.c (build_component_ref): Warn when acessing elements of
4962 atomic structures or unions.
4963
4964 2015-12-21 David Malcolm <dmalcolm@redhat.com>
4965
4966 * c-typeck.c: Include "gcc-rich-location.h".
4967 (build_binary_op): In the two places that call binary_op_error,
4968 create a gcc_rich_location and populate it with the location of
4969 the binary op and its two operands.
4970
4971 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4972
4973 * c-parser.c (c_parser_statement_after_labels): When calling
4974 c_finish_return, Use the return expression's location if it has
4975 one, falling back to the location of the first token within it.
4976 * c-typeck.c (c_finish_return): When issuing warnings about
4977 the incorrect presence/absence of a return value, issue a note
4978 showing the declaration of the function.
4979
4980 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4981
4982 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4983 to 4.
4984 (c_parser_peek_nth_token): New function.
4985 (c_parser_peek_conflict_marker): New function.
4986 (c_parser_error): Detect conflict markers and report them as such.
4987
4988 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4989
4990 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4991 to preserve range information for the primary expression
4992 in the call to c_parser_postfix_expression_after_primary.
4993
4994 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4995
4996 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4997 expression location, falling back on the first token location,
4998 rather than always using the latter.
4999
5000 2015-12-16 Marek Polacek <polacek@redhat.com>
5001
5002 PR c/64637
5003 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5004 available.
5005
5006 2015-12-15 Marek Polacek <polacek@redhat.com>
5007
5008 PR c/68907
5009 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5010 artificial decl.
5011
5012 2015-12-08 David Malcolm <dmalcolm@redhat.com>
5013
5014 * c-parser.c (c_parser_alignof_expression): Capture location of
5015 closing parenthesis (if any), or of end of unary expression, and
5016 use it to build a src_range for the expression.
5017
5018 2015-12-08 David Malcolm <dmalcolm@redhat.com>
5019
5020 PR c/68757
5021 * c-parser.c (c_parser_get_builtin_args): Add
5022 "out_close_paren_loc" param, and write back to it.
5023 (c_parser_postfix_expression): Capture the closing
5024 parenthesis location for RID_CHOOSE_EXPR,
5025 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5026 RID_BUILTIN_SHUFFLE and use it to set the source range
5027 for such expressions; within RID_BUILTIN_COMPLEX set
5028 the underlying location.
5029
5030 2015-12-07 Marek Polacek <polacek@redhat.com>
5031
5032 PR c/68668
5033 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5034 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5035
5036 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5037
5038 * c-tree.h (c_build_va_arg): Adjust prototype.
5039 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5040 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5041 parameter, adjust throughout and issue an error if EXPR is a component
5042 with reverse storage order.
5043
5044 2015-12-02 Jason Merrill <jason@redhat.com>
5045
5046 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5047 (c_fully_fold_internal, decl_constant_value_for_optimization):
5048 Move from c-common.c.
5049 * c-tree.h: Declare decl_constant_value_for_optimization.
5050 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5051
5052 2015-12-02 Joseph Myers <joseph@codesourcery.com>
5053
5054 PR c/68162
5055 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5056 following link from declarator to next declarator. Track original
5057 qualified type and pass it to c_build_qualified_type.
5058 * c-typeck.c (c_build_qualified_type): Add arguments
5059 orig_qual_type and orig_qual_indirect.
5060
5061 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5062
5063 * c-parser.c (c_parser_omp_clause_name)
5064 (c_parser_oacc_all_clauses): Alphabetical sorting.
5065
5066 2015-12-02 Jakub Jelinek <jakub@redhat.com>
5067
5068 PR c/68533
5069 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5070 for diagnostics.
5071
5072 2015-12-01 Julian Brown <julian@codesourcery.com>
5073 Cesar Philippidis <cesar@codesourcery.com>
5074 James Norris <James_Norris@mentor.com>
5075
5076 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5077 (c_parser_oacc_clause_use_device): New function.
5078 (c_parser_oacc_all_clauses): Add use_device support.
5079 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5080 (c_parser_oacc_host_data): New function.
5081 (c_parser_omp_construct): Add host_data support.
5082 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5083 * c-typeck.c (c_finish_oacc_host_data): New function.
5084 (c_finish_omp_clauses): Add use_device support.
5085
5086 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
5087
5088 PR c/67106
5089 * c-decl.c: Set TYPE_PACKED in variants.
5090
5091 2015-11-27 Martin Liska <mliska@suse.cz>
5092
5093 PR c++/68312
5094 * c-array-notation.c (fix_builtin_array_notation_fn):
5095 Use release_vec_vec instead of vec::release.
5096 (build_array_notation_expr): Likewise.
5097 (fix_conditional_array_notations_1): Likewise.
5098 (fix_array_notation_expr): Likewise.
5099 (fix_array_notation_call_expr): Likewise.
5100
5101 2015-11-27 Jakub Jelinek <jakub@redhat.com>
5102
5103 PR c/63326
5104 * c-parser.c (c_parser_compound_statement_nostart): If
5105 last_label is true, use pragma_stmt instead of pragma_compound
5106 as second c_parser_pragma argument.
5107 (c_parser_omp_ordered, c_parser_omp_target_update,
5108 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5109 false as second argument to c_parser_skip_to_pragma_eol after
5110 diagnosing standalone directives used in pragma_stmt context.
5111
5112 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5113
5114 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5115 with "if (ENABLE_OFFLOADING)".
5116
5117 2015-11-23 David Malcolm <dmalcolm@redhat.com>
5118
5119 PR objc/68438
5120 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5121 for various Objective-C constructs: Class.name syntax,
5122 @selector(), @protocol(), @encode(), and [] message syntax.
5123
5124 2015-11-20 David Malcolm <dmalcolm@redhat.com>
5125
5126 PR 62314
5127 * c-typeck.c (should_suggest_deref_p): New function.
5128 (build_component_ref): Special-case POINTER_TYPE when
5129 generating a "not a structure of union" error message, and
5130 suggest a "->" rather than a ".", providing a fix-it hint.
5131
5132 2015-11-19 David Malcolm <dmalcolm@redhat.com>
5133
5134 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5135 candidate into a new function, find_closest_identifier.
5136
5137 2015-11-19 Marek Polacek <polacek@redhat.com>
5138
5139 PR c/68412
5140 * c-typeck.c (parser_build_binary_op): Properly handle
5141 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5142
5143 2015-11-17 David Malcolm <dmalcolm@redhat.com>
5144
5145 * c-parser.c (set_c_expr_source_range): Bulletproof both
5146 overloaded implementations against NULL expr->value.
5147 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5148 values.
5149 (c_parser_unary_expression): Likewise when handling addresses of
5150 labels.
5151 (c_parser_postfix_expression): Likewise for statement expressions,
5152 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5153 __builtin_va_arg, and for __builtin_offset_of.
5154 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5155 src_range using the range of the braced initializer.
5156 (c_parser_transaction_expression): Set src_range for "ret" to a
5157 sane pair of values.
5158
5159 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5160
5161 * c-parser.c (c_finish_omp_declare_simd): Look for
5162 "simd" attribute as well. Update error message.
5163
5164 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5165
5166 * c-parser.c (c_parser_omp_declare_target): Adjust.
5167
5168 2015-11-14 Jakub Jelinek <jakub@redhat.com>
5169
5170 * c-typeck.c (c_finish_omp_clauses): Don't mark
5171 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5172
5173 2015-11-14 Marek Polacek <polacek@redhat.com>
5174
5175 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5176 * c-typeck.c: Likewise.
5177
5178 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5179
5180 * c-decl.c (warn_defaults_to): Pass line_table to
5181 rich_location ctor.
5182 * c-errors.c (pedwarn_c99): Likewise.
5183 (pedwarn_c90): Likewise.
5184 * c-parser.c (set_c_expr_source_range): New functions.
5185 (c_token::get_range): New method.
5186 (c_token::get_finish): New method.
5187 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5188 based on the range from the start of the LHS to the end of the
5189 RHS.
5190 (c_parser_conditional_expression): Likewise, based on the range
5191 from the start of the cond.value to the end of exp2.value.
5192 (c_parser_binary_expression): Call set_c_expr_source_range on
5193 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5194 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5195 based on the cast_loc through to the end of the expr.
5196 (c_parser_unary_expression): Likewise, based on the
5197 op_loc through to the end of op.
5198 (c_parser_sizeof_expression) Likewise, based on the start of the
5199 sizeof token through to either the closing paren or the end of
5200 expr.
5201 (c_parser_postfix_expression): Likewise, using the token range,
5202 or from the open paren through to the close paren for
5203 parenthesized expressions.
5204 (c_parser_postfix_expression_after_primary): Likewise, for
5205 various kinds of expression.
5206 * c-tree.h (struct c_expr): Add field "src_range".
5207 (c_expr::get_start): New method.
5208 (c_expr::get_finish): New method.
5209 (set_c_expr_source_range): New decls.
5210 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5211 on ret for prefix unary ops.
5212 (parser_build_binary_op): Likewise, running from the start of
5213 arg1.value through to the end of arg2.value.
5214
5215 2015-11-13 Marek Polacek <polacek@redhat.com>
5216
5217 PR c/68320
5218 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5219
5220 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5221
5222 * c-typeck.c: Include spellcheck.h.
5223 (lookup_field_fuzzy_find_candidates): New function.
5224 (lookup_field_fuzzy): New function.
5225 (build_component_ref): If the field was not found, try using
5226 lookup_field_fuzzy and potentially offer a suggestion.
5227
5228 2015-11-12 James Norris <jnorris@codesourcery.com>
5229 Joseph Myers <joseph@codesourcery.com>
5230
5231 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5232 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5233 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5234 and PRAGMA_OMP_CLAUSE_LINK.
5235 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5236 and PRAGMA_OACC_CLAUSE_LINK.
5237 (OACC_DECLARE_CLAUSE_MASK): New definition.
5238 (c_parser_oacc_declare): New function.
5239
5240 2015-11-12 Marek Polacek <polacek@redhat.com>
5241
5242 PR c/67784
5243 * c-parser.c (c_parser_for_statement): Reclassify the token in
5244 a correct scope.
5245
5246 2015-11-11 Marek Polacek <polacek@redhat.com>
5247
5248 PR c/68107
5249 PR c++/68266
5250 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5251 checking the size of an array.
5252
5253 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
5254
5255 * c-array-notation.c: Remove unused header files.
5256 * c-aux-info.c: Likewise.
5257 * c-convert.c: Likewise.
5258 * c-decl.c: Likewise.
5259 * c-errors.c: Likewise.
5260 * c-lang.c: Likewise.
5261 * c-objc-common.c: Likewise.
5262 * c-parser.c: Likewise.
5263 * c-typeck.c: Likewise.
5264 * gccspec.c: Likewise.
5265
5266 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5267 Cesar Philippidis <cesar@codesourcery.com>
5268 James Norris <jnorris@codesourcery.com>
5269 Julian Brown <julian@codesourcery.com>
5270 Nathan Sidwell <nathan@codesourcery.com>
5271
5272 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5273 routine arg.
5274 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5275 (c_parser_pragma): Parse 'acc routine'.
5276 (OACC_ROUTINE_CLAUSE_MARK): Define.
5277 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5278
5279 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5280
5281 PR debug/67192
5282 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5283 location of the backward-goto to the start of the loop body.
5284
5285 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5286
5287 PR debug/67192
5288 * c-parser.c (c_parser_while_statement): Finish the loop before
5289 parsing ahead for misleading indentation.
5290 (c_parser_for_statement): Likewise.
5291
5292 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5293
5294 * c-decl.c (finish_struct): If the structure has reverse storage
5295 order, rewrite the type of array fields with scalar component. Call
5296 maybe_apply_pragma_scalar_storage_order on entry.
5297 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5298 errors on bit-fields and reverse SSO here and not...
5299 (c_mark_addressable): ...here.
5300 (output_init_element): Adjust call to initializer_constant_valid_p.
5301 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5302
5303 2015-11-06 David Malcolm <dmalcolm@redhat.com>
5304
5305 * c-decl.c (warn_defaults_to): Update for change in signature
5306 of diagnostic_set_info.
5307 * c-errors.c (pedwarn_c99): Likewise.
5308 (pedwarn_c90): Likewise.
5309 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5310 for textinfo::set_location.
5311
5312 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5313 Thomas Schwinge <thomas@codesourcery.com>
5314 James Norris <jnorris@codesourcery.com>
5315
5316 * c-parser.c (c_parser_omp_clause_name): Add support for
5317 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5318 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5319 default(none) in OpenACC.
5320 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5321 arguments.
5322 (c_parser_oacc_clause_tile): New function.
5323 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5324 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5325 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5326 TILE}.
5327 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5328 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5329 FIRSTPRIVATE}.
5330 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5331 (c_parser_oacc_update): Update the error message for missing clauses.
5332 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5333 and OMP_CLAUSE_INDEPENDENT.
5334
5335 2015-11-05 Marek Polacek <polacek@redhat.com>
5336
5337 PR c/68090
5338 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5339 deal with pre-evaluation on invalid types.
5340
5341 2015-11-05 Jakub Jelinek <jakub@redhat.com>
5342 Ilya Verbin <ilya.verbin@intel.com>
5343
5344 * c-parser.c: Include context.h and gimple-expr.h.
5345 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5346 monotonic together with nonmonotonic.
5347 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5348 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5349 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5350 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5351 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5352 expressions on combined target teams before the target.
5353 (c_parser_omp_declare_target): If decl has "omp declare target" or
5354 "omp declare target link" attribute, and cgraph or varpool node already
5355 exists, then set corresponding flags. Call c_finish_omp_clauses
5356 in the parenthesized extended-list syntax case.
5357 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5358 declare target.
5359 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5360 on OMP_CLAUSE_REDUCTION array sections.
5361 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5362 into the constant offset, or for variable low-bound using
5363 POINTER_PLUS_EXPR. For structure element based array sections use
5364 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5365 (c_finish_omp_clauses): Drop generic_field_head, structure
5366 elements are now always mapped even as array section bases,
5367 diagnose same var in data sharing and mapping clauses. Diagnose if
5368 linear step on declare simd is neither a constant nor a uniform
5369 parameter. Look through POINTER_PLUS_EXPR for array section
5370 reductions. Diagnose the same var or function appearing multiple
5371 times on the same directive. Fix up wording for the to clause if t
5372 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5373 modifier on kinds other than dynamic or guided or nonmonotonic
5374 modifier together with ordered clause.
5375
5376 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5377 Chung-Lin Tang <cltang@codesourcery.com>
5378
5379 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5380
5381 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
5382
5383 * c-array-notation.c: Reorder #include's and remove duplicates.
5384 * c-aux-info.c: Likewise.
5385 * c-convert.c: Likewise.
5386 * c-decl.c: Likewise.
5387 * c-errors.c: Likewise.
5388 * c-lang.c: Likewise.
5389 * c-objc-common.c: Likewise.
5390 * c-parser.c: Likewise.
5391 * c-typeck.c: Likewise.
5392
5393 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
5394
5395 PR debug/66068
5396 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5397 after calling build_qualified_type.
5398
5399 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5400 Thomas Schwinge <thomas@codesourcery.com>
5401 James Norris <jnorris@codesourcery.com>
5402 Joseph Myers <joseph@codesourcery.com>
5403 Julian Brown <julian@codesourcery.com>
5404 Bernd Schmidt <bschmidt@redhat.com>
5405
5406 * c-parser.c (c_parser_oacc_shape_clause): New.
5407 (c_parser_oacc_simple_clause): New.
5408 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5409 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5410
5411 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5412 James Norris <jnorris@codesourcery.com>
5413 Cesar Philippidis <cesar@codesourcery.com>
5414
5415 PR c/64765
5416 PR c/64880
5417 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5418 parameters, and handle these. Adjust all users.
5419 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5420 into...
5421 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5422 all users.
5423 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5424 declare functions.
5425 (c_finish_omp_construct): Declare function.
5426 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5427 Merge functions into...
5428 (c_finish_omp_construct): ... this new function.
5429
5430 2015-10-22 Richard Biener <rguenther@suse.de>
5431
5432 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5433 before folding a MINUS_EXPR.
5434
5435 2015-10-21 Marek Polacek <polacek@redhat.com>
5436
5437 PR c/68024
5438 * c-decl.c (start_function): Warn about vararg functions without
5439 a prototype.
5440
5441 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5442
5443 * c-typeck.c (build_conditional_expr): Use boolean vector
5444 type for vector comparison.
5445 (build_vec_cmp): New.
5446 (build_binary_op): Use build_vec_cmp for comparison.
5447
5448 2015-10-20 Marek Polacek <polacek@redhat.com>
5449
5450 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5451
5452 2015-10-20 Marek Polacek <polacek@redhat.com>
5453
5454 PR c/67964
5455 * c-parser.c (c_parser_attributes): Break out of the loop if the
5456 token after an attribute isn't a comma.
5457
5458 2015-10-13 Jakub Jelinek <jakub@redhat.com>
5459 Aldy Hernandez <aldyh@redhat.com>
5460
5461 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5462 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5463 (c_parser_omp_variable_list): Handle structure elements for
5464 map, to and from clauses. Handle array sections in reduction
5465 clause. Formatting fixes.
5466 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5467 if clause modifiers.
5468 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5469 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5470 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5471 c_parser_omp_clause_is_device_ptr): New functions.
5472 (c_parser_omp_clause_ordered): Parse optional parameter.
5473 (c_parser_omp_clause_reduction): Handle array reductions.
5474 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5475 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5476 functions.
5477 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5478 (c_parser_omp_clause_depend_sink): New function.
5479 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5480 (c_parser_omp_clause_map): Parse release/delete map kinds and
5481 optional always modifier.
5482 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5483 and c_finish_omp_clauses callers.
5484 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5485 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5486 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5487 (OMP_CRITICAL_CLAUSE_MASK): Define.
5488 (c_parser_omp_critical): Parse critical clauses.
5489 (c_parser_omp_for_loop): Handle doacross loops, adjust
5490 c_finish_omp_for and c_finish_omp_clauses callers.
5491 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5492 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5493 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5494 (c_parser_omp_for): Disallow ordered clause when combined with
5495 distribute. Disallow linear clause when combined with distribute
5496 and not combined with simd.
5497 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5498 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5499 parse clauses and if depend clause is found, don't parse a body.
5500 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5501 Allow target parallel without for after it.
5502 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5503 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5504 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5505 invalid kinds.
5506 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5507 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5508 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5509 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5510 functions.
5511 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5512 defaultmap and is_device_ptr clauses.
5513 (c_parser_omp_target): Parse target parallel and target simd. Set
5514 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5515 and target exit data. Diagnose invalid map kinds.
5516 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5517 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5518 construct.
5519 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5520 &omp_priv.
5521 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5522 (c_parser_omp_taskloop): New function.
5523 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5524 handle PRAGMA_OMP_TASKLOOP.
5525 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5526 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5527 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5528 Add IS_OMP argument, handle structure element bases, diagnose
5529 bitfields, pass IS_OMP recursively, diagnose known zero length
5530 array sections in depend clauses, handle array sections in reduction
5531 clause, diagnose negative length even for pointers.
5532 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5533 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5534 array sections in reduction clause, set
5535 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5536 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5537 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5538 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5539
5540 2015-10-06 Marek Polacek <polacek@redhat.com>
5541
5542 * c-parser.c (c_parser_statement_after_labels): Use
5543 protected_set_expr_location.
5544 (c_parser_omp_clause_num_gangs): Likewise.
5545 (c_parser_omp_clause_num_threads): Likewise.
5546 (c_parser_omp_clause_num_workers): Likewise.
5547 (c_parser_omp_clause_vector_length): Likewise.
5548 (c_parser_omp_clause_num_teams): Likewise.
5549 (c_parser_omp_clause_thread_limit): Likewise.
5550 * c-typeck.c (build_c_cast): Likewise.
5551 (c_cast_expr): Likewise.
5552
5553 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5554
5555 * c-typeck.c (c_tree_equal): Use real_equal instead of
5556 REAL_VALUES_EQUAL.
5557
5558 2015-10-04 Jason Merrill <jason@redhat.com>
5559
5560 * c-parser.c (c_lex_one_token): Handle @synchronized.
5561 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5562 can change whether the function is transaction_safe.
5563
5564 2015-10-02 Marek Polacek <polacek@redhat.com>
5565
5566 PR c/67730
5567 * c-typeck.c (convert_for_assignment): Use the expansion point
5568 location throughout.
5569
5570 2015-10-02 Marek Polacek <polacek@redhat.com>
5571
5572 PR c/64249
5573 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5574 and pass it down to c_parser_if_statement.
5575 (c_parser_else_body): Add CHAIN parameter and pass it down to
5576 c_parser_statement_after_labels.
5577 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5578 duplicated if-else-if conditions.
5579
5580 2015-10-01 Marek Polacek <polacek@redhat.com>
5581
5582 * c-typeck.c (convert_for_assignment): Improve commentary.
5583
5584 2015-09-30 Marek Polacek <polacek@redhat.com>
5585
5586 PR c/67730
5587 * c-typeck.c (c_finish_return): Use the expansion point location for
5588 certain "return with value" warnings.
5589
5590 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5591
5592 * c-parser.c (pragma_lex): Add loc argument.
5593
5594 2015-09-15 Marek Polacek <polacek@redhat.com>
5595
5596 PR c/67580
5597 * c-decl.c (tag_exists_p): New function.
5598 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5599 struct/union/enum keywords are missing.
5600 * c-tree.h (tag_exists_p): Declare.
5601
5602 2015-09-15 Marek Polacek <polacek@redhat.com>
5603
5604 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5605 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5606 Return NULL_TREE instead of 0.
5607 (lookup_name): Return NULL_TREE instead of 0.
5608 (lookup_name_in_scope): Likewise.
5609 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5610 (parser_xref_tag): Use false instead of 0.
5611 (start_struct): Use true instead of 1.
5612 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5613
5614 2015-09-14 Marek Polacek <polacek@redhat.com>
5615
5616 * c-typeck.c (set_nonincremental_init_from_string): Use
5617 HOST_WIDE_INT_M1U when shifting a negative value.
5618
5619 2015-09-09 Mark Wielaard <mjw@redhat.com>
5620
5621 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5622 parm against NULL.
5623
5624 2015-09-10 Jakub Jelinek <jakub@redhat.com>
5625
5626 PR c/67502
5627 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5628 into OMP_FOR_PRE_BODY rather than before the loop.
5629
5630 2015-09-09 Jakub Jelinek <jakub@redhat.com>
5631
5632 PR c/67501
5633 * c-parser.c (c_parser_oacc_all_clauses,
5634 c_parser_omp_all_clauses): Remove invalid clause from
5635 list of clauses even if parser->error is set.
5636
5637 PR c/67500
5638 * c-parser.c (c_parser_omp_clause_aligned,
5639 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5640 test for errors.
5641 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5642 error_mark_node.
5643
5644 PR c/67495
5645 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5646 instead of c_parser_unary_expression. If the result is !lvalue_p,
5647 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5648
5649 2015-09-04 Marek Polacek <polacek@redhat.com>
5650
5651 PR sanitizer/67279
5652 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5653
5654 2015-09-03 Martin Sebor <msebor@redhat.com>
5655
5656 PR c/66516
5657 * c-typeck.c (convert_arguments, parser_build_unary_op,
5658 build_conditional_expr, c_cast_expr, convert_for_assignment,
5659 build_binary_op, _objc_common_truthvalue_conversion): Call
5660 reject_gcc_builtin.
5661 (c_decl_implicit): Define.
5662
5663 2015-09-02 Marek Polacek <polacek@redhat.com>
5664
5665 PR c/67432
5666 * c-parser.c (c_parser_enum_specifier): Give a better error for
5667 an empty enum.
5668
5669 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5670
5671 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5672
5673 2015-08-12 Marek Polacek <polacek@redhat.com>
5674
5675 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5676 LOC to it.
5677
5678 2015-08-03 Marek Polacek <polacek@redhat.com>
5679
5680 PR c/67088
5681 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5682 Use it.
5683 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5684
5685 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5686
5687 * c-parser.c (c_parser_if_body): Take token_indent_info
5688 argument. Call warn_for_misleading_indentation even when the
5689 body is a semicolon. Extract token_indent_infos corresponding
5690 to the guard, body and next tokens. Adjust call to
5691 warn_for_misleading_indentation accordingly.
5692 (c_parser_else_body): Likewise.
5693 (c_parser_if_statement): Likewise.
5694 (c_parser_while_statement): Likewise.
5695 (c_parser_for_statement): Likewise.
5696
5697 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5698 Manuel López-Ibáñez <manu@gcc.gnu.org>
5699
5700 * c-decl.c (get_parm_info): Remove static var. Update warning
5701 message.
5702
5703 2015-07-27 Marek Polacek <polacek@redhat.com>
5704
5705 PR c++/66555
5706 PR c/54979
5707 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5708
5709 2015-07-20 Marek Polacek <polacek@redhat.com>
5710
5711 PR c++/55095
5712 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5713 (build_binary_op): Warn about left shift overflows.
5714
5715 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
5716
5717 * c-array-notation.c: Adjust includes for flags.h changes.
5718 * c-objc-common.c: Likewise.
5719
5720 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
5721
5722 * c-array-notation.c: Adjust includes.
5723 * c-aux-info.c: Likewise.
5724 * c-convert.c: Likewise.
5725 * c-decl.c: Likewise.
5726 * c-errors.c: Likewise.
5727 * c-lang.c: Likewise.
5728 * c-objc-common.c: Likewise.
5729 * c-parser.c: Likewise.
5730 * c-typeck.c: Likewise.
5731
5732 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5733
5734 PR fortran/66605
5735 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5736
5737 2015-06-29 Marek Polacek <polacek@redhat.com>
5738
5739 PR c/66322
5740 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5741 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5742 about -Wswitch-bool here.
5743 (do_case): Update c_add_case_label call.
5744 (c_finish_case): Update c_do_switch_warnings call.
5745
5746 2015-06-27 Marek Polacek <polacek@redhat.com>
5747
5748 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5749
5750 2015-06-26 Marek Polacek <polacek@redhat.com>
5751
5752 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5753 INDIRECT_REF_P.
5754 * c-typeck.c (array_to_pointer_conversion): Likewise.
5755 (build_unary_op): Likewise.
5756 (c_finish_return): Likewise.
5757
5758 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5759
5760 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5761 * c-parser.c: Likewise.
5762
5763 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5764
5765 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5766 instead of pointer_hash.
5767 (detect_field_duplicates): Likewise.
5768
5769 2015-06-25 Marek Polacek <polacek@redhat.com>
5770
5771 * c-array-notation.c: Use VAR_P throughout.
5772 * c-decl.c: Likewise.
5773 * c-objc-common.c: Likewise.
5774 * c-parser.c: Likewise.
5775 * c-typeck.c: Likewise.
5776
5777 2015-06-25 Marek Polacek <polacek@redhat.com>
5778
5779 * c-decl.c: Use is_global_var throughout.
5780 * c-parser.c: Likewise.
5781 * c-typeck.c: Likewise.
5782
5783 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
5784
5785 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5786 * c-aux-info.c: Likewise.
5787 * c-convert.c: Likewise.
5788 * c-decl.c: Likewise.
5789 * c-errors.c: Likewise.
5790 * c-lang.c: Likewise.
5791 * c-objc-common.c: Likewise.
5792 * c-parser.c: Likewise.
5793 * c-typeck.c: Likewise.
5794
5795 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
5796
5797 PR middle-end/66325
5798 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5799 variants.
5800
5801 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5802
5803 * c-decl.c (pop_scope): Register the main translation unit
5804 through the new debug hook.
5805
5806 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
5807
5808 * c-array-notation.c : Adjust include files.
5809 * c-aux-info.c : Likewise.
5810 * c-convert.c : Likewise.
5811 * c-decl.c : Likewise.
5812 * c-errors.c : Likewise.
5813 * c-lang.c : Likewise.
5814 * c-lang.h : Likewise.
5815 * c-objc-common.c : Likewise.
5816 * c-parser.c : Likewise.
5817 * c-typeck.c : Likewise.
5818
5819 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
5820
5821 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5822 immediately clobber it.
5823 (c_write_global_declarations_1): Remove call to
5824 check_global_declaration_1.
5825 (c_write_global_declarations_2): Remove.
5826 (c_write_final_cleanups): Rename from c_write_global_declarations.
5827 Remove call to finalize_compilation_unit.
5828 Remove calls to debugging hooks.
5829 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5830 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5831 * c-tree.h: Remove c_write_global_declarations.
5832
5833 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
5834
5835 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5836 * c-aux-info.c: Likewise.
5837 * c-convert.c: Likewise.
5838 * c-decl.c: Likewise.
5839 * c-errors.c: Likewise.
5840 * c-lang.c: Likewise.
5841 * c-objc-common.c: Likewise.
5842 * c-parser.c: Likewise.
5843 * c-typeck.c: Likewise.
5844
5845 2015-06-04 Marek Polacek <polacek@redhat.com>
5846
5847 PR c/66341
5848 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5849 it is a lvalue.
5850
5851 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5852
5853 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5854 Warn for empty struct.
5855 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5856
5857 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5858
5859 * c-decl.c (start_function): Call plugin before parsing.
5860 (finish_function): Call plugin after parsing.
5861
5862 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5863
5864 PR c/49551
5865 * c-decl.c (merge_decls): Merge DECL_COMMON.
5866
5867 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
5868
5869 * Make-lang.in (check_gcc_pallelize): Define.
5870
5871 2015-05-22 Marek Polacek <polacek@redhat.com>
5872
5873 PR c/47043
5874 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5875 attributes.
5876
5877 2015-05-21 Marek Polacek <polacek@redhat.com>
5878
5879 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5880 DECL_BUILT_IN.
5881
5882 2015-05-20 Marek Polacek <polacek@redhat.com>
5883
5884 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5885 * c-typeck.c: Likewise.
5886
5887 2015-05-19 Marek Polacek <polacek@redhat.com>
5888
5889 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5890
5891 2015-05-19 Jakub Jelinek <jakub@redhat.com>
5892
5893 PR middle-end/66199
5894 * c-parser.c (c_parser_omp_for_loop): Don't add
5895 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5896 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5897 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5898 constructs.
5899
5900 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5901
5902 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
5903 swaps.
5904
5905 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5906
5907 PR fortran/44054
5908 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5909 accessor function.
5910
5911 2015-05-14 Marek Polacek <polacek@redhat.com>
5912
5913 PR c/66066
5914 PR c/66127
5915 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5916 rather than with 0.
5917
5918 2015-05-12 David Malcolm <dmalcolm@redhat.com>
5919
5920 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5921 to add a call to warn_for_misleading_indentation.
5922 (c_parser_else_body): Likewise, adding param "else_loc".
5923 (c_parser_if_statement): Check for misleading indentation.
5924 (c_parser_while_statement): Likewise.
5925 (c_parser_for_statement): Likewise.
5926
5927 2015-05-08 Marek Polacek <polacek@redhat.com>
5928
5929 PR c/64918
5930 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5931 (output_init_element): Likewise.
5932
5933 2015-05-07 Marek Polacek <polacek@redhat.com>
5934
5935 PR c/65179
5936 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5937 value.
5938
5939 2015-04-30 Marek Polacek <polacek@redhat.com>
5940
5941 * c-typeck.c (set_init_label): Call error_at instead of error and
5942 pass LOC to it.
5943
5944 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5945 the type of a decl.
5946
5947 * c-typeck.c (c_build_va_arg): Clarify the error message.
5948
5949 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5950
5951 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5952 OMP_STANDALONE_CLAUSES.
5953
5954 2015-04-28 Marek Polacek <polacek@redhat.com>
5955
5956 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5957
5958 2015-04-28 Marek Polacek <polacek@redhat.com>
5959
5960 PR c/65901
5961 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5962
5963 2015-04-25 Marek Polacek <polacek@redhat.com>
5964
5965 PR c/52085
5966 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5967 attribute.
5968
5969 2015-04-23 Marek Polacek <polacek@redhat.com>
5970
5971 PR c/65345
5972 * c-decl.c (set_labels_context_r): New function.
5973 (store_parm_decls): Call it via walk_tree_without_duplicates.
5974 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5975 instead of create_tmp_var. Build TARGET_EXPR instead of
5976 COMPOUND_EXPR.
5977 (build_atomic_assign): Use create_tmp_var_raw instead of
5978 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5979
5980 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5981
5982 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5983 (c_parser_omp_target_update): Add missed %> to error_at ().
5984
5985 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5986
5987 PR target/55143
5988 * c-decl.c (c_default_pointer_mode): Remove definition.
5989 * c-tree.h (c_default_pointer_mode): Remove declaration.
5990
5991 2015-03-27 Tobias Burnus <burnus@net-b.de>
5992
5993 PR c/65586
5994 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5995 error out.
5996 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5997 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5998 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5999
6000 2015-03-19 Jakub Jelinek <jakub@redhat.com>
6001
6002 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6003 attribute for DECL_EXTERNAL VAR_DECLs.
6004
6005 2015-03-11 Jakub Jelinek <jakub@redhat.com>
6006
6007 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6008 argument.
6009
6010 2015-03-10 Jakub Jelinek <jakub@redhat.com>
6011
6012 PR c/65120
6013 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6014 before preparing arguments to warn_logical_not_parentheses.
6015
6016 2015-03-09 Jakub Jelinek <jakub@redhat.com>
6017
6018 PR c/65120
6019 * c-typeck.c (parser_build_binary_op): Don't warn for
6020 !!x == y or !b == y where b is _Bool.
6021
6022 2015-03-09 Marek Polacek <polacek@redhat.com>
6023
6024 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6025 * c-decl.c (grokdeclarator): Likewise.
6026 * c-typeck.c (build_binary_op): Likewise.
6027
6028 2015-02-27 Marek Polacek <polacek@redhat.com>
6029
6030 PR c/65228
6031 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6032
6033 2015-02-14 Marek Polacek <polacek@redhat.com>
6034
6035 PR c/64768
6036 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6037 declared through a typedef name.
6038
6039 2015-02-13 Marek Polacek <polacek@redhat.com>
6040
6041 PR c/65050
6042 * c-decl.c (grokdeclarator): Print also the type when giving
6043 the error message about array's incomplete element type.
6044
6045 2015-02-11 Jakub Jelinek <jakub@redhat.com>
6046
6047 PR c/64824
6048 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6049 check in the POP macro.
6050
6051 2015-02-09 Marek Polacek <polacek@redhat.com>
6052
6053 PR c/64856
6054 * c-typeck.c (process_init_element): Don't always wrap
6055 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6056 initializing a range of elements.
6057
6058 2015-02-04 Jakub Jelinek <jakub@redhat.com>
6059
6060 PR c/64824
6061 PR c/64868
6062 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6063
6064 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
6065
6066 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6067 processing enum declaration.
6068
6069 2015-01-29 Marek Polacek <polacek@redhat.com>
6070
6071 PR c/64709
6072 * c-typeck.c (pop_init_level): If constructor_elements has
6073 exactly one element with integer_zerop value, set constructor_zeroinit
6074 to 1. Remove braces around warning_init call.
6075
6076 2015-01-27 Jakub Jelinek <jakub@redhat.com>
6077
6078 PR c/64766
6079 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6080 of FUNCTION_DECLs with error_mark_node.
6081
6082 2015-01-26 Jakub Jelinek <jakub@redhat.com>
6083
6084 PR c/64778
6085 * c-typeck.c (convert_arguments): Return -1 if there are
6086 error_args, even if we've diagnosed too many arguments.
6087
6088 2015-01-21 Richard Biener <rguenther@suse.de>
6089
6090 PR middle-end/64313
6091 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6092 for builtins the user declared correctly.
6093
6094 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6095 Bernd Schmidt <bernds@codesourcery.com>
6096 Cesar Philippidis <cesar@codesourcery.com>
6097 James Norris <jnorris@codesourcery.com>
6098 Jakub Jelinek <jakub@redhat.com>
6099 Ilmir Usmanov <i.usmanov@samsung.com>
6100
6101 * c-parser.c: Include "gomp-constants.h".
6102 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6103 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6104 Use OMP_CLAUSE_SET_MAP_KIND.
6105 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6106 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6107 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6108 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6109 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6110 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6111 "copyout", "create", "delete", "deviceptr", "gang", "host",
6112 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6113 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6114 "present_or_create", "pcreate", "seq", "self", "vector",
6115 "vector_length", "wait", "worker".
6116 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6117 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6118 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6119 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6120 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6121 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6122 (c_parser_oacc_data_clause_deviceptr)
6123 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6124 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6125 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6126 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6127 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6128 (c_parser_oacc_parallel, c_parser_oacc_update)
6129 (c_parser_oacc_wait): New functions.
6130 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6131 (c_finish_oacc_data): New prototypes.
6132 * c-typeck.c: Include "gomp-constants.h".
6133 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6134 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6135 OMP_CLAUSE_SET_MAP_KIND.
6136 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6137 (c_finish_oacc_data): New functions.
6138 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6139 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6140 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6141 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6142 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6143 GOMP_MAP_FORCE_DEVICEPTR.
6144
6145 2015-01-09 Michael Collison <michael.collison@linaro.org>
6146
6147 * c-array-notation.c: Include hash-set.h, machmode.h,
6148 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6149 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6150 * c-aux-info.c: Ditto.
6151 * c-convert.c: Ditto.
6152 * c-decl.c: Ditto.
6153 * c-errors.c: Ditto.
6154 * c-lang.c: Dittoxs.
6155 * c-objc-common.c: Ditto.
6156 * c-parser.c: Ditto.
6157 * c-typeck.c: Include hash-set.h, machmode.h,
6158 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6159 fold-const.h, wide-int.h, inchash.h, real.h and
6160 fixed-value.h due to flattening of tree.h.
6161
6162 2015-01-07 Marek Polacek <polacek@redhat.com>
6163
6164 PR c/64417
6165 * c-typeck.c (process_init_element): Disallow initialization of
6166 a flexible array member with a string constant if the structure
6167 is in an array.
6168
6169 2015-01-05 Jakub Jelinek <jakub@redhat.com>
6170
6171 PR sanitizer/64344
6172 * c-typeck.c (convert_for_assignment, c_finish_return): For
6173 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6174 types also set in_late_binary_op around convert call.
6175 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6176 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6177 result on expr as last argument to ubsan_instrument_float_cast,
6178 if in_late_binary_op, don't use c_save_expr but save_expr.
6179
6180 Update copyright years.
6181
6182 2015-01-05 Marek Polacek <polacek@redhat.com>
6183
6184 PR c/64423
6185 * c-typeck.c (build_array_ref): Pass loc down to
6186 warn_array_subscript_with_type_char.
6187
6188 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
6189
6190 * c-typeck.c: New behavious for pointers to arrays with qualifiers
6191 (common-pointer-type): For pointers to arrays take qualifiers from
6192 element type.
6193 (build_conditional_expr): Add warnings for lost qualifiers.
6194 (comp-target-types): Allow pointers to arrays with different qualifiers.
6195 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
6196 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
6197 to PEDWARN_FOR_QUALIFIERS.
6198
6199 2014-12-17 Jakub Jelinek <jakub@redhat.com>
6200
6201 PR sanitizer/64289
6202 * c-convert.c: Include ubsan.h.
6203 (convert): For real -> integral casts and
6204 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6205 instead instrument the float cast directly.
6206
6207 2014-11-29 Jakub Jelinek <jakub@redhat.com>
6208
6209 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6210 c_finish_stmt_expr): Remove NULL last argument from
6211 create_tmp_var_raw and create_tmp_var calls.
6212 * c-array-notation.c (fix_builtin_array_notation_fn,
6213 build_array_notation_expr, fix_conditional_array_notations_1,
6214 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6215
6216 2014-11-28 Marek Polacek <polacek@redhat.com>
6217
6218 PR c/63862
6219 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6220 convert the right operand to integer type.
6221
6222 2014-11-25 Marek Polacek <polacek@redhat.com>
6223
6224 PR c/63877
6225 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6226 for inline functions.
6227
6228 2014-11-21 Jakub Jelinek <jakub@redhat.com>
6229
6230 PR target/63764
6231 * c-typeck.c (build_array_ref): Adjust
6232 convert_vector_to_pointer_for_subscript caller. If it returns true,
6233 call non_lvalue_loc on the result.
6234
6235 2014-11-11 Richard Biener <rguenther@suse.de>
6236
6237 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6238 to true.
6239
6240 2014-11-10 Andi Kleen <ak@linux.intel.com>
6241
6242 PR c/60804
6243 * c-parser.c (c_parser_statement_after_labels): Call
6244 check_no_cilk.
6245 (c_parser_if_statement): Dito.
6246 (c_parser_switch_statement): Dito.
6247 (c_parser_while_statement): Dito.
6248 (c_parser_do_statement): Dito.
6249 (c_parser_for_statement): Dito.
6250 * c-typeck.c (c_finish_loop): Dito.
6251
6252 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6253
6254 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6255 OPT_Wshift_count_overflow in the warnings.
6256
6257 2014-10-30 Marek Polacek <polacek@redhat.com>
6258
6259 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6260 print the stripped version as well, if they're not the same.
6261
6262 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6263
6264 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6265 machine_mode.
6266
6267 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
6268
6269 * c-decl.c: Adjust include files.
6270 * c-parser.c: Ditto.
6271
6272 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6273 Tom Tromey <tromey@redhat.com>
6274
6275 * c-tree.h (enum c_oracle_request): New.
6276 (c_binding_oracle_function): New typedef.
6277 (c_binding_oracle, c_pushtag, c_bind): Declare.
6278 * c-decl.c (c_binding_oracle): New global.
6279 (I_SYMBOL_CHECKED): New macro.
6280 (i_symbol_binding): New function.
6281 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6282 (I_TAG_CHECKED): New macro.
6283 (i_tag_binding): New function.
6284 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6285 (I_LABEL_CHECKED): New macro.
6286 (i_label_binding): New function.
6287 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6288 (c_print_identifier): Save and restore c_binding_oracle.
6289 (c_pushtag, c_bind): New functions.
6290
6291 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
6292
6293 * c-typeck.c: Adjust include files.
6294
6295 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6296
6297 PR c++/53061
6298 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6299 initialization here...
6300 (c_initialize_diagnostics): ... but here. Set defaults after
6301 building pretty-printer.
6302
6303 2014-10-23 Marek Polacek <polacek@redhat.com>
6304
6305 PR c/63626
6306 * c-decl.c (pop_scope): Don't print warning in external_scope.
6307
6308 2014-10-19 Marek Polacek <polacek@redhat.com>
6309
6310 PR c/63567
6311 * c-typeck.c (output_init_element): Allow initializing objects with
6312 static storage duration with compound literals even in C99 and add
6313 pedwarn for it.
6314
6315 2014-10-17 Marek Polacek <polacek@redhat.com>
6316
6317 PR c/63567
6318 * c-typeck.c (digest_init): Allow initializing objects with static
6319 storage duration with compound literals even in C99 and add pedwarn
6320 for it.
6321
6322 2014-10-17 Marek Polacek <polacek@redhat.com>
6323
6324 PR c/63543
6325 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6326 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6327 error multiple times. Print the type.
6328
6329 2014-10-17 Marek Polacek <polacek@redhat.com>
6330
6331 PR c/63549
6332 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6333 type.
6334
6335 2014-10-17 Marek Polacek <polacek@redhat.com>
6336
6337 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6338 (start_function): Use OPT_Wimplicit_int instead of 0.
6339 (store_parm_decls_oldstyle): Likewise.
6340
6341 2014-10-17 Alan Modra <amodra@gmail.com>
6342
6343 PR middle-end/61848
6344 * c-decl.c (merge_decls): Don't merge section name or tls model
6345 to newdecl symtab node, instead merge to olddecl. Override
6346 existing olddecl section name. Set tls_model for all thread-local
6347 vars, not just OMP thread-private ones. Remove incorrect comment.
6348
6349 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
6350
6351 * c-decl.c: Adjust include files.
6352
6353 2014-10-14 DJ Delorie <dj@redhat.com>
6354
6355 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6356 (c_token_starts_typename): Check all __intN, not just __int128.
6357 (c_token_starts_declspecs): Likewise.
6358 (c_parser_declspecs): Likewise.
6359 (c_parser_attribute_any_word): Likewise.
6360 (c_parser_objc_selector): Likewise.
6361 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6362 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6363 is specified.
6364 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6365 __int128.
6366 (finish_declspecs): Likewise.
6367
6368 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6369
6370 * c-parser.c (c_parser_all_labels): New function to replace
6371 the duplicate code.
6372 (c_parser_statement): Call the new function.
6373
6374 2014-10-09 Marek Polacek <polacek@redhat.com>
6375
6376 PR c/63480
6377 * c-typeck.c (pop_init_level): Don't warn about initializing
6378 with { }.
6379
6380 2014-10-07 Marek Polacek <polacek@redhat.com>
6381
6382 PR c/59717
6383 * c-decl.c (header_for_builtin_fn): New function.
6384 (implicitly_declare): Suggest which header to include.
6385
6386 2014-10-07 Marek Polacek <polacek@redhat.com>
6387
6388 * c-convert.c (convert): Use error_operand_p.
6389 * c-typeck.c (require_complete_type): Likewise.
6390 (really_atomic_lvalue): Likewise.
6391 (digest_init): Likewise.
6392 (handle_omp_array_sections_1): Likewise.
6393
6394 2014-10-03 Marek Polacek <polacek@redhat.com>
6395
6396 PR c/63453
6397 * c-decl.c (pop_scope): Don't warn about "inline function declared
6398 but never defined" for functions marked with gnu_inline attribute.
6399
6400 2014-09-25 Jakub Jelinek <jakub@redhat.com>
6401
6402 PR c++/63249
6403 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6404 on low_bound and length.
6405
6406 2014-09-24 Marek Polacek <polacek@redhat.com>
6407
6408 PR c/61405
6409 PR c/53874
6410 * c-parser.c: Don't define CPP_KEYWORD.
6411 (c_parser_switch_statement): Pass original type to c_finish_case.
6412 * c-tree.h (c_finish_case): Update declaration.
6413 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6414 conditionally to c_do_switch_warnings.
6415
6416 2014-09-03 Marek Polacek <polacek@redhat.com>
6417
6418 PR c/62024
6419 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6420 conversions.
6421
6422 2014-09-02 Jakub Jelinek <jakub@redhat.com>
6423 Balaji V. Iyer <balaji.v.iyer@intel.com>
6424 Igor Zamyatin <igor.zamyatin@intel.com>
6425
6426 * c-parser.c (c_parser_cilk_for): New function.
6427 (c_parser_cilk_grainsize): Likewise.
6428 (c_get_temp_regvar): Likewise.
6429 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6430 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6431 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6432 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6433 case.
6434
6435 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6436
6437 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6438 with using HOST_WIDE_INT without truncation to 'int'
6439
6440 2014-08-22 Marek Polacek <polacek@redhat.com>
6441
6442 PR c++/62199
6443 * c-typeck.c (parser_build_binary_op): Adjust call to
6444 warn_logical_not_parentheses.
6445
6446 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6447
6448 PR other/62008
6449 * c-parser.c (c_parser_array_notation): Check for correct
6450 type of an array added.
6451
6452 2014-08-19 Marek Polacek <polacek@redhat.com>
6453
6454 PR c++/62153
6455 * c-typeck.c (build_binary_op): If either operand of a comparison
6456 is a boolean expression, call maybe_warn_bool_compare.
6457
6458 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6459
6460 PR c/45584
6461 * c-typeck.c (build_c_cast): Do a conversion even when the
6462 TYPE_MAIN_VARIANTs are the same.
6463
6464 2014-08-19 Marek Polacek <polacek@redhat.com>
6465
6466 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6467 pedwarn_c99 instead of pedwarn.
6468 (grokfield): Likewise.
6469 (warn_defaults_to): New function.
6470 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6471 Unconditionally call pedwarn_c99 instead of pedwarn.
6472 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6473 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6474 check flag_isoc11 before.
6475 * c-errors.c (pedwarn_c99): Change the return type to bool.
6476 Handle -Wc99-c11-compat.
6477 * c-parser.c (disable_extension_diagnostics): Handle
6478 warn_c99_c11_compat.
6479 (restore_extension_diagnostics): Likewise.
6480 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6481 instead of pedwarn, don't check flag_isoc11 before.
6482 (c_parser_declspecs): Likewise.
6483 (c_parser_alignas_specifier): Likewise.
6484 (c_parser_alignof_expression): Likewise.
6485 (c_parser_generic_selection): Likewise.
6486 * c-tree.h (pedwarn_c99): Update declaration.
6487 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6488 of pedwarn_c99.
6489
6490 2014-08-19 Marek Polacek <polacek@redhat.com>
6491
6492 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6493 to pedwarn_c90.
6494 * c-errors.c: Include "opts.h".
6495 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6496 * c-parser.c (disable_extension_diagnostics): Handle negative value
6497 of warn_c90_c99_compat, too.
6498 (restore_extension_diagnostics): Likewise.
6499 (c_parser_compound_statement_nostart): Pass
6500 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6501
6502 2014-08-12 Marek Polacek <polacek@redhat.com>
6503
6504 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6505 Add pedwarn.
6506 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6507 Likewise.
6508 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6509
6510 2014-08-10 Marek Polacek <polacek@redhat.com>
6511
6512 PR c/51849
6513 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6514 Call pedwarn_c90 instead of pedwarn.
6515 (check_bitfield_type_and_width): Likewise.
6516 (declspecs_add_qual): Likewise.
6517 (declspecs_add_type): Likewise.
6518 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6519 Adjust to only call pedwarn_c90.
6520 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6521 pedwarn_c90 instead of pedwarn.
6522 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6523 * c-parser.c (disable_extension_diagnostics): Handle
6524 warn_c90_c99_compat.
6525 (restore_extension_diagnostics): Likewise.
6526 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6527 pedwarn_c90 instead of pedwarn.
6528 (c_parser_initelt): Likewise.
6529 (c_parser_postfix_expression): Likewise.
6530 (c_parser_postfix_expression_after_paren_type): Likewise.
6531 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6532 * c-tree.h: Fix formatting.
6533 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6534 pedwarn_c90 instead of pedwarn.
6535
6536 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6537
6538 * c-typeck.c: Remove include of pointer-set.h.
6539
6540 2014-08-07 Marek Polacek <polacek@redhat.com>
6541
6542 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6543
6544 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6545
6546 * c-typeck.c: Use hash_map instead of pointer_map.
6547
6548 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6549
6550 * c-decl.c: Use hash_set instead of pointer_set.
6551
6552 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6553
6554 PR middle-end/61455
6555 * c-array-notation.c (expand_array_notations): Handling
6556 of DECL_EXPR added.
6557
6558 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
6559
6560 PR c++/60517
6561 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6562 a local variable.
6563
6564 2014-07-30 Tom Tromey <tromey@redhat.com>
6565
6566 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6567 field.
6568 (really_start_incremental_init, push_init_level): Initialize
6569 designator_depth.
6570 (pop_init_level): Set global designator_depth.
6571 (process_init_element): Check for designated_init attribute.
6572
6573 2014-07-20 Marek Polacek <polacek@redhat.com>
6574
6575 PR c/61852
6576 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6577 (implicitly_declare): Pass location to implicit_decl_warning.
6578
6579 2014-07-14 Jakub Jelinek <jakub@redhat.com>
6580
6581 PR middle-end/61294
6582 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6583 If non-NULL, call c_parser_check_literal_zero.
6584 (c_parser_check_literal_zero): New function.
6585 (c_parser_postfix_expression_after_primary): Adjust
6586 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6587
6588 2014-07-06 Marek Polacek <polacek@redhat.com>
6589
6590 PR c/6940
6591 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6592 * c-tree.h (C_ARRAY_PARAMETER): Define.
6593 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6594 function parameter.
6595
6596 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
6597 Chen Gang <gang.chen.5i5j@gmail.com>
6598
6599 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6600 releasing symbol.
6601
6602 2014-07-01 Marek Polacek <polacek@redhat.com>
6603
6604 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6605 instead of 0 to WARN_FOR_ASSIGNMENT.
6606
6607 2014-07-01 Marek Polacek <polacek@redhat.com>
6608
6609 PR c/58286
6610 * c-typeck.c (convert_for_assignment): Pass
6611 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6612
6613 2014-06-30 Marek Polacek <polacek@redhat.com>
6614
6615 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6616 has no_sanitize_undefined attribute.
6617
6618 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6619
6620 PR middle-end/57541
6621 * c-array-notation.c (fix_builtin_array_notation_fn):
6622 Check for 0 arguments in builtin call. Check that bultin argument is
6623 correct.
6624 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6625 index.
6626
6627 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6628
6629 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6630 qualifiers in __auto_type for atomic types.
6631 (c_parser_typeof_specifier): Discard all type qualifiers in
6632 __typeof__ for atomic types.
6633
6634 2014-06-25 Marek Polacek <polacek@redhat.com>
6635
6636 PR c/61162
6637 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6638 the return expression to c_finish_return.
6639
6640 2014-06-25 Jakub Jelinek <jakub@redhat.com>
6641
6642 * c-typeck.c (c_finish_omp_clauses): Make sure
6643 OMP_CLAUSE_LINEAR_STEP has correct type.
6644
6645 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6646
6647 * c-decl.c: Adjust.
6648
6649 2014-06-24 Jakub Jelinek <jakub@redhat.com>
6650
6651 * c-parser.c (c_parser_omp_for_loop): For
6652 #pragma omp parallel for simd move lastprivate clause from parallel
6653 to for rather than simd.
6654
6655 2014-06-23 Marek Polacek <polacek@redhat.com>
6656
6657 * c-typeck.c (parser_build_binary_op): Don't call
6658 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6659
6660 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
6661
6662 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6663 * c-decl.c (merge_decls): Likewise.
6664
6665 2014-06-09 Marek Polacek <polacek@redhat.com>
6666
6667 PR c/36446
6668 * c-typeck.c (error_init): Call inform instead of error_at.
6669 (pedwarn_init): Call inform instead of pedwarn.
6670 (warning_init): Call inform instead of warning_at.
6671
6672 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
6673
6674 * c-decl.c (merge_decls): Use set_decl_section_name.
6675 (duplicate_decls): Remove node if it exists.
6676
6677 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6678
6679 PR c/53119
6680 * c-typeck.c (push_init_level, process_init_element,
6681 pop_init_level): Correct check for zero initialization, move
6682 missing brace warning to respect zero initialization.
6683
6684 2014-06-05 Marek Polacek <polacek@redhat.com>
6685
6686 PR c/56724
6687 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6688
6689 2014-06-05 Marek Polacek <polacek@redhat.com>
6690
6691 PR c/49706
6692 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
6693 on the left hand side operand of a comparison.
6694
6695 2014-06-05 Marek Polacek <polacek@redhat.com>
6696
6697 PR c/48062
6698 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6699 Print note only if the warning was printed.
6700
6701 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6702
6703 PR c/58942
6704 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6705 with a pointer.
6706
6707 2014-06-03 Marek Polacek <polacek@redhat.com>
6708
6709 PR c/60439
6710 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6711 c_start_case.
6712 * c-tree.h (c_start_case): Update.
6713 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6714 switch condition has boolean value.
6715
6716 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
6717
6718 * c-decl.c: Include builtins.h.
6719 * c-parser.c: Likewise.
6720
6721 2014-05-27 Marek Polacek <polacek@redhat.com>
6722
6723 PR c/56724
6724 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6725 error and warning calls to error_at and warning_at. Pass location of
6726 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6727 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6728 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6729
6730 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6731
6732 PR c/61191
6733 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6734 function parameters.
6735
6736 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
6737
6738 * c-decl.c (merge_decls): Preserve symtab node pointers.
6739 (duplicate_decls): Free new decl.
6740
6741 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6742
6743 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6744 initialization.
6745
6746 * c-parser.c (c_parser_omp_target): Return bool values.
6747
6748 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6749
6750 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6751 num_teams_loc variable to num_thread_limit_loc.
6752
6753 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6754
6755 * c-array-notation.c (expand_array_notations): Use void_node
6756 instead of void_zero_node.
6757
6758 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6759
6760 * c-decl.c (finish_struct): Adjust.
6761 (finish_enum): Likewise.
6762 (bind): Adjust.
6763 (record_inline_static): Likewise.
6764 (push_scope): Likewise.
6765 (make_label): Likewise.
6766 (lookup_label_for_goto): Likewise.
6767 (finish_struct): Likewise.
6768 (finish_enum): Likewise.
6769 (store_parm_decls): Likewise.
6770 (c_push_function_context): Likewise.
6771 * c-lang.h: Remove usage of variable_size gty attribute.
6772 * c-parser.c (c_parse_init): Adjust.
6773 (c_parse_file): Likewise.
6774
6775 2014-05-13 Marek Polacek <polacek@redhat.com>
6776
6777 PR c/61162
6778 * c-typeck.c (convert_for_assignment): Pass location to
6779 WARN_FOR_ASSIGNMENT instead of input_location.
6780
6781 2014-05-10 Marek Polacek <polacek@redhat.com>
6782
6783 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6784 maybe_warn_string_init.
6785 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6786 maybe_warn_string_init.
6787 * c-tree.h (maybe_warn_string_init): Update declaration.
6788 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6789 Call pedwarn_init with loc instead of with input_location.
6790 (digest_init): Pass init_loc to maybe_warn_string_init.
6791 (pop_init_level): Call pedwarn_init with loc instead of with
6792 input_location.
6793 (set_init_index): Likewise.
6794 (process_init_element): Likewise.
6795
6796 2014-05-09 Marek Polacek <polacek@redhat.com>
6797
6798 PR c/61096
6799 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6800 (c_parser_initelt): Pass location to set_init_label. Pass array index
6801 location to set_init_index.
6802 * c-tree.h (push_init_level): Update declaration.
6803 (pop_init_level): Likewise.
6804 (set_init_index): Likewise.
6805 (set_init_label): Likewise.
6806 * c-typeck.c (error_init): Add location parameter. Call error_at
6807 instead of error.
6808 (digest_init): Pass init_loc to error_init.
6809 (really_start_incremental_init):
6810 (push_init_level): Add location parameter. Pass loc to pop_init_level
6811 and error_init.
6812 (pop_init_level): Likewise.
6813 (set_designator): Add location parameter. Pass loc to pop_init_level,
6814 push_init_level, and error_init.
6815 (set_init_index): Add location parameter. Pass loc to error_init and
6816 set_designator.
6817 (set_init_label): Likewise.
6818 (output_init_element): Pass loc to error_init.
6819 (process_init_element): Pass loc to error_init, pop_init_level,
6820 pedwarn_init, and push_init_level.
6821
6822 2014-05-09 Marek Polacek <polacek@redhat.com>
6823
6824 PR c/50459
6825 * c-parser.c (c_parser_attributes): Parse the arguments as an
6826 expression-list if the attribute takes identifier.
6827
6828 2014-05-08 Marek Polacek <polacek@redhat.com>
6829
6830 PR c/61053
6831 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6832 TYPE_ALIGN_UNIT.
6833
6834 2014-05-08 Marek Polacek <polacek@redhat.com>
6835
6836 PR c/61077
6837 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6838 of main.
6839
6840 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6841 Mike Stump <mikestump@comcast.net>
6842 Richard Sandiford <rdsandiford@googlemail.com>
6843
6844 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6845 (finish_enum): Use wide-int interfaces.
6846 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6847 * c-typeck.c (build_c_cast): Likewise.
6848 (set_nonincremental_init_from_string): Likewise.
6849 (c_tree_equal): Likewise.
6850
6851 2014-05-02 Marek Polacek <polacek@redhat.com>
6852
6853 PR c/25801
6854 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6855 Return size_one_node when the type is not complete.
6856 (pointer_diff): Remove comment.
6857 (build_unary_op): Improve error messages.
6858
6859 2014-05-02 Marek Polacek <polacek@redhat.com>
6860
6861 * c-typeck.c (c_finish_return): Separate warning_at calls.
6862
6863 2014-05-02 Marek Polacek <polacek@redhat.com>
6864
6865 * c-tree.h (error_init): Remove declaration.
6866 (pedwarn_init): Likewise.
6867 * c-typeck.c (error_init): Make static and move above.
6868 (pedwarn_init): Likewise.
6869 (warning_init): Move above.
6870 (maybe_warn_string_init): Likewise.
6871
6872 2014-05-01 Jeff Law <law@redhat.com>
6873
6874 Revert:
6875
6876 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6877 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6878 avoid goto.
6879
6880 2014-05-02 Marek Polacek <polacek@redhat.com>
6881
6882 PR c/60784
6883 * c-typeck.c (push_init_level): Set constructor_designated to
6884 p->designated for structures.
6885
6886 2014-05-01 Marek Polacek <polacek@redhat.com>
6887
6888 PR c/60915
6889 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6890 function-definition has an attribute after the declarator.
6891
6892 2014-05-01 Marek Polacek <polacek@redhat.com>
6893
6894 PR c/60257
6895 * c-typeck.c (warning_init): Add location_t parameter. Call
6896 warning_at instead of warning.
6897 (push_init_level): Pass input_location to warning_init.
6898 (add_pending_init): Add location_t parameter. Pass loc to
6899 warning_init.
6900 (set_nonincremental_init): Pass input_location to add_pending_init.
6901 (set_nonincremental_init_from_string): Likewise.
6902 (output_init_element): Pass loc to warning_init and to
6903 add_pending_init.
6904
6905 2014-05-01 Marek Polacek <polacek@redhat.com>
6906
6907 PR c/43395
6908 * c-typeck.c (c_finish_return): Distinguish between label and variable
6909 when warning about returning local address.
6910
6911 2014-05-01 Marek Polacek <polacek@redhat.com>
6912
6913 PR c/29467
6914 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6915 in C89 mode.
6916
6917 2014-05-01 Marek Polacek <polacek@redhat.com>
6918
6919 PR c/43245
6920 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6921 instead of 0 to WARN_FOR_QUALIFIERS.
6922
6923 2014-05-01 Marek Polacek <polacek@redhat.com>
6924
6925 PR c/56989
6926 * c-typeck.c (default_conversion): Use better location for
6927 error call.
6928
6929 2014-04-30 Marek Polacek <polacek@redhat.com>
6930
6931 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6932 also when SANITIZE_FLOAT_DIVIDE is on.
6933
6934 2014-04-30 Marek Polacek <polacek@redhat.com>
6935
6936 PR c/60139
6937 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6938 and pedwarn_init. Use loc insted of input_location.
6939
6940 2014-04-30 Marek Polacek <polacek@redhat.com>
6941
6942 PR c/60351
6943 * c-typeck.c (build_binary_op): Use location when warning about
6944 shift count.
6945
6946 2014-04-25 Marek Polacek <polacek@redhat.com>
6947
6948 PR c/18079
6949 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6950 always_inline/noinline and hot/cold attributes.
6951
6952 2014-04-25 Marek Polacek <polacek@redhat.com>
6953
6954 PR c/60114
6955 * c-parser.c (c_parser_initelt): Pass input_location to
6956 process_init_element.
6957 (c_parser_initval): Pass loc to process_init_element.
6958 * c-tree.h (process_init_element): Adjust declaration.
6959 * c-typeck.c (push_init_level): Pass input_location to
6960 process_init_element.
6961 (pop_init_level): Likewise.
6962 (set_designator): Likewise.
6963 (output_init_element): Add location_t parameter. Pass loc to
6964 digest_init.
6965 (output_pending_init_elements): Pass input_location to
6966 output_init_element.
6967 (process_init_element): Add location_t parameter. Pass loc to
6968 output_init_element.
6969
6970 2014-04-24 Jakub Jelinek <jakub@redhat.com>
6971
6972 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6973 atomic-clause, allow comma in between atomic-clause and
6974 seq_cst.
6975
6976 2014-04-22 Jakub Jelinek <jakub@redhat.com>
6977
6978 PR c/59073
6979 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6980 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6981
6982 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6983
6984 PR middle-end/60469
6985 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6986 create_tmp_var instead build_decl for creating temps.
6987 (build_array_notation_expr): Likewise.
6988 (fix_conditional_array_notations_1): Likewise.
6989 (fix_array_notation_expr): Likewise.
6990 (fix_array_notation_call_expr): Likewise.
6991
6992 2014-03-28 Jakub Jelinek <jakub@redhat.com>
6993
6994 PR c++/60689
6995 * c-tree.h (c_build_function_call_vec): New prototype.
6996 * c-typeck.c (build_function_call_vec): Don't call
6997 resolve_overloaded_builtin here.
6998 (c_build_function_call_vec): New wrapper function around
6999 build_function_call_vec. Call resolve_overloaded_builtin here.
7000 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7001 Call c_build_function_call_vec instead of build_function_call_vec.
7002 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7003 * c-decl.c (finish_decl): Likewise.
7004
7005 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7006
7007 PR c/55383
7008 * c-typeck.c: Use correct format string in cast-qual warning
7009
7010 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7011
7012 * c-decl.c (c_decl_attributes): Use
7013 lang_hooks.types.omp_mappable_type.
7014 * c-typeck.c (c_finish_omp_clauses): Likewise.
7015
7016 2014-03-06 Marek Polacek <polacek@redhat.com>
7017
7018 PR c/60197
7019 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7020 of checking tree code.
7021
7022 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7023
7024 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7025 (c_parser_parameter_declaration): Likewise.
7026
7027 2014-02-19 Marek Polacek <polacek@redhat.com>
7028
7029 PR c/60195
7030 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7031 Call mark_exp_read on exp.value.
7032 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7033 TREE_ADDRESSABLE on old instead of val.
7034 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7035
7036 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7037
7038 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7039 C_EXPR_APPEND by vec_safe_push.
7040 * c-tree.h (C_EXPR_APPEND): Remove.
7041
7042 2014-01-31 Marek Polacek <polacek@redhat.com>
7043
7044 PR c/59963
7045 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7046 build_function_call_vec.
7047 (build_function_call): Likewise.
7048 (build_atomic_assign): Likewise.
7049 (build_function_call_vec): Add arg_loc parameter. Use it.
7050 (convert_arguments): Likewise.
7051 (convert_for_assignment): Rename rhs_loc to expr_loc.
7052 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7053 (c_parser_objc_keywordexpr): Likewise.
7054 (c_parser_postfix_expression_after_primary): Call
7055 build_function_call_vec with expr_loc rather than op_loc.
7056 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7057 build_function_call_vec.
7058 (c_parser_expr_list): Add locations parameter. Fill it with locations
7059 of function arguments.
7060 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7061
7062 2014-01-30 Marek Polacek <polacek@redhat.com>
7063
7064 PR c/59940
7065 * c-typeck.c (build_function_call_vec): Use loc parameter.
7066 (convert_arguments): Add location parameter. Use it.
7067 (ep_convert_and_check): Likewise.
7068 (build_atomic_assign): Adjust convert_for_assignment call.
7069 (build_modify_expr): Likewise.
7070 (digest_init): Likewise.
7071 (c_finish_return): Likewise.
7072 (build_conditional_expr): Adjust ep_convert_and_check calls.
7073 (convert_for_assignment): Add rhs_loc parameter. Use it.
7074 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7075 calls.
7076
7077 2014-01-30 Richard Biener <rguenther@suse.de>
7078
7079 PR c/59905
7080 * c-typeck.c (build_function_call_vec): Do not replace calls
7081 to a function via an incompatible type with a runtime abort.
7082
7083 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7084
7085 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7086 flag_enable_cilkplus with flag_cilkplus.
7087 (c_parser_direct_declarator_inner): Likewise.
7088 (c_parser_attribute_any_word): Likewise.
7089 (c_parser_attributes): Likewise.
7090 (c_parser_compound_statement): Likewise.
7091 (c_parser_statement_after_labels): Likewise.
7092 (c_parser_if_statement): Likewise.
7093 (c_parser_switch_statement): Likewise.
7094 (c_parser_do_statement): Likewise.
7095 (c_parser_for_statement): Likewise.
7096 (c_parser_unary_expression): Likewise.
7097 (c_parser_postfix_expression): Likewise.
7098 (c_parser_postfix_expression_after_primary): Likewise.
7099 (c_parser_postfix_expression_after_primary): Likewise.
7100 (c_parser_omp_clause_name): Likewise.
7101 (c_finish_omp_declare_simd): Likewise.
7102 (c_parser_cilk_verify_simd): Likewise.
7103 * c-typeck.c (build_array_ref): Likewise.
7104 (build_function_call_vec): Likewise.
7105 (convert_arguments): Likewise.
7106 (build_compound_expr): Likewise.
7107 (c_finish_return): Likewise.
7108 (c_finish_if_stmt): Likewise.
7109 (c_finish_loop): Likewise.
7110 (build_binary_op): Likewise.
7111
7112 2014-01-23 Marek Polacek <polacek@redhat.com>
7113
7114 PR c/59846
7115 * c-typeck.c (parser_build_binary_op): Use location instead of
7116 input_location.
7117 (build_binary_op): Pass location to shorten_compare.
7118
7119 2014-01-23 Marek Polacek <polacek@redhat.com>
7120
7121 PR c/58346
7122 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7123 an empty aggregate.
7124
7125 2014-01-23 Marek Polacek <polacek@redhat.com>
7126
7127 PR c/59871
7128 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7129 of a comma expression.
7130 (emit_side_effect_warnings): Likewise.
7131
7132 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7133
7134 PR c/59825
7135 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7136 function to use walk_tree and moved a lot of its functionality to
7137 expand_array_notations.
7138 (expand_array_notations): New function.
7139
7140 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7141
7142 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7143 attribute an attribute without value.
7144
7145 2014-01-23 Jakub Jelinek <jakub@redhat.com>
7146
7147 PR middle-end/58809
7148 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7149 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7150
7151 2014-01-22 Marek Polacek <polacek@redhat.com>
7152
7153 PR c/59891
7154 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7155 of remove_c_maybe_const_expr on op1 and op2.
7156
7157 2014-01-15 Jakub Jelinek <jakub@redhat.com>
7158
7159 PR c/58943
7160 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7161 effects, preevaluate rhs using SAVE_EXPR first.
7162
7163 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7164
7165 PR c++/59631
7166 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7167 statements with if-elseif statements.
7168
7169 2014-01-06 Marek Polacek <polacek@redhat.com>
7170
7171 PR c/57773
7172 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7173 defined bit-field types only in ISO C.
7174
7175 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7176
7177 Update copyright years
7178
7179 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7180
7181 * c-array-notation.c: Use the standard form for the copyright notice.
7182
7183 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7184
7185 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7186 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7187 field in parser is not empty. If not-empty, call the function
7188 c_parser_finish_omp_declare_simd.
7189 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7190 between SIMD-enabled functions and #pragma simd. Added new parameter.
7191 (c_parser_cilk_all_clauses): Modified the usage of the function
7192 c_parser_cilk_clause_vectorlength as mentioned above.
7193 (c_parser_cilk_simd_fn_vector_attrs): New function.
7194 (c_finish_cilk_simd_fn_tokens): Likewise.
7195 (is_cilkplus_vector_p): Likewise.
7196 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7197 "nomask," and "mask" strings in clause name.
7198 (c_parser_omp_all_clauses): Added 3 new case statements:
7199 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7200 PRAGMA_CILK_CLAUSE_NOMASK.
7201 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7202 check for vector attribute and if so call the function
7203 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7204 called the function c_finish_cilk_simd_fn_tokens.
7205 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7206 parser field is non-empty. If so, parse them as you would parse
7207 the omp declare simd pragma.
7208 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7209 Added a check when step is a parameter and flag it as error.
7210 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7211 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7212 pragma_omp_clause.
7213
7214 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7215
7216 * c-parser.c (c_parser_omp_parallel): Fix description.
7217
7218 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7219
7220 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7221 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7222 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7223 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7224
7225 2013-12-04 Joseph Myers <joseph@codesourcery.com>
7226
7227 PR c/52023
7228 * c-parser.c (c_parser_alignas_specifier): Use
7229 c_sizeof_or_alignof_type instead of c_alignof.
7230 (c_parser_alignof_expression): Likewise, with min_alignof
7231 parameter depending on alignof spelling used.
7232
7233 2013-12-04 Marek Polacek <polacek@redhat.com>
7234
7235 PR c/54113
7236 * c-decl.c (start_function): Don't warn for missing prototype for
7237 inline functions.
7238
7239 2013-12-03 Marek Polacek <polacek@redhat.com>
7240
7241 PR c/59351
7242 * c-decl.c (build_compound_literal): Allow compound literals with
7243 empty initial value.
7244
7245 2013-12-02 Joseph Myers <joseph@codesourcery.com>
7246
7247 PR c/58235
7248 * c-typeck.c (build_modify_expr): Diagnose assignment to
7249 expression with array type.
7250
7251 2013-11-29 Joseph Myers <joseph@codesourcery.com>
7252
7253 PR c/42262
7254 * c-typeck.c (process_init_element): Do not treat a string as
7255 initializing a whole array when used with a designator for an
7256 individual element.
7257
7258 2013-11-29 Joseph Myers <joseph@codesourcery.com>
7259
7260 PR c/57574
7261 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7262 an inline function following a static declaration.
7263
7264 2013-11-28 Jakub Jelinek <jakub@redhat.com>
7265
7266 PR c/59310
7267 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7268 to p_name before calling c_parser_omp_teams instead of after.
7269 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7270 argument. Remove unused p_name variable.
7271
7272 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
7273 Jakub Jelinek <jakub@redhat.com>
7274
7275 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7276 external_scope is NULL.
7277
7278 2013-11-27 Tom de Vries <tom@codesourcery.com>
7279 Marc Glisse <marc.glisse@inria.fr>
7280
7281 PR c++/59032
7282 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7283
7284 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
7285
7286 * c-typeck.c: Add required include files from gimple.h.
7287
7288 2013-11-22 David Malcolm <dmalcolm@redhat.com>
7289
7290 * c-decl.c (define_label, shadow_tag_warned)
7291 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7292 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7293 (declspecs_add_type): Remove use of in_system_header macro.
7294 * c-parser.c (c_parser_unary_expression): Likewise.
7295 * c-typeck.c (store_init_value, process_init_element)
7296 (c_start_case): Likewise.
7297
7298 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7299 macro.
7300
7301 * c-parser.c (c_parser_set_source_position_from_token): Remove
7302 reference to in_system_header from comment.
7303
7304 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7305
7306 * c-decl.c (grokdeclarator): Update comment to refer to
7307 tree_to_[su]hwi rather than tree_low_cst.
7308
7309 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7310
7311 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7312 tree_to_uhwi throughout.
7313
7314 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7315
7316 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7317 throughout.
7318
7319 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7320
7321 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7322 throughout.
7323
7324 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
7325
7326 * c-parser.c (c_parser_cilk_simd): New.
7327 (c_parser_cilk_verify_simd): New.
7328 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7329 (c_parser_omp_for_loop): Add case for NE_EXPR.
7330 Set c_break_label for CILK_SIMD.
7331 (c_parser_cilk_clause_vectorlength): New.
7332 (c_parser_cilk_clause_linear): New.
7333 (c_parser_cilk_clause_name): New.
7334 (c_parser_cilk_all_clauses): New.
7335 * c-typeck.c (build_unary_op): Pass location argument to
7336 readonly_error.
7337 (build_modify_expr): Same.
7338 (build_asm_expr): Same.
7339 (c_finish_bc_stmt): Error on break/continue in loops.
7340
7341 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
7342
7343 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7344
7345 2013-11-14 Diego Novillo <dnovillo@google.com>
7346
7347 * c-decl.c: Include print-tree.h.
7348 Include stor-layout.h.
7349 Include varasm.h.
7350 Include attribs.h.
7351 Include stringpool.h.
7352 * c-lang.c: Include fold-const.h.
7353 * c-parser.c: Include stringpool.h.
7354 Include attribs.h.
7355 Include stor-layout.h.
7356 Include varasm.h.
7357 Include trans-mem.h.
7358 * c-typeck.c: Include stor-layout.h.
7359 Include trans-mem.h.
7360 Include varasm.h.
7361 Include stmt.h.
7362
7363 2013-11-13 Joseph Myers <joseph@codesourcery.com>
7364
7365 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7366 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7367 __auto_type.
7368 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7369 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7370 RID_AUTO_TYPE.
7371 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7372 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7373 (c_parser_declarator, c_parser_direct_declarator_inner)
7374 (c_parser_parameter_declaration, c_parser_type_name): All callers
7375 changed.
7376 (c_parser_declaration_or_fndef): Handle declarations with type
7377 determined from the initializer.
7378
7379 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
7380
7381 * c-typeck.c: Include gimplify.h.
7382
7383 2013-11-12 Joseph Myers <joseph@codesourcery.com>
7384
7385 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7386 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7387 comment.
7388 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7389 or _Thread_local as appropriate in diagnostics.
7390 (build_null_declspecs): Initialize ret->thread_gnu_p.
7391 (declspecs_add_scspec): Handle either __thread or _Thread_local
7392 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7393 pedantic. Do not disallow _Thread_local extern and _Thread_local
7394 static.
7395
7396 2013-11-07 Joseph Myers <joseph@codesourcery.com>
7397 Andrew MacLeod <amacleod@redhat.com>
7398
7399 * c-aux-info.c (gen_type): Handle atomic qualifier.
7400 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7401 qualifiers when compating types.
7402 (shadow_tag_warned): Handle atomic_p in declspecs.
7403 (quals_from_declspecs): Likewise.
7404 (start_decl): Use c_type_promotes_to when promoting argument
7405 types.
7406 (grokdeclarator): Handle _Atomic.
7407 (get_parm_info): Diagnose any qualifier on "void" as only
7408 parameter.
7409 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7410 comparing types. Use c_type_promotes_to when promoting argument
7411 types.
7412 (finish_function): Use c_type_promotes_to when promoting argument
7413 types.
7414 (build_null_declspecs): Handle atomic_p in declspecs.
7415 (declspecs_add_qual): Handle RID_ATOMIC.
7416 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7417 (c_token_starts_declspecs): Handle RID_ATOMIC.
7418 (c_parser_declspecs): Handle atomic type specifiers and
7419 qualifiers.
7420 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7421 from types of expressions with atomic type.
7422 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7423 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7424 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7425 (c_parser_statement_after_labels, c_parser_switch_statement)
7426 (c_parser_for_statement, c_parser_expr_no_commas)
7427 (c_parser_conditional_expression, c_parser_binary_expression)
7428 (c_parser_cast_expression, c_parser_unary_expression)
7429 (c_parser_postfix_expression)
7430 (c_parser_postfix_expression_after_primary, c_parser_expression):
7431 Use convert_lvalue_to_rvalue.
7432 (c_parser_expression_conv, c_parser_expr_list): Document
7433 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7434 (c_parser_objc_synchronized_statement): Use
7435 convert_lvalue_to_rvalue.
7436 (c_parser_objc_selector): Handle RID_ATOMIC.
7437 (c_parser_objc_receiver, c_parser_array_notation): Use
7438 convert_lvalue_to_rvalue.
7439 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7440 _Atomic (type-name).
7441 (struct c_declspecs): Add atomic_p field.
7442 (convert_lvalue_to_rvalue): Declare.
7443 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7444 corresponding atomic types.
7445 (qualify_type): Don't add _Atomic qualifiers from second argument.
7446 (comp_target_types): Do not allow _Atomic mismatches.
7447 (type_lists_compatible_p): Do not remove atomic qualifiers when
7448 comparing types.
7449 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7450 (build_atomic_assign): New functions.
7451 (build_unary_op): Use build_atomic_assign for atomic increment and
7452 decrement.
7453 (build_conditional_expr): Do not treat _Atomic void as a qualified
7454 version of void.
7455 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7456 (find_anonymous_field_with_type, convert_to_anonymous_field)
7457 (convert_for_assignment): Do not remove atomic qualifiers when
7458 comparing types.
7459 (digest_init): Do not accept initialization of arrays of atomic
7460 elements by string constants.
7461 (build_asm_expr): Use convert_lvalue_to_rvalue.
7462 (build_binary_op): Do not treat _Atomic void as a qualified
7463 version of void.
7464
7465 2013-11-06 DJ Delorie <dj@redhat.com>
7466
7467 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7468 both explicit and builtin, print the location of the explicit one.
7469
7470 2013-11-05 Tobias Burnus <burnus@net-b.de>
7471
7472 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7473 c_parser_omp_distribute, c_parser_omp_teams,
7474 c_parser_omp_target, c_parser_omp_declare): Handle
7475 -fopenmp-simd.
7476
7477 2013-11-03 Marek Polacek <polacek@redhat.com>
7478
7479 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7480
7481 2013-11-01 Jakub Jelinek <jakub@redhat.com>
7482
7483 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7484 check_dup_generic at the end, unless remove is true.
7485 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7486 remove = true;.
7487 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7488
7489 2013-10-31 Jakub Jelinek <jakub@redhat.com>
7490
7491 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7492 with decl that is not pointer nor array.
7493
7494 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7495
7496 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7497 a spawning function is found.
7498 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7499 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7500 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7501 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7502 case.
7503 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7504 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7505 expr.
7506 (c_finish_return): Added a check to reject _Cilk_spawn in return
7507 expression.
7508 (build_cilk_spawn): New function.
7509 (build_cilk_sync): Likewise.
7510 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
7511
7512 2013-10-27 Tobias Burnus <burnus@net-b.de>
7513
7514 PR other/33426
7515 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7516 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7517 (c_parser_statement_after_labels): Update calls.
7518
7519 2013-10-24 Tobias Burnus <burnus@net-b.de>
7520
7521 PR other/33426
7522 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7523 Handle PRAGMA_IVDEP.
7524 (c_parser_statement_after_labels): Update call.
7525
7526 2013-10-24 Marek Polacek <polacek@redhat.com>
7527
7528 * c-parser.c (c_parser_struct_declaration): Add a comment.
7529 (c_parser_declarator): Don't allow _Alignas here.
7530
7531 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
7532
7533 * c-parser.c: Include omp-low.h.
7534 * c-typeck.c: Likewise.
7535
7536 2013-10-17 Marek Polacek <polacek@redhat.com>
7537
7538 PR c/58267
7539 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7540 Document syntax of the array-declarator.
7541 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7542 are not permitted.
7543 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7544 (c_parser_struct_declaration): Likewise.
7545 (c_parser_declarator): Likewise.
7546 (c_parser_direct_declarator_inner): Likewise.
7547 (c_parser_parameter_declaration): Likewise.
7548 (c_parser_type_name): Likewise.
7549
7550 2013-10-11 Jakub Jelinek <jakub@redhat.com>
7551
7552 * c-lang.h (current_omp_declare_target_attribute): New extern
7553 decl.
7554 * c-parser.c: Include c-lang.h.
7555 (struct c_parser): Change tokens to c_token *.
7556 Add tokens_buf field. Change tokens_avail type to unsigned int.
7557 (c_parser_consume_token): If parser->tokens isn't
7558 &parser->tokens_buf[0], increment parser->tokens.
7559 (c_parser_consume_pragma): Likewise.
7560 (enum pragma_context): Add pragma_struct and pragma_param.
7561 (c_parser_external_declaration): Adjust
7562 c_parser_declaration_or_fndef caller.
7563 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7564 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7565 Adjust recursive call.
7566 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7567 of pragma_external.
7568 (c_parser_parameter_declaration): Use pragma_param instead of
7569 pragma_external.
7570 (c_parser_compound_statement_nostart, c_parser_label,
7571 c_parser_for_statement): Adjust
7572 c_parser_declaration_or_fndef callers.
7573 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7574 it through to c_parser_conditional_expression.
7575 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7576 pass it through to c_parser_binary_expression. Adjust recursive
7577 call.
7578 (c_parser_binary_expression): Remove prec argument, add
7579 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7580 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7581 binop matches it, use build2 instead of parser_build_binary_op.
7582 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7583 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7584 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7585 Handle pragma_struct and pragma_param the same as pragma_external.
7586 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7587 (c_parser_omp_variable_list): Parse array sections for
7588 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7589 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7590 (c_parser_omp_clause_reduction): Handle user defined reductions.
7591 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7592 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7593 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7594 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7595 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7596 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7597 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7598 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7599 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7600 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7601 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7602 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7603 (c_parser_omp_for_loop): Add CODE argument, pass it through
7604 to c_finish_omp_for. Change last argument to cclauses,
7605 and adjust uses to grab parallel clauses from the array of all
7606 the split clauses. Adjust c_parser_binary_expression,
7607 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7608 (omp_split_clauses): New function.
7609 (c_parser_omp_simd): New function.
7610 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7611 Allow the function to be called also when parsing combined constructs,
7612 and call c_parser_omp_simd when parsing for simd.
7613 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7614 #pragma omp section, require exactly one structured-block instead of
7615 sequence of statements.
7616 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7617 Allow the function to be called also when parsing combined constructs.
7618 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7619 Allow the function to be called also when parsing combined
7620 constructs.
7621 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7622 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7623 c_parser_omp_teams, c_parser_omp_target_data,
7624 c_parser_omp_target_update, c_parser_omp_target,
7625 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7626 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7627 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7628 (c_parser_omp_construct): Add p_name and mask vars. Handle
7629 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7630 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7631 and c_parser_omp_sections callers.
7632 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7633 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7634 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7635 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7636 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7637 OMP_CLAUSE_DEPEND.
7638 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7639 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7640 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7641 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7642 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7643 * c-typeck.c: Include tree-inline.h.
7644 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7645 handle_omp_array_sections_1, handle_omp_array_sections,
7646 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7647 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7648 user defined reductions.
7649 (c_tree_equal): New function.
7650 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7651 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7652 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7653 c_check_omp_declare_reduction_r): New prototypes.
7654 * c-decl.c (current_omp_declare_target_attribute): New variable.
7655 (c_decl_attributes): New function.
7656 (start_decl, start_function): Use it instead of decl_attributes.
7657 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7658 c_omp_reduction_decl, c_omp_reduction_lookup,
7659 c_check_omp_declare_reduction_r): New functions.
7660
7661 2013-09-25 Tom Tromey <tromey@redhat.com>
7662
7663 * Make-lang.in (c/gccspec.o): Remove.
7664 (CFLAGS-c/gccspec.o): New variable.
7665 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7666 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7667 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7668
7669 2013-09-25 Tom Tromey <tromey@redhat.com>
7670
7671 * Make-lang.in (c/gccspec.o): Don't use subshell.
7672
7673 2013-09-18 Marek Polacek <polacek@redhat.com>
7674
7675 PR sanitize/58443
7676 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7677 Remove unnecessary check.
7678
7679 2013-09-18 Marek Polacek <polacek@redhat.com>
7680
7681 PR sanitizer/58411
7682 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7683 no_sanitize_undefined attribute.
7684
7685 2013-09-13 Kai Tietz <ktietz@redhat.com>
7686
7687 PR target/57848
7688 * c-decl.c (c_builtin_function_ext_scope): Remove
7689 wrong assumption that it is never called on prexisting
7690 symbol.
7691
7692 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7693
7694 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7695
7696 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7697
7698 * c-objc-common.c (c_tree_printer): Tidy.
7699
7700 2013-08-30 Marek Polacek <polacek@redhat.com>
7701
7702 * c-typeck.c (build_binary_op): Add division by zero and shift
7703 instrumentation.
7704
7705 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
7706 Joseph Myers <joseph@codesourcery.com>
7707
7708 PR c/35649
7709 * c-typeck.c (c_common_type): Prefer double_type_node over
7710 other REAL_TYPE types with the same precision.
7711 (convert_arguments): Likewise.
7712
7713 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7714
7715 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7716 (c_initialize_diagnostics): Call a destructor for the early printer.
7717
7718 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7719
7720 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7721 printer initialization.
7722
7723 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
7724
7725 PR c/57490
7726 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7727 check for truth values.
7728 (expand_array_notation_exprs): Added truth values case. Removed an
7729 unwanted else. Added for-loop to walk through subtrees in default
7730 case.
7731
7732 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7733
7734 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7735
7736 2013-07-23 Joseph Myers <joseph@codesourcery.com>
7737
7738 * c-parser.c (struct c_generic_association): Fix typo.
7739
7740 2013-07-23 Tom Tromey <tromey@redhat.com>
7741 Joseph Myers <joseph@codesourcery.com>
7742
7743 * c-parser.c (struct c_generic_association): New.
7744 (c_generic_association_d): New typedef.
7745 (c_parser_generic_selection): New function.
7746 (c_parser_postfix_expression): Handle RID_GENERIC.
7747
7748 2013-07-13 Jason Merrill <jason@redhat.com>
7749
7750 PR c++/57793
7751 * c-decl.c (finish_struct): Check for too-large class.
7752
7753 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
7754
7755 PR c/57821
7756 * c-typeck.c (set_init_index): When folding, check for index overflow.
7757
7758 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7759
7760 * c-parser.c (c_parser_array_notation): Removed rejection of array
7761 notations in an array of function pointers.
7762
7763 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7764
7765 * c-array-notation.c (make_triplet_val_inv): New function.
7766 (create_cmp_incr): Likewise.
7767 (create_array_refs): Likewise.
7768 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7769 Also modularized common parts between functions and called the function.
7770 (build_array_notation_expr): Likewise.
7771 (fix_conditional_array_notations_1): Likewise.
7772 (fix_array_notation_expr): Likewise.
7773 (fix_array_notation_call_expr): Likewise.
7774
7775 2013-06-18 Marek Polacek <polacek@redhat.com>
7776
7777 PR c/57630
7778 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7779
7780 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7781
7782 * c-array-notation.c (build_array_notation_expr): Reject array notation
7783 mismatch between LHS and RHS even inside a call_expr. Also, removed
7784 a couple while statements that were dead code.
7785
7786 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7787
7788 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7789 excessive precision expressions in function parameters. Also removed
7790 couple unwanted while statements.
7791
7792 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7793
7794 * c-array-notation.c (expand_array_notation_exprs): Added
7795 ARRAY_NOTATION_REF case.
7796
7797 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7798
7799 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7800 function to c-family/array-notation-common.c.
7801 (is_cilkplus_reduce_builtin): Likewise.
7802 (find_rank): Likewise.
7803 (extract_array_notation_exprs): Likewise.
7804 (replace_array_notations): Likewise.
7805 (find_inv_trees): Likewise.
7806 (replace_inv_trees): Likewise.
7807 (contains_array_notation_expr): Likewise.
7808 (find_correct_array_notation_type): Likewise.
7809 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7810 (struct inv_list): Moved this to c-family/array-notation-common.c.
7811 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
7812
7813 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7814
7815 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7816 reduction functions outside the for-loop. Added a check if the fundecl
7817 is non-NULL. Finally, removed an unwanted if-statement, and made the
7818 body unconditional.
7819
7820 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7821
7822 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7823 condition of the if-statement matches the rank of else-block and then-
7824 block when array notations are used.
7825 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7826 expression after the entire function body is parsed.
7827 (c_parser_expr_no_commas): Delayed creating array notation expressions
7828 to the end of function parsing.
7829 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7830 whole if-statement instead of just the condition.
7831 (expand_array_notation_exprs): Added MODIFY_EXPR case.
7832
7833 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7834
7835 PR c/57474
7836 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7837 array to NULL_TREE if they are unused. Also added a check for the
7838 field to be NULL before its fields are used in future.
7839
7840 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7841
7842 PR bootstrap/57450
7843 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7844 (build_array_notation_expr): Likewise.
7845
7846 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7847
7848 * c-typeck.c (build_array_ref): Added a check to see if array's
7849 index is greater than one. If true, then emit an error.
7850 (build_function_call_vec): Exclude error reporting and checking
7851 for builtin array-notation functions.
7852 (convert_arguments): Likewise.
7853 (c_finish_return): Added a check for array notations as a return
7854 expression. If true, then emit an error.
7855 (c_finish_loop): Added a check for array notations in a loop
7856 condition. If true then emit an error.
7857 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7858 (build_binary_op): Added a check for array notation expr inside
7859 op1 and op0. If present, we call another function to find correct
7860 type.
7861 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7862 * c-parser.c (c_parser_compound_statement): Check if array
7863 notation code is used in tree, if so, then transform them into
7864 appropriate C code.
7865 (c_parser_expr_no_commas): Check if array notation is used in LHS
7866 or RHS, if so, then build array notation expression instead of
7867 regular modify.
7868 (c_parser_postfix_expression_after_primary): Added a check for
7869 colon(s) after square braces, if so then handle it like an array
7870 notation. Also, break up array notations in unary op if found.
7871 (c_parser_direct_declarator_inner): Added a check for array
7872 notation.
7873 (c_parser_compound_statement): Added a check for array notation in
7874 a stmt. If one is present, then expand array notation expr.
7875 (c_parser_if_statement): Likewise.
7876 (c_parser_switch_statement): Added a check for array notations in
7877 a switch statement's condition. If true, then output an error.
7878 (c_parser_while_statement): Similarly, but for a while.
7879 (c_parser_do_statement): Similarly, but for a do-while.
7880 (c_parser_for_statement): Similarly, but for a for-loop.
7881 (c_parser_unary_expression): Check if array notation is used in a
7882 pre-increment or pre-decrement expression. If true, then expand
7883 them.
7884 (c_parser_array_notation): New function.
7885 * c-array-notation.c: New file.
7886 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
7887
7888 2013-05-23 Mike Stump <mikestump@comcast.net>
7889
7890 * c-typeck.c (convert_for_assignment): Handle references to memory
7891 spaces better.
7892
7893 2013-05-16 Jason Merrill <jason@redhat.com>
7894
7895 * Make-lang.in (cc1$(exeext)): Use link mutex.
7896
7897 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7898
7899 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7900 to simply use OPT_Wpointer_arith.
7901 (build_unary_op): Likewise.
7902
7903 2013-04-03 Jakub Jelinek <jakub@redhat.com>
7904
7905 PR c/19449
7906 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7907 argument. If set, or it temporarily for parsing of the first
7908 argument into force_folding_builtin_constant_p.
7909 (c_parser_postfix_expression): Adjust callers.
7910
7911 2013-03-21 Richard Biener <rguenther@suse.de>
7912
7913 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7914 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7915
7916 2013-02-12 Marek Polacek <polacek@redhat.com>
7917
7918 PR c/44938
7919 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7920 origtypes to NULL.
7921
7922 2013-01-24 Jakub Jelinek <jakub@redhat.com>
7923
7924 PR c/56078
7925 * c-typeck.c (set_nonincremental_init_from_string): If
7926 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7927 returned false.
7928 (process_init_element): Likewise.
7929
7930 2012-12-20 Jakub Jelinek <jakub@redhat.com>
7931
7932 PR c++/55619
7933 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7934 argument, don't call default_function_array_conversion
7935 nor c_fully_fold here.
7936 (c_parser_asm_statement): Adjust callers.
7937 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7938 and outputs here, and call default_function_array_conversion
7939 on inputs that don't need to be addressable.
7940
7941 2012-12-18 Jakub Jelinek <jakub@redhat.com>
7942
7943 PR c/39464
7944 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7945 warning require that both c_common_unsigned_type as well as
7946 c_common_signed_type is the same for both mvl and mvr types.
7947
7948 2012-11-16 Diego Novillo <dnovillo@google.com>
7949
7950 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7951
7952 * c-common.c: Use new vec API in vec.h.
7953 * c-common.h: Likewise.
7954 * c-gimplify.c: Likewise.
7955 * c-pragma.c: Likewise.
7956 * c-pretty-print.c: Likewise.
7957 * c-pretty-print.h: Likewise.
7958 * c-semantics.c: Likewise.
7959 * c-decl.c: Likewise.
7960 * c-parser.c: Likewise.
7961 * c-tree.h: Likewise.
7962 * c-typeck.c: Likewise.
7963
7964 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7965
7966 PR c++/54930
7967 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7968
7969 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7970
7971 PR c/53066
7972 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7973 shadows a function, unless the variable is a function or a
7974 pointer-to-function.
7975
7976 2012-10-12 Jakub Jelinek <jakub@redhat.com>
7977
7978 PR c/54381
7979 * c-parser.c (struct c_tree_loc_pair): Removed.
7980 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7981 add location_t * and tree * arguments, fill in array of 3
7982 sizeof_arg trees and corresponding locs.
7983 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7984 c_parser_expr_list callers.
7985 (c_parser_postfix_expression_after_primary): Likewise. Pass
7986 array of 3 sizeof_arg trees and locs (corresponding to first
7987 3 arguments) to sizeof_pointer_memaccess_warning.
7988
7989 2012-10-09 Lawrence Crowl <crowl@google.com>
7990
7991 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7992 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7993 hash table.
7994
7995 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7996
7997 PR c++/54194
7998 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7999 call.
8000
8001 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
8002
8003 PR c++/54427
8004 * c-typeck.c: Include c-common.h.
8005 (enum stv_conv): Moved to c-common.h.
8006 (scalar_to_vector): Moved to c-common.c.
8007 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8008 * Make-lang.in: c-typeck.c depends on c-common.h.
8009
8010 2012-10-04 Arnaud Charlet <charlet@adacore.com>
8011
8012 * c-decl.c (c_write_global_declarations): Fix handling of
8013 -fdump-ada-spec*.
8014
8015 2012-09-30 Sharad Singhai <singhai@google.com>
8016
8017 * c-decl.c (c_write_global_declarations): Use a different method
8018 to determine if the dump has ben initialized.
8019
8020 2012-09-14 Joseph Myers <joseph@codesourcery.com>
8021
8022 PR c/54552
8023 * c-typeck.c (c_cast_expr): When casting to a type requiring
8024 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8025 c_fully_fold first.
8026
8027 2012-09-14 Joseph Myers <joseph@codesourcery.com>
8028
8029 PR c/54103
8030 * c-typeck.c (build_unary_op): Pass original argument of
8031 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8032 any C_MAYBE_CONST_EXPR, if it has integer operands.
8033 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8034 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8035 to c_objc_common_truthvalue_conversion, then remove any
8036 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8037 c_objc_common_truthvalue_conversion not
8038 c_common_truthvalue_conversion.
8039 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8040 call note_integer_operands for arguments with integer operands
8041 that are not integer constants.
8042
8043 2012-09-13 Jakub Jelinek <jakub@redhat.com>
8044
8045 PR c/54559
8046 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8047 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8048
8049 2012-08-31 Jakub Jelinek <jakub@redhat.com>
8050
8051 PR c/54428
8052 * c-convert.c (convert): Don't call fold_convert_loc if
8053 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8054 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8055 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8056
8057 2012-08-24 Jakub Jelinek <jakub@redhat.com>
8058
8059 PR c/54355
8060 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8061 for nested and empty_ok arguments in the call to
8062 c_parser_declaration_or_fndef.
8063
8064 2012-08-17 Jakub Jelinek <jakub@redhat.com>
8065
8066 * c-tree.h (c_last_sizeof_arg): Declare.
8067 * c-parser.c (struct c_tree_loc_pair): New type.
8068 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8069 non-NULL.
8070 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8071 (c_parser_postfix_expression_after_primary): Likewise. Call
8072 sizeof_pointer_memaccess_warning if needed.
8073 (sizeof_ptr_memacc_comptypes): New function.
8074 * c-typeck.c (c_last_sizeof_arg): New global variable.
8075 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8076
8077 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
8078
8079 * c-lang.h (lang_decl): Add variable_size GTY option.
8080
8081 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8082
8083 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8084 * Make-lang.in: Fix dependencies.
8085
8086 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8087
8088 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8089 and add language Makefile hooks.
8090 * config-lang.in: New file.
8091 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8092 add the required "normal" config-lang.in rules.
8093 * c-lang.h: Moved from gcc/ to here.
8094 * c-tree.h: Likewise.
8095 * c-objc-common.c: Likewise.
8096 * c-objc-common.h: Likewise.
8097 * c-typeck.c: Likewise.
8098 * c-convert.c: Likewise.
8099 * c-lang.c: Likewise.
8100 * c-aux-info.c: Likewise.
8101 * c-errors.c: Likewise.
8102 * gccspec.c: Likewise.
8103 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8104 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8105 \f
8106 Copyright (C) 2012-2021 Free Software Foundation, Inc.
8107
8108 Copying and distribution of this file, with or without modification,
8109 are permitted in any medium without royalty provided the copyright
8110 notice and this notice are preserved.