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