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