]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
libstdc++: Add some noexcept to std::valarray
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
c2bd5d8a
GA
12021-10-22 Eric Gallager <egallager@gcc.gnu.org>
2
3 PR other/102663
4 * Make-lang.in: Add dummy c.install-dvi target.
5
93d183a5
GA
62021-10-15 Richard Biener <rguenther@suse.de>
7
8 PR c/102763
9 * gimple-parser.c
10 (c_parser_gimple_postfix_expression_after_primary): Check
11 for a pointer do be dereferenced by ->.
12
5d5885c9
GA
132021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
14
15 * c-parser.c (c_finish_omp_declare_variant): Change call from
16 c_omp_check_context_selector to omp_check_context_selector. Change
17 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
18
c9db17b8
GA
192021-10-09 Jakub Jelinek <jakub@redhat.com>
20
21 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
22 (c_parser_omp_scan_loop_body): Use it.
23 (c_parser_omp_sections_scope): Likewise.
24
50e20ee6
GA
252021-10-07 Richard Biener <rguenther@suse.de>
26
27 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
28
bb6194e0
GA
292021-10-05 Richard Biener <rguenther@suse.de>
30
31 PR c/102605
32 * gimple-parser.c (c_parser_gimple_postfix_expression):
33 Accept more address _Literals.
34
da9c5f78
GA
352021-10-04 Marek Polacek <polacek@redhat.com>
36
37 PR c++/97573
38 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
39
9d116bcc
GA
402021-10-01 Martin Sebor <msebor@redhat.com>
41
42 PR c/102103
43 * c-typeck.c (maybe_warn_for_null_address): New function.
44 (build_binary_op): Call it.
45
462021-10-01 Jakub Jelinek <jakub@redhat.com>
47 Richard Biener <rguenther@suse.de>
48
49 PR sanitizer/102515
50 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
51 for division even for SANITIZE_SI_OVERFLOW.
52
532021-10-01 Jakub Jelinek <jakub@redhat.com>
54
55 * c-parser.c (c_parser_omp_clause_order): Set
56 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
57
fd133479
GA
582021-09-28 Andrew Pinski <apinski@marvell.com>
59
60 PR c/32122
61 * c-parser.c (c_parser_statement_after_labels): Pass
62 the c_expr instead of the tree to c_finish_goto_ptr.
63 * c-typeck.c (c_finish_goto_ptr): Change the second
64 argument type to c_expr.
65 * c-tree.h (c_finish_goto_ptr): Likewise.
66 Error out if the expression was not of a pointer type.
67
e4777439
GA
682021-09-22 Jakub Jelinek <jakub@redhat.com>
69
70 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
71 modifiers.
72
cf74e7b5
GA
732021-09-18 Jakub Jelinek <jakub@redhat.com>
74
75 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
76 and reproducible modifiers.
77 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
78
792021-09-18 Jakub Jelinek <jakub@redhat.com>
80
81 * c-parser.c (c_parser_omp_clause_default): Handle private and
82 firstprivate arguments, adjust diagnostics on unknown argument.
83
0a4cb439
GA
842021-09-17 Jakub Jelinek <jakub@redhat.com>
85
86 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
87 is true.
88
a26206ec
GA
892021-09-10 Jakub Jelinek <jakub@redhat.com>
90
91 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
92 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
93 don't call build_conditional_expr, instead build a COND_EXPR directly.
94 (c_parser_binary_expression): Avoid calling parser_build_binary_op
95 if omp_atomic_lhs even in more cases for >, < or ==.
96 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
97 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
98 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
99 * c-typeck.c (build_binary_op): For flag_openmp only handle
100 MIN_EXPR/MAX_EXPR.
101
b2748138
GA
1022021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
103
104 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
105 directive.
106
e11c6046
GA
1072021-09-01 Iain Sandoe <iain@sandoe.co.uk>
108
109 * c-decl.c (enum deprecated_states): Add unavailable state.
110 (merge_decls): Copy unavailability.
111 (quals_from_declspecs): Handle unavailable case.
112 (start_decl): Amend the logic handling suppression of nested
113 deprecation states to include unavailability.
114 (smallest_type_quals_location): Amend comment.
115 (grokdeclarator): Handle the unavailable deprecation state.
116 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
117 * c-tree.h (struct c_declspecs): Add unavailable_p.
118 * c-typeck.c (build_component_ref): Handle unavailability.
119 (build_external_ref): Likewise.
120
1212021-09-01 Roger Sayle <roger@nextmovesoftware.com>
122 Joseph Myers <joseph@codesourcery.com>
123
124 PR c/79412
125 * c-decl.c (duplicate_decls): On significant mismatches, mark the
126 types of both (non-function) decls as error_mark_node, so that the
127 middle-end can see the code is malformed.
128 (free_attr_access_data): Don't process if the type has been set to
129 error_mark_node.
130
6d51ee43
GA
1312021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
132
133 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
134 and 'ancestor' in 'target device' clauses.
135
38b19c5b
GA
1362021-08-23 Jakub Jelinek <jakub@redhat.com>
137
138 * c-parser.c (c_parser_omp_clause_num_tasks,
139 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
140
5b2876f9
GA
1412021-08-22 Martin Uecker <muecker@gwdg.de>
142
143 PR c/98397
144 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
145 for pointers to arrays with qualifiers.
146 (build_conditional_expr): For C23 don't lose qualifiers for pointers
147 to arrays when the other pointer is a void pointer. Update warnings.
148 (convert_for_assignment): Update warnings for C2X when converting from
149 void* with qualifiers to a pointer to array with the same qualifiers.
150
7c9e1645
GA
1512021-08-20 Jakub Jelinek <jakub@redhat.com>
152
153 * c-parser.c (c_parser_omp_error): New function.
154 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
155
1562021-08-20 Jakub Jelinek <jakub@redhat.com>
157
158 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
159 comma at the end of list.
160 (c_parser_omp_requires): Likewise.
161
b57fba5e
GA
1622021-08-19 Jakub Jelinek <jakub@redhat.com>
163
164 * c-parser.c (c_parser_omp_requires): Don't call
165 c_parser_peek_2nd_token and optionally consume token if current
166 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
167
6e529985
GA
1682021-08-18 Jakub Jelinek <jakub@redhat.com>
169
170 * c-parser.c (c_parser_omp_nothing): New function.
171 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
172
1732021-08-18 Jakub Jelinek <jakub@redhat.com>
174
175 * c-parser.c (c_parser_statement_after_labels): Add restart label
176 near the start of the function. If c_parser_pragma returns false,
177 goto restart.
178 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
179 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
180 return what c_parser_omp_declare returned. Return true instead of
181 false after emitting errors that the directive is not allowed in
182 pragma_stmt context.
183 (c_parser_omp_ordered): Return true instead of
184 false after emitting errors that the directive is not allowed in
185 pragma_stmt context.
186 (c_parser_omp_target_update): Likewise.
187 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
188 Change return type from tree to bool, return false if the
189 directive should be ignored in pragma_stmt contexts.
190 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
191 return their result directly.
192 (c_parser_omp_cancellation_point): Change return type from void to
193 bool, return false if the directive should be ignored in pragma_stmt
194 contexts.
195 (c_parser_omp_declare): Likewise.
196
2d14d64b
GA
1972021-08-17 Jakub Jelinek <jakub@redhat.com>
198
199 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
200 (c_parser_omp_scope): New function.
201 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
202
72be20e2
GA
2032021-08-12 Jakub Jelinek <jakub@redhat.com>
204
205 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
206 (c_parser_omp_clause_filter): New function.
207 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
208 (OMP_MASKED_CLAUSE_MASK): Define.
209 (c_parser_omp_masked): New function.
210 (c_parser_omp_parallel): Handle parallel masked.
211 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
212 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
213
2142021-08-12 Martin Uecker <muecker@gwdg.de>
215
216 PR c/101838
217 PR c/29970
218 * c-typeck.c (c_expr_sizeof_type): Evaluate
219 size expressions for structs of variable size.
220
2212021-08-12 Tobias Burnus <tobias@codesourcery.com>
222
223 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
224 'primary' as alias for 'master'.
225
3ae564ea
GA
2262021-08-10 Martin Uecker <muecker@gwdg.de>
227
228 PR c/29970
229 * c-typeck.c (c_expr_sizeof_expr): Evaluate
230 size expressions for structs of variable size.
231
f92f4778
GA
2322021-08-06 Tamar Christina <tamar.christina@arm.com>
233
234 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
235 * c-tree.h (c_simulate_enum_decl): Likewise.
236
2372021-08-06 Martin Sebor <msebor@redhat.com>
238
239 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
240 vec arguments to by-reference.
241 (c_finish_omp_declare_simd): Same.
242 (c_parser_compound_statement_nostart): Same.
243 (c_parser_for_statement): Same.
244 (c_parser_objc_methodprotolist): Same.
245 (c_parser_oacc_routine): Same.
246 (c_parser_omp_for_loop): Same.
247 (c_parser_omp_declare_simd): Same.
248
419c6c68
GA
2492021-07-21 Thomas Schwinge <thomas@codesourcery.com>
250 Joseph Myers <joseph@codesourcery.com>
251 Cesar Philippidis <cesar@codesourcery.com>
252
253 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
254 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
255 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
256 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
257
92d45509
GA
2582021-07-20 Martin Sebor <msebor@redhat.com>
259
260 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
261 by-const-reference.
262 * c-typeck.c (c_build_function_call_vec): Same.
263
d97d71a1
GA
2642021-07-15 Martin Sebor <msebor@redhat.com>
265
266 PR c/101289
267 PR c/97548
268 * c-decl.c (get_parm_array_spec): Strip nops.
269
6fba0eea
GA
2702021-07-06 Martin Sebor <msebor@redhat.com>
271
272 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
273
7a60a6e8
GA
2742021-07-02 Jakub Jelinek <jakub@redhat.com>
275
276 PR c/101297
277 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
278 appears before a CPP_NAME.
279
90708f87
GA
2802021-06-25 Martin Sebor <msebor@redhat.com>
281
282 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
283 warning_suppressed_p, suppress_warning, and copy_no_warning.
284 (diagnose_mismatched_decls): Same.
285 (duplicate_decls): Same.
286 (grokdeclarator): Same.
287 (finish_function): Same.
288 (c_write_global_declarations_1): Same.
289 * c-fold.c (c_fully_fold_internal): Same.
290 * c-parser.c (c_parser_expr_no_commas): Same.
291 (c_parser_postfix_expression): Same.
292 * c-typeck.c (array_to_pointer_conversion): Same.
293 (function_to_pointer_conversion): Same.
294 (default_function_array_conversion): Same.
295 (convert_lvalue_to_rvalue): Same.
296 (default_conversion): Same.
297 (build_indirect_ref): Same.
298 (build_function_call_vec): Same.
299 (build_atomic_assign): Same.
300 (build_unary_op): Same.
301 (c_finish_return): Same.
302 (emit_side_effect_warnings): Same.
303 (c_finish_stmt_expr): Same.
304 (c_omp_clause_copy_ctor): Same.
305
9aa8327e
GA
3062021-06-24 Jakub Jelinek <jakub@redhat.com>
307
308 PR c/101176
309 * c-parser.c (c_parser_has_attribute_expression): Set source range for
310 the result.
311
3122021-06-24 Jakub Jelinek <jakub@redhat.com>
313
314 PR c/101171
315 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
316 error_mark_node.
317
3182021-06-24 Jakub Jelinek <jakub@redhat.com>
319
320 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
321 C_ORT_OMP for clauses on target construct.
322 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
323 (c_parser_omp_target): For non-combined target add
324 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
325 C_ORT_OMP_TARGET to c_finish_omp_clauses.
326 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
327 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
328 never present on C_ORT_*DECLARE_SIMD.
329 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
330 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
331 corresponding map clauses.
332
2f080224
GA
3332021-06-21 Jakub Jelinek <jakub@redhat.com>
334
335 PR inline-asm/100785
336 * c-typeck.c (c_mark_addressable): Diagnose trying to make
337 bit-fields addressable.
338
ede6c356
GA
3392021-06-15 Robin Dapp <rdapp@linux.ibm.com>
340
341 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
342 similar.
343
8dc48181
GA
3442021-06-14 Tobias Burnus <tobias@codesourcery.com>
345
346 PR c/100913
347 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
348 var in the error case.
349
438aac59
GA
3502021-06-07 Eric Botcazou <ebotcazou@adacore.com>
351
352 PR c/100920
353 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
354 spot built-in functions.
355
7d6987e9
GA
3562021-06-06 Jakub Jelinek <jakub@redhat.com>
357
358 PR c/100902
359 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
360 even when target is combined with other constructs.
361
3622021-06-06 Eric Botcazou <ebotcazou@adacore.com>
363
364 PR c/100920
365 * c-decl.c (finish_struct): Fix thinko in previous change.
366 * c-typeck.c (convert_for_assignment): Do not warn on pointer
367 assignment and initialization for storage order purposes if the
368 RHS is a call to a DECL_IS_MALLOC function.
369
600f90cb
GA
3702021-06-04 Martin Sebor <msebor@redhat.com>
371
372 PR c/100783
373 * c-objc-common.c (print_type): Handle erroneous types.
374
440c8a0a
GA
3752021-06-03 Jakub Jelinek <jakub@redhat.com>
376
377 PR c++/100859
378 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
379 after depend only cases.
380
ee682192
GA
3812021-05-31 Richard Biener <rguenther@suse.de>
382
383 PR c++/88601
384 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
385 * c-parser.c (c_parser_postfix_expression): Likewise.
386
48166757
GA
3872021-05-28 Richard Biener <rguenther@suse.de>
388
389 PR c/100803
390 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
391 invalid if conditions.
392
3932021-05-28 Jakub Jelinek <jakub@redhat.com>
394
395 PR middle-end/99928
396 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
397 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
398 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
399 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
400 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
401 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
402 if present in map_head, map_field_head or map_firstprivate_head
403 bitmaps.
404
4052021-05-28 Tobias Burnus <tobias@codesourcery.com>
406
407 * c-parser.c (c_parser_omp_clause_affinity): New.
408 (c_parser_omp_clause_name, c_parser_omp_variable_list,
409 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
410 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
411 c_finish_omp_clauses): Likewise.
412
01c59ef2
GA
4132021-05-26 Eric Botcazou <ebotcazou@adacore.com>
414
415 PR c/100653
416 * c-decl.c (finish_struct): Warn for a union containing an aggregate
417 field with a differing scalar storage order.
418
2832d51b
GA
4192021-05-21 Jakub Jelinek <jakub@redhat.com>
420
421 PR middle-end/99928
422 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
423 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
424 if a decl is mentioned both in map clause and in such firstprivate
425 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
426
65f32e5d
GA
4272021-05-19 Jakub Jelinek <jakub@redhat.com>
428
429 PR middle-end/99928
430 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
431 master when combined with taskloop.
432 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
433 parallel master when not combined with taskloop.
434
a8daf9a1
GA
4352021-05-18 Richard Biener <rguenther@suse.de>
436
437 PR c/100522
438 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
439 Diagnose calls to non-functions.
440 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
441
a7ffc1ef
GA
4422021-05-17 Richard Biener <rguenther@suse.de>
443
444 PR c/100625
445 * gimple-parser.c (c_parser_gimple_label): Avoid building
446 a GIMPLE label with NULL label decl.
447
f9af11c7
GA
4482021-05-13 Martin Sebor <msebor@redhat.com>
449
450 PR c/100550
451 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
452
0ff3a0f2
GA
4532021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
454
455 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
456 'close'.
457
aa891c56
GA
4582021-05-10 Martin Liska <mliska@suse.cz>
459
460 * c-aux-info.c (affix_data_type): Use startswith
461 function instead of strncmp.
462 * c-typeck.c (build_function_call_vec): Likewise.
463 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
464
62d87a32
GA
4652021-05-07 Eric Botcazou <ebotcazou@adacore.com>
466
467 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
468 on the address of a pointer field in a record with reverse SSO.
469
99e8df7a
GA
4702021-05-04 Tobias Burnus <tobias@codesourcery.com>
471
472 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
473 for || and && reductions.
474
3c8e539d
GA
4752021-04-29 Joseph Myers <joseph@codesourcery.com>
476
477 * c-typeck.c (function_types_compatible_p): For C2X, treat
478 unprototyped function as compatible with non-variadic prototyped
479 function even if some argument types are changed by the default
480 argument promotions.
481
ee351f7f
GA
4822021-04-15 Martin Sebor <msebor@redhat.com>
483
484 PR c/99420
485 PR c/99972
486 * c-decl.c (pushdecl): Always propagate type attribute.
487
4882021-04-15 Richard Sandiford <richard.sandiford@arm.com>
489
490 PR c/98852
491 * c-typeck.c (c_common_type): Do not drop attributes that
492 affect type identity.
493
1d54b138
GA
4942021-04-10 Jakub Jelinek <jakub@redhat.com>
495
496 PR c/99990
497 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
498 error_mark_node.
499
4493b1c1
GA
5002021-03-25 Jakub Jelinek <jakub@redhat.com>
501
502 PR c++/99565
503 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
504 to operand_equal_p.
505
5f256a70
GA
5062021-03-19 Jakub Jelinek <jakub@redhat.com>
507
508 PR c/99588
509 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
510 with modifycode NOP_EXPR produces and mark the _Atomic var as read
511 if found.
512 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
513 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
514 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
515
3c5b6d24
GA
5162021-03-15 Tobias Burnus <tobias@codesourcery.com>
517
518 PR c++/99509
519 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
520 ensure that the varpool node is marked as offloadable.
521
ceae9533
GA
5222021-03-05 Tobias Burnus <tobias@codesourcery.com>
523
524 PR c/99137
525 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
526
4028d01a
GA
5272021-02-24 Martin Sebor <msebor@redhat.com>
528
529 PR middle-end/97172
530 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
531
bf81237e
GA
5322021-02-18 Jakub Jelinek <jakub@redhat.com>
533
534 PR c/99136
535 * c-typeck.c (c_finish_return): Don't wrap retval into
536 EXCESS_PRECISION_EXPR in functions that return void.
537
0c5cdb31
GA
5382021-02-11 Marek Polacek <polacek@redhat.com>
539
540 * c-parser.c (c_parser_if_statement): Use vec_free.
541
a19dd5e6
GA
5422021-02-04 Martin Sebor <msebor@redhat.com>
543
544 PR c/97882
545 * c-decl.c (locate_old_decl): Add type to diagnostic output.
546 (diagnose_mismatched_decls): Same.
547 (start_function): Introduce temporaries for better readability.
548 * c-typeck.c (comptypes_internal): Only consider complete enum
549 types in comparisons with integers.
550
f7884fb1
GA
5512021-02-01 Martin Sebor <msebor@redhat.com>
552
553 PR middle-end/97172
554 * c-decl.c (free_attr_access_data): New function.
555 (c_parse_final_cleanups): Call free_attr_access_data.
556
59cf67d1
GA
5572021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
558
559 * c-parser.c (c_parser_omp_clause_detach): New.
560 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
561 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
562 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
563 clause. Prevent use of detach with mergeable and overriding the
564 data sharing mode of the event handle.
565
2f7f0d32
GA
5662021-01-15 Jakub Jelinek <jakub@redhat.com>
567
568 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
569 unqualified element type and then call c_build_qualified_type on the
570 ARRAY_TYPE.
571
7d187e4f
GA
5722021-01-07 Richard Biener <rguenther@suse.de>
573
574 * gimple-parser.c (c_parser_gimple_compound_statement): Only
575 reallocate loop array if it is too small.
576
eefe499f
GA
5772020-12-16 Martin Uecker <muecker@gwdg.de>
578
579 PR c/98047
580 * c-typeck.c (build_modify_expr): Drop qualifiers.
581
5822020-12-16 Martin Uecker <muecker@gwdg.de>
583
584 PR c/98260
585 * c-parser.c (c_parser_expression): Look into
586 nop expression when marking expressions as read.
587
d52945ce
GA
5882020-12-14 Martin Liska <mliska@suse.cz>
589
590 PR sanitizer/98204
591 * c-typeck.c (pointer_diff): Do not emit a top-level
592 sanitization.
593 (build_binary_op): Likewise.
594
ca2bd949
GA
5952020-12-09 Tobias Burnus <tobias@codesourcery.com>
596
597 * c-parser.c (c_parser_omp_allocate): New.
598 (c_parser_omp_construct): Call it.
599
6002020-12-09 Richard Biener <rguenther@suse.de>
601
602 PR c/98200
603 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
604 early on error.
605
bc8a7013
GA
6062020-12-07 Martin Uecker <muecker@gwdg.de>
607
608 PR c/97981
609 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
610 that drops qualifiers to the end of the function.
611
d48df6f2
GA
6122020-11-26 Martin Uecker <muecker@gwdg.de>
613
614 PR c/65455
615 PR c/92935
616 * c-parser.c (c_parser_declaration_or_fndef): Remove
617 redundant code to drop qualifiers of _Atomic types for __auto_type.
618 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
619 types for __typeof__.
620
1e2c9a27
GA
6212020-11-24 Jakub Jelinek <jakub@redhat.com>
622
623 PR c/97958
624 * c-parser.c (c_parser_binary_expression): For omp atomic binary
625 expressions, use make_node instead of build2 to avoid checking build2
626 performs.
627
8e6198d0
GA
6282020-11-23 Joseph Myers <joseph@codesourcery.com>
629
630 PR c/95630
631 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
632 for comparisons of complete and incomplete pointers.
633
7a97e2fc
GA
6342020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
635
636 * c-aux-info.c (gen_type): Support opaque types.
637
82e5048e
GA
6382020-11-20 Martin Sebor <msebor@redhat.com>
639
640 PR middle-end/97879
641 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
642
6432020-11-20 Jakub Jelinek <jakub@redhat.com>
644
645 PR other/97911
646 * Make-lang.in (c.serial): Change from goal to a variable.
647 (.PHONY): Drop c.serial.
648
6492020-11-20 Martin Uecker <muecker@gwdg.de>
650
651 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
652
d62586ee
GA
6532020-11-19 Jakub Jelinek <jakub@redhat.com>
654
655 PR c/97860
656 * c-decl.c (get_parm_array_spec): Bail out of nelts is
657 error_operand_p.
658
25bb75f8
GA
6592020-11-18 Jakub Jelinek <jakub@redhat.com>
660
661 * Make-lang.in (c.serial): New goal.
662 (.PHONY): Add c.serial c.prev.
663 (cc1$(exeext)): Call LINK_PROGRESS.
664
77f67db2
GA
6652020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
666
667 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
668 goto too.
669 * c-typeck.c (build_asm_expr): Remove an assert checking output
670 absence for asm goto.
671
6722020-11-13 Jakub Jelinek <jakub@redhat.com>
673
674 * c-typeck.c (c_finish_omp_clauses): Don't clear
675 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
676
6772020-11-13 Iain Sandoe <iain@sandoe.co.uk>
678
679 PR objc/77404
680 * c-parser.c (c_parser_objc_class_definition): Pass the
681 location of the class name to the interface declaration.
682
bb622641
GA
6832020-11-10 Strager Neds <strager.nds@gmail.com>
684
685 * c-decl.c (merge_decls): Use new overload of
686 set_decl_section_name.
687
6882020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
689
690 * c-parser.c (c_parser_omp_target_data): Add use of
691 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
692 handled map clause kind.
693 (c_parser_omp_target_enter_data): Likewise.
694 (c_parser_omp_target_exit_data): Likewise.
695 (c_parser_omp_target): Likewise.
696 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
697 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
698 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
699 same struct field access to co-exist on OpenMP construct.
700
2da7ee05
GA
7012020-11-07 Martin Uecker <muecker@gwdg.de>
702
703 * c-parser.c (c_parser_label): Implement mixing of labels and code.
704 (c_parser_all_labels): Likewise.
705
44cab2d8
GA
7062020-11-06 Iain Sandoe <iain@sandoe.co.uk>
707
708 * c-parser.c (c_parser_objc_at_property_declaration):
709 Improve parsing fidelity. Associate better location info
710 with @property attributes. Clean up the interface to
711 objc_add_property_declaration ().
712
7132020-11-06 Nathan Sidwell <nathan@acm.org>
714
715 * c-decl.c (diagnose_mismatched_decls): Rename
716 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
717 (warn_if_shadowing, implicitly_declare, names_builtin_p)
718 (collect_source_refs): Likewise.
719 * c-typeck.c (inform_declaration, inform_for_arg)
720 (convert_for_assignment): Likewise.
721
7222020-11-06 Tobias Burnus <tobias@codesourcery.com>
723
724 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
725 OpenACC matching.
726 (c_parser_omp_construct): Update call.
727
35c125cb
GA
7282020-11-04 Jakub Jelinek <jakub@redhat.com>
729
730 PR c++/97670
731 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
732 find underlying decl to clear in the aligned_head bitmap.
733
7342020-11-04 Joseph Myers <joseph@codesourcery.com>
735
736 * c-decl.c (handle_nodiscard_attribute): New.
737 (std_attribute_table): Add nodiscard.
738 * c-parser.c (c_parser_std_attribute): Expect argument to
739 nodiscard attribute to be a string. Do not special-case ignoring
740 nodiscard.
741 * c-typeck.c (maybe_warn_nodiscard): New.
742 (build_compound_expr, emit_side_effect_warnings): Call
743 maybe_warn_nodiscard.
744 (c_process_expr_stmt, c_finish_stmt_expr): Also call
745 emit_side_effect_warnings if warn_unused_result.
746
4f0606fe
GA
7472020-10-29 Asher Gordon <AsDaGo@posteo.net>
748
749 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
750 with XDELETE.
751 (finish_init): Likewise.
752 (pop_init_level): Likewise.
753
e93aae4a
GA
7542020-10-28 Joseph Myers <joseph@codesourcery.com>
755
756 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
757 error_at for omitted parameter name.
758
7592020-10-28 Jakub Jelinek <jakub@redhat.com>
760
761 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
762 (c_parser_omp_clause_allocate): New function.
763 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
764 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
765 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
766 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
767 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
768 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
769 PRAGMA_OMP_CLAUSE_ALLOCATE.
770 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
771
89bb01e7
GA
7722020-10-27 Joseph Myers <joseph@codesourcery.com>
773
774 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
775 standard attributes.
776
efe71fcc
GA
7772020-10-23 Marek Polacek <polacek@redhat.com>
778
779 PR c++/91741
780 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
781 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
782 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
783 * c-tree.h (char_type_p): Declare.
784 * c-typeck.c (char_type_p): No longer static.
785
7862020-10-23 Martin Sebor <msebor@redhat.com>
787
788 PR middle-end/97552
789 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
790
2fe5b7d1
GA
7912020-09-19 Martin Sebor <msebor@redhat.com>
792
793 PR c/50584
794 * c-decl.c (lookup_last_decl): Define new function.
795 (c_decl_attributes): Call it.
796 (start_decl): Add argument and use it.
797 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
798 (get_parm_array_spec): Define new function.
799 (push_parm_decl): Call get_parm_array_spec.
800 (start_function): Call warn_parm_array_mismatch. Build attribute
801 access and add it to current function.
802 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
803 in forms of array parameters.
804 * c-tree.h (start_decl): Add argument.
805
8062020-09-19 Sandra Loosemore <sandra@codesourcery.com>
807
808 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
809 with...
810 (in_statement): New.
811 (start_function): Adjust for above change.
812 (c_push_function_context, c_pop_function_context): Likewise.
813 * c-lang.h (struct language_function): Likewise.
814 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
815 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
816 New.
817 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
818 (c_parser_switch_statement): Adjust break/switch context handling
819 and calls to renamed functions.
820 (c_parser_while_statement): Adjust break/switch context handling and
821 build a WHILE_STMT.
822 (c_parser_do_statement): Ditto, with DO_STMT respectively.
823 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
824 (c_parser_omp_for_loop): Adjust break/switch context handling.
825 * c-tree.h (c_break_label, c_cont_label): Delete.
826 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
827 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
828 (in_statement, switch_statement_break_seen_p): Declare.
829 (c_start_case, c_finish_case): Renamed to...
830 (c_start_switch, c_finish_switch).
831 (c_finish_bc_stmt): Adjust arguments.
832 * c-typeck.c (build_function_call_vec): Don't try to print
833 statements with %qE format.
834 (struct c_switch): Rename switch_expr field to switch_stmt.
835 Add break_stmt_seen_p field.
836 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
837 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
838 (do_case): Update for changes to struct c_switch.
839 (c_finish_case): Rename to c_finish_switch. Update for changes to
840 struct c_switch and change of representation from SWITCH_EXPR to
841 SWITCH_STMT.
842 (c_finish_loop): Delete.
843 (c_finish_bc_stmt): Update to reflect changes to break/continue
844 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
845 of a GOTO_EXPR except for objc foreach loops.
846
e1a4a8a0
GA
8472020-09-01 Jakub Jelinek <jakub@redhat.com>
848
849 PR c++/96867
850 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
851 only on PARM_DECLs.
852
8f7ea26a
GA
8532020-08-28 Martin Sebor <msebor@redhat.com>
854
855 PR c/96596
856 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
857 argument type.
858
8b394f01
GA
8592020-08-27 Martin Liska <mliska@suse.cz>
860
861 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
862 growth function to true.
863
db0f6efe
GA
8642020-08-25 Tobias Burnus <tobias@codesourcery.com>
865
866 PR c/96678
867 * c-typeck.c (handle_omp_array_sections_1): Talk about
868 array function parameter in the error message.
869
5c265693
GA
8702020-08-18 Jakub Jelinek <jakub@redhat.com>
871
872 PR c/96571
873 * c-parser.c (c_parser_generic_selection): Change match_found from bool
874 to int, holding index of the match. Call mark_exp_read on the selector
875 expression and on expressions other than the selected one.
876
4967ca2f
GA
8772020-08-01 Richard Sandiford <richard.sandiford@arm.com>
878
879 PR c/96377
880 * c-typeck.c (process_init_element): Split test for whether to
881 recurse into a record, union or array into...
882 (initialize_elementwise_p): ...this new function. Don't recurse
883 into a vector type if the initialization value is also a vector.
884
48cc2e46
GA
8852020-07-31 Richard Biener <rguenther@suse.de>
886
887 PR debug/96383
888 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
889 Define to c_common_finalize_early_debug.
890
3ea9abca
GA
8912020-07-22 Tobias Burnus <tobias@codesourcery.com>
892
893 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
894 (c_parser_omp_critical): Permit hint(0) clause without named critical.
895 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
896
30430061
GA
8972020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
898
899 PR target/95237
900 * c-decl.c (finish_decl): Call target hook
901 lower_local_decl_alignment to lower local decl alignment.
902
3f8ca9cb
GA
9032020-07-09 Julian Brown <julian@codesourcery.com>
904 Thomas Schwinge <thomas@codesourcery.com>
905
906 PR middle-end/95270
907 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
908 for standalone attach/detach clauses.
909
a82c4c4c 9102020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
911
912 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
913 set, warn for conversion between pointers that point to incompatible
914 scalar storage orders.
915
f60ee68d
GA
9162020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
917
918 * c-parser.c (c_parser_statement_after_labels): Pass correct
919 parameters to c_parser_do_statement.
920
56638b9b
GA
9212020-06-16 Jakub Jelinek <jakub@redhat.com>
922
923 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
924 c_in_omp_for.
925 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
926 premature c_fully_fold. Defer explicit c_fully_fold calls to after
927 c_finish_omp_for.
928 * c-tree.h (c_in_omp_for): Declare.
929 * c-typeck.c (c_in_omp_for): Define.
930 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
931 (digest_init): Likewise.
932 (build_binary_op): Likewise.
933
9342020-06-16 Jakub Jelinek <jakub@redhat.com>
935
936 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
937 from kind by comma rather than colon.
938
1a59f3db
GA
9392020-06-05 Mark Wielaard <mark@klomp.org>
940
941 * c-decl.c (implicit_decl_warning): When warned and olddecl is
942 an undeclared builtin, then add a fixit header hint, if found.
943 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
944 warning_at about implicit builtin declaration type mismatch.
945
9a5b7438
GA
9462020-06-03 Mark Wielaard <mark@klomp.org>
947
948 * c-parser.c (struct c_parser): Add seen_string_literal
949 bitfield.
950 (c_parser_consume_token): Reset seen_string_literal.
951 (c_parser_error_richloc): Add name_hint if seen_string_literal
952 and next token is a CPP_NAME and we have a missing header
953 suggestion for the name.
954 (c_parser_string_literal): Set seen_string_literal.
955
9562020-06-03 Mark Wielaard <mark@klomp.org>
957
958 * c-parser.c (c_parser_postfix_expression_after_primary): Add
959 scope with matching_parens after CPP_OPEN_PAREN.
960
9612020-06-03 Tobias Burnus <tobias@codesourcery.com>
962
963 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
964
53ffb43a
GA
9652020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
966
967 * Make-lang.in: Remove extra slash.
968
8f66f175
ML
9692020-05-19 Martin Liska <mliska@suse.cz>
970
971 * c-parser.c: Fix typo.
972
49ddde69
JJ
9732020-05-14 Jakub Jelinek <jakub@redhat.com>
974
975 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
976
eb72dc66
RB
9772020-05-07 Richard Biener <rguenther@suse.de>
978
979 PR middle-end/94703
980 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
981 DECL_GIMPLE_REG_P.
982
bf915591
JJ
9832020-04-30 Jakub Jelinek <jakub@redhat.com>
984
985 PR c/94842
986 * c-decl.c (set_labels_context_r): In addition to context-less
987 LABEL_DECLs adjust also LABEL_DECLs with context equal to
988 parent function if any.
989 (store_parm_decls): Adjust comment.
990
e1113ffb
JJ
9912020-04-19 Jakub Jelinek <jakub@redhat.com>
992
993 PR objc/94637
994 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
995 two CPP_COLON tokens.
996
2e389749
JJ
9972020-04-17 Jakub Jelinek <jakub@redhat.com>
998
999 PR other/94629
1000 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1001 to data.clauses.
1002
2dc9294c
JJ
10032020-04-15 Jakub Jelinek <jakub@redhat.com>
1004
1005 PR c/94593
1006 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1007 requires directive when not at file scope.
1008
13e41d8b
TB
10092020-04-08 Tobias Burnus <tobias@codesourcery.com>
1010
1011 PR middle-end/94120
1012 * c-decl.c (c_check_in_current_scope): New function.
1013 * c-tree.h (c_check_in_current_scope): Declare it.
1014 * c-parser.c (c_parser_oacc_declare): Add check that variables
1015 are declared in the same scope as the directive. Fix handling
1016 of namespace vars.
1017
4df50a05
JJ
10182020-04-07 Jakub Jelinek <jakub@redhat.com>
1019
1020 PR c++/94512
1021 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1022 if c_parser_omp_master succeeded.
1023
5db9e893
JJ
10242020-03-23 Jakub Jelinek <jakub@redhat.com>
1025
1026 PR gcov-profile/94029
1027 PR c/94239
1028 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1029 the function_start_locus location. Don't do that afterwards for the
1030 __GIMPLE body parsing.
1031
9def91e9
JJ
10322020-03-19 Jakub Jelinek <jakub@redhat.com>
1033
1034 PR gcov-profile/94029
1035 * c-tree.h (finish_function): Add location_t argument defaulted to
1036 input_location.
1037 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1038 set it to the locus of closing } if non-NULL.
1039 (c_parser_compound_statement_nostart): Return locus of closing }.
1040 (c_parser_parse_rtl_body): Likewise.
1041 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1042 finish_function.
1043 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1044 input_location to set function_end_locus.
1045
046c5890
JJ
10462020-03-17 Jakub Jelinek <jakub@redhat.com>
1047
1048 PR c/94172
1049 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1050 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1051 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1052 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1053 ENUMERAL_TYPEs.
1054 (finish_incomplete_vars): New function, moved from finish_struct. Use
1055 relayout_decl instead of layout_decl.
1056 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1057 being TYPE_VFIELD. Use finish_incomplete_vars.
1058 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1059 finish_incomplete_vars.
1060 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1061 also on ENUMERAL_TYPEs.
1062
c015ff8c
JJ
10632020-03-16 Jakub Jelinek <jakub@redhat.com>
1064
1065 PR c/94179
1066 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1067
f2e9fe5f
MS
10682020-03-13 Martin Sebor <msebor@redhat.com>
1069
1070 PR c/94040
1071 * c-decl.c (builtin_structptr_type_count): New constant.
1072 (match_builtin_function_types): Reject decls that are incompatible
1073 in types pointed to by pointers.
1074 (diagnose_mismatched_decls): Adjust comments.
1075
c9d70946
JM
10762020-03-05 Joseph Myers <joseph@codesourcery.com>
1077
1078 PR c/93577
1079 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1080 empty when initialized type is error_mark_node.
1081 (set_designator, process_init_element): Ignore initializers for
1082 elements of a variable-size type or of error_mark_node.
1083
726e292d
MS
10842020-03-01 Martin Sebor <msebor@redhat.com>
1085
1086 PR middle-end/93926
1087 * c-decl.c (types_close_enough_to_match): New function.
1088 (match_builtin_function_types):
1089 (diagnose_mismatched_decls): Add missing inform call to a warning.
1090
a499c2f8
MS
10912020-03-01 Martin Sebor <msebor@redhat.com>
1092
1093 PR c/93812
1094 * c-typeck.c (build_functype_attribute_variant): New function.
1095 (composite_type): Call it.
1096
9c3da8cc
JJ
10972020-02-25 Jakub Jelinek <jakub@redhat.com>
1098
1099 PR other/93912
1100 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1101 Rename last argument from probablity to probability.
1102
bacdd5e9
JJ
11032020-02-13 Jakub Jelinek <jakub@redhat.com>
1104
1105 PR c/93576
1106 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1107 *expr if it has side effects.
1108
f9eb0973
JL
11092020-01-30 Jeff Law <law@redhat.com>
1110
1111 PR c/88660
1112 * c-parser.c (c_parser_switch_statement): Make sure to request
1113 marking the switch expr as used.
1114
ac68e287
JM
11152020-01-22 Joseph Myers <joseph@codesourcery.com>
1116
1117 PR c/93348
1118 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1119 argument with integer operands.
1120
852f0ae8
KK
11212020-01-16 Kerem Kat <keremkat@gmail.com>
1122
1123 PR c/92833
1124 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1125 to support 4 available tokens.
1126
e2346a33
JM
11272020-01-15 Joseph Myers <joseph@codesourcery.com>
1128
1129 PR c/93072
1130 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1131 determine whether to set DECL_CONTEXT.
1132
3d77686d
JM
11332020-01-13 Joseph Myers <joseph@codesourcery.com>
1134
1135 PR c/93241
1136 * c-typeck.c (build_c_cast): Check for expressions with integer
1137 operands that can occur in an unevaluated part of an integer
1138 constant expression and call note_integer_operands as needed.
1139
f74c4b2c
RB
11402019-01-08 Richard Biener <rguenther@suse.de>
1141
1142 PR middle-end/93199
1143 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1144 permanently.
1145
8d9254fc
JJ
11462020-01-01 Jakub Jelinek <jakub@redhat.com>
1147
1148 Update copyright years.
1149
39292e25
EB
11502019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1151
1152 * c-decl.c (collect_source_ref_cb): Delete.
1153 (for_each_global_decl): Rename into...
1154 (collect_source_refs): ...this. Call collect_source_ref directly.
1155 (c_parse_final_cleanups): Always call collect_source_ref on the main
1156 input filename.
1157
519d7496
JB
11582019-12-19 Julian Brown <julian@codesourcery.com>
1159 Cesar Philippidis <cesar@codesourcery.com>
1160
1161 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1162 detach clauses.
1163 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1164 Allow deref (->) in variable lists if true.
1165 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1166 Pass to c_parser_omp_variable_list.
1167 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1168 call to c_parser_omp_variable_list.
1169 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1170 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1171 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1172 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1173 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1174 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1175 and detach. Support deref.
1176 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1177 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1178 (c_oacc_check_attachments): New function.
1179 (c_finish_omp_clauses): Check attach/detach arguments for being
1180 pointers using above. Support deref.
1181
a6163563
JB
11822019-12-19 Julian Brown <julian@codesourcery.com>
1183 Maciej W. Rozycki <macro@codesourcery.com>
1184 Tobias Burnus <tobias@codesourcery.com>
1185 Thomas Schwinge <thomas@codesourcery.com>
1186
1187 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1188 (c_parser_oacc_data_clause): Likewise.
1189 (c_parser_oacc_all_clauses): Likewise.
1190 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1191 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1192 PRAGMA_OACC_CLAUSE_NO_CREATE.
1193 * c-typeck.c (handle_omp_array_sections): Support
1194 GOMP_MAP_NO_ALLOC.
1195
d68f5d45
DM
11962019-12-09 David Malcolm <dmalcolm@redhat.com>
1197
1198 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1199 Replace label_text ctor calls.
1200
4691bf46
JM
12012019-12-04 Joseph Myers <joseph@codesourcery.com>
1202
1203 PR c/36941
1204 PR c/88827
1205 * c-typeck.c (convert_lvalue_to_rvalue): Call
1206 require_complete_type for arguments not of void types.
1207 (build_indirect_ref): Do not diagnose dereferencing pointers to
1208 incomplete types.
1209 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1210
85d11957
JM
12112019-12-03 Joseph Myers <joseph@codesourcery.com>
1212
1213 PR c/88704
1214 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1215 old-style parameter definitions.
1216
4569f8b3
SL
12172019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1218
1219 PR target/92499
1220
1221 * c-decl.c (flexible_array_type_p): Move to common code.
1222
65ef05d0
RS
12232019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1224
1225 * c-decl.c (start_decl): Allow initialization of variables whose
1226 size is a POLY_INT_CST.
1227 (finish_decl): Use verify_type_context to check whether the target
1228 allows variables with a particular type to have static or thread-local
1229 storage duration. Don't raise a second error if such variables do
1230 not have a constant size.
1231 (grokdeclarator): Use verify_type_context to check whether the
1232 target allows fields or array elements to have a particular type.
1233 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1234 the target allows pointer difference for the types involved.
1235 (build_unary_op): Likewise for pointer increment and decrement.
1236
34b43828
JM
12372019-11-29 Joseph Myers <joseph@codesourcery.com>
1238
1239 * c-parser.c (struct c_parser): Add members raw_tokens and
1240 raw_tokens_used.
1241 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1242 using previously-lexed raw tokens.
1243 (c_parser_peek_nth_token_raw)
1244 (c_parser_check_balanced_raw_token_sequence): New functions.
1245 (c_parser_nth_token_starts_std_attributes): Use
1246 c_parser_check_balanced_raw_token_sequence for Objective-C.
1247
5b8d9367
JM
12482019-11-25 Joseph Myers <joseph@codesourcery.com>
1249
1250 PR c/91985
1251 * c-decl.c (finish_declspecs): Use int instead of decimal
1252 floating-point types if decimal floating-point not supported.
1253
1723e1be
JM
12542019-11-25 Joseph Myers <joseph@codesourcery.com>
1255
1256 * c-tree.h (struct c_declarator): Use a structure for id member.
1257 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1258 declarators at the start, not when handling individual declarators
1259 later. Use u.id.id instead of u.id.
1260 (grokfield): Use u.id.id instead of u.id.
1261 (build_id_declarator): Set u.id.id and u.id.attrs.
1262 (finish_declspecs): Handle postfix attributes in case of typedef
1263 name or typeof used.
1264 * c-parser.c (c_parser_direct_declarator)
1265 (c_parser_direct_declarator_inner): Place declarator for
1266 attributes inside that for function or array, not outside. Set
1267 u.id.attrs for identifiers.
1268 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1269 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1270 instead of u.id.
1271
bdaf8be1
JJ
12722019-11-22 Jakub Jelinek <jakub@redhat.com>
1273
1274 PR c/90677
1275 * c-decl.c (identifier_global_tag): Define.
1276
3e00ba47
RB
12772019-11-20 Richard Biener <rguenther@suse.de>
1278
1279 PR c/92088
1280 * c-decl.c (grokdeclarator): Prevent inlining of nested
1281 function with VLA arguments.
1282
8c5b727a
JM
12832019-11-20 Joseph Myers <joseph@codesourcery.com>
1284
1285 * c-decl.c (c_warn_type_attributes): New function.
1286 (groktypename, grokdeclarator, finish_declspecs): Call
1287 c_warn_type_attributes before applying attributes to types.
1288 * c-tree.h (c_warn_type_attributes): Declare.
1289
192961ff
JM
12902019-11-19 Joseph Myers <joseph@codesourcery.com>
1291
1292 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1293 standard attributes.
1294 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1295 pedwarn for unknown standard attributes and return error_mark_node
1296 for them.
1297
20a38017
MM
12982019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1299
1300 * c-parser.c (c_parser_parse_rtl_body): Always call
1301 run_rtl_passes, even if startwith pass is not provided.
1302
d5fbe5e0
JM
13032019-11-15 Joseph Myers <joseph@codesourcery.com>
1304
1305 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1306 duplicate standard attributes.
1307
97cc1187
JM
13082019-11-15 Joseph Myers <joseph@codesourcery.com>
1309
1310 * c-decl.c (std_attribute_table): Add maybe_unused.
1311
f8aea5e3
JM
13122019-11-15 Joseph Myers <joseph@codesourcery.com>
1313
1314 * c-decl.c (std_attribute_table): Add fallthrough.
1315 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1316 attribute at top level.
1317
2cc94aa8
JM
13182019-11-15 Joseph Myers <joseph@codesourcery.com>
1319
1320 * c-decl.c (std_attribute_table): New.
1321 (c_init_decl_processing): Register attributes from
1322 std_attribute_table.
1323 * c-parser.c (c_parser_attribute_arguments): Add arguments
1324 require_string and allow_empty_args. All callers changed.
1325 (c_parser_std_attribute): Set require_string argument for
1326 "deprecated" attribute.
1327
7c5890cc
JM
13282019-11-14 Joseph Myers <joseph@codesourcery.com>
1329
1330 * c-parser.c (c_parser_postfix_expression)
1331 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1332 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1333
e8738f4e
RS
13342019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1335
1336 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1337 of build_same_sized_truth_vector_type.
1338 (build_vec_cmp): Likewise.
1339
b2417b59
JJ
13402019-11-14 Jakub Jelinek <jakub@redhat.com>
1341
bedb7f04
JJ
1342 * c-parser.c (c_parser_omp_context_selector): Don't require score
1343 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1344 negative score.
1345
b2417b59
JJ
1346 * c-parser.c (c_parser_omp_context_selector): Rename
1347 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1348 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1349 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1350 and string literals.
1351
4e03c3a7
JM
13522019-11-14 Joseph Myers <joseph@codesourcery.com>
1353
1354 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1355 ctsk_tagfirstref_attrs.
1356 (struct c_declspecs): Update description of attrs. Add
1357 postfix_attrs and non_std_attrs_seen_p. Increase size of
1358 typespec_kind bit-field.
1359 (c_warn_unused_attributes): New declaration.
1360 (parser_xref_tag): Update prototype.
1361 * c-decl.c (c_warn_unused_attributes): New function.
1362 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1363 ctsk_tagref_attrs. Handle attribute declarations.
1364 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1365 (grokdeclarator): Handle standard attributes.
1366 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1367 attributes to incomplete type reference.
1368 (xref_tag): Update call to parser_xref_tag.
1369 (declspecs_add_addrspace, declspecs_add_type)
1370 (declspecs_add_scspec, declspecs_add_attrs): Set
1371 non_std_attrs_seen_p.
1372 (finish_declspecs): Apply postfix standard attributes to type.
1373 * c-parser.c (c_token_starts_declspecs)
1374 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1375 (c_parser_next_tokens_start_declaration): Update comments.
1376 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1377 parser->tokens[2] to parser->tokens[1].
1378 (c_parser_nth_token_starts_std_attributes)
1379 (c_parser_std_attribute_specifier_sequence): New functions.
1380 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1381 attrs. All callers changed. Handle standard attributes.
1382 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1383 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1384 All callers changed.
1385 (c_parser_declspecs): Add arguments start_std_attr_ok and
1386 end_std_attr_ok. All callers changed. Handle standard
1387 attributes.
1388 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1389 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1390 (c_parser_compound_statement_nostart, c_parser_all_labels)
1391 (c_parser_label, c_parser_statement, c_parser_for_statement):
1392 Handle standard attributes.
1393 * c-parser.h (c_parser_declspecs): Update prototype.
1394 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1395 c_parser_declspecs.
1396
0c29cac4
ML
13972019-11-12 Martin Liska <mliska@suse.cz>
1398
1399 * gimple-parser.c: Do not include params.h.
1400
028d4092
ML
14012019-11-12 Martin Liska <mliska@suse.cz>
1402
1403 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1404 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1405 macro.
1406
62aee289
MR
14072019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1408 Frederik Harwath <frederik@codesourcery.com>
1409
1410 gcc/c/
1411 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1412 (c_parser_oacc_kernels_parallel): Rename function to...
1413 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1414 (c_parser_omp_construct): Update accordingly.
1415
1416
7cec9588
JJ
14172019-11-11 Jakub Jelinek <jakub@redhat.com>
1418
1419 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1420 without corresponding end declare target.
1421
f486280c
RS
14222019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1423
1424 * c-convert.c (convert): Only handle vector conversions if one of
1425 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1426 allows it.
1427 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1428 vectors satisfy gnu_vector_type_p.
1429 (build_unary_op): Only allow unary operators to be applied to
1430 vectors if they satisfy gnu_vector_type_p.
1431 (digest_init): Only allow by-element initialization of vectors
1432 if they satisfy gnu_vector_type_p.
1433 (really_start_incremental_init): Likewise.
1434 (push_init_level): Likewise.
1435 (pop_init_level): Likewise.
1436 (process_init_element): Likewise.
1437 (build_binary_op): Only allow binary operators to be applied to
1438 vectors if they satisfy gnu_vector_type_p.
1439
017c6491
JM
14402019-11-08 Joseph Myers <joseph@codesourcery.com>
1441
1442 * c-decl.c (grokparms): Convert () in a function definition to
1443 (void) for C2x.
1444 (store_parm_decls_oldstyle): Pedwarn for C2x.
1445 (store_parm_decls): Update comment about () not generating a
1446 prototype.
1447
c01bd174
JM
14482019-11-07 Joseph Myers <joseph@codesourcery.com>
1449
1450 * c-parser.c (c_parser_attribute_arguments): New function.
1451 Factored out of c_parser_gnu_attribute.
1452 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1453 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1454 (c_parser_std_attribute_specifier): New functions.
1455 (c_parser_transaction_attributes): Use
1456 c_parser_std_attribute_specifier.
1457
471c5330
JM
14582019-11-07 Joseph Myers <joseph@codesourcery.com>
1459
1460 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1461 lex_joined_string and translate_strings_p.
1462 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1463 c_lex_with_flags.
1464 (c_parser_string_literal): New function.
1465 (c_parser_static_assert_declaration_no_semi): Use
1466 c_parser_string_literal. Do not set lex_untranslated_string.
1467 (c_parser_asm_string_literal): Use c_parser_string_literal.
1468 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1469 (c_parser_gnu_attributes): Set and restore translate_strings_p
1470 instead of lex_untranslated_string.
1471 (c_parser_asm_statement): Do not set lex_untranslated_string.
1472 (c_parser_asm_operands): Likewise.
1473 (c_parser_has_attribute_expression): Set and restore
1474 translate_strings_p instead of lex_untranslated_string.
1475 (c_parser_postfix_expression): Use c_parser_string_literal.
1476 (pragma_lex): Likewise.
1477 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1478 (c_parse_file): Set translate_strings_p.
1479 * gimple-parser.c (c_parser_gimple_postfix_expression)
1480 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1481 * c-parser.c (c_parser_string_literal): Declare function.
1482
d0c464d2
JJ
14832019-11-02 Jakub Jelinek <jakub@redhat.com>
1484
1485 * c-parser.c (c_finish_omp_declare_variant): Use
1486 omp_get_context_selector instead of c_omp_get_context_selector.
1487
ac2cfa6c
RS
14882019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1489
1490 * c-tree.h (c_simulate_enum_decl): Declare.
1491 * c-decl.c (c_simulate_enum_decl): New function.
1492 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1493
74078538
RS
14942019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1495
1496 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1497 * c-decl.c (c_simulate_builtin_function_decl): New function.
1498 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1499 to the above.
1500
ad1539d5
MS
15012019-10-28 Martin Sebor <msebor@redhat.com>
1502
1503 PR c/66970
1504 * c-decl.c (names_builtin_p): Define a new function.
1505
cb73e4e7
RB
15062019-10-28 Richard Biener <rguenther@suse.de>
1507
1508 PR c/92249
1509 * gimple-parser.c (c_parser_parse_gimple_body): Make
1510 current_bb the entry block initially to easier recover
1511 from errors.
1512 (c_parser_gimple_compound_statement): Adjust.
1513
135df52c
JJ
15142019-10-24 Jakub Jelinek <jakub@redhat.com>
1515
1516 * c-parser.c (c_finish_omp_declare_variant): Use
1517 omp_context_selector_matches instead of
1518 c_omp_context_selector_matches.
1519 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1520 attribute in between declare target and end declare target
1521 pragmas.
1522
783bfe5e
JM
15232019-10-15 Joseph Myers <joseph@codesourcery.com>
1524
1525 * c-parser.c (c_parser_attribute_any_word): Rename to
1526 c_parser_gnu_attribute_any_word. All callers changed.
1527 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1528 callers changed.
1529 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1530 callers changed.
1531 (c_parser_declaration_or_fndef, c_parser_declspecs)
1532 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1533 (c_parser_struct_declaration, c_parser_declarator)
1534 (c_parser_gnu_attribute, c_parser_compound_statement)
1535 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1536 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1537 attribute-related syntax productions.
1538
56898e43
RS
15392019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1540
1541 * c-objc-common.c (useful_aka_type_p): Replace with...
1542 (get_aka_type): ...this new function. Given the original type,
1543 decide which aka type to print (if any). Only look through typedefs
1544 if user_facing_original_type_p.
1545 (print_type): Update accordingly.
1546
b9424661
JJ
15472019-10-14 Jakub Jelinek <jakub@redhat.com>
1548
1549 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1550 into int NESTED, if it is 2, diagnose missing commas in between
1551 clauses.
1552 (c_parser_omp_context_selector): Pass 2 as last argument to
1553 c_parser_omp_all_clauses.
1554
20de9568
JJ
15552019-10-12 Jakub Jelinek <jakub@redhat.com>
1556
1557 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1558 For simd properties, put them directly into TREE_VALUE.
1559 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1560 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1561 add "omp declare variant base" attribute rather than
1562 "omp declare variant".
1563
fe2bc27c
JM
15642019-10-11 Joseph Myers <joseph@codesourcery.com>
1565
1566 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1567
94e7f906
JJ
15682019-10-10 Jakub Jelinek <jakub@redhat.com>
1569
1570 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1571 true, terminate processing on closing paren and don't skip to end of
1572 pragma line.
1573 (c_parser_omp_declare_simd): Handle also declare variant.
1574 (omp_construct_selectors, omp_device_selectors,
1575 omp_implementation_selectors, omp_user_selectors): New variables.
1576 (c_parser_omp_context_selector,
1577 c_parser_omp_context_selector_specification,
1578 c_finish_omp_declare_variant): New functions.
1579 (c_finish_omp_declare_simd): Handle both declare simd and
1580 declare variant.
1581 (c_parser_omp_declare): Handle declare variant.
1582
93313b94
JM
15832019-10-02 Joseph Myers <joseph@codesourcery.com>
1584
1585 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1586 CPP_COLON tokens.
1587
55879815
RS
15882019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1589
1590 * c-objc-common.c (useful_aka_type_p): New function.
1591 (print_type): Use it to decide whether an aka type is worth printing.
1592
59bc434a
JJ
15932019-09-27 Jakub Jelinek <jakub@redhat.com>
1594
1595 PR c++/88203
1596 * c-parser.c (c_parser_predefined_identifier): New function.
1597 (c_parser_postfix_expression): Use it.
1598 (c_parser_omp_variable_list): Parse predefined identifiers.
1599 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1600 in shared and firstprivate clauses, even when they are predetermined
1601 shared.
1602
c6447c20
RS
16032019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1604
1605 * c-typeck.c (build_function_call_vec): Take the original function
1606 decl as an optional final parameter. Pass all built-in calls to
1607 check_builtin_function_arguments.
1608
522da4c2
EB
16092019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1610
1611 PR c/91815
1612 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1613 of identifiers in the external scope only for variables and functions.
1614
68e2c199
PK
16152019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1616
1617 PR c/78736
1618 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1619
22f8849d
IS
16202019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1621
1622 PR pch/61250
1623 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1624 after determining that the first token is not
1625 PRAGMA_GCC_PCH_PREPROCESS.
1626
db376f45
EB
16272019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1628
1629 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1630 FUNCTION_DECL to the right value in the presence of nested declarators.
1631
4d732405
RS
16322019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1633
1634 PR middle-end/91421
1635 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1636
cb1180d5
RS
16372019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1638
1639 PR middle-end/91421
1640 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1641 of a built_in_function.
1642 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1643
77eb117f
JJ
16442019-08-10 Jakub Jelinek <jakub@redhat.com>
1645
1646 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1647 (c_parser_omp_clause_device_type): New function.
1648 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1649 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1650 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1651 diagnostics for declare target with clauses nested in clause-less
1652 declare target declaration-definition-seq.
1653 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1654
2c3b8bad
JJ
16552019-08-09 Jakub Jelinek <jakub@redhat.com>
1656
bb522e2e
JJ
1657 * c-parser.c (check_no_duplicate_clause): Simplify using
1658 omp_find_clause.
1659 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1660 directive name modifiers.
1661 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1662
2c3b8bad
JJ
1663 PR c/91401
1664 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1665 check_no_duplicate_clause call. Comment it out, instead emit a
1666 warning for duplicate dist_schedule clauses.
1667
99769e7f
RS
16682019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1669
1670 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1671
8860d270
JJ
16722019-08-08 Jakub Jelinek <jakub@redhat.com>
1673
1674 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1675 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1676 instead of generic_head to track duplicates.
1677
398e3feb
JJ
16782019-08-07 Jakub Jelinek <jakub@redhat.com>
1679
1680 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1681 (c_parser_omp_clause_use_device_addr): New function.
1682 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1683 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1684 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1685 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1686 map or use_device_* clauses.
1687 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1688 in OpenMP, require pointer type rather than pointer or array type.
1689 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1690
a28351e7
JJ
16912019-07-31 Jakub Jelinek <jakub@redhat.com>
1692
1693 PR c/91192
1694 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1695 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1696 case.
1697
6343b6bf
ML
16982019-07-25 Martin Liska <mliska@suse.cz>
1699 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1700
1701 PR c++/23383
1702 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1703
cb50701e
ML
17042019-07-25 Martin Liska <mliska@suse.cz>
1705
1706 * c-decl.c (merge_decls): Use new macros
1707 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1708
62e3e66f
RB
17092019-07-23 Richard Biener <rguenther@suse.de>
1710
1711 PR tree-optimization/83518
1712 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1713 a CFG also rebuild cgraph edges.
1714
554a530f
JJ
17152019-07-20 Jakub Jelinek <jakub@redhat.com>
1716
1717 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1718 (c_parser_omp_clause_bind): New function.
1719 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1720 (OMP_LOOP_CLAUSE_MASK): Define.
1721 (c_parser_omp_loop): New function.
1722 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1723 loop combined with parallel or teams.
1724 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1725 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1726
d119bf79
RS
17272019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1728
1729 PR c/53633
1730 * c-decl.c (finish_function): Check targetm.warn_func_return
1731 before issuing a -Wreturn-type warning.
1732
ab20d992 17332019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1734
1735 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1736 (c_parser_compound_statement): Call it.
1737
1fdd6f04
JJ
17382019-07-12 Jakub Jelinek <jakub@redhat.com>
1739
1740 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1741 (c_parser_omp_clause_order): New function.
1742 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1743 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1744 PRAGMA_OMP_CLAUSE_ORDER.
1745 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1746
8389386c
RB
17472019-07-10 Richard Biener <rguenther@suse.de>
1748
1749 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1750 _Literal (int *) &x for address literals.
1751
99b1c316
MS
17522019-07-09 Martin Sebor <msebor@redhat.com>
1753
1754 PR c++/61339
1755 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1756 to class.
1757 (field_decl_cmp): Same.
1758 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1759 * c-tree.h: Same.
1760 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1761
6c1dae73
MS
17622019-07-09 Martin Sebor <msebor@redhat.com>
1763
1764 PR c++/61339
1765 * c-decl.c: Change class-key from class to struct and vice versa
1766 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1767 * gimple-parser.c: Same.
1768
69b5279e
RB
17692019-07-01 Richard Biener <rguenther@suse.de>
1770
1771 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1772 _Literal (char *) &"foo" for address literals pointing to
1773 STRING_CSTs.
1774
ab20d992
JJ
17752019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1776
1777 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1778 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1779 C incompatibility if alternate "__intN__" form is used.
1780
1e3d475e
MS
17812019-06-24 Martin Sebor <msebor@redhat.com>
1782
1783 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1784
bf38f7e9
JJ
17852019-06-10 Jakub Jelinek <jakub@redhat.com>
1786
1787 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1788 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1789 (c_parser_omp_scan_loop_body): New function.
1790 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1791 inscan reduction clauses.
1792 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1793 non-inscan reductions on the same construct, or inscan reductions with
1794 ordered or schedule clauses, or inscan array reductions.
1795
65985d78
MS
17962019-06-05 Martin Sebor <msebor@redhat.com>
1797
1798 PR c/90737
1799 * c-typeck.c (c_finish_return): Only consider functions returning
1800 pointers as candidates for -Wreturn-local-addr.
1801
0ecf545c
MS
18022019-06-05 Martin Sebor <msebor@redhat.com>
1803
1804 * c-decl.c (start_decl): Adjust quoting and hyphenation
1805 in diagnostics.
1806 (finish_decl): Same.
1807 (finish_enum): Same.
1808 (start_function): Same.
1809 (declspecs_add_type): Same.
1810 * c-parser.c (warn_for_abs): Same.
1811 * c-typeck.c (build_binary_op): Same.
1812
e03436e7
TS
18132019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1814
b48f44bf
TS
1815 PR c/89433
1816 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1817 marked with an OpenACC 'routine' directive.
1818
5bf04509
TS
1819 PR c/89433
1820 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1821 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1822
e03436e7
TS
1823 PR c/89433
1824 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1825 clauses from "omp declare target" attribute.
1826
a9c697b8
MS
18272019-05-16 Martin Sebor <msebor@redhat.com>
1828
ab20d992
JJ
1829 * c-decl.c (start_decl): Quote keywords, operators, and
1830 types in diagnostics.
1831 (finish_decl): Same.
1832 * c-parser.c (c_parser_asm_statement): Same.
1833 (c_parser_conditional_expression): Same.
1834 (c_parser_transaction_cancel): Same.
1835 * c-typeck.c (c_common_type): Same.
1836 (build_conditional_expr): Same.
1837 (digest_init): Same.
1838 (process_init_element): Same.
1839 (build_binary_op): Same.
a9c697b8 1840
c4499192
RB
18412019-05-17 Richard Biener <rguenther@suse.de>
1842
1843 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1844 (c_parser_gimple_unary_expression): Likewise.
1845 (c_parser_gimple_parentized_ternary_expression): New function.
1846
adfe6e4b
RB
18472019-05-16 Richard Biener <rguenther@suse.de>
1848
1849 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1850 (c_parser_gimple_unary_expression): Likewise.
1851
186dabf2
RB
18522019-05-15 Richard Biener <rguenther@suse.de>
1853
1854 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1855 __BIT_FIELD_REF.
1856
1158c5b4
RB
18572019-05-14 Richard Biener <rguenther@suse.de>
1858
1859 * gimple-parser.c (c_parser_gimple_statement): Remove
1860 questionable auto-promotion to VIEW_CONVERT_EXPR.
1861 (c_parser_gimple_typespec): Split out from __MEM parsing.
1862 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1863 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1864 as __VIEW_CONVERT with -gimple.
1865
fd4485aa
ML
18662019-05-09 Martin Liska <mliska@suse.cz>
1867
1868 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1869 __MAX.
1870 (c_parser_gimple_unary_expression): Parse also binary expression
1871 __MIN and __MAX.
1872 (c_parser_gimple_parentized_binary_expression): New function.
1873
d276406a
ML
18742019-05-09 Martin Liska <mliska@suse.cz>
1875
1876 * gimple-parser.c (struct gimple_parser): Add probability.
1877 for gimple_parser_edge.
1878 (gimple_parser::push_edge): Add new argument probability.
1879 (c_parser_gimple_parse_bb_spec): Parse also probability
1880 if present.
1881 (c_parser_parse_gimple_body): Set edge probability.
1882 (c_parser_gimple_compound_statement): Consume token
1883 before calling c_parser_gimple_goto_stmt.
1884 Parse BB counts.
1885 (c_parser_gimple_statement): Pass new argument.
1886 (c_parser_gimple_goto_stmt): Likewise.
1887 (c_parser_gimple_if_stmt): Likewise.
1888 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1889 * c-parser.c (c_parser_declaration_or_fndef): Pass
1890 hot_bb_threshold argument.
1891 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1892 field.
1893 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1894
f179b64e
JJ
18952019-04-26 Jakub Jelinek <jakub@redhat.com>
1896
1897 PR debug/90197
1898 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1899 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1900 (c_parser_do_statement): Likewise.
1901 (c_parser_for_statement): Likewise. Formatting fixes.
1902 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1903 emit DEBUG_BEGIN_STMTs if needed.
1904
e7178413
JJ
19052019-04-19 Jakub Jelinek <jakub@redhat.com>
1906
c280b7ee
JJ
1907 PR c/89888
1908 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1909 (c_start_case): Don't clear it.
1910 (do_case): Adjust c_add_case_label caller.
1911 (c_finish_case): Adjust c_do_switch_warnings caller.
1912
e7178413
JJ
1913 PR c++/90108
1914 * c-decl.c (merge_decls): If remove is main variant and
1915 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1916 variant that has newdecl as TYPE_NAME if any.
1917
60a2c645
JJ
19182019-04-12 Jakub Jelinek <jakub@redhat.com>
1919
1920 PR c/89933
1921 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1922 don't try to remove it from the variant list, but instead assert
1923 it has no variants.
1924
2a82beaa
RB
19252019-04-01 Richard Biener <rguenther@suse.de>
1926
1927 PR c/71598
1928 * c-tree.h (c_get_alias_set): Declare.
1929 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1930 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1931 as the underlying integer type.
1932
bec1da64
MS
19332019-03-19 Martin Sebor <msebor@redhat.com>
1934
1935 PR tree-optimization/89688
1936 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1937 kinds of initializers.
1938
855cd9b1
JJ
19392019-03-19 Jakub Jelinek <jakub@redhat.com>
1940
1941 PR c/89734
1942 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1943 return type even if quals_used is 0. Formatting fixes.
1944
baa09dc5
RB
19452019-03-14 Richard Biener <rguenther@suse.de>
1946
1947 * c-tree.h (enum c_declspec_il): New.
1948 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1949 enum bitfield.
1950 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1951 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1952 (c_parser_declspecs): Adjust.
1953 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1954 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1955 and bitmap.h.
1956 (struct gimple_parser): New.
1957 (gimple_parser::push_edge): New method.
1958 (c_parser_gimple_parse_bb_spec): New helper.
1959 (c_parser_parse_gimple_body): Get start pass and IL specification.
1960 Initialize SSA and CFG.
1961 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1962 Build a gimple_parser parsing state and pass it along.
1963 (c_parser_gimple_statement): Change intermittend __PHI internal
1964 function argument for the edge.
1965 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1966 (c_parser_gimple_goto_stmt): Record edges to build.
1967 (c_parser_gimple_if_stmt): Likewise.
1968 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1969 (c_parser_gimple_or_rtl_pass_list): Likewise.
1970
a3f9f006
ML
19712019-03-11 Martin Liska <mliska@suse.cz>
1972
1973 * c-decl.c (check_for_loop_decls): Wrap an option name
1974 in a string format message and fix GNU coding style.
1975 * c-parser.c (c_parser_declspecs): Likewise.
1976
1db01ff9
JJ
19772019-03-08 Jakub Jelinek <jakub@redhat.com>
1978
1979 PR tree-optimization/89550
1980 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1981 returned true.
1982 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1983 or warning returned true.
1984
66dcb747
JJ
19852019-02-28 Jakub Jelinek <jakub@redhat.com>
1986
1987 PR c/89525
1988 * c-typeck.c (convert_arguments): Call inform_declaration only if
1989 the previous warning_at call returned true.
1990
2263c9f2
TS
19912019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1992
1993 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1994 parameter. Adjust all users.
1995 (c_parser_oacc_simple_clause): Replace parser with loc formal
1996 parameter. Adjust all users.
1997
ab20d992 19982019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1999
2000 PR c/87924
2001 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2002 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2003
5f88ba10
JJ
20042019-02-15 Jakub Jelinek <jakub@redhat.com>
2005
2006 PR c/89340
2007 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2008 before c_decl_attributes rather than after it.
2009
cfc30fd1
JJ
20102019-02-06 Jakub Jelinek <jakub@redhat.com>
2011
2012 PR c/89211
2013 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2014 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2015 instead of 3 nested ifs.
2016
fbe83e6b
JM
20172019-02-06 Joseph Myers <joseph@codesourcery.com>
2018
2019 PR c/88584
2020 * c-decl.c (finish_decl): Do not complete array types for arrays
2021 with external linkage not at file scope.
2022
f461f938
RB
20232019-02-05 Richard Biener <rguenther@suse.de>
2024
2025 PR c/88606
2026 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2027 all type variants when not supported.
2028
fe509359
JJ
20292019-01-30 Jakub Jelinek <jakub@redhat.com>
2030
2031 PR c/89061
2032 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2033 * c-decl.c (decl_jump_unsafe): Return false for
2034 C_DECL_COMPOUND_LITERAL_P decls.
2035 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2036
6a335b96
JJ
20372019-01-29 Jakub Jelinek <jakub@redhat.com>
2038
f4b7e754
JJ
2039 PR c/89045
2040 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2041 scope.
2042
6a335b96
JJ
2043 PR c/86125
2044 * c-decl.c (last_fileptr_type): Remove.
2045 (last_structptr_types): New variable.
2046 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2047 {old,new}rettype instead of the types themselves. Assert
2048 last_structptr_types array has the same number of elements
2049 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2050 argument oldtype and newtype. Instead of handling
2051 just fileptr_type_node specially, handle all builtin_structptr_types
2052 pointer nodes. Formatting fix.
2053
d8b5a1a0
MS
20542019-01-24 Martin Sebor <msebor@redhat.com>
2055
2056 PR c/86125
2057 PR c/88886
2058 PR middle-end/86308
2059 * c-decl.c (match_builtin_function_types): Add arguments.
2060 (diagnose_mismatched_decls): Diagnose mismatched declarations
2061 of built-ins more strictly.
2062
e21c4491
JJ
20632019-01-24 Jakub Jelinek <jakub@redhat.com>
2064
2065 PR c++/88976
2066 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2067 on #pragma omp cancel with different modifiers.
2068
420183d9
L
20692019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2070
2071 PR c/51628
2072 PR c/88664
2073 * c-typeck.c (convert_for_assignment): Upate the
2074 warn_for_address_or_pointer_of_packed_member call.
2075
17ad43dd
TH
20762019-01-16 Tom Honermann <tom@honermann.net>
2077 Jason Merrill <jason@redhat.com>
2078
2079 * c-typeck.c (digest_init): Revised the error message produced for
2080 ill-formed cases of array initialization with a string literal.
2081 (error_init): Make variadic.
2082
5f07d78a
JJ
20832019-01-12 Jakub Jelinek <jakub@redhat.com>
2084
2085 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2086
c4581bbf
JJ
20872019-01-07 Jakub Jelinek <jakub@redhat.com>
2088
2089 PR c/88701
2090 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2091 if current_function_decl is non-NULL.
2092
65c5b1eb
JM
20932019-01-07 Joseph Myers <joseph@codesourcery.com>
2094
2095 PR c/88720
2096 PR c/88726
2097 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2098 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2099 functions declared but never defined only for external scope, not
2100 for other scopes.
2101
d8fcab68
JJ
21022019-01-07 Jakub Jelinek <jakub@redhat.com>
2103
2104 PR c++/85052
2105 * c-parser.c (c_parser_postfix_expression): Parse
2106 __builtin_convertvector.
2107
a5544970
JJ
21082019-01-01 Jakub Jelinek <jakub@redhat.com>
2109
2110 Update copyright years.
2111
da77eace
L
21122018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2113
2114 PR c/51628
2115 * c-typeck.c (convert_for_assignment): Call
2116 warn_for_address_or_pointer_of_packed_member.
2117
1edf8866
SB
21182018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2119
2120 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2121 a more specific error message (instead of just falling through).
2122
db4fd626
SB
21232018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2124
2125 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2126 asm qualifier is first seen; use that to give nicer "duplicate asm
2127 qualifier" messages. Delete 'quals" variable, instead pass the
2128 "is_volatile_ flag to build_asm_stmt directly.
2129 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2130 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2131
9c9cfcbb
SB
21322018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2133
2134 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2135 "done" boolean variable.
2136
a14feb3c
DM
21372018-12-19 David Malcolm <dmalcolm@redhat.com>
2138
2139 PR c++/87504
2140 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2141 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2142 (build_binary_op): Use struct op_location_t and
2143 class binary_op_rich_location.
2144
6d939173
JJ
21452018-12-11 Jakub Jelinek <jakub@redhat.com>
2146
2147 PR sanitizer/88426
2148 * c-convert.c (convert): Call c_fully_fold before calling
2149 ubsan_instrument_float_cast.
2150
b7055028
SB
21512018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2152
2153 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2154 setting "quals".
2155
5b76e75f
SB
21562018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2157
2158 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2159 after asm. Pass a flag for it to build_asm_expr.
2160 * c-tree.h (build_asm_expr): Update declaration.
2161 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2162 set ASM_INLINE_P.
2163
30bd42b9
SB
21642018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2165
2166 PR inline-asm/55681
2167 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2168 combination of volatile and goto, in any order, without repetitions.
2169
9df6c0e4
JB
21702018-12-04 James Norris <jnorris@codesourcery.com>
2171 Cesar Philippidis <cesar@codesourcery.com>
2172 Julian Brown <julian@codesourcery.com>
2173
2174 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2175 code.
2176
f44697b7
RB
21772018-11-30 Richard Biener <rguenther@suse.de>
2178
2179 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2180 _Literal (type) { ... } as empty aggregate or vector constructor.
2181
550dfbdc
MS
21822018-11-29 Martin Sebor <msebor@redhat.com>
2183
2184 PR c/88091
2185 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2186 (convert_arguments): Add comments. Pass additional argument to
2187 the function above.
2188
673670da
MS
21892018-11-29 Martin Sebor <msebor@redhat.com>
2190
2191 PR c/88172
2192 PR testsuite/88208
2193 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2194
db1d09b0
MS
21952018-11-23 Martin Sebor <msebor@redhat.com>
2196
2197 PR testsuite/88098
2198 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2199 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2200
98f08eb8
MS
22012018-11-20 Martin Sebor <msebor@redhat.com>
2202
2203 * c-parser.c (c_parser_has_attribute_expression): New function.
2204 (c_parser_attribute): New function.
2205 (c_parser_attributes): Move code into c_parser_attribute.
2206 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2207
cd5da983
MS
22082018-11-15 Martin Sebor <msebor@redhat.com>
2209
2210 PR c/83656
2211 * c-decl.c (header_for_builtin_fn): Declare.
2212 (diagnose_mismatched_decls): Diagnose declarations of built-in
2213 functions without a prototype.
2214 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2215 (convert_argument): Same.
2216 (convert_arguments): Factor code out into convert_argument.
2217 Detect mismatches between built-in formal arguments in calls
2218 to built-in without prototype.
2219 (build_conditional_expr): Same.
2220 (type_or_builtin_type): New function.
2221 (convert_for_assignment): Add argument. Conditionally issue
2222 warnings instead of errors for mismatches.
2223
620e594b
DM
22242018-11-13 David Malcolm <dmalcolm@redhat.com>
2225
2226 * c-decl.c: Replace "source_location" with "location_t".
2227 * c-tree.h: Likewise.
2228 * c-typeck.c: Likewise.
2229 * gimple-parser.c: Likewise.
2230
3179ebae
JJ
22312018-11-09 Jakub Jelinek <jakub@redhat.com>
2232
81a227c6
JJ
2233 * c-parser.c (c_parser_omp_clause_final): Use
2234 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2235 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2236 parsing instead of c_parser_paren_condition.
2237 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2238 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2239 c_fully_fold instead of c_parser_condition.
2240 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2241 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2242 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2243 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2244 c_parser_expr_no_commas instead of c_parser_expression.
2245
98c91c56
JJ
2246 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2247 reduction clause with inscan modifier.
2248
3179ebae
JJ
2249 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2250 clauses other than atomic_default_mem_order.
2251
28567c40
JJ
22522018-11-08 Jakub Jelinek <jakub@redhat.com>
2253
2254 * c-parser.c: Include memmode.h.
2255 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2256 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2257 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2258 task_reduction clauses.
2259 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2260 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2261 section, or lvalue assignment expression.
2262 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2263 (c_parser_omp_clause_lastprivate): Parse optional
2264 conditional: modifier.
2265 (c_parser_omp_clause_hint): Require constant integer expression rather
2266 than just integer expression.
2267 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2268 clause.
2269 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2270 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2271 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2272 functions.
2273 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2274 iterators. Parse mutexinoutset and depobj kinds.
2275 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2276 callers.
2277 (c_parser_omp_all_clauses): Likewise. Handle
2278 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2279 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2280 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2281 default memory order from requires directive if any. Adjust
2282 c_finish_omp_atomic caller.
2283 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2284 (c_parser_omp_flush): Parse flush with memory-order-clause.
2285 (c_parser_omp_for_loop): Allow NE_EXPR even in
2286 OpenMP loops, adjust c_finish_omp_for caller.
2287 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2288 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2289 Allow to be called while parsing combined parallel master.
2290 Parse combined master taskloop{, simd}.
2291 (c_parser_omp_parallel): Parse combined
2292 parallel master{, taskloop{, simd}} constructs.
2293 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2294 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2295 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2296 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2297 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2298 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2299 around teams body. Use SET_EXPR_LOCATION.
2300 (c_parser_omp_target_data): Allow target data
2301 with only use_device_ptr clauses.
2302 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2303 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2304 (c_parser_omp_requires): New function.
2305 (c_finish_taskloop_clauses): New function.
2306 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2307 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2308 declaration. Disallow in_reduction clause when combined with parallel
2309 master.
2310 (c_parser_omp_construct): Adjust c_parser_omp_master and
2311 c_parser_omp_taskgroup callers.
2312 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2313 other than cancel.
2314 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2315 like OMP_CLAUSE_REDUCTION.
2316 (handle_omp_array_sections): Likewise. Call save_expr on array
2317 reductions before calling build_index_type. Handle depend clauses
2318 with iterators.
2319 (struct c_find_omp_var_s): New type.
2320 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2321 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2322 with static, runtime or auto schedule kinds. Call save_expr for whole
2323 array reduction sizes. Diagnose reductions with zero sized elements
2324 or variable length structures. Diagnose nogroup clause used with
2325 reduction clause(s). Handle depend clause with
2326 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2327 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2328 some different type for other kinds. Use build_unary_op with
2329 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2330 Handle depend clauses with iterators. Remove no longer needed special
2331 case that predetermined const qualified vars may be specified in
2332 firstprivate clause. Complain if const qualified vars are mentioned
2333 in data-sharing clauses other than firstprivate or shared. Use
2334 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2335 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2336 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2337 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2338
7e2de6df
DM
23392018-10-29 David Malcolm <dmalcolm@redhat.com>
2340
2341 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2342 logic for change to name_hint::operator bool.
2343 (undeclared_variable): Likewise.
2344 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2345 (c_parser_parameter_declaration): Likewise.
2346
9f936c86
JM
23472018-10-17 Joseph Myers <joseph@codesourcery.com>
2348
2349 * c-errors.c (pedwarn_c11): New function.
2350 * c-parser.c (disable_extension_diagnostics): Save
2351 warn_c11_c2x_compat and set it to 0.
2352 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2353 (c_parser_static_assert_declaration_no_semi): Handle
2354 _Static_assert without string constant.
2355 * c-tree.h (pedwarn_c11): New prototype.
2356
033eb567
DM
23572018-10-17 David Malcolm <dmalcolm@redhat.com>
2358
2359 * Make-lang.in (selftest-c): New.
2360 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2361 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2362 from gcc/Makefile.in.
2363
0edf3afe
RB
23642018-10-02 Richard Biener <rguenther@suse.de>
2365
2366 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2367
8313a764
JM
23682018-09-26 Joseph Myers <joseph@codesourcery.com>
2369
2370 PR c/87390
2371 * c-typeck.c (build_binary_op): Use excess precision for
2372 comparisons of integers and floating-point for C11 and later.
2373
ce6f0888
MJ
23742018-09-26 Martin Jambor <mjambor@suse.cz>
2375
2376 PR c/87347
2377 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2378 comment.
ce6f0888 2379
9c4a4b3c
DM
23802018-09-17 David Malcolm <dmalcolm@redhat.com>
2381
2382 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2383 Update for new param.
2384 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2385 Likewise.
2386
80c6d1f4
MJ
23872018-09-17 Martin Jambor <mjambor@suse.cz>
2388
2389 PR c/63886
2390 * c-parser.c: (warn_for_abs): New function.
2391 (c_parser_postfix_expression_after_primary): Call it.
2392
4a426e36
BE
23932018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2394
2395 * c-typeck.c (digest_init): Shorten overlength strings.
2396
6d900107
BE
23972018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2398
2399 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2400
b5764229
BE
24012018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2402
2403 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2404 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2405
22eea6b2
AM
24062018-08-30 Alexander Monakov <amonakov@ispras.ru>
2407
2408 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2409 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2410
85204e23
DM
24112018-08-27 David Malcolm <dmalcolm@redhat.com>
2412
2413 PR 87091
2414 * c-decl.c (implicitly_declare): Update call to
2415 maybe_add_include_fixit to suggest overriding the location, as it
2416 is for a note.
2417 * c-objc-common.c (c_tree_printer): Update for conversion of
2418 show_caret_p to a tri-state.
2419
3d78e008
ML
24202018-08-27 Martin Liska <mliska@suse.cz>
2421
2422 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2423 fndecl_built_in_p and remove check for FUNCTION_DECL if
2424 possible.
3d78e008
ML
2425 (diagnose_mismatched_decls): Likewise.
2426 (merge_decls): Likewise.
2427 (warn_if_shadowing): Likewise.
2428 (pushdecl): Likewise.
2429 (implicitly_declare): Likewise.
2430 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2431 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2432 * c-typeck.c (build_function_call_vec): Likewise.
2433 (convert_arguments): Likewise.
2434
097f82ec
DM
24352018-08-20 David Malcolm <dmalcolm@redhat.com>
2436
2437 PR other/84889
2438 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2439 (diagnose_mismatched_decls): Likewise, in various places.
2440 (warn_if_shadowing): Likewise.
2441 (implicit_decl_warning): Likewise.
2442 (implicitly_declare): Likewise.
2443 (undeclared_variable): Likewise.
2444 (declare_label): Likewise.
2445 (grokdeclarator): Likewise.
2446 (start_function): Likewise.
2447 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2448 (c_parser_parameter_declaration): Likewise.
2449 (c_parser_binary_expression): Likewise.
2450 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2451 (parser_build_binary_op): Likewise.
2452 (build_unary_op): Likewise.
2453 (error_init): Likewise.
2454 (pedwarn_init): Likewise.
2455 (warning_init): Likewise.
2456 (convert_for_assignment): Likewise.
2457
96e6ae57
DM
24582018-08-15 David Malcolm <dmalcolm@redhat.com>
2459
2460 * c-objc-common.c: Include "gcc-rich-location.h".
2461 (c_tree_printer): Move implemenation of '%T' to...
2462 (print_type): ...this new function.
2463 (range_label_for_type_mismatch::get_text): New function.
2464 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2465 range for the various ic_argpass cases.
2466 (class maybe_range_label_for_tree_type_mismatch): New class.
2467 (build_binary_op): Use it when calling binary_op_error.
2468
0cd020ae 24692018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2470
0cd020ae
PK
2471 * c-decl.c (start_decl): Do not warn if variables is named as main
2472 and is a local variable.
2473
72733314
IS
24742018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2475
2476 PR c/19315
2477 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2478 objects of unknown size.
2479
23aa9f7c
MS
24802018-08-13 Martin Sebor <msebor@redhat.com>
2481
2482 PR tree-optimization/71625
2483 * c-parser.c (c_parser_declaration_or_fndef): Call
2484 braced_list_to_string.
2485
e5e7e50d
BH
24862018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2487
2488 PR c/86690
2489 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2490 errors.
2491
8a45b051
MS
24922018-08-01 Martin Sebor <msebor@redhat.com>
2493
2494 PR tree-optimization/86650
2495 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2496 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2497
5922dcb5
JJ
24982018-08-01 Jakub Jelinek <jakub@redhat.com>
2499
2500 PR c/85704
2501 * c-typeck.c (init_field_decl_cmp): New function.
2502 (output_pending_init_elements): Use it for field comparisons
2503 instead of pure bit_position comparisons.
2504
9b452033
JJ
25052018-07-12 Jakub Jelinek <jakub@redhat.com>
2506
2507 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2508 type here, instead add "omp declare target implicit" attribute.
2509 (finish_decl): Diagnose vars without mappable type here.
2510
ab20d992
JJ
25112018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2512 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2513 Cesar Philippidis <cesar@codesourcery.com>
2514
2515 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2516 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2517 to their non-present_or_* counterparts. Make 'self' an alias to
2518 PRAGMA_OACC_CLAUSE_HOST.
2519 (c_parser_oacc_data_clause): Update GOMP mappings for
2520 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2521 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2522 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2523 Remove support for present_or_* clauses.
2524 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2525 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2526 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2527 (OACC_DATA_CLAUSE_MASK): Likewise.
2528 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2529 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2530 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2531 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2532 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2533
e197e64e
KV
25342018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2535
2536 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2537 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2538 (c_parser_gimple_unary_expression): Likewise.
2539
487f2f61
JJ
25402018-06-15 Jakub Jelinek <jakub@redhat.com>
2541
2542 PR c/86093
2543 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2544 before doing POINTER_DIFF_EXPR.
2545
e4d44a37
MP
25462018-06-07 Marek Polacek <polacek@redhat.com>
2547
2548 PR c/85318
2549 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2550 for loop initial declarations.
2551
b67b9225
DP
25522018-05-30 David Pagan <dave.pagan@oracle.com>
2553
2554 PR c/55976
2555 * c-decl.c (grokdeclarator): Update check for return type warnings.
2556 (start_function): Likewise.
2557 (finish_function): Likewise.
2558 * c-typeck.c (c_finish_return): Update check for return type warnings.
2559 Pass OPT_Wreturn_type to pedwarn when appropriate.
2560
c566cc9f
RS
25612018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2562
2563 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2564 __FMA_EXPR handlng.
2565
e4f81565
RS
25662018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2567
2568 * gimple-parser.c: Include internal-fn.h.
2569 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2570 (c_parser_gimple_call_internal): New function.
2571 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2572 Fix typos in comment.
2573
79e7b1fe
JJ
25742018-05-10 Jakub Jelinek <jakub@redhat.com>
2575
2576 PR c++/85662
2577 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2578 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2579 fold_convert_loc.
2580 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2581 fold_offsetof_1, pass argtype as TYPE to it and drop the
2582 fold_convert_loc.
2583
f7584c81
DP
25842018-05-02 David Pagan <dave.pagan@oracle.com>
2585
2586 PR c/30552
2587 * c-decl.c (old_style_parameter_scope): New function.
2588 * c-parser.c (c_parser_postfix_expression): Check for statement
2589 expressions in old-style function parameter list declarations.
2590 * c-parser.h (old_style_parameter_scope): New extern declaration.
2591
b33a0cb3
JJ
25922018-04-25 Jakub Jelinek <jakub@redhat.com>
2593
2594 PR sanitizer/84307
2595 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2596 it is not TREE_STATIC.
2597 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2598 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2599 its COMPOUND_LITERAL_EXPR_DECL.
2600
c5c5822a
JM
26012018-03-21 Joseph Myers <joseph@codesourcery.com>
2602
2603 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2604 where all functions return the same _FloatN or _FloatNx type,
2605 treat integer types as _Float64 instead of double.
2606
aa1c9429
JJ
26072018-03-21 Jakub Jelinek <jakub@redhat.com>
2608
2609 PR c/84999
2610 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2611 building vector comparison, diagnose it and return error_mark_node.
2612
9bb45a95
JJ
26132018-03-15 Jakub Jelinek <jakub@redhat.com>
2614
2615 PR c/84853
2616 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2617 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2618 INTEGER_TYPE element type.
2619
ada6bad9
DP
26202018-03-13 David Pagan <dave.pagan@oracle.com>
2621
2622 PR c/46921
2623 * c-typeck.c (output_init_element): Ensure field initializer
2624 expression is always evaluated if there are side effects.
2625
849bbdb9
JJ
26262018-03-06 Jakub Jelinek <jakub@redhat.com>
2627
2628 PR c/84721
2629 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2630 !building_stmt_list_p ().
2631
d74641bd
RS
26322018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2633
2634 PR c/84305
2635 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2636 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2637 and include the BIND_EXPR in the list of things that need to be
2638 pre-evaluated.
2639
0444aa9c
NS
26402018-02-09 Nathan Sidwell <nathan@acm.org>
2641
2642 PR c/84293
2643 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2644 to strict_aliasing_warning.
2645
7c30b12a
PC
26462018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2647
2648 * c-typeck.c (really_start_incremental_init, push_init_level,
2649 set_nonincremental_init, output_init_element, process_init_element):
2650 Use DECL_UNNAMED_BIT_FIELD.
2651
2be4dfcb
MP
26522018-01-31 Marek Polacek <polacek@redhat.com>
2653
2654 PR c/81779
2655 * c-parser.c (c_parser_compound_statement_nostart): Call
2656 expansion_point_location_if_in_system_header.
2657
bb9869d5
DM
26582018-01-17 David Malcolm <dmalcolm@redhat.com>
2659
2660 PR c++/83814
2661 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2662 the C part.
2663
b4923738
JJ
26642018-01-13 Jakub Jelinek <jakub@redhat.com>
2665
2666 PR c/83801
2667 * c-tree.h (decl_constant_value_1): Add a bool argument.
2668 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2669 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2670 (decl_constant_value): Adjust caller.
2671 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2672 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2673 decl_constant_value returns initializer that has BLKmode or
2674 array type.
2675 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2676
928686b1
RS
26772018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2678 Alan Hayward <alan.hayward@arm.com>
2679 David Sherwood <david.sherwood@arm.com>
2680
2681 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2682 TYPE_VECTOR_SUBPARTS.
2683
85ec4feb
JJ
26842018-01-03 Jakub Jelinek <jakub@redhat.com>
2685
2686 Update copyright years.
2687
913884f7
JJ
26882018-01-01 Jakub Jelinek <jakub@redhat.com>
2689
2690 PR c/83595
2691 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2692 c_parser_conditional_expression, c_parser_cast_expression,
2693 c_parser_sizeof_expression, c_parser_alignof_expression,
2694 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2695 c_parser_transaction_expression): Use set_error () method instead
2696 of setting value member to error_mark_node.
2697
c6cfa2bf
MM
26982017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2699
2700 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2701 and _Float<N>X built-in functions.
2702
11d29d63
JJ
27032017-12-22 Jakub Jelinek <jakub@redhat.com>
2704
14ec014e
JJ
2705 PR debug/83550
2706 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2707 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2708 incomplete vars rather than after it.
2709
11d29d63
JJ
2710 PR debug/83547
2711 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2712 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2713 and consider empty ones if there are no other stmts. For
2714 -Wunused-value walk all statements before the one only followed by
2715 DEBUG_BEGIN_STMTs.
2716
170a8bd6 27172017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2718 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2719
2720 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2721 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2722 (c_parser_do_statement): Likewise.
2723 (c_parser_for_statement): Likewise.
2724 (c_parser_statement_after_labels): Adjust calls to above.
2725 (c_parse_pragma_ivdep): New static function.
2726 (c_parser_pragma_unroll): Likewise.
2727 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2728 <PRAGMA_UNROLL>: New case.
2729
01512446
JJ
27302017-12-19 Jakub Jelinek <jakub@redhat.com>
2731
2732 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2733 perform_integral_promotions, digest_init): Replace Yoda conditions
2734 with typical order conditions.
2735 * c-decl.c (check_bitfield_type_and_width): Likewise.
2736
c65e18d3
BE
27372017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2738
2739 * c-typeck.c (c_safe_arg_type_equiv_p,
2740 c_safe_function_type_cast_p): New function.
2741 (build_c_cast): Implement -Wcast-function-type.
2742
b7280579
RB
27432017-12-14 Richard Biener <rguenther@suse.de>
2744
2745 PR c/83415
2746 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2747 like REALPART_EXPR for the behavior of whether its operand
2748 is an lvalue.
2749
49e6a6c0
MP
27502017-12-12 Marek Polacek <polacek@redhat.com>
2751
2752 PR c/82679
2753 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2754
ab20d992 27552017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2756
2757 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2758 * c-parser.c (add_debug_begin_stmt): New.
2759 (c_parser_declaration_or_fndef): Call it.
2760 (c_parser_compound_statement_nostart): Likewise.
2761 (c_parser_statement_after_labels): Likewise.
2762 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2763
4b2b493f
JM
27642017-12-07 Joseph Myers <joseph@codesourcery.com>
2765
2766 * c-decl.c (build_compound_literal): Add parameter alignas_align
2767 and set alignment of decl if nonzero.
2768 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2769 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2770 qualifier.
2771 (c_parser_struct_declaration): Update syntax comment.
2772 (c_parser_type_name): Add alignas_ok argument and pass it to
2773 c_parser_declspecs.
2774 (c_parser_cast_expression): Pass true to c_parser_type_name and
2775 give error if a cast used an _Alignas specifier.
2776 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2777 give error if sizeof (type-name) used an _Alignas specifier.
2778 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2779 give error if _Alignof (type-name) used an _Alignas specifier.
2780 (c_parser_postfix_expression_after_paren_type): Check specified
2781 alignment for a compound literal and pass it to
2782 build_compound_literal.
2783 * c-parser.h (c_parser_type_name): Update prototype.
2784 * c-tree.h (build_compound_literal): Update prototype.
2785
5d9ae53d
MS
27862017-12-07 Martin Sebor <msebor@redhat.com>
2787
2788 PR c/81544
2789 * c-decl.c (c_decl_attributes): Look up existing declaration and
2790 pass it to decl_attributes.
2791
c79144f8
DM
27922017-12-06 David Malcolm <dmalcolm@redhat.com>
2793
2794 PR c/83236
2795 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2796 reserved for use by the implementation.
2797
613bc14f
DM
27982017-12-06 David Malcolm <dmalcolm@redhat.com>
2799
2800 * c-decl.c: Include "c-family/c-spellcheck.h".
2801
05abad4c
ML
28022017-12-05 Martin Liska <mliska@suse.cz>
2803 Jakub Jelinek <jakub@redhat.com>
2804
2805 * c-typeck.c (pointer_diff): Add new argument and instrument
2806 pointer subtraction.
2807 (build_binary_op): Similar for pointer comparison.
2808
cc6534d4
JJ
28092017-12-01 Jakub Jelinek <jakub@redhat.com>
2810
65791f42
JJ
2811 PR c/79153
2812 * c-parser.c: Include tree-iterator.h.
2813 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2814 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2815 on it.
2816
cc6534d4
JJ
2817 PR c/83222
2818 * c-tree.h (decl_constant_value_1): Declare.
2819 * c-typeck.c (decl_constant_value_1): New function.
2820 (decl_constant_value): Use it.
2821 * c-fold.c (c_fully_fold_internal): If in_init, use
2822 decl_constant_value_1 instead of decl_constant_value.
2823
5de73c05
JJ
28242017-11-30 Jakub Jelinek <jakub@redhat.com>
2825
2826 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2827
058f0b9e
JJ
28282017-11-28 Jakub Jelinek <jakub@redhat.com>
2829
2830 PR sanitizer/81275
2831 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2832 c_switch_covers_all_cases_p returns true.
2833
5e9d6aa4 28342017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2835 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2836
2837 * Make-lang.in (c/c-array-notation.o): Remove.
2838 * c-array-notation.c: Delete.
2839 * c-decl.c: Remove cilkplus condition.
2840 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2841 c_parser_cilk_verify_simd, c_parser_array_notation,
2842 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2843 c_parser_cilk_simd_fn_vector_attrs,
2844 c_finish_cilk_simd_fn_tokens): Delete.
2845 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2846 (c_parser_direct_declarator_inner): Ditto.
2847 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2848 (c_parser_attributes, c_parser_compound_statement,
2849 c_parser_statement_after_labels, c_parser_if_statement,
2850 c_parser_switch_statement, c_parser_while_statement,
2851 c_parser_do_statement, c_parser_for_statement,
2852 c_parser_unary_expression, c_parser_postfix_expression,
2853 c_parser_postfix_expression_after_primary,
2854 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2855 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2856 support.
2857 * c-typeck.c (build_array_ref, build_function_call_vec,
2858 convert_arguments,
2859 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2860 c_finish_loop, build_binary_op): Remove cilkplus support.
2861
9e851845
JJ
28622017-11-28 Jakub Jelinek <jakub@redhat.com>
2863
2864 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2865 of build3.
2866
ab20d992 28672017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2868
2869 * Make-lang.in (c.install-plugin): Install backend import library.
2870
41521dee
JJ
28712017-11-23 Jakub Jelinek <jakub@redhat.com>
2872
2873 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2874 pragma_stmt context.
2875
ac9effed
EB
28762017-11-23 Mike Stump <mikestump@comcast.net>
2877 Eric Botcazou <ebotcazou@adacore.com>
2878
2879 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2880 ANNOTATE_EXPR.
2881 (c_parser_do_statement): Likewise.
2882 (c_parser_for_statement): Likewise.
2883
ce95abc4
DM
28842017-11-22 David Malcolm <dmalcolm@redhat.com>
2885
2886 PR c++/62170
2887 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2888 bool to bool *. Within '%T' handling, if showing an "aka", use
2889 "quoted" param to add appropriate quoting.
2890
974aedcc
MP
28912017-11-22 Marek Polacek <polacek@redhat.com>
2892
2893 PR c++/60336
2894 PR middle-end/67239
2895 PR target/68355
2896 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2897
d4300cc6
DM
28982017-11-21 David Malcolm <dmalcolm@redhat.com>
2899
2900 PR c/83056
2901 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2902 earlier failed lookups.
2903
1af4ebf5
MG
29042017-11-21 Marc Glisse <marc.glisse@inria.fr>
2905
2906 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2907 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2908
26edace6
DM
29092017-11-20 David Malcolm <dmalcolm@redhat.com>
2910
2911 PR c/81404
2912 * c-decl.c: Include "c-family/known-headers.h".
2913 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2914 to known-headers.cc.
2915 (class suggest_missing_header): Move to known-header.h.
2916 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2917 than get_c_name_hint.
2918
b1212255
DM
29192017-11-20 David Malcolm <dmalcolm@redhat.com>
2920
2921 * c-decl.c (get_c_name_hint): New function.
2922 (class suggest_missing_header): New class.
2923 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2924 suggest missing headers to the user.
2925
6c7a259b
DM
29262017-11-20 David Malcolm <dmalcolm@redhat.com>
2927
2928 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2929 Include "c-family/name-hint.h"
2930 (implicit_decl_warning): Convert "hint" from
2931 const char * to name_hint. Pass location to
2932 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2933 warning was not printed.
2934 (undeclared_variable): Likewise for "guessed_id".
2935 (lookup_name_fuzzy): Convert return type from const char *
2936 to name_hint. Add location_t param.
2937 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2938 Include "c-family/name-hint.h"
2939 (c_parser_declaration_or_fndef): Convert "hint" from
2940 const char * to name_hint. Pass location to lookup_name_fuzzy.
2941 (c_parser_parameter_declaration): Likewise.
2942
f9c59f7e
JJ
29432017-11-19 Jakub Jelinek <jakub@redhat.com>
2944
2945 PR c/66618
2946 PR c/69960
2947 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2948 where needed.
2949 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2950 handle_omp_array_sections): Likewise.
2951 (digest_init): Don't call decl_constant_value_for_optimization.
2952 * c-tree.h (decl_constant_value_for_optimization): Removed.
2953 * c-fold.c (c_fold_array_ref): New function.
2954 (c_fully_fold_internal): Add LVAL argument, propagate it through
2955 recursive calls. For VAR_P call decl_constant_value and
2956 unshare if not LVAL and either optimizing or IN_INIT. Remove
2957 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2958 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2959 (c_fully_fold): Add LVAL argument, pass it through to
2960 c_fully_fold_internal.
2961 (decl_constant_value_for_optimization): Removed.
2962
3ca0dc60
JM
29632017-11-15 Joseph Myers <joseph@codesourcery.com>
2964
2965 PR c/81156
2966 * c-parser.c (check_tgmath_function): New function.
2967 (enum tgmath_parm_kind): New enum.
2968 (c_parser_postfix_expression): Handle __builtin_tgmath.
2969
64a5912c
DM
29702017-10-31 David Malcolm <dmalcolm@redhat.com>
2971
2972 * c-decl.c (implicit_decl_warning): Update for renaming of
2973 pedwarn_at_rich_loc and warning_at_rich_loc.
2974 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2975 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2976 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2977 (c_parser_struct_or_union_specifier): Likewise for renaming of
2978 pedwarn_at_rich_loc.
2979 (c_parser_parameter_declaration): Likewise for renaming of
2980 error_at_rich_loc.
2981 * c-typeck.c (build_component_ref): Likewise.
2982 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2983 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2984 (set_init_label): Likewise for renaming of error_at_rich_loc.
2985
c1136864
RB
29862017-10-30 Richard Biener <rguenther@suse.de>
2987
2988 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2989 stmts.
2990
ee5fd23a
MM
29912017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2992
2993 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2994 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2995
1a59ccf2
DM
29962017-10-25 David Malcolm <dmalcolm@redhat.com>
2997
2998 PR c/7356
2999 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3000 semicolons.
3001
bc1a75dd
JJ
30022017-10-25 Jakub Jelinek <jakub@redhat.com>
3003
3004 PR libstdc++/81706
3005 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3006 newdecl to corresponding __builtin_ if any.
3007
ff1ff960
PC
30082017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3009
3010 PR c++/82466
3011 * c-decl.c (diagnose_mismatched_decls): Use
3012 OPT_Wbuiltin_declaration_mismatch.
3013
62e1c678
DM
30142017-10-12 David Malcolm <dmalcolm@redhat.com>
3015
3016 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3017 use it to guard calls to maybe_suggest_missing_token_insertion.
3018 (c_parser_parms_list_declarator): Override default value of new
3019 "type_is_unique" param to c_parser_require.
3020 (c_parser_asm_statement): Likewise.
3021 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3022 defaulting to true.
3023
a92f6726
NS
30242017-10-11 Nathan Sidwell <nathan@acm.org>
3025
3026 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3027
8e6cdc90
RS
30282017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3029
3030 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3031 operating on trees as wide_ints.
3032 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3033 (c_tree_equal): Likewise.
3034
8139a48e
DM
30352017-10-04 David Malcolm <dmalcolm@redhat.com>
3036
3037 * c-decl.c (push_parm_decl): Store c_parm's location into the
3038 PARAM_DECL.
3039 (build_c_parm): Add "loc" param and store it within the c_parm.
3040 * c-parser.c (struct c_parser): Add "last_token_location" field.
3041 (c_parser_consume_token): Store location of the token into the
3042 new field.
3043 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3044 when handling a FUNCTION_DECL, if it doesn't already have them.
3045 (c_parser_parameter_declaration): Generate a location for the
3046 parameter, and pass it to the call to build_c_parm.
3047 * c-tree.h (struct c_parm): Add field "loc".
3048 (build_c_parm): Add location_t param.
3049 * c-typeck.c (get_fndecl_argument_location): New function.
3050 (inform_for_arg): New function.
3051 (convert_for_assignment): Use inform_for_arg when dealing with
3052 ic_argpass.
3053
2a389958
JJ
30542017-09-29 Jakub Jelinek <jakub@redhat.com>
3055
7d386d45
JJ
3056 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3057 width is non-NULL.
3058 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3059 don't SET_DECL_C_BIT_FIELD here.
3060
2a389958
JJ
3061 PR c/82340
3062 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3063 instead of trying to set just TREE_READONLY manually.
3064
ebc6a85e
TV
30652017-09-16 Tom de Vries <tom@codesourcery.com>
3066
3067 PR c/81875
3068 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3069 cond itself.
3070
bb75facd
JM
30712017-09-15 Joseph Myers <joseph@codesourcery.com>
3072
3073 PR c/82071
3074 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3075 for C11.
3076 (build_conditional_expr): For C11, generate result with excess
3077 precision when one argument is an integer and the other is of a
3078 type using excess precision.
3079
1d933576
BE
30802017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3081
3082 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3083
267bbb6f
MP
30842017-09-13 Marek Polacek <polacek@redhat.com>
3085
3086 PR c/82167
3087 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3088 than expr.original_type.
3089
6836632e
NS
30902017-09-12 Nathan Sidwell <nathan@acm.org>
3091
3092 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3093 resort_sorted_fields): Moved from c-family/c-common.c.
3094 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3095
e035be33
JM
30962017-09-01 Joseph Myers <joseph@codesourcery.com>
3097
3098 PR c/82071
3099 * c-typeck.c (build_atomic_assign): Handle argument with excess
3100 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3101 argument passed to build_binary_op and convert_for_assignment but
3102 not for call to c_fully_fold.
3103 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3104 Ensure build_binary_op is called with argument with original
3105 semantic type. Avoid calling c_fully_fold with an
3106 EXCESS_PRECISION_EXPR from build_binary_op.
3107
d2e05fcb
JJ
31082017-09-01 Jakub Jelinek <jakub@redhat.com>
3109
3110 PR c/81887
3111 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3112
b397965c
RS
31132017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3114 Alan Hayward <alan.hayward@arm.com>
3115 David Sherwood <david.sherwood@arm.com>
3116
3117 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3118 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3119 m1 and m2 to the signed equivalent of a fixed-point
3120 SCALAR_TYPE_MODE.
3121
14e18d71
DM
31222017-08-24 David Malcolm <dmalcolm@redhat.com>
3123
3124 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3125 than CAN_HAVE_LOCATION_P when determining whether to use the
3126 location_t value within "value".
3127
7f204c0f
DM
31282017-08-21 David Malcolm <dmalcolm@redhat.com>
3129
3130 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3131 rather than peeking the location of the first token.
3132 * c-tree.h (c_expr::get_location): New method.
3133
2f687306
DM
31342017-08-21 David Malcolm <dmalcolm@redhat.com>
3135
3136 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3137 to check_function_arguments.
3138
3e7b80d7
MP
31392017-08-18 Marek Polacek <polacek@redhat.com>
3140
3141 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3142 commentary.
3143
00aa1fa2
L
31442017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3145
3146 PR c/53037
3147 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3148 (check_bitfield_type_and_width): Don't allow bit-field with
3149 warn_if_not_aligned type.
3150
da67acb9
MS
31512017-08-14 Martin Sebor <msebor@redhat.com>
3152
3153 PR c/81117
3154 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3155
bb85aa74
MP
31562017-08-11 Marek Polacek <polacek@redhat.com>
3157
3158 PR c/81795
3159 * c-decl.c (pushtag): Only print inform if the warning was printed.
3160 (grokdeclarator): Likewise.
3161
32129a17
DM
31622017-08-10 David Malcolm <dmalcolm@redhat.com>
3163
3164 * c-parser.c (c_parser_error): Rename to...
3165 (c_parser_error_richloc): ...this, making static, and adding
3166 "richloc" parameter, passing it to the c_parse_error call,
3167 rather than calling c_parser_set_source_position_from_token.
3168 (c_parser_error): Reintroduce, reimplementing in terms of the
3169 above, converting return type from void to bool.
3170 (class token_pair): New class.
3171 (struct matching_paren_traits): New struct.
3172 (matching_parens): New typedef.
3173 (struct matching_brace_traits): New struct.
3174 (matching_braces): New typedef.
3175 (get_matching_symbol): New function.
3176 (c_parser_require): Add param MATCHING_LOCATION, using it to
3177 highlight matching "opening" tokens for missing "closing" tokens.
3178 (c_parser_skip_until_found): Likewise.
3179 (c_parser_static_assert_declaration_no_semi): Convert explicit
3180 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3181 class matching_parens, so that the pertinent open parenthesis is
3182 highlighted when there are problems locating the close
3183 parenthesis.
3184 (c_parser_struct_or_union_specifier): Likewise.
3185 (c_parser_typeof_specifier): Likewise.
3186 (c_parser_alignas_specifier): Likewise.
3187 (c_parser_simple_asm_expr): Likewise.
3188 (c_parser_braced_init): Likewise, for matching_braces.
3189 (c_parser_paren_condition): Likewise, for matching_parens.
3190 (c_parser_switch_statement): Likewise.
3191 (c_parser_for_statement): Likewise.
3192 (c_parser_asm_statement): Likewise.
3193 (c_parser_asm_operands): Likewise.
3194 (c_parser_cast_expression): Likewise.
3195 (c_parser_sizeof_expression): Likewise.
3196 (c_parser_alignof_expression): Likewise.
3197 (c_parser_generic_selection): Likewise.
3198 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3199 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3200 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3201 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3202 c_parser_skip_until_found call.
3203 (c_parser_objc_class_definition): Use class matching_parens as
3204 above.
3205 (c_parser_objc_method_decl): Likewise.
3206 (c_parser_objc_try_catch_finally_statement): Likewise.
3207 (c_parser_objc_synchronized_statement): Likewise.
3208 (c_parser_objc_at_property_declaration): Likewise.
3209 (c_parser_oacc_wait_list): Likewise.
3210 (c_parser_omp_var_list_parens): Likewise.
3211 (c_parser_omp_clause_collapse): Likewise.
3212 (c_parser_omp_clause_default): Likewise.
3213 (c_parser_omp_clause_if): Likewise.
3214 (c_parser_omp_clause_num_threads): Likewise.
3215 (c_parser_omp_clause_num_tasks): Likewise.
3216 (c_parser_omp_clause_grainsize): Likewise.
3217 (c_parser_omp_clause_priority): Likewise.
3218 (c_parser_omp_clause_hint): Likewise.
3219 (c_parser_omp_clause_defaultmap): Likewise.
3220 (c_parser_oacc_single_int_clause): Likewise.
3221 (c_parser_omp_clause_ordered): Likewise.
3222 (c_parser_omp_clause_reduction): Likewise.
3223 (c_parser_omp_clause_schedule): Likewise.
3224 (c_parser_omp_clause_num_teams): Likewise.
3225 (c_parser_omp_clause_thread_limit): Likewise.
3226 (c_parser_omp_clause_aligned): Likewise.
3227 (c_parser_omp_clause_linear): Likewise.
3228 (c_parser_omp_clause_safelen): Likewise.
3229 (c_parser_omp_clause_simdlen): Likewise.
3230 (c_parser_omp_clause_depend): Likewise.
3231 (c_parser_omp_clause_map): Likewise.
3232 (c_parser_omp_clause_device): Likewise.
3233 (c_parser_omp_clause_dist_schedule): Likewise.
3234 (c_parser_omp_clause_proc_bind): Likewise.
3235 (c_parser_omp_clause_uniform): Likewise.
3236 (c_parser_omp_for_loop): Likewise.
3237 (c_parser_cilk_clause_vectorlength): Likewise.
3238 (c_parser_cilk_clause_linear): Likewise.
3239 (c_parser_transaction_expression): Likewise.
3240 * c-parser.h (c_parser_require): Add param matching_location with
3241 default UNKNOWN_LOCATION.
3242 (c_parser_error): Convert return type from void to bool.
3243 (c_parser_skip_until_found): Add param matching_location with
3244 default UNKNOWN_LOCATION.
3245
30af3a2b
MP
32462017-08-09 Marek Polacek <polacek@redhat.com>
3247
3248 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3249 * c-tree.h (build_external_ref): Update declaration.
3250 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3251 (build_external_ref): Change the type of a parameter to bool.
3252 (parser_build_binary_op): Use true/false instead of 1/0.
3253 (pointer_diff): Likewise.
3254 (build_modify_expr): Likewise.
3255 (set_designator): Change the type of a parameter to bool.
3256 (set_init_index): Use true/false instead of 1/0.
3257 (set_init_label): Likewise.
3258 (output_init_element): Change the type of a parameter to bool.
3259 (output_pending_init_elements): Use true/false instead of 1/0.
3260 (process_init_element): Likewise.
3261 (build_binary_op): Change the type of a parameter to bool.
3262
296c53ac
MP
32632017-08-09 Marek Polacek <polacek@redhat.com>
3264
3265 PR c/81233
3266 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3267 Call emit_diagnostic_valist instead of pedwarn.
3268 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3269 Print the relevant types in diagnostics.
3270
a32c8316
MP
32712017-08-09 Marek Polacek <polacek@redhat.com>
3272
3273 PR c/81417
3274 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3275 build_conditional_expr.
a32c8316
MP
3276 * c-parser.c (c_parser_conditional_expression): Create locations for
3277 EXP1 and EXP2 from their source ranges. Pass the locations down to
3278 build_conditional_expr.
3279 * c-tree.h (build_conditional_expr): Update declaration.
3280 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3281 For -Wsign-compare, also print the types.
3282
314e6352
ML
32832017-08-08 Martin Liska <mliska@suse.cz>
3284
3285 * c-convert.c: Include header files.
3286 * c-typeck.c: Likewise.
3287
577eec56
ML
32882017-08-07 Martin Liska <mliska@suse.cz>
3289
3290 * c-parser.c (c_parser_attributes): Canonicalize name of an
3291 attribute.
3292
f7b6353a
MP
32932017-08-02 Marek Polacek <polacek@redhat.com>
3294
3295 PR c/81289
3296 * c-parser.c (c_parser_unary_expression): Use set_error.
3297
8a6eab34
MP
3298 PR c/81448
3299 PR c/81306
3300 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3301 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3302
ab20d992 33032017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3304 Martin Liska <mliska@suse.cz>
3305
3306 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3307 statement.
7fef86d3 3308
f34ebeb2
ML
33092017-07-31 Martin Liska <mliska@suse.cz>
3310
3311 PR sanitize/81530
3312 * c-convert.c (convert): Guard condition with flag_sanitize_p
3313 also with current_function_decl non-null equality.
3314 * c-decl.c (grokdeclarator): Likewise.
3315 * c-typeck.c (build_binary_op): Likewise.
3316
8595f67b
MP
33172017-07-25 Marek Polacek <polacek@redhat.com>
3318
3319 * c-decl.c (grokfield): Remove local variable.
3320
d49718d6
MP
33212017-07-25 Marek Polacek <polacek@redhat.com>
3322
3323 PR c/81364
3324 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3325 macro expansion if the body is in { }.
3326 (c_parser_while_statement): Likewise.
3327 (c_parser_for_statement): Likewise.
3328
ff22eb12
NS
33292017-07-18 Nathan Sidwell <nathan@acm.org>
3330
3331 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3332
eea77d1f
DM
33332017-07-14 David Malcolm <dmalcolm@redhat.com>
3334
3335 * c-decl.c (implicitly_declare): When suggesting a missing
3336 #include, provide a fix-it hint.
3337
b6f43128
DM
33382017-07-06 David Malcolm <dmalcolm@redhat.com>
3339
3340 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3341 and call that instead.
3342 * c-tree.h (selftest::run_c_tests): New decl.
3343
3e2becc4
MP
33442017-06-26 Marek Polacek <polacek@redhat.com>
3345
3346 PR c/80116
3347 * c-parser.c (c_parser_if_body): Set the location of the
3348 body of the conditional after parsing all the labels. Call
3349 warn_for_multistatement_macros.
3350 (c_parser_else_body): Likewise.
3351 (c_parser_switch_statement): Likewise.
3352 (c_parser_while_statement): Likewise.
3353 (c_parser_for_statement): Likewise.
3354 (c_parser_statement): Add a default argument. Save the location
3355 after labels have been parsed.
3356 (c_parser_c99_block_statement): Likewise.
3357
343ae898
RB
33582017-06-19 Richard Biener <rguenther@suse.de>
3359
3360 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3361 negated _Literals to parse _Literal (int) -1.
3362
45b2222a
ML
33632017-06-13 Martin Liska <mliska@suse.cz>
3364
3365 PR sanitize/78204
3366 * c-convert.c (convert): Use sanitize_flags_p.
3367 * c-decl.c (grokdeclarator): Likewise.
3368 * c-typeck.c (convert_for_assignment): Likewise.
3369 (c_finish_return): Likewise.
3370 (build_binary_op): Likewise.
3371
8ab7005b
JJ
33722017-06-08 Jakub Jelinek <jakub@redhat.com>
3373
3374 PR c/81006
3375 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3376 to sizetype before size_binop.
3377
363dc72c
JJ
33782017-06-07 Jakub Jelinek <jakub@redhat.com>
3379
3380 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3381 of TDI_generic.
3382
dc949728
MP
33832017-06-06 Marek Polacek <polacek@redhat.com>
3384
3385 PR c/79983
3386 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3387 ref.
3388 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3389
40ffd95f
BE
33902017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3391
3392 * c-parser.c (c_parser_binary_expression): Implement the
3393 -Wsizeof_pointer_div warning.
3394 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3395 from a parenthesized expression.
3396 (c_parser_expr_list): Use c_last_sizeof_loc.
3397 * c-tree.h (c_last_sizeof_loc): New external.
3398 * c-typeck.c (c_last_sizeof_loc): New variable.
3399 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3400
9fc5e7a4
MM
34012017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3402
3403 PR testsuite/80580
3404 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3405
f012c8ef
DM
34062017-05-30 David Malcolm <dmalcolm@redhat.com>
3407
3408 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3409 parameters.
3410
3cd211af
MS
34112017-05-24 Martin Sebor <msebor@redhat.com>
3412
3413 PR c/80731
3414 * c-fold.c (c_fully_fold_internal): Adjust.
3415 * c-typeck.c (parser_build_unary_op): Adjust.
3416
fd71a9a2
TS
34172017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3418
3419 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3420 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3421 "VECTOR_LENGTH".
3422
92fa0f9e
MP
34232017-05-23 Marek Polacek <polacek@redhat.com>
3424
3425 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3426 quotes.
3427
d11c168a
JJ
34282017-05-22 Jakub Jelinek <jakub@redhat.com>
3429
3430 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3431 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3432 it returned invariant. Call tree_invariant_p unconditionally
3433 afterwards to decide whether to return expr or op0.
3434
58aca9d9
NS
34352017-05-22 Nathan Sidwell <nathan@acm.org>
3436
3437 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3438
7fd549d2
TS
34392017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3440
3441 * c-parser.c (c_parser_omp_clause_default): Handle
3442 "OMP_CLAUSE_DEFAULT_PRESENT".
3443
6ecd2339
BE
34442017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3445
3446 * config-lang.in (gtfiles): Add c-family/c-format.c.
3447
8a57ecff
NS
34482017-05-18 Nathan Sidwell <nathan@acm.org>
3449
3450 * c-decl.c (pushdecl_top_level): Delete unused function.
3451
6574d78e
MP
34522017-05-18 Marek Polacek <polacek@redhat.com>
3453
3454 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3455 (check_earlier_gotos): Likewise.
3456 (define_label): Likewise.
3457 (pending_xref_error): Likewise.
3458 (smallest_type_quals_location): Likewise.
3459 (grokdeclarator): Likewise.
3460 (grokparms): Likewise.
3461 (identifier_global_value): Likewise.
3462 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3463 (find_init_member): Likewise.
3464
e3455240
MP
34652017-05-18 Marek Polacek <polacek@redhat.com>
3466
3467 * c-decl.c (start_decl): Use false/true instead of 0/1.
3468 (grokdeclarator): Likewise.
3469 (finish_struct): Likewise.
3470 (start_function): Change the return type to bool. Use false/true
3471 instead of 0/1.
3472 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3473 * c-tree.h (start_function): Update.
3474 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3475 (set_designator): Change the return type to bool. Use false/true
3476 instead of 0/1.
3477
3fa8871b
MP
34782017-05-17 Marek Polacek <polacek@redhat.com>
3479
3480 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3481 * c-typeck.c: Likewise.
3482
142473df
MP
34832017-05-17 Marek Polacek <polacek@redhat.com>
3484
3485 PR sanitizer/80659
3486 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3487 DECL_IGNORED_P even for non-static compound literals.
3488
1a817418
ML
34892017-05-17 Martin Liska <mliska@suse.cz>
3490
3491 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3492 use it instead of int type.
3493
b2fa0a8b
MP
34942017-05-17 Marek Polacek <polacek@redhat.com>
3495
3496 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3497 call c_fully_fold.
3498 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3499 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3500 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3501 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3502 save_expr.
3503 (c_parser_conditional_expression): Likewise.
3504 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3505 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3506 (process_init_element): Likewise.
3507 (build_binary_op): Likewise.
3508 (handle_omp_array_sections_1): Likewise.
3509
1e47f02b
TS
35102017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3511
3512 * c-parser.c (c_parser_omp_clause_num_gangs)
3513 (c_parser_omp_clause_num_workers)
3514 (c_parser_omp_clause_vector_length): Merge functions into...
3515 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3516 all users.
3517
c24e924f
NS
35182017-05-11 Nathan Sidwell <nathan@acm.org>
3519
3520 * gimple-parser.c: Don't #include tree-dump.h.
3521
c587104e
MM
35222017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3523
3524 PR testsuite/80580
3525 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3526
67ac9a9d
MM
35272017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3528
3529 PR testsuite/80580
3530 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3531 incorrect __MEM syntax.
3532
ac4eb40f
MM
35332017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3534
3535 PR testsuite/80580
3536 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3537 type of unary '*'.
3538
641da50a
NS
35392017-05-09 Nathan Sidwell <nathan@acm.org>
3540
3541 * c-tree.h (pushdecl): Declare.
3542
56d35585
DM
35432017-05-05 David Malcolm <dmalcolm@redhat.com>
3544
3545 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3546 with diagnostic_report_diagnostic.
3547 * c-errors.c (pedwarn_c99): Likewise.
3548 (pedwarn_c90): Likewise.
3549
815d9cc6
XR
35502017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3551
92a285c1 3552 PR c++/80038
815d9cc6
XR
3553 * c-gimplify.c (c_gimplify_expr): Remove calls to
3554 cilk_gimplifY_call_params_in_spawned_fn.
3555
1c4ea66f
DM
35562017-04-25 David Malcolm <dmalcolm@redhat.com>
3557
3558 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3559 hint for removing extra semicolon.
3560
666f7903
JJ
35612017-04-21 Jakub Jelinek <jakub@redhat.com>
3562
3563 PR c/80468
3564 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3565 enabled, set specs->type to integer_type_node.
3566
5764ee3c
JW
35672017-04-03 Jonathan Wakely <jwakely@redhat.com>
3568
3569 * c-array-notation.c: Fix typo in comment.
3570
10fa8dfb
MP
35712017-03-29 Marek Polacek <polacek@redhat.com>
3572
3573 PR c/79730
3574 * c-decl.c (finish_decl): Check VAR_P.
3575
a9e4a1a5
JJ
35762017-03-27 Jakub Jelinek <jakub@redhat.com>
3577
3578 PR middle-end/80162
3579 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3580 * c-typeck.c (c_mark_addressable): Likewise. Look through
3581 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3582 to ARRAY_TYPE.
3583 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3584
ee3ff394
MP
35852017-03-23 Marek Polacek <polacek@redhat.com>
3586
3587 * c-tree.h: Remove a C_RID_YYCODE reference.
3588
4d1b8e70
JJ
35892017-03-21 Jakub Jelinek <jakub@redhat.com>
3590
3591 PR c/80097
3592 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3593 optional COMPOUND_EXPR with ubsan instrumentation.
3594
31dc71a8
MP
35952017-03-17 Marek Polacek <polacek@redhat.com>
3596
3597 * c-parser.c: Add C11 references.
3598
d579c385
MP
35992017-03-15 Marek Polacek <polacek@redhat.com>
3600
3601 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3602
85059a38
MP
36032017-03-11 Marek Polacek <polacek@redhat.com>
3604
3605 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3606
2f6f187a
DM
36072017-03-10 David Malcolm <dmalcolm@redhat.com>
3608
3609 PR translation/79848
3610 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3611 "%qs".
3612 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3613
36618428
MP
36142017-03-09 Marek Polacek <polacek@redhat.com>
3615
3616 PR sanitizer/79757
3617 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3618 parameter declarations with initializers.
3619
01e5af5a
JJ
36202017-03-09 Jakub Jelinek <jakub@redhat.com>
3621
3622 PR c/79969
3623 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3624 TYPE_STUB_DECL.
3625
a71dbc63
JJ
36262017-03-07 Jakub Jelinek <jakub@redhat.com>
3627
3628 PR c/79834
3629 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3630 for "may only be used in compound statements" diagnostics, change it
3631 such that the same translatable string is used for all pragmas. For
3632 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3633 diagnostics.
3634 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3635 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3636 "may only be used in compound statements" diagnostics, such that the
3637 same translatable string is used for all pragmas.
3638
1ff4bae6
MP
36392017-03-04 Marek Polacek <polacek@redhat.com>
3640
3641 PR c/79847
3642 * c-decl.c (implicit_decl_warning): Add missing space.
3643
7f5a7d78
MP
36442017-03-03 Marek Polacek <polacek@redhat.com>
3645
3646 PR c/79758
3647 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3648 current_function_prototype_arg_types is error_mark_node. Fix
3649 formatting. Use TREE_VALUE instead of TREE_TYPE.
3650
883c8f06
JJ
36512017-03-03 Jakub Jelinek <jakub@redhat.com>
3652
79c9b7a8
JJ
3653 PR c/79837
3654 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3655 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3656 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3657 diagnostics.
3658
883c8f06
JJ
3659 PR c/79836
3660 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3661 instead of %<_Generic>.
3662 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3663 (c_parser_omp_target_exit_data): Use %<release%> instead of
3664 %<release>.
3665
324ff1a0
JJ
36662017-02-28 Jakub Jelinek <jakub@redhat.com>
3667
3668 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3669 instead of just cond ? "..." : "...".
3670 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3671 for "enter"/"exit" keyword.
3672 (c_finish_oacc_routine): Don't use %s to supply portions of the
3673 message.
3674
4227c9ad
JJ
36752017-02-24 Jakub Jelinek <jakub@redhat.com>
3676
3677 PR c++/79588
3678 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3679 handle -Wrestrict here.
3680 * c-typeck.c (build_function_call_vec): Adjust
3681 check_function_arguments caller.
3682
5d972e66
RB
36832017-02-23 Richard Biener <rguenther@suse.de>
3684
3685 PR c/79684
3686 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3687 to initialize c_exprs to return.
3688 (c_parser_gimple_binary_expression): Likewise.
3689 (c_parser_gimple_unary_expression): Likewise.
3690 (c_parser_gimple_postfix_expression): Likewise.
3691
61ac5ebe
MP
36922017-02-22 Marek Polacek <polacek@redhat.com>
3693
3694 PR c/79662
3695 * c-typeck.c (convert_arguments): Handle error_mark_node.
3696
41d1b0b1
PK
36972017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3698
3699 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3700 value of c_parser_parse_ssa_name against error_mark_node and emit
3701 error if ssa name is anonymous and written as default definition.
3702
eab1f169
PK
37032017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3704
3705 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3706 FMA_EXPR.
3707
bcac0b4d
JJ
37082017-02-16 Jakub Jelinek <jakub@redhat.com>
3709
3710 PR c++/79512
3711 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3712 ignore #pragma omp target even when not followed by identifier.
3713
1be33173
PK
37142017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3715
3716 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3717 (c_parser_gimple_unary_expression): Likewise.
3718
aa326bfb
JJ
37192017-02-13 Jakub Jelinek <jakub@redhat.com>
3720
3721 * c-parser.c (c_parser_oacc_declare): Add missing space in
3722 diagnostics.
3723
8a398bc5
PK
37242017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3725
3726 PR c/79478
3727 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3728 set_c_expr_source_range when parsing ssa-name.
3729
3dcde5ef 37302017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3731 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3732
3733 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3734 building IL when arguments are error_mark_node.
3735 (c_parser_gimple_unary_expression): Likewise.
3736 (c_parser_gimple_if_stmt): Likewise.
3737 (c_parser_gimple_switch_stmt): Likewise.
3738 (c_parser_gimple_return_stmt): Likewise.
3739 (c_parser_parse_ssa_name): When name lookup fails do not build
3740 an SSA name. Use undeclared rather than not declared in error
3741 reporting.
3742
192b048b
MP
37432017-02-09 Marek Polacek <polacek@redhat.com>
3744
3745 PR c/79428
3746 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3747 instead of c_parser_skip_until_found.
3748
56f71478
JJ
37492017-02-09 Jakub Jelinek <jakub@redhat.com>
3750
3751 PR c/79431
3752 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3753 symtab_node::get on automatic variables.
3754
02889d23
CLT
37552016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3756 Chung-Lin Tang <cltang@codesourcery.com>
3757
3758 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3759 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3760 semantic checking.
3761 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3762
7af4b20d
RB
37632017-02-07 Richard Biener <rguenther@suse.de>
3764
3765 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3766 (c_parser_gimple_postfix_expression_after_primary):
3767 Do not use c_build_function_call_vec to avoid folding and promotion.
3768 Simplify.
3769
e5e391d6
MO
37702017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3771
3772 PR lto/79061
3773 * c-decl.c (pop_scope): Pass main_input_filename to
3774 build_translation_unit_decl.
3775
c2e84327
DM
37762017-01-24 David Malcolm <dmalcolm@redhat.com>
3777
3778 * c-parser.c: Include "read-rtl-function.h" and
3779 "run-rtl-passes.h".
3780 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3781 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3782 production. Update for renaming of field "gimple_pass" to
3783 "gimple_or_rtl_pass". If __RTL was seen, call
3784 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3785 to an auto_timevar, to cope with early exit.
3786 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3787 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3788 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3789 Handle RID_RTL.
3790 (c_parser_parse_rtl_body): New function.
3791 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3792 (struct c_declspecs): Rename field "gimple_pass" to
3793 "gimple_or_rtl_pass". Add field "rtl_p".
3794 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3795 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3796 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3797 (c_parser_gimple_or_rtl_pass_list): ...this.
3798
2ebd93e1
MP
37992017-01-20 Marek Polacek <polacek@redhat.com>
3800
3801 PR c/64279
3802 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3803
b1c95bb5
RB
38042017-01-13 Richard Biener <rguenther@suse.de>
3805
3806 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3807 nops.
3808
25329913
RB
38092017-01-13 Richard Biener <rguenther@suse.de>
3810
3811 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3812 _Literal ( type-name ) number.
3813
6bb4ea5c
RB
38142017-01-12 Richard Biener <rguenther@suse.de>
3815
3816 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3817 __MEM.
3818
6b5b4e9c
JJ
38192017-01-11 Jakub Jelinek <jakub@redhat.com>
3820
3821 PR c++/72813
3822 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3823 PCH file.
3824
e3252775
RB
38252017-01-11 Richard Biener <rguenther@suse.de>
3826
3827 PR bootstrap/79052
3828 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3829 returns on parse errors.
3830
a9342885
MP
38312017-01-04 Marek Polacek <polacek@redhat.com>
3832
3833 PR c++/64767
3834 * c-parser.c (c_parser_postfix_expression): Mark zero character
3835 constants by setting original_type in c_expr.
3836 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3837 with a zero character constant.
3838 (char_type_p): New function.
3839
5dd9a9d0
DM
38402017-01-04 David Malcolm <dmalcolm@redhat.com>
3841
3842 * c-parser.c (c_parser_declaration_or_fndef): Create a
3843 rich_location at init_loc and parse it to start_init.
3844 (last_init_list_comma): New global.
3845 (c_parser_braced_init): Update last_init_list_comma when parsing
3846 commas. Pass it to pop_init_level. Pass location of closing
3847 brace to pop_init_level.
3848 (c_parser_postfix_expression_after_paren_type): Create a
3849 rich_location at type_loc and parse it to start_init.
3850 (c_parser_omp_declare_reduction): Likewise for loc.
3851 * c-tree.h (start_init): Add rich_location * param.
3852 (pop_init_level): Add location_t param.
3853 * c-typeck.c (struct initializer_stack): Add field
3854 "missing_brace_richloc".
3855 (start_init): Add richloc param, use it to initialize
3856 the stack node's missing_brace_richloc.
3857 (last_init_list_comma): New decl.
3858 (finish_implicit_inits): Pass last_init_list_comma to
3859 pop_init_level.
3860 (push_init_level): When finding missing open braces, add fix-it
3861 hints to the richloc.
3862 (pop_init_level): Add "insert_before" param and pass it
3863 when calling pop_init_level. Add fixits about missing
3864 close braces to any richloc. Use the richloc for the
3865 -Wmissing-braces warning.
3866 (set_designator): Pass last_init_list_comma to pop_init_level.
3867 (process_init_element): Likewise.
3868
cbe34bb5
JJ
38692017-01-01 Jakub Jelinek <jakub@redhat.com>
3870
3871 Update copyright years.
3872
d17680f3
JJ
38732016-12-21 Jakub Jelinek <jakub@redhat.com>
3874
0dba7960
JJ
3875 PR bootstrap/78817
3876 * c-typeck.c (build_function_call_vec): If check_function_arguments
3877 returns true, set TREE_NO_WARNING on CALL_EXPR.
3878
d17680f3
JJ
3879 PR c/77767
3880 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3881 to *expr instead of overwriting it.
3882
aa90531e
RB
38832016-12-20 Richard Biener <rguenther@suse.de>
3884
3885 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3886 error recovery.
3887 (c_parser_gimple_statement): Only build assigns for non-error
3888 stmts.
3889 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3890
629b3d75
MJ
38912016-12-14 Martin Jambor <mjambor@suse.cz>
3892
3893 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3894 omp-low.h.
3895 (c_finish_oacc_routine): Adjusted call to
3896 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3897 to use their new names.
3898 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3899 use its new name.
3900 (c_parser_oacc_update): Likewise.
3901 (c_parser_omp_simd): Likewise.
3902 (c_parser_omp_target_update): Likewise.
3903 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3904 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3905 name.
3906 (c_finish_omp_cancellation_point): Likewise.
3907 * gimple-parser.c: Do not include omp-low.h
3908
c5af52eb
CP
39092016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3910 James Norris <jnorris@codesourcery.com>
3911
3912 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3913 EXIT_DATA,WAIT} are not used in compound statements.
3914 (c_parser_oacc_enter_exit_data): Update diagnostics.
3915
48330c93
BE
39162016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3917
3918 PR c++/71973
3919 * c-decl.c (diagnose_mismatched_decls): Use
3920 OPT_Wbuiltin_declaration_mismatch here too.
3921
899ca90e 39222016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3923 Alan Hayward <alan.hayward@arm.com>
3924 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3925
3926 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3927 (make_label, finish_struct): Likewise.
3928
1ee62b92 39292016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3930 Richard Biener <rguenther@suse.de>
22b15758 3931
8e745a17
JJ
3932 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3933 * config-lang.in (gtfiles): Add c/c-parser.h.
3934 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3935 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3936 * c-parser.c (enum c_id_kind, struct c_token,
3937 c_parser_next_token_is, c_parser_next_token_is_not,
3938 c_parser_next_token_is_keyword,
3939 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3940 Split out to ...
3941 * c-parser.h: ... new header.
3942 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3943 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3944 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3945 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3946 c_parser_error, c_parser_require, c_parser_skip_until_found,
3947 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3948 c_parser_type_name): Export.
3949 (c_parser_tokens_buf): New function.
3950 (c_parser_error): Likewise.
3951 (c_parser_set_error): Likewise.
3952 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3953 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3954 via c_parser_parse_gimple_body.
8e745a17
JJ
3955 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3956 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3957 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3958 c_parser_error, c_parser_require, c_parser_skip_until_found,
3959 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3960 c_parser_type_name): Declare.
1ee62b92
PG
3961 (struct c_parser): Declare forward.
3962 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3963 (c_parser_error): Likewise.
3964 (c_parser_set_error): Likewise.
3965 * gimple-parser.c: New file.
3966 * gimple-parser.h: Likewise.
1ee62b92 3967
22b15758
UB
39682016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3969
3970 PR c/35503
3971 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3972 warn_for_restrict.
3973
84ff4775
LCW
39742016-09-11 Le-Chun Wu <lcwu@google.com>
3975 Mark Wielaard <mjw@redhat.com>
3976
3977 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3978 to the given -Wshadow= variant.
3979
4d0cdd0c
TP
39802016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3981
3982 * c-typeck.c: Include memmodel.h.
3983
1202f33e
JJ
39842016-10-13 Jakub Jelinek <jakub@redhat.com>
3985
3986 PR target/77957
3987 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3988 instead of lhd_return_null_tree_v.
3989
8a14afd0
BS
39902016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3991
3992 PR c++/69733
3993 * c-decl.c (smallest_type_quals_location): New static function.
3994 (grokdeclarator): Try to find the correct location for an ignored
3995 qualifier.
3996
81fea426
MP
39972016-09-26 Marek Polacek <polacek@redhat.com>
3998
3999 PR c/7652
4000 * c-decl.c (pop_scope): Add gcc_fallthrough.
4001
40022016-09-26 Marek Polacek <polacek@redhat.com>
4003
4004 PR c/7652
4005 * c-parser.c (struct c_token): Add flags field.
4006 (c_lex_one_token): Pass it to c_lex_with_flags.
4007 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4008 into IFN_FALLTHROUGH.
4009 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4010 attribute fallthrough after a case label or default label.
4011 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4012
9a2300e9
MP
40132016-09-24 Marek Polacek <polacek@redhat.com>
4014
4015 PR c/77490
4016 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4017 have boolean value. Warn about ++/-- on booleans.
4018
7de76362
JJ
40192016-09-23 Jakub Jelinek <jakub@redhat.com>
4020
4021 * c-parser.c (incomplete_record_decls): Remove unnecessary
4022 = vNULL initialization of file scope vec.
4023
5b73d2ab
MP
40242016-09-16 Marek Polacek <polacek@redhat.com>
4025
4026 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4027
e51fbec3
MP
40282016-09-14 Marek Polacek <polacek@redhat.com>
4029
4030 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4031 (fix_array_notation_expr): Likewise.
4032 * c-decl.c (finish_decl): Likewise.
4033 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4034 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4035 (function_to_pointer_conversion): Use false instead of 0.
4036 (convert_lvalue_to_rvalue): Likewise.
4037 (parser_build_unary_op): Likewise.
4038 (build_atomic_assign): Likewise.
4039 (build_unary_op): Change nonconvert parameter type to bool, use
4040 true/false instead of 1/0.
4041 (build_binary_op): Use true instead of 1.
4042
254830ba
DM
40432016-09-13 David Malcolm <dmalcolm@redhat.com>
4044
4045 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4046 of add_fixit_insert to add_fixit_insert_before.
4047
4c13ba17
MP
40482016-09-13 Marek Polacek <polacek@redhat.com>
4049
4050 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4051 it.
4052
54dcdb88
BE
40532016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4054
4055 PR c++/77496
4056 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4057 COMPOUND_EXPR to warn_for_omitted_condop.
4058
e5106e27
DM
40592016-09-07 David Malcolm <dmalcolm@redhat.com>
4060
4061 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4062 c_get_substring_location for this new langhook.
4063
9dc5773f
JJ
40642016-09-02 Jakub Jelinek <jakub@redhat.com>
4065
4066 PR c/65467
4067 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4068 flag_openmp.
4069 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4070 instead of mark_exp_read on low_bound/length expression.
4071 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4072 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4073 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4074 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4075 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4076 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4077 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4078 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4079 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4080 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4081 instead of mark_expr_read.
4082 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4083 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4084 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4085 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4086 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4087 array section bases outside of depend clause, for depend clause
4088 use convert_lvalue_to_rvalue on the base.
4089 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4090 linear, aligned, map, to and from clauses.
4091 (c_omp_clause_copy_ctor): New function.
4092
295844f6
MP
40932016-09-01 Marek Polacek <polacek@redhat.com>
4094
4095 PR c/7652
4096 * c-typeck.c (composite_type): Add FALLTHRU comment.
4097
089af25c
DM
40982016-08-31 David Malcolm <dmalcolm@redhat.com>
4099
4100 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4101 to the insertion fixits for "struct", "union", and "enum".
4102
f9087798
DM
41032016-08-30 David Malcolm <dmalcolm@redhat.com>
4104
4105 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4106 rather than add_fixit_misspelled_id.
4107 (undeclared_variable): Likewise.
4108 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4109 now-redundant "here" params from add_fixit_insert method calls.
4110 (c_parser_parameter_declaration): Likewise.
4111 * c-typeck.c (build_component_ref): Remove now-redundant range
4112 param from add_fixit_replace method calls.
4113
ebef225f
MP
41142016-08-25 Marek Polacek <polacek@redhat.com>
4115
4116 * c-typeck.c (parser_build_binary_op): Pass LHS to
4117 warn_logical_not_parentheses.
4118
fe377a48
MP
41192016-08-25 Marek Polacek <polacek@redhat.com>
4120
4121 PR c/77323
4122 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4123 or _FloatN or _FloatNx is not supported.
4124 (finish_declspecs): Set type to integer_type_node when _FloatN or
4125 _FloatNx is not supported.
4126
c65699ef
JM
41272016-08-19 Joseph Myers <joseph@codesourcery.com>
4128
4129 PR c/32187
4130 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4131 (struct c_declspecs): Add field floatn_nx_idx.
4132 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4133 and _FloatNx type specifiers.
4134 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4135 (c_parser_declspecs, c_parser_attribute_any_word)
4136 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4137 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4138 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4139 narrower than double.
4140
2f1364c2
JJ
41412016-08-12 Jakub Jelinek <jakub@redhat.com>
4142 Martin Liska <mliska@suse.cz>
4143
4144 PR c/67410
4145 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4146 % to determine val element to change. Assert that
4147 wchar_bytes * charwidth fits into val array.
4148
191816a3
MP
41492016-08-12 Marek Polacek <polacek@redhat.com>
4150
4151 PR c/7652
4152 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4153 (c_parser_postfix_expression): Likewise.
4154 * c-typeck.c (build_unary_op): Adjust fall through comment.
4155 (c_mark_addressable): Likewise.
4156
b95a64bb
JJ
41572016-08-11 Jakub Jelinek <jakub@redhat.com>
4158
4159 PR c/72816
4160 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4161 array member through typedef, for orig_qual_indirect == 0 clear
4162 orig_qual_type.
4163
895aa8e1
DM
41642016-08-08 David Malcolm <dmalcolm@redhat.com>
4165
4166 PR c/64955
4167 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4168 this up to selftest::run_c_tests.
4169 (selftest::run_c_tests): New function.
4170
0b212d8c
TS
41712016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4172
ae9281fc
TS
4173 * c-parser.c (struct oacc_routine_data): Add error_seen and
4174 fndecl_seen members.
4175 (c_finish_oacc_routine): Use these.
4176 (c_parser_declaration_or_fndef): Adjust.
4177 (c_parser_oacc_routine): Likewise. Support more C language
4178 constructs, and improve diagnostics. Move pragma context
4179 checking...
4180 (c_parser_pragma): ... here.
4181
0b212d8c
TS
4182 * c-parser.c (struct oacc_routine_data): New.
4183 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4184 Simplify code.
4185 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4186 declare target" attribute.
4187
76e2c821
JB
41882016-08-01 Jan Beulich <jbeulich@suse.com>
4189
4190 * c-fold.c (c_fully_fold_internal): Also emit shift count
4191 warnings for vector types.
4192 * c-typeck.c (build_binary_op): Likewise.
4193
f618a472
MP
41942016-07-29 Marek Polacek <polacek@redhat.com>
4195
4196 PR c/71742
4197 * c-decl.c (finish_struct): Rephrase an error message.
4198
efd0786f
MP
4199 PR c/71853
4200 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4201 to error node for invalid code.
4202
e00dceaf
MP
4203 PR c/71573
4204 * c-decl.c (implicitly_declare): Return decl early not only for
4205 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4206
673a107a
JJ
42072016-07-29 Jakub Jelinek <jakub@redhat.com>
4208
4209 PR c/71969
4210 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4211 on GNU extern inline functions.
4212
a5b5c8b6
MP
42132016-07-29 Marek Polacek <polacek@redhat.com>
4214
4215 PR c/71583
4216 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4217 check expr.value.
4218
e3fe09c1
UB
42192016-07-22 Uros Bizjak <ubizjak@gmail.com>
4220
4221 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4222
7c8f7eaa
DM
42232016-07-20 David Malcolm <dmalcolm@redhat.com>
4224
4225 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4226 spellcheck-tree.h
4227 (best_macro_match): Likewise, converting from a typedef to a
4228 subclass.
4229 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4230 (lookup_name_fuzzy): Update for change of best_macro_match to a
4231 subclass with a ctor that calls cpp_forall_identifiers.
4232
de6a69ee
DM
42332016-07-20 David Malcolm <dmalcolm@redhat.com>
4234
4235 * c-decl.c (implicit_decl_warning): Update for conversion of
4236 return type of lookup_name_fuzzy to const char *.
4237 (undeclared_variable): Likewise.
4238 (lookup_name_fuzzy): Convert return type from tree to
4239 const char *.
4240 * c-parser.c (c_parser_declaration_or_fndef): Update for
4241 conversion of return type of lookup_name_fuzzy to const char *.
4242 (c_parser_parameter_declaration): Likewise.
4243
b1c9c068
CP
42442016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4245
4246 * c-parser.c (c_parser_oacc_declare): Don't scan for
4247 GOMP_MAP_POINTER.
4248 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4249 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4250 zero-length subarrays.
4251
ddbbcb19
JJ
42522016-07-15 Jakub Jelinek <jakub@redhat.com>
4253
4254 PR c/71858
4255 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4256 instead of FUZZY_LOOKUP_NAME.
4257 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4258 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4259
dd36b877
JJ
42602016-07-14 Jakub Jelinek <jakub@redhat.com>
4261
4262 PR c/71858
4263 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4264
8c681247
TS
42652016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4266
4267 * c-parser.c (c_parser_generic_selection): Make type of variable
4268 auto_vec.
4269 (c_parser_omp_declare_simd): Likewise.
4270
bf4fa671
TS
42712016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4272
4273 * c-decl.c (struct c_struct_parse_info): Change member types
4274 from vec to auto_vec.
4275 (start_struct): Adjust.
4276 (finish_struct): Likewise.
4277
557e8c49
JJ
42782016-07-02 Jakub Jelinek <jakub@redhat.com>
4279
4280 PR c/71719
4281 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4282
54d19c3b
TS
42832016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4284
4285 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4286 Move pragma context checking into...
4287 (c_parser_omp_cancellation_point): ... here, and improve
4288 diagnostic messages.
4289 * c-typeck.c (c_finish_omp_cancel)
4290 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4291
152ef731
JJ
42922016-06-29 Jakub Jelinek <jakub@redhat.com>
4293
4294 PR c/71685
4295 * c-typeck.c (c_build_qualified_type): Don't clear
4296 C_TYPE_INCOMPLETE_VARS for the main variant.
4297
42982016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4299
4300 PR c/71552
4301 * c-typeck.c (output_init_element): Diagnose incompatible types
4302 before non-constant initializers.
4303
e9ac1f86
JJ
43042016-06-28 Jakub Jelinek <jakub@redhat.com>
4305
4306 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4307
277d7ee0
AK
43082016-06-23 Andi Kleen <ak@linux.intel.com>
4309
4310 * Make-lang.in: Add support for autofdo.
4311
1a4f11c8
DM
43122016-06-22 David Malcolm <dmalcolm@redhat.com>
4313
4314 PR c/70339
4315 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4316 (implicit_decl_warning): When issuing warnings for implicit
4317 declarations, attempt to provide a suggestion via
4318 lookup_name_fuzzy.
4319 (undeclared_variable): Likewise when issuing errors.
4320 (lookup_name_in_scope): Likewise.
4321 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4322 (best_macro_match): New typedef.
4323 (find_closest_macro_cpp_cb): New function.
4324 (lookup_name_fuzzy): New function.
4325 * c-parser.c: Include gcc-rich-location.h.
4326 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4327 (c_keyword_starts_typename): ...this new function.
4328 (c_parser_declaration_or_fndef): When issuing errors about
4329 missing "struct" etc, add a fixit. For other kinds of errors,
4330 attempt to provide a suggestion via lookup_name_fuzzy.
4331 (c_parser_parms_declarator): When looking ahead to detect typos in
4332 type names, also reject CPP_KEYWORD.
4333 (c_parser_parameter_declaration): When issuing errors about
4334 unknown type names, attempt to provide a suggestion via
4335 lookup_name_fuzzy.
4336 * c-tree.h (c_keyword_starts_typename): New prototype.
4337
5a578671
JM
43382016-06-20 Joseph Myers <joseph@codesourcery.com>
4339
4340 PR c/71601
4341 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4342 c_common_type returns error_mark_node.
4343
3f8257db 43442016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4345
4346 PR c/69507
4347 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4348 __alignof__ (expression).
4349
6a3f203c
DM
43502016-06-14 David Malcolm <dmalcolm@redhat.com>
4351
4352 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4353
264757fb
DM
43542016-06-14 David Malcolm <dmalcolm@redhat.com>
4355
4356 * c-typeck.c (build_component_ref): Simplify fixit code by
4357 using gcc_rich_location::add_fixit_misspelled_id.
4358 (set_init_label): Likewise.
4359
f7e4f2e3
DM
43602016-06-13 David Malcolm <dmalcolm@redhat.com>
4361
4362 * c-parser.c (c_parser_initelt): Provide location of name for new
4363 location_t param of set_init_label.
4364 * c-tree.h (set_init_label): Add location_t param.
4365 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4366 param and use it when issuing error messages about unrecognized
4367 field names. Attempt to provide a fixit hint if appropriate,
4368 otherwise update the error message to provide the type name.
4369
4b1ffdb1
TS
43702016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4371
4372 PR c/71381
4373 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4374 Loosen checking.
4375
44a845ca
MS
43762016-06-08 Martin Sebor <msebor@redhat.com>
4377 Jakub Jelinek <jakub@redhat.com>
4378
4379 PR c++/70507
4380 PR c/68120
4381 * c-typeck.c (convert_arguments): Don't promote last argument
4382 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4383
92a5f2ba
MP
43842016-06-08 Marek Polacek <polacek@redhat.com>
4385
4386 PR c/71418
4387 * c-decl.c (grokdeclarator): Check TYPE_P.
4388
08203f73
MP
4389 PR c/71426
4390 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4391 code.
4392
6ffd47b7
DM
43932016-06-07 David Malcolm <dmalcolm@redhat.com>
4394
4395 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4396 and structure element reference, capture the location of the
4397 element name token and pass it to build_component_ref.
4398 (c_parser_postfix_expression_after_primary): Likewise for
4399 structure element dereference.
4400 (c_parser_omp_variable_list): Likewise for
4401 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4402 * c-tree.h (build_component_ref): Add location_t param.
4403 * c-typeck.c (build_component_ref): Add location_t param
4404 COMPONENT_LOC. Use it, if available, when issuing hints about
4405 mispelled member names to provide a fixit replacement hint.
4406
1f40cff3
MP
44072016-06-06 Marek Polacek <polacek@redhat.com>
4408
4409 PR c/71362
4410 * c-parser.c (c_parser_direct_declarator): Set location.
4411
5545a907
MP
44122016-06-06 Marek Polacek <polacek@redhat.com>
4413
4414 * c-typeck.c (comptypes_internal): Handle comparisons of
4415 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4416 TYPE_REF_CAN_ALIAS_ALL.
4417
b605f663
CLT
44182016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4419
4420 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4421 arguments as addressable when async clause exists.
4422
00631022
JJ
44232016-05-30 Jakub Jelinek <jakub@redhat.com>
4424
4425 PR c++/71349
4426 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4427 when combined with target construct.
4428
7211a097
JJ
44292016-05-26 Jakub Jelinek <jakub@redhat.com>
4430
4431 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4432 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4433
95efe6b6
MP
44342016-05-25 Marek Polacek <polacek@redhat.com>
4435
4436 PR c/71265
4437 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4438
a23faf7a
MP
4439 PR c/71266
4440 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4441
e46c7770
CP
44422016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4443
4444 * c-parser.c (c_parser_oacc_declare): Add support for
4445 GOMP_MAP_FIRSTPRIVATE_POINTER.
4446 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4447 argument with enum c_omp_region_type ort.
4448 (handle_omp_array_sections): Likewise. Update call to
4449 handle_omp_array_sections_1.
4450 (c_finish_omp_clauses): Add specific errors and warning messages for
4451 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4452 call to handle_omp_array_sections.
4453
a04e69c0
TS
44542016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4455
4456 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4457
f17a223d
RB
44582016-05-24 Richard Biener <rguenther@suse.de>
4459
4460 PR middle-end/70434
4461 PR c/69504
4462 * c-typeck.c (build_array_ref): Do not complain about indexing
4463 non-lvalue vectors. Adjust for function name change.
4464
79063edd
MS
44652016-05-20 Martin Sebor <msebor@redhat.com>
4466
4467 PR c/71115
4468 * c-typeck.c (error_init): Use
4469 expansion_point_location_if_in_system_header.
4470 (warning_init): Same.
4471
8a40fef3
DM
44722016-05-19 David Malcolm <dmalcolm@redhat.com>
4473
4474 PR c/71171
4475 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4476 in error-handling.
4477 (c_parser_postfix_expression): Likewise.
4478 * c-tree.h (c_expr::set_error): New method.
4479 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4480 that result's range is initialized.
4481
e9892350
JG
44822016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4483
4484 * c-typeck.c (parser_build_unary_op): Fix formatting.
4485
8fad45f5
MW
44862016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4487
4488 * c-decl.c (grokdeclarator): Remove errmsg and use of
4489 targetm.invalid_return_type.
4490 (grokparms): Remove errmsg and use of
4491 targetm.invalid_parameter_type.
4492
aa4b467b
JM
44932016-05-13 Joseph Myers <joseph@codesourcery.com>
4494
4495 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4496 function return type.
4497
4f2e1536
MP
44982016-05-12 Marek Polacek <polacek@redhat.com>
4499
4500 PR c/70756
4501 * c-decl.c (build_compound_literal): Pass LOC down to
4502 c_incomplete_type_error.
4503 * c-tree.h (require_complete_type): Adjust declaration.
4504 (c_incomplete_type_error): Likewise.
4505 * c-typeck.c (require_complete_type): Add location parameter, pass it
4506 down to c_incomplete_type_error.
4507 (c_incomplete_type_error): Add location parameter, pass it down to
4508 error_at.
4509 (build_component_ref): Pass location down to c_incomplete_type_error.
4510 (default_conversion): Pass location down to require_complete_type.
4511 (build_array_ref): Likewise.
4512 (build_function_call_vec): Likewise.
4513 (convert_arguments): Likewise.
4514 (build_unary_op): Likewise.
4515 (build_c_cast): Likewise.
4516 (build_modify_expr): Likewise.
4517 (convert_for_assignment): Likewise.
4518 (c_finish_omp_clauses): Likewise.
4519
d6e83a8d
MM
45202016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4521
4522 PR c/43651
4523 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4524 is enabled.
4525 * c-errors.c (pedwarn_c90): Return true if warned.
4526 * c-tree.h (pedwarn_c90): Change return type to bool.
4527 (enum c_declspec_word): Add new enumerator cdw_atomic.
4528
5c3a10fb
MP
45292016-05-11 Marek Polacek <polacek@redhat.com>
4530
4531 PR c++/71024
4532 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4533 diagnose_mismatched_attributes and call it.
4534
cf68d92c
MP
45352016-05-10 Marek Polacek <polacek@redhat.com>
4536
4537 PR c/70255
4538 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4539 on a declaration following the definition.
4540
351f85c5
JJ
45412016-05-05 Jakub Jelinek <jakub@redhat.com>
4542
4543 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4544 parse it through to c_parser_c99_block_statement.
4545 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4546 caller.
4547
deef7113
MP
45482016-05-04 Marek Polacek <polacek@redhat.com>
4549
4550 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4551 OPT_Wdangling_else.
4552
de55efd5
MP
45532016-05-04 Marek Polacek <polacek@redhat.com>
4554
4555 PR c/48778
4556 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4557 for macro expansions.
4558
79ce98bc
MP
45592016-05-03 Marek Polacek <polacek@redhat.com>
4560
4561 PR c/70859
4562 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4563 check_builtin_function_arguments.
4564
fb2647aa
RB
45652016-05-03 Richard Biener <rguenther@suse.de>
4566
4567 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4568 the checksum from the previous stage.
4569
77886428
CP
45702016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4571
4572 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4573 c_finish_omp_clauses.
4574 (c_parser_omp_all_clauses): Likewise.
4575 (c_parser_oacc_cache): Likewise.
4576 (c_parser_oacc_loop): Likewise.
4577 (omp_split_clauses): Likewise.
4578 (c_parser_omp_declare_target): Likewise.
4579 (c_parser_cilk_all_clauses): Likewise.
4580 (c_parser_cilk_for): Likewise.
4581 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4582 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4583
7176a4a0
MP
45842016-05-02 Marek Polacek <polacek@redhat.com>
4585
4586 PR c/70851
4587 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4588 incomplete type.
4589
e7ff0319
CP
45902016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4591
4592 PR middle-end/70626
4593 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4594 OACC_LOOP_CLAUSE_MASK.
4595 (c_parser_oacc_kernels_parallel): Update call to
4596 c_oacc_split_loop_clauses.
4597
9f405ce1
AM
45982016-04-28 Andrew MacLeod <amacleod@redhat.com>
4599
4600 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4601 argument to build_modify_expr in two cases.
4602
c1e1f433
BS
46032016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4604
4605 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4606 warn_for_memset instead of warning directly here.
4607
2448a956
MP
46082016-04-26 Marek Polacek <polacek@redhat.com>
4609
4610 PR c/67784
4611 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4612 out of ...
4613 (c_parser_for_statement): ... here.
4614 (c_parser_if_statement): Use it.
4615 (c_parser_switch_statement): Use it.
4616 (c_parser_while_statement): Use it.
4617
b02a5e26
MP
4618 PR c/70791
4619 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4620
477d4906
IV
46212016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4622
4623 PR c++/69363
4624 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4625 instead of c_finish_cilk_clauses.
4626 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4627 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4628 floating-point variables in the linear clause for Cilk Plus.
4629
fe37c7af
MM
46302016-04-18 Michael Matz <matz@suse.de>
4631
4632 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4633 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4634
949505a9
MP
46352016-04-15 Marek Polacek <polacek@redhat.com>
4636
4637 PR c/70671
4638 * c-typeck.c (build_unary_op): Pass location down to error and
4639 warning call.
4640
dda1bf61
JJ
46412016-04-15 Jakub Jelinek <jakub@redhat.com>
4642
4643 PR c/70436
4644 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4645 where needed.
4646 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4647 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4648 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4649 Adjust c_parser_pragma callers.
4650 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4651 caller.
4652 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4653 c_parser_statement.
4654 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4655 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4656 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4657 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4658 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4659 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4660 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4661 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4662 down where needed.
4663 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4664 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4665 calls.
4666
99cd9857
MP
46672016-04-13 Marek Polacek <polacek@redhat.com>
4668
4669 PR c/70436
4670 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4671 adjust callers.
4672 (c_parser_statement): Likewise.
4673 (c_parser_c99_block_statement): Likewise.
4674 (c_parser_while_statement): Likewise.
4675 (c_parser_for_statement): Likewise.
4676 (c_parser_if_body): Don't set IF_P here.
4677 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4678 about dangling else here.
4679 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4680 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4681 warn about dangling else here.
4682
f13355da
MP
46832016-04-04 Marek Polacek <polacek@redhat.com>
4684
4685 PR c/70307
4686 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4687
5fde6a45
MP
46882016-03-31 Marek Polacek <polacek@redhat.com>
4689
4690 PR c/70297
4691 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4692
4bbf545b
DM
46932016-03-18 David Malcolm <dmalcolm@redhat.com>
4694
4695 PR c/70281
4696 * c-parser.c (c_parser_postfix_expression): Set the source range
4697 for uses of "__builtin_types_compatible_p".
4698
fcc2b74f
JJ
46992016-03-17 Jakub Jelinek <jakub@redhat.com>
4700
4701 PR c/70280
4702 * c-typeck.c (composite_type): Don't count void_list_node
4703 into len, if the list is terminated by void_list_node, start
4704 with void_list_node instead of NULL for newargs. Stop
4705 at void_list_node.
4706
ab4c578f
MP
47072016-03-16 Marek Polacek <polacek@redhat.com>
4708
4709 PR c/70093
4710 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4711 nested functions returning VM types.
4712
96b3c82d
CP
47132016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4714
4715 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4716 when calling c_finish_omp_clauses.
4717
29b9828f
BS
47182016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4719
4720 PR c/69824
4721 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4722 for later.
4723
7ff6ca38
MP
47242016-03-04 Marek Polacek <polacek@redhat.com>
4725
4726 PR c/69798
4727 * c-parser.c (c_parser_postfix_expression): Call
4728 c_parser_cast_expression rather than c_parser_postfix_expression.
4729
686e2237
JJ
47302016-03-01 Jakub Jelinek <jakub@redhat.com>
4731
4732 PR c/69796
4733 PR c/69974
4734 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4735 of incomplete decls to error_mark_node.
4736
0b05329b
MP
47372016-02-24 Marek Polacek <polacek@redhat.com>
4738
4739 PR c/69819
4740 * c-decl.c (finish_decl): Don't update the copy of the type of a
4741 different decl type.
4742
067fbd8b
JJ
47432016-02-23 Jakub Jelinek <jakub@redhat.com>
4744
4745 PR objc/69844
4746 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4747 in id_kind reclassification.
4748
bf14eba2
JJ
47492016-02-16 Jakub Jelinek <jakub@redhat.com>
4750
4751 PR c/69835
4752 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4753
ba539195
JN
47542016-02-16 James Norris <jnorris@codesourcery.com>
4755
4756 PR c/64748
4757 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4758
16595a1f
BS
47592016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4760
f48dfe98
BS
4761 * c-decl.c (build_null_declspecs): Zero the entire struct.
4762
16595a1f
BS
4763 PR c/69522
4764 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4765 callers changed. If nested_p is true, use it to call
4766 finish_implicit_inits.
4767 * c-tree.h (finish_implicit_inits): Declare.
4768 * c-typeck.c (finish_implicit_inits): New function. Move code
4769 from ...
4770 (push_init_level): ... here.
4771 (set_designator, process_init_element): Call finish_implicit_inits.
4772
66756373
JJ
47732016-02-11 Jakub Jelinek <jakub@redhat.com>
4774
4775 PR c/69768
4776 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4777 arguments for -Waddress warning.
4778
1066e9b5
JJ
47792016-02-04 Jakub Jelinek <jakub@redhat.com>
4780
4781 PR c/69669
4782 * c-decl.c (finish_enum): When honoring mode attribute,
4783 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4784
3a5d2ba4
JJ
47852016-01-29 Jakub Jelinek <jakub@redhat.com>
4786
4787 PR debug/69518
4788 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4789 all type variants, not just TYPE_MAIN_VARIANT.
4790
cbdd8ae0
JJ
47912016-01-27 Jakub Jelinek <jakub@redhat.com>
4792
4793 PR debug/66869
4794 * c-decl.c (c_write_global_declarations_1): Warn with
4795 warn_unused_function if static prototype without definition
4796 is not C_DECL_USED.
4797
fa74a4bc
MP
47982016-01-27 Marek Polacek <polacek@redhat.com>
4799
4800 PR c/68062
4801 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4802 to unsigned, if needed. Add -Wsign-compare warning.
4803
13f92e8d
JJ
48042016-01-26 Jakub Jelinek <jakub@redhat.com>
4805
4806 PR tree-optimization/69483
4807 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4808
cd8e73dc 48092016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4810
4811 PR c/24293
4812 * c-tree.h (incomplete_record_decls): Declare.
4813 * c-parser.c (incomplete_record_decls): Define.
4814 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4815 report error if any decl has zero size.
4816 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4817 or enum type to incomplete_record_decls.
4818
e6d6ec9e
TV
48192016-01-14 Tom de Vries <tom@codesourcery.com>
4820
4821 PR tree-optimization/68773
4822 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4823 set force_output.
4824
00083992
MP
48252016-01-14 Marek Polacek <polacek@redhat.com>
4826
4827 PR c/69262
4828 * c-decl.c (grokdeclarator): Provide more information for invalid
4829 array declarations.
4830
7443cf13
DM
48312016-01-06 David Malcolm <dmalcolm@redhat.com>
4832
4833 * c-parser.c (c_parser_unary_expression): For dereferences, build
4834 a combined location before calling build_indirect_ref, so that
4835 error reports cover the full range, manually updating the c_expr
4836 src_range.
4837
6b131d5b
MP
48382016-01-06 Marek Polacek <polacek@redhat.com>
4839
4840 PR sanitizer/69099
4841 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4842 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4843 NULL.
4844
818ab71a
JJ
48452016-01-04 Jakub Jelinek <jakub@redhat.com>
4846
4847 Update copyright years.
4848
2fe0a208
MP
48492016-01-04 Marek Polacek <polacek@redhat.com>
4850
4851 PR c/68908
4852 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4853 optimization to use __atomic_fetch_* built-in if possible.
4854
c7b48c8a
TS
48552015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4856
4857 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4858 into...
4859 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4860 all users.
4861
fda5652f
MP
48622015-12-22 Marek Polacek <polacek@redhat.com>
4863
4864 PR c/69002
4865 * c-typeck.c (build_component_ref): Warn when acessing elements of
4866 atomic structures or unions.
4867
745e411d
DM
48682015-12-21 David Malcolm <dmalcolm@redhat.com>
4869
4870 * c-typeck.c: Include "gcc-rich-location.h".
4871 (build_binary_op): In the two places that call binary_op_error,
4872 create a gcc_rich_location and populate it with the location of
4873 the binary op and its two operands.
4874
94c40e19
DM
48752015-12-16 David Malcolm <dmalcolm@redhat.com>
4876
4877 * c-parser.c (c_parser_statement_after_labels): When calling
4878 c_finish_return, Use the return expression's location if it has
4879 one, falling back to the location of the first token within it.
4880 * c-typeck.c (c_finish_return): When issuing warnings about
4881 the incorrect presence/absence of a return value, issue a note
4882 showing the declaration of the function.
4883
de67c4c3
DM
48842015-12-16 David Malcolm <dmalcolm@redhat.com>
4885
4886 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4887 to 4.
4888 (c_parser_peek_nth_token): New function.
4889 (c_parser_peek_conflict_marker): New function.
4890 (c_parser_error): Detect conflict markers and report them as such.
4891
a10704e1
DM
48922015-12-16 David Malcolm <dmalcolm@redhat.com>
4893
4894 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4895 to preserve range information for the primary expression
4896 in the call to c_parser_postfix_expression_after_primary.
4897
8062bca6
DM
48982015-12-16 David Malcolm <dmalcolm@redhat.com>
4899
4900 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4901 expression location, falling back on the first token location,
4902 rather than always using the latter.
4903
d06f8b75
MP
49042015-12-16 Marek Polacek <polacek@redhat.com>
4905
4906 PR c/64637
4907 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4908 available.
4909
2994fb91
MP
49102015-12-15 Marek Polacek <polacek@redhat.com>
4911
4912 PR c/68907
4913 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4914 artificial decl.
4915
a1b93f8d
DM
49162015-12-08 David Malcolm <dmalcolm@redhat.com>
4917
4918 * c-parser.c (c_parser_alignof_expression): Capture location of
4919 closing parenthesis (if any), or of end of unary expression, and
4920 use it to build a src_range for the expression.
4921
46c6e1e2
DM
49222015-12-08 David Malcolm <dmalcolm@redhat.com>
4923
4924 PR c/68757
4925 * c-parser.c (c_parser_get_builtin_args): Add
4926 "out_close_paren_loc" param, and write back to it.
4927 (c_parser_postfix_expression): Capture the closing
4928 parenthesis location for RID_CHOOSE_EXPR,
4929 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4930 RID_BUILTIN_SHUFFLE and use it to set the source range
4931 for such expressions; within RID_BUILTIN_COMPLEX set
4932 the underlying location.
4933
66189108
MP
49342015-12-07 Marek Polacek <polacek@redhat.com>
4935
4936 PR c/68668
4937 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4938 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4939
f187980b
EB
49402015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4941
4942 * c-tree.h (c_build_va_arg): Adjust prototype.
4943 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4944 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4945 parameter, adjust throughout and issue an error if EXPR is a component
4946 with reverse storage order.
4947
4250754e
JM
49482015-12-02 Jason Merrill <jason@redhat.com>
4949
4950 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4951 (c_fully_fold_internal, decl_constant_value_for_optimization):
4952 Move from c-common.c.
4953 * c-tree.h: Declare decl_constant_value_for_optimization.
4954 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4955
e9e32ee6
JM
49562015-12-02 Joseph Myers <joseph@codesourcery.com>
4957
4958 PR c/68162
4959 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4960 following link from declarator to next declarator. Track original
4961 qualified type and pass it to c_build_qualified_type.
4962 * c-typeck.c (c_build_qualified_type): Add arguments
4963 orig_qual_type and orig_qual_indirect.
4964
ff7a55bf
TS
49652015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4966
4967 * c-parser.c (c_parser_omp_clause_name)
4968 (c_parser_oacc_all_clauses): Alphabetical sorting.
4969
657e4e47
JJ
49702015-12-02 Jakub Jelinek <jakub@redhat.com>
4971
4972 PR c/68533
4973 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4974 for diagnostics.
4975
37d5ad46
JB
49762015-12-01 Julian Brown <julian@codesourcery.com>
4977 Cesar Philippidis <cesar@codesourcery.com>
4978 James Norris <James_Norris@mentor.com>
4979
4980 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4981 (c_parser_oacc_clause_use_device): New function.
4982 (c_parser_oacc_all_clauses): Add use_device support.
4983 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4984 (c_parser_oacc_host_data): New function.
4985 (c_parser_omp_construct): Add host_data support.
4986 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4987 * c-typeck.c (c_finish_oacc_host_data): New function.
4988 (c_finish_omp_clauses): Add use_device support.
4989
a4850ce9
JH
49902015-11-29 Jan Hubicka <hubicka@ucw.cz>
4991
4992 PR c/67106
4993 * c-decl.c: Set TYPE_PACKED in variants.
4994
b58d3df2
ML
49952015-11-27 Martin Liska <mliska@suse.cz>
4996
4997 PR c++/68312
4998 * c-array-notation.c (fix_builtin_array_notation_fn):
4999 Use release_vec_vec instead of vec::release.
5000 (build_array_notation_expr): Likewise.
5001 (fix_conditional_array_notations_1): Likewise.
5002 (fix_array_notation_expr): Likewise.
5003 (fix_array_notation_call_expr): Likewise.
5004
aec17bfe
JJ
50052015-11-27 Jakub Jelinek <jakub@redhat.com>
5006
5007 PR c/63326
5008 * c-parser.c (c_parser_compound_statement_nostart): If
5009 last_label is true, use pragma_stmt instead of pragma_compound
5010 as second c_parser_pragma argument.
5011 (c_parser_omp_ordered, c_parser_omp_target_update,
5012 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5013 false as second argument to c_parser_skip_to_pragma_eol after
5014 diagnosing standalone directives used in pragma_stmt context.
5015
688c4de0
IV
50162015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5017
5018 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5019 with "if (ENABLE_OFFLOADING)".
5020
cbd03aee
DM
50212015-11-23 David Malcolm <dmalcolm@redhat.com>
5022
5023 PR objc/68438
5024 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5025 for various Objective-C constructs: Class.name syntax,
5026 @selector(), @protocol(), @encode(), and [] message syntax.
5027
a87a86e1
DM
50282015-11-20 David Malcolm <dmalcolm@redhat.com>
5029
5030 PR 62314
5031 * c-typeck.c (should_suggest_deref_p): New function.
5032 (build_component_ref): Special-case POINTER_TYPE when
5033 generating a "not a structure of union" error message, and
5034 suggest a "->" rather than a ".", providing a fix-it hint.
5035
8ece8dfb
DM
50362015-11-19 David Malcolm <dmalcolm@redhat.com>
5037
5038 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5039 candidate into a new function, find_closest_identifier.
5040
433068cc
MP
50412015-11-19 Marek Polacek <polacek@redhat.com>
5042
5043 PR c/68412
5044 * c-typeck.c (parser_build_binary_op): Properly handle
5045 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5046
bef08b71
DM
50472015-11-17 David Malcolm <dmalcolm@redhat.com>
5048
5049 * c-parser.c (set_c_expr_source_range): Bulletproof both
5050 overloaded implementations against NULL expr->value.
5051 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5052 values.
5053 (c_parser_unary_expression): Likewise when handling addresses of
5054 labels.
5055 (c_parser_postfix_expression): Likewise for statement expressions,
5056 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5057 __builtin_va_arg, and for __builtin_offset_of.
5058 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5059 src_range using the range of the braced initializer.
5060 (c_parser_transaction_expression): Set src_range for "ret" to a
5061 sane pair of values.
5062
fff77217
KY
50632015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5064
5065 * c-parser.c (c_finish_omp_declare_simd): Look for
5066 "simd" attribute as well. Update error message.
5067
1d899da2
TS
50682015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5069
5070 * c-parser.c (c_parser_omp_declare_target): Adjust.
5071
e4606348
JJ
50722015-11-14 Jakub Jelinek <jakub@redhat.com>
5073
5074 * c-typeck.c (c_finish_omp_clauses): Don't mark
5075 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5076
3e636daf
MP
50772015-11-14 Marek Polacek <polacek@redhat.com>
5078
5079 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5080 * c-typeck.c: Likewise.
5081
ebedc9a3
DM
50822015-11-13 David Malcolm <dmalcolm@redhat.com>
5083
5084 * c-decl.c (warn_defaults_to): Pass line_table to
5085 rich_location ctor.
5086 * c-errors.c (pedwarn_c99): Likewise.
5087 (pedwarn_c90): Likewise.
5088 * c-parser.c (set_c_expr_source_range): New functions.
5089 (c_token::get_range): New method.
5090 (c_token::get_finish): New method.
5091 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5092 based on the range from the start of the LHS to the end of the
5093 RHS.
5094 (c_parser_conditional_expression): Likewise, based on the range
5095 from the start of the cond.value to the end of exp2.value.
5096 (c_parser_binary_expression): Call set_c_expr_source_range on
5097 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5098 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5099 based on the cast_loc through to the end of the expr.
5100 (c_parser_unary_expression): Likewise, based on the
5101 op_loc through to the end of op.
5102 (c_parser_sizeof_expression) Likewise, based on the start of the
5103 sizeof token through to either the closing paren or the end of
5104 expr.
5105 (c_parser_postfix_expression): Likewise, using the token range,
5106 or from the open paren through to the close paren for
5107 parenthesized expressions.
5108 (c_parser_postfix_expression_after_primary): Likewise, for
5109 various kinds of expression.
5110 * c-tree.h (struct c_expr): Add field "src_range".
5111 (c_expr::get_start): New method.
5112 (c_expr::get_finish): New method.
5113 (set_c_expr_source_range): New decls.
5114 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5115 on ret for prefix unary ops.
5116 (parser_build_binary_op): Likewise, running from the start of
5117 arg1.value through to the end of arg2.value.
5118
ec8b536f
MP
51192015-11-13 Marek Polacek <polacek@redhat.com>
5120
5121 PR c/68320
5122 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5123
277fe616
DM
51242015-11-13 David Malcolm <dmalcolm@redhat.com>
5125
5126 * c-typeck.c: Include spellcheck.h.
5127 (lookup_field_fuzzy_find_candidates): New function.
5128 (lookup_field_fuzzy): New function.
5129 (build_component_ref): If the field was not found, try using
5130 lookup_field_fuzzy and potentially offer a suggestion.
5131
6e232ba4
JN
51322015-11-12 James Norris <jnorris@codesourcery.com>
5133 Joseph Myers <joseph@codesourcery.com>
5134
5135 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5136 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5137 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5138 and PRAGMA_OMP_CLAUSE_LINK.
5139 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5140 and PRAGMA_OACC_CLAUSE_LINK.
5141 (OACC_DECLARE_CLAUSE_MASK): New definition.
5142 (c_parser_oacc_declare): New function.
5143
9be4f715
MP
51442015-11-12 Marek Polacek <polacek@redhat.com>
5145
5146 PR c/67784
5147 * c-parser.c (c_parser_for_statement): Reclassify the token in
5148 a correct scope.
5149
e78bede6
MP
51502015-11-11 Marek Polacek <polacek@redhat.com>
5151
5152 PR c/68107
5153 PR c++/68266
5154 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5155 checking the size of an array.
5156
69f293c9
AM
51572015-11-11 Andrew MacLeod <amacleod@redhat.com>
5158
5159 * c-array-notation.c: Remove unused header files.
5160 * c-aux-info.c: Likewise.
5161 * c-convert.c: Likewise.
5162 * c-decl.c: Likewise.
5163 * c-errors.c: Likewise.
5164 * c-lang.c: Likewise.
5165 * c-objc-common.c: Likewise.
5166 * c-parser.c: Likewise.
5167 * c-typeck.c: Likewise.
5168 * gccspec.c: Likewise.
5169
3a40d81d
NS
51702015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5171 Cesar Philippidis <cesar@codesourcery.com>
5172 James Norris <jnorris@codesourcery.com>
5173 Julian Brown <julian@codesourcery.com>
5174 Nathan Sidwell <nathan@codesourcery.com>
5175
3a40d81d
NS
5176 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5177 routine arg.
5178 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5179 (c_parser_pragma): Parse 'acc routine'.
5180 (OACC_ROUTINE_CLAUSE_MARK): Define.
5181 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5182
fc402eec
AA
51832015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5184
5185 PR debug/67192
5186 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5187 location of the backward-goto to the start of the loop body.
5188
f6b0b3db
AA
51892015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5190
5191 PR debug/67192
5192 * c-parser.c (c_parser_while_statement): Finish the loop before
5193 parsing ahead for misleading indentation.
5194 (c_parser_for_statement): Likewise.
5195
ee45a32d
EB
51962015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5197
5198 * c-decl.c (finish_struct): If the structure has reverse storage
5199 order, rewrite the type of array fields with scalar component. Call
5200 maybe_apply_pragma_scalar_storage_order on entry.
5201 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5202 errors on bit-fields and reverse SSO here and not...
5203 (c_mark_addressable): ...here.
5204 (output_init_element): Adjust call to initializer_constant_valid_p.
5205 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5206
8a645150
DM
52072015-11-06 David Malcolm <dmalcolm@redhat.com>
5208
5209 * c-decl.c (warn_defaults_to): Update for change in signature
5210 of diagnostic_set_info.
5211 * c-errors.c (pedwarn_c99): Likewise.
5212 (pedwarn_c90): Likewise.
5213 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5214 for textinfo::set_location.
5215
7a5e4956
CP
52162015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5217 Thomas Schwinge <thomas@codesourcery.com>
5218 James Norris <jnorris@codesourcery.com>
5219
5220 * c-parser.c (c_parser_omp_clause_name): Add support for
5221 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5222 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5223 default(none) in OpenACC.
5224 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5225 arguments.
5226 (c_parser_oacc_clause_tile): New function.
5227 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5228 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5229 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5230 TILE}.
5231 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5232 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5233 FIRSTPRIVATE}.
5234 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5235 (c_parser_oacc_update): Update the error message for missing clauses.
5236 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5237 and OMP_CLAUSE_INDEPENDENT.
5238
bfcfbfa0
MP
52392015-11-05 Marek Polacek <polacek@redhat.com>
5240
5241 PR c/68090
5242 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5243 deal with pre-evaluation on invalid types.
5244
e01d41e5
JJ
52452015-11-05 Jakub Jelinek <jakub@redhat.com>
5246 Ilya Verbin <ilya.verbin@intel.com>
5247
5248 * c-parser.c: Include context.h and gimple-expr.h.
5249 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5250 monotonic together with nonmonotonic.
5251 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5252 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5253 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5254 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5255 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5256 expressions on combined target teams before the target.
5257 (c_parser_omp_declare_target): If decl has "omp declare target" or
5258 "omp declare target link" attribute, and cgraph or varpool node already
5259 exists, then set corresponding flags. Call c_finish_omp_clauses
5260 in the parenthesized extended-list syntax case.
5261 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5262 declare target.
5263 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5264 on OMP_CLAUSE_REDUCTION array sections.
5265 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5266 into the constant offset, or for variable low-bound using
5267 POINTER_PLUS_EXPR. For structure element based array sections use
5268 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5269 (c_finish_omp_clauses): Drop generic_field_head, structure
5270 elements are now always mapped even as array section bases,
5271 diagnose same var in data sharing and mapping clauses. Diagnose if
5272 linear step on declare simd is neither a constant nor a uniform
5273 parameter. Look through POINTER_PLUS_EXPR for array section
5274 reductions. Diagnose the same var or function appearing multiple
5275 times on the same directive. Fix up wording for the to clause if t
5276 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5277 modifier on kinds other than dynamic or guided or nonmonotonic
5278 modifier together with ordered clause.
5279
4bf9e5a8
TS
52802015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5281 Chung-Lin Tang <cltang@codesourcery.com>
5282
5283 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5284
2adfab87
AM
52852015-10-29 Andrew MacLeod <amacleod@redhat.com>
5286
5287 * c-array-notation.c: Reorder #include's and remove duplicates.
5288 * c-aux-info.c: Likewise.
5289 * c-convert.c: Likewise.
5290 * c-decl.c: Likewise.
5291 * c-errors.c: Likewise.
5292 * c-lang.c: Likewise.
5293 * c-objc-common.c: Likewise.
5294 * c-parser.c: Likewise.
5295 * c-typeck.c: Likewise.
5296
e922069e
JW
52972015-10-26 Jim Wilson <jim.wilson@linaro.org>
5298
5299 PR debug/66068
5300 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5301 after calling build_qualified_type.
5302
765dd391
CP
53032015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5304 Thomas Schwinge <thomas@codesourcery.com>
5305 James Norris <jnorris@codesourcery.com>
5306 Joseph Myers <joseph@codesourcery.com>
5307 Julian Brown <julian@codesourcery.com>
5308 Bernd Schmidt <bschmidt@redhat.com>
5309
5310 * c-parser.c (c_parser_oacc_shape_clause): New.
5311 (c_parser_oacc_simple_clause): New.
5312 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5313 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5314
88bae6f4
TS
53152015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5316 James Norris <jnorris@codesourcery.com>
5317 Cesar Philippidis <cesar@codesourcery.com>
5318
5319 PR c/64765
5320 PR c/64880
5321 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5322 parameters, and handle these. Adjust all users.
5323 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5324 into...
5325 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5326 all users.
5327 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5328 declare functions.
5329 (c_finish_omp_construct): Declare function.
5330 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5331 Merge functions into...
5332 (c_finish_omp_construct): ... this new function.
5333
a8fc2579
RB
53342015-10-22 Richard Biener <rguenther@suse.de>
5335
5336 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5337 before folding a MINUS_EXPR.
5338
e9122ef6
MP
53392015-10-21 Marek Polacek <polacek@redhat.com>
5340
5341 PR c/68024
5342 * c-decl.c (start_function): Warn about vararg functions without
5343 a prototype.
5344
9f47c7e5
IE
53452015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5346
5347 * c-typeck.c (build_conditional_expr): Use boolean vector
5348 type for vector comparison.
5349 (build_vec_cmp): New.
5350 (build_binary_op): Use build_vec_cmp for comparison.
5351
fa60eeb9
MP
53522015-10-20 Marek Polacek <polacek@redhat.com>
5353
5354 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5355
2c7020eb
MP
53562015-10-20 Marek Polacek <polacek@redhat.com>
5357
5358 PR c/67964
5359 * c-parser.c (c_parser_attributes): Break out of the loop if the
5360 token after an attribute isn't a comma.
5361
d9a6bd32
JJ
53622015-10-13 Jakub Jelinek <jakub@redhat.com>
5363 Aldy Hernandez <aldyh@redhat.com>
5364
5365 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5366 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5367 (c_parser_omp_variable_list): Handle structure elements for
5368 map, to and from clauses. Handle array sections in reduction
5369 clause. Formatting fixes.
5370 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5371 if clause modifiers.
5372 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5373 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5374 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5375 c_parser_omp_clause_is_device_ptr): New functions.
5376 (c_parser_omp_clause_ordered): Parse optional parameter.
5377 (c_parser_omp_clause_reduction): Handle array reductions.
5378 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5379 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5380 functions.
5381 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5382 (c_parser_omp_clause_depend_sink): New function.
5383 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5384 (c_parser_omp_clause_map): Parse release/delete map kinds and
5385 optional always modifier.
5386 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5387 and c_finish_omp_clauses callers.
5388 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5389 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5390 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5391 (OMP_CRITICAL_CLAUSE_MASK): Define.
5392 (c_parser_omp_critical): Parse critical clauses.
5393 (c_parser_omp_for_loop): Handle doacross loops, adjust
5394 c_finish_omp_for and c_finish_omp_clauses callers.
5395 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5396 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5397 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5398 (c_parser_omp_for): Disallow ordered clause when combined with
5399 distribute. Disallow linear clause when combined with distribute
5400 and not combined with simd.
5401 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5402 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5403 parse clauses and if depend clause is found, don't parse a body.
5404 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5405 Allow target parallel without for after it.
5406 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5407 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5408 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5409 invalid kinds.
5410 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5411 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5412 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5413 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5414 functions.
5415 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5416 defaultmap and is_device_ptr clauses.
5417 (c_parser_omp_target): Parse target parallel and target simd. Set
5418 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5419 and target exit data. Diagnose invalid map kinds.
5420 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5421 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5422 construct.
5423 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5424 &omp_priv.
5425 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5426 (c_parser_omp_taskloop): New function.
5427 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5428 handle PRAGMA_OMP_TASKLOOP.
5429 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5430 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5431 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5432 Add IS_OMP argument, handle structure element bases, diagnose
5433 bitfields, pass IS_OMP recursively, diagnose known zero length
5434 array sections in depend clauses, handle array sections in reduction
5435 clause, diagnose negative length even for pointers.
5436 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5437 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5438 array sections in reduction clause, set
5439 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5440 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5441 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5442 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5443
21ba0cea
MP
54442015-10-06 Marek Polacek <polacek@redhat.com>
5445
5446 * c-parser.c (c_parser_statement_after_labels): Use
5447 protected_set_expr_location.
5448 (c_parser_omp_clause_num_gangs): Likewise.
5449 (c_parser_omp_clause_num_threads): Likewise.
5450 (c_parser_omp_clause_num_workers): Likewise.
5451 (c_parser_omp_clause_vector_length): Likewise.
5452 (c_parser_omp_clause_num_teams): Likewise.
5453 (c_parser_omp_clause_thread_limit): Likewise.
5454 * c-typeck.c (build_c_cast): Likewise.
5455 (c_cast_expr): Likewise.
5456
624d31fe
RS
54572015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5458
5459 * c-typeck.c (c_tree_equal): Use real_equal instead of
5460 REAL_VALUES_EQUAL.
5461
b8fd7909
JM
54622015-10-04 Jason Merrill <jason@redhat.com>
5463
5464 * c-parser.c (c_lex_one_token): Handle @synchronized.
5465 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5466 can change whether the function is transaction_safe.
5467
1c7485af
MP
54682015-10-02 Marek Polacek <polacek@redhat.com>
5469
5470 PR c/67730
5471 * c-typeck.c (convert_for_assignment): Use the expansion point
5472 location throughout.
5473
3e3b8d63
MP
54742015-10-02 Marek Polacek <polacek@redhat.com>
5475
5476 PR c/64249
5477 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5478 and pass it down to c_parser_if_statement.
5479 (c_parser_else_body): Add CHAIN parameter and pass it down to
5480 c_parser_statement_after_labels.
5481 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5482 duplicated if-else-if conditions.
5483
aabef2de
MP
54842015-10-01 Marek Polacek <polacek@redhat.com>
5485
5486 * c-typeck.c (convert_for_assignment): Improve commentary.
5487
de8ddd5f
MP
54882015-09-30 Marek Polacek <polacek@redhat.com>
5489
5490 PR c/67730
5491 * c-typeck.c (c_finish_return): Use the expansion point location for
5492 certain "return with value" warnings.
5493
c4914de6
MLI
54942015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5495
5496 * c-parser.c (pragma_lex): Add loc argument.
5497
0e36f5c7
MP
54982015-09-15 Marek Polacek <polacek@redhat.com>
5499
5500 PR c/67580
5501 * c-decl.c (tag_exists_p): New function.
5502 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5503 struct/union/enum keywords are missing.
5504 * c-tree.h (tag_exists_p): Declare.
5505
2f3bb934
MP
55062015-09-15 Marek Polacek <polacek@redhat.com>
5507
5508 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5509 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5510 Return NULL_TREE instead of 0.
5511 (lookup_name): Return NULL_TREE instead of 0.
5512 (lookup_name_in_scope): Likewise.
5513 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5514 (parser_xref_tag): Use false instead of 0.
5515 (start_struct): Use true instead of 1.
5516 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5517
aa256c4a
MP
55182015-09-14 Marek Polacek <polacek@redhat.com>
5519
5520 * c-typeck.c (set_nonincremental_init_from_string): Use
5521 HOST_WIDE_INT_M1U when shifting a negative value.
5522
dbb68221
MW
55232015-09-09 Mark Wielaard <mjw@redhat.com>
5524
5525 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5526 parm against NULL.
5527
a8a098ac
JJ
55282015-09-10 Jakub Jelinek <jakub@redhat.com>
5529
5530 PR c/67502
5531 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5532 into OMP_FOR_PRE_BODY rather than before the loop.
5533
f4b189d5
JJ
55342015-09-09 Jakub Jelinek <jakub@redhat.com>
5535
0bb99c11
JJ
5536 PR c/67501
5537 * c-parser.c (c_parser_oacc_all_clauses,
5538 c_parser_omp_all_clauses): Remove invalid clause from
5539 list of clauses even if parser->error is set.
5540
fce5e5e3
JJ
5541 PR c/67500
5542 * c-parser.c (c_parser_omp_clause_aligned,
5543 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5544 test for errors.
5545 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5546 error_mark_node.
5547
f4b189d5
JJ
5548 PR c/67495
5549 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5550 instead of c_parser_unary_expression. If the result is !lvalue_p,
5551 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5552
b2aaf235
MP
55532015-09-04 Marek Polacek <polacek@redhat.com>
5554
5555 PR sanitizer/67279
5556 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5557
1807ffc1
MS
55582015-09-03 Martin Sebor <msebor@redhat.com>
5559
5560 PR c/66516
8b652e65
JJ
5561 * c-typeck.c (convert_arguments, parser_build_unary_op,
5562 build_conditional_expr, c_cast_expr, convert_for_assignment,
5563 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5564 reject_gcc_builtin.
5565 (c_decl_implicit): Define.
5566
d04ff417
MP
55672015-09-02 Marek Polacek <polacek@redhat.com>
5568
5569 PR c/67432
5570 * c-parser.c (c_parser_enum_specifier): Give a better error for
5571 an empty enum.
5572
a79683d5
TS
55732015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5574
5575 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5576
191a6b94
MP
55772015-08-12 Marek Polacek <polacek@redhat.com>
5578
5579 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5580 LOC to it.
5581
420a9d9b
MP
55822015-08-03 Marek Polacek <polacek@redhat.com>
5583
5584 PR c/67088
5585 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5586 Use it.
5587 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5588
992118a1
PP
55892015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5590
5591 * c-parser.c (c_parser_if_body): Take token_indent_info
5592 argument. Call warn_for_misleading_indentation even when the
5593 body is a semicolon. Extract token_indent_infos corresponding
5594 to the guard, body and next tokens. Adjust call to
5595 warn_for_misleading_indentation accordingly.
5596 (c_parser_else_body): Likewise.
5597 (c_parser_if_statement): Likewise.
5598 (c_parser_while_statement): Likewise.
5599 (c_parser_for_statement): Likewise.
5600
46308474
LFSM
56012015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5602 Manuel López-Ibáñez <manu@gcc.gnu.org>
5603
5604 * c-decl.c (get_parm_info): Remove static var. Update warning
5605 message.
5606
05b28fd6
MP
56072015-07-27 Marek Polacek <polacek@redhat.com>
5608
5609 PR c++/66555
5610 PR c/54979
5611 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5612
451b5e48
MP
56132015-07-20 Marek Polacek <polacek@redhat.com>
5614
5615 PR c++/55095
5616 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5617 (build_binary_op): Warn about left shift overflows.
5618
1916bcb5
AM
56192015-07-09 Andrew MacLeod <amacleod@redhat.com>
5620
5621 * c-array-notation.c: Adjust includes for flags.h changes.
5622 * c-objc-common.c: Likewise.
5623
c7131fb2
AM
56242015-07-07 Andrew MacLeod <amacleod@redhat.com>
5625
5626 * c-array-notation.c: Adjust includes.
5627 * c-aux-info.c: Likewise.
5628 * c-convert.c: Likewise.
5629 * c-decl.c: Likewise.
5630 * c-errors.c: Likewise.
5631 * c-lang.c: Likewise.
5632 * c-objc-common.c: Likewise.
5633 * c-parser.c: Likewise.
5634 * c-typeck.c: Likewise.
5635
da2e71c9
MLI
56362015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5637
5638 PR fortran/66605
5639 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5640
b155cfd9
MP
56412015-06-29 Marek Polacek <polacek@redhat.com>
5642
5643 PR c/66322
5644 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5645 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5646 about -Wswitch-bool here.
5647 (do_case): Update c_add_case_label call.
5648 (c_finish_case): Update c_do_switch_warnings call.
5649
31521951
MP
56502015-06-27 Marek Polacek <polacek@redhat.com>
5651
5652 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5653
22d03525
MP
56542015-06-26 Marek Polacek <polacek@redhat.com>
5655
5656 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5657 INDIRECT_REF_P.
5658 * c-typeck.c (array_to_pointer_conversion): Likewise.
5659 (build_unary_op): Likewise.
5660 (c_finish_return): Likewise.
5661
f0889939
AM
56622015-06-25 Andrew MacLeod <amacleod@redhat.com>
5663
5664 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5665 * c-parser.c: Likewise.
5666
8d67ee55
RS
56672015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5668
5669 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5670 instead of pointer_hash.
5671 (detect_field_duplicates): Likewise.
5672
0ae9bd27
MP
56732015-06-25 Marek Polacek <polacek@redhat.com>
5674
5675 * c-array-notation.c: Use VAR_P throughout.
5676 * c-decl.c: Likewise.
5677 * c-objc-common.c: Likewise.
5678 * c-parser.c: Likewise.
5679 * c-typeck.c: Likewise.
5680
62f9079a
MP
56812015-06-25 Marek Polacek <polacek@redhat.com>
5682
5683 * c-decl.c: Use is_global_var throughout.
5684 * c-parser.c: Likewise.
5685 * c-typeck.c: Likewise.
5686
abb226c9
AM
56872015-06-17 Andrew MacLeod <amacleod@redhat.com>
5688
5689 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5690 * c-aux-info.c: Likewise.
5691 * c-convert.c: Likewise.
5692 * c-decl.c: Likewise.
5693 * c-errors.c: Likewise.
5694 * c-lang.c: Likewise.
5695 * c-objc-common.c: Likewise.
5696 * c-parser.c: Likewise.
5697 * c-typeck.c: Likewise.
5698
8cbababc
JH
56992015-06-11 Jan Hubicka <hubicka@ucw.cz>
5700
5701 PR middle-end/66325
5702 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5703 variants.
5704
a0349665
PMR
57052015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5706
5707 * c-decl.c (pop_scope): Register the main translation unit
5708 through the new debug hook.
5709
13fdf2e2
AM
57102015-06-08 Andrew MacLeod <amacleod@redhat.com>
5711
5712 * c-array-notation.c : Adjust include files.
5713 * c-aux-info.c : Likewise.
5714 * c-convert.c : Likewise.
5715 * c-decl.c : Likewise.
5716 * c-errors.c : Likewise.
5717 * c-lang.c : Likewise.
5718 * c-lang.h : Likewise.
5719 * c-objc-common.c : Likewise.
5720 * c-parser.c : Likewise.
5721 * c-typeck.c : Likewise.
5722
d7438551
AH
57232015-06-05 Aldy Hernandez <aldyh@redhat.com>
5724
5725 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5726 immediately clobber it.
5727 (c_write_global_declarations_1): Remove call to
5728 check_global_declaration_1.
5729 (c_write_global_declarations_2): Remove.
5730 (c_write_final_cleanups): Rename from c_write_global_declarations.
5731 Remove call to finalize_compilation_unit.
5732 Remove calls to debugging hooks.
5733 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5734 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5735 * c-tree.h: Remove c_write_global_declarations.
5736
ecb9f223
AM
57372015-06-04 Andrew MacLeod <amacleod@redhat.com>
5738
5739 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5740 * c-aux-info.c: Likewise.
5741 * c-convert.c: Likewise.
5742 * c-decl.c: Likewise.
5743 * c-errors.c: Likewise.
5744 * c-lang.c: Likewise.
5745 * c-objc-common.c: Likewise.
5746 * c-parser.c: Likewise.
5747 * c-typeck.c: Likewise.
5748
9482b620
MP
57492015-06-04 Marek Polacek <polacek@redhat.com>
5750
5751 PR c/66341
5752 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5753 it is a lvalue.
5754
bc51ace3
PK
57552015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5756
5757 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5758 Warn for empty struct.
5759 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5760
ea5b45b6
AT
57612015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5762
5763 * c-decl.c (start_function): Call plugin before parsing.
5764 (finish_function): Call plugin after parsing.
5765
c2d47482
PK
57662015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5767
5768 PR c/49551
5769 * c-decl.c (merge_decls): Merge DECL_COMMON.
5770
a95492ab
JW
57712015-05-22 Jim Wilson <jim.wilson@linaro.org>
5772
5773 * Make-lang.in (check_gcc_pallelize): Define.
5774
fd5c817a
MP
57752015-05-22 Marek Polacek <polacek@redhat.com>
5776
5777 PR c/47043
5778 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5779 attributes.
5780
c7b70a3c
MP
57812015-05-21 Marek Polacek <polacek@redhat.com>
5782
5783 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5784 DECL_BUILT_IN.
5785
21b634ae
MP
57862015-05-20 Marek Polacek <polacek@redhat.com>
5787
5788 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5789 * c-typeck.c: Likewise.
5790
296a8c2f
MP
57912015-05-19 Marek Polacek <polacek@redhat.com>
5792
5793 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5794
41b37d5e
JJ
57952015-05-19 Jakub Jelinek <jakub@redhat.com>
5796
5797 PR middle-end/66199
5798 * c-parser.c (c_parser_omp_for_loop): Don't add
5799 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5800 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5801 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5802 constructs.
5803
fab27f52
MM
58042015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5805
5806 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5807 swaps.
fab27f52 5808
40de31cf
MLI
58092015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5810
5811 PR fortran/44054
5812 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5813 accessor function.
5814
3aa3c9fc
MP
58152015-05-14 Marek Polacek <polacek@redhat.com>
5816
5817 PR c/66066
5818 PR c/66127
5819 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5820 rather than with 0.
5821
c3388e62
DM
58222015-05-12 David Malcolm <dmalcolm@redhat.com>
5823
5824 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5825 to add a call to warn_for_misleading_indentation.
5826 (c_parser_else_body): Likewise, adding param "else_loc".
5827 (c_parser_if_statement): Check for misleading indentation.
5828 (c_parser_while_statement): Likewise.
5829 (c_parser_for_statement): Likewise.
5830
755e528f
MP
58312015-05-08 Marek Polacek <polacek@redhat.com>
5832
5833 PR c/64918
5834 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5835 (output_init_element): Likewise.
5836
0173bd2a
MP
58372015-05-07 Marek Polacek <polacek@redhat.com>
5838
5839 PR c/65179
5840 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5841 value.
5842
9babc352
MP
58432015-04-30 Marek Polacek <polacek@redhat.com>
5844
5845 * c-typeck.c (set_init_label): Call error_at instead of error and
5846 pass LOC to it.
5847
ac9f18db
MP
5848 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5849 the type of a decl.
5850
ec3fba51
MP
5851 * c-typeck.c (c_build_va_arg): Clarify the error message.
5852
b811915d
TS
58532015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5854
5855 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5856 OMP_STANDALONE_CLAUSES.
5857
f3075008
MP
58582015-04-28 Marek Polacek <polacek@redhat.com>
5859
5860 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5861
4e81b788
MP
58622015-04-28 Marek Polacek <polacek@redhat.com>
5863
5864 PR c/65901
5865 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5866
6c1db78e
MP
58672015-04-25 Marek Polacek <polacek@redhat.com>
5868
5869 PR c/52085
5870 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5871 attribute.
5872
5c4abbb8
MP
58732015-04-23 Marek Polacek <polacek@redhat.com>
5874
5875 PR c/65345
5876 * c-decl.c (set_labels_context_r): New function.
5877 (store_parm_decls): Call it via walk_tree_without_duplicates.
5878 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5879 instead of create_tmp_var. Build TARGET_EXPR instead of
5880 COMPOUND_EXPR.
5881 (build_atomic_assign): Use create_tmp_var_raw instead of
5882 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5883
06aca1d5
IV
58842015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5885
5886 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5887 (c_parser_omp_target_update): Add missed %> to error_at ().
5888
8fba1830
BRF
58892015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5890
5891 PR target/55143
5892 * c-decl.c (c_default_pointer_mode): Remove definition.
5893 * c-tree.h (c_default_pointer_mode): Remove declaration.
5894
62021f64
TB
58952015-03-27 Tobias Burnus <burnus@net-b.de>
5896
5897 PR c/65586
5898 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5899 error out.
5900 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5901 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5902 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5903
9b65e171
JJ
59042015-03-19 Jakub Jelinek <jakub@redhat.com>
5905
5906 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5907 attribute for DECL_EXTERNAL VAR_DECLs.
5908
17958621
JJ
59092015-03-11 Jakub Jelinek <jakub@redhat.com>
5910
5911 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5912 argument.
5913
7ccb1a11
JJ
59142015-03-10 Jakub Jelinek <jakub@redhat.com>
5915
5916 PR c/65120
5917 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5918 before preparing arguments to warn_logical_not_parentheses.
5919
01177669
JJ
59202015-03-09 Jakub Jelinek <jakub@redhat.com>
5921
5922 PR c/65120
5923 * c-typeck.c (parser_build_binary_op): Don't warn for
5924 !!x == y or !b == y where b is _Bool.
5925
802ac282
MP
59262015-03-09 Marek Polacek <polacek@redhat.com>
5927
5928 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5929 * c-decl.c (grokdeclarator): Likewise.
5930 * c-typeck.c (build_binary_op): Likewise.
5931
e5165b60
MP
59322015-02-27 Marek Polacek <polacek@redhat.com>
5933
5934 PR c/65228
5935 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5936
065d214c
MP
59372015-02-14 Marek Polacek <polacek@redhat.com>
5938
5939 PR c/64768
5940 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5941 declared through a typedef name.
5942
e5d9235b
MP
59432015-02-13 Marek Polacek <polacek@redhat.com>
5944
5945 PR c/65050
5946 * c-decl.c (grokdeclarator): Print also the type when giving
5947 the error message about array's incomplete element type.
5948
fa01ffcc
JJ
59492015-02-11 Jakub Jelinek <jakub@redhat.com>
5950
5951 PR c/64824
5952 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5953 check in the POP macro.
5954
c3e38a03
MP
59552015-02-09 Marek Polacek <polacek@redhat.com>
5956
5957 PR c/64856
5958 * c-typeck.c (process_init_element): Don't always wrap
5959 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5960 initializing a range of elements.
5961
4886ec8e
JJ
59622015-02-04 Jakub Jelinek <jakub@redhat.com>
5963
5964 PR c/64824
5965 PR c/64868
5966 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5967
c3e38a03 59682015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5969
5970 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5971 processing enum declaration.
5972
7b33f0c8
MP
59732015-01-29 Marek Polacek <polacek@redhat.com>
5974
5975 PR c/64709
5976 * c-typeck.c (pop_init_level): If constructor_elements has
5977 exactly one element with integer_zerop value, set constructor_zeroinit
5978 to 1. Remove braces around warning_init call.
5979
dea63e49
JJ
59802015-01-27 Jakub Jelinek <jakub@redhat.com>
5981
5982 PR c/64766
5983 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5984 of FUNCTION_DECLs with error_mark_node.
5985
d38f7dce
JJ
59862015-01-26 Jakub Jelinek <jakub@redhat.com>
5987
5988 PR c/64778
5989 * c-typeck.c (convert_arguments): Return -1 if there are
5990 error_args, even if we've diagnosed too many arguments.
5991
cbf5d0e7
RB
59922015-01-21 Richard Biener <rguenther@suse.de>
5993
5994 PR middle-end/64313
5995 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5996 for builtins the user declared correctly.
5997
41dbbb37
TS
59982015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5999 Bernd Schmidt <bernds@codesourcery.com>
6000 Cesar Philippidis <cesar@codesourcery.com>
6001 James Norris <jnorris@codesourcery.com>
6002 Jakub Jelinek <jakub@redhat.com>
6003 Ilmir Usmanov <i.usmanov@samsung.com>
6004
6005 * c-parser.c: Include "gomp-constants.h".
6006 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6007 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6008 Use OMP_CLAUSE_SET_MAP_KIND.
6009 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6010 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6011 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6012 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6013 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6014 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6015 "copyout", "create", "delete", "deviceptr", "gang", "host",
6016 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6017 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6018 "present_or_create", "pcreate", "seq", "self", "vector",
6019 "vector_length", "wait", "worker".
6020 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6021 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6022 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6023 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6024 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6025 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6026 (c_parser_oacc_data_clause_deviceptr)
6027 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6028 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6029 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6030 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6031 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6032 (c_parser_oacc_parallel, c_parser_oacc_update)
6033 (c_parser_oacc_wait): New functions.
6034 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6035 (c_finish_oacc_data): New prototypes.
6036 * c-typeck.c: Include "gomp-constants.h".
6037 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6038 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6039 OMP_CLAUSE_SET_MAP_KIND.
6040 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6041 (c_finish_oacc_data): New functions.
6042 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6043 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6044 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6045 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6046 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6047 GOMP_MAP_FORCE_DEVICEPTR.
6048
adfac8df
JJ
60492015-01-09 Michael Collison <michael.collison@linaro.org>
6050
6051 * c-array-notation.c: Include hash-set.h, machmode.h,
6052 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6053 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6054 * c-aux-info.c: Ditto.
6055 * c-convert.c: Ditto.
6056 * c-decl.c: Ditto.
6057 * c-errors.c: Ditto.
6058 * c-lang.c: Dittoxs.
6059 * c-objc-common.c: Ditto.
6060 * c-parser.c: Ditto.
6061 * c-typeck.c: Include hash-set.h, machmode.h,
6062 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6063 fold-const.h, wide-int.h, inchash.h, real.h and
6064 fixed-value.h due to flattening of tree.h.
6065
2cc901dc
MP
60662015-01-07 Marek Polacek <polacek@redhat.com>
6067
6068 PR c/64417
6069 * c-typeck.c (process_init_element): Disallow initialization of
6070 a flexible array member with a string constant if the structure
6071 is in an array.
6072
5624e564
JJ
60732015-01-05 Jakub Jelinek <jakub@redhat.com>
6074
e5341100
JJ
6075 PR sanitizer/64344
6076 * c-typeck.c (convert_for_assignment, c_finish_return): For
6077 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6078 types also set in_late_binary_op around convert call.
6079 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6080 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6081 result on expr as last argument to ubsan_instrument_float_cast,
6082 if in_late_binary_op, don't use c_save_expr but save_expr.
6083
5624e564
JJ
6084 Update copyright years.
6085
5bd012f8
MP
60862015-01-05 Marek Polacek <polacek@redhat.com>
6087
6088 PR c/64423
6089 * c-typeck.c (build_array_ref): Pass loc down to
6090 warn_array_subscript_with_type_char.
6091
3f8257db 60922014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6093
6094 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6095 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6096 element type.
8e745a17 6097 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6098 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6099 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6100 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6101 to PEDWARN_FOR_QUALIFIERS.
768952be 6102
8f94a8c4
JJ
61032014-12-17 Jakub Jelinek <jakub@redhat.com>
6104
6105 PR sanitizer/64289
6106 * c-convert.c: Include ubsan.h.
6107 (convert): For real -> integral casts and
6108 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6109 instead instrument the float cast directly.
6110
b731b390
JJ
61112014-11-29 Jakub Jelinek <jakub@redhat.com>
6112
6113 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6114 c_finish_stmt_expr): Remove NULL last argument from
6115 create_tmp_var_raw and create_tmp_var calls.
6116 * c-array-notation.c (fix_builtin_array_notation_fn,
6117 build_array_notation_expr, fix_conditional_array_notations_1,
6118 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6119
541e35a6
MP
61202014-11-28 Marek Polacek <polacek@redhat.com>
6121
6122 PR c/63862
6123 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6124 convert the right operand to integer type.
6125
b286be94
MP
61262014-11-25 Marek Polacek <polacek@redhat.com>
6127
6128 PR c/63877
6129 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6130 for inline functions.
6131
aa7da51a
JJ
61322014-11-21 Jakub Jelinek <jakub@redhat.com>
6133
6134 PR target/63764
6135 * c-typeck.c (build_array_ref): Adjust
6136 convert_vector_to_pointer_for_subscript caller. If it returns true,
6137 call non_lvalue_loc on the result.
6138
d876207f
RB
61392014-11-11 Richard Biener <rguenther@suse.de>
6140
6141 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6142 to true.
6143
e5e44252
AK
61442014-11-10 Andi Kleen <ak@linux.intel.com>
6145
6146 PR c/60804
6147 * c-parser.c (c_parser_statement_after_labels): Call
6148 check_no_cilk.
6149 (c_parser_if_statement): Dito.
6150 (c_parser_switch_statement): Dito.
6151 (c_parser_while_statement): Dito.
6152 (c_parser_do_statement): Dito.
6153 (c_parser_for_statement): Dito.
6154 * c-typeck.c (c_finish_loop): Dito.
6155
13c21655
PC
61562014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6157
6158 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6159 OPT_Wshift_count_overflow in the warnings.
6160
2d51fcef
MP
61612014-10-30 Marek Polacek <polacek@redhat.com>
6162
6163 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6164 print the stripped version as well, if they're not the same.
6165
ef4bddc2
RS
61662014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6167
6168 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6169 machine_mode.
6170
c582198b
AM
61712014-10-28 Andrew MacLeod <amacleod@redhat.com>
6172
6173 * c-decl.c: Adjust include files.
6174 * c-parser.c: Ditto.
6175
ddc8de03
PM
61762014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6177 Tom Tromey <tromey@redhat.com>
6178
6179 * c-tree.h (enum c_oracle_request): New.
6180 (c_binding_oracle_function): New typedef.
6181 (c_binding_oracle, c_pushtag, c_bind): Declare.
6182 * c-decl.c (c_binding_oracle): New global.
6183 (I_SYMBOL_CHECKED): New macro.
6184 (i_symbol_binding): New function.
6185 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6186 (I_TAG_CHECKED): New macro.
6187 (i_tag_binding): New function.
6188 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6189 (I_LABEL_CHECKED): New macro.
6190 (i_label_binding): New function.
6191 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6192 (c_print_identifier): Save and restore c_binding_oracle.
6193 (c_pushtag, c_bind): New functions.
6194
60393bbc
AM
61952014-10-27 Andrew MacLeod <amacleod@redhat.com>
6196
6197 * c-typeck.c: Adjust include files.
6198
d723bb7c
MLI
61992014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6200
6201 PR c++/53061
6202 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6203 initialization here...
6204 (c_initialize_diagnostics): ... but here. Set defaults after
6205 building pretty-printer.
6206
1bc5a451
MP
62072014-10-23 Marek Polacek <polacek@redhat.com>
6208
6209 PR c/63626
6210 * c-decl.c (pop_scope): Don't print warning in external_scope.
6211
4435bb92
MP
62122014-10-19 Marek Polacek <polacek@redhat.com>
6213
6214 PR c/63567
6215 * c-typeck.c (output_init_element): Allow initializing objects with
6216 static storage duration with compound literals even in C99 and add
6217 pedwarn for it.
6218
7278465e
MP
62192014-10-17 Marek Polacek <polacek@redhat.com>
6220
6221 PR c/63567
6222 * c-typeck.c (digest_init): Allow initializing objects with static
6223 storage duration with compound literals even in C99 and add pedwarn
6224 for it.
6225
d9b7be2e
MP
62262014-10-17 Marek Polacek <polacek@redhat.com>
6227
6228 PR c/63543
6229 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6230 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6231 error multiple times. Print the type.
6232
f406ae1f
MP
62332014-10-17 Marek Polacek <polacek@redhat.com>
6234
6235 PR c/63549
6236 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6237 type.
6238
92574c7c
MP
62392014-10-17 Marek Polacek <polacek@redhat.com>
6240
6241 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6242 (start_function): Use OPT_Wimplicit_int instead of 0.
6243 (store_parm_decls_oldstyle): Likewise.
6244
1bc4a978
MT
62452014-10-17 Alan Modra <amodra@gmail.com>
6246
6247 PR middle-end/61848
6248 * c-decl.c (merge_decls): Don't merge section name or tls model
6249 to newdecl symtab node, instead merge to olddecl. Override
6250 existing olddecl section name. Set tls_model for all thread-local
6251 vars, not just OMP thread-private ones. Remove incorrect comment.
6252
83685514
AM
62532014-10-16 Andrew MacLeod <amacleod@redhat.com>
6254
6255 * c-decl.c: Adjust include files.
6256
78a7c317
DD
62572014-10-14 DJ Delorie <dj@redhat.com>
6258
6259 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6260 (c_token_starts_typename): Check all __intN, not just __int128.
6261 (c_token_starts_declspecs): Likewise.
6262 (c_parser_declspecs): Likewise.
6263 (c_parser_attribute_any_word): Likewise.
6264 (c_parser_objc_selector): Likewise.
6265 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6266 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6267 is specified.
6268 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6269 __int128.
6270 (finish_declspecs): Likewise.
6271
74d98c1e
AB
62722014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6273
8e745a17 6274 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6275 the duplicate code.
8e745a17 6276 (c_parser_statement): Call the new function.
74d98c1e 6277
84937de2
MP
62782014-10-09 Marek Polacek <polacek@redhat.com>
6279
6280 PR c/63480
6281 * c-typeck.c (pop_init_level): Don't warn about initializing
6282 with { }.
6283
0382aaa0
MP
62842014-10-07 Marek Polacek <polacek@redhat.com>
6285
6286 PR c/59717
6287 * c-decl.c (header_for_builtin_fn): New function.
6288 (implicitly_declare): Suggest which header to include.
6289
7a0ca710
MP
62902014-10-07 Marek Polacek <polacek@redhat.com>
6291
6292 * c-convert.c (convert): Use error_operand_p.
6293 * c-typeck.c (require_complete_type): Likewise.
6294 (really_atomic_lvalue): Likewise.
6295 (digest_init): Likewise.
6296 (handle_omp_array_sections_1): Likewise.
6297
6bc8a126
MP
62982014-10-03 Marek Polacek <polacek@redhat.com>
6299
6300 PR c/63453
6301 * c-decl.c (pop_scope): Don't warn about "inline function declared
6302 but never defined" for functions marked with gnu_inline attribute.
6303
d90c0a59
JJ
63042014-09-25 Jakub Jelinek <jakub@redhat.com>
6305
6306 PR c++/63249
6307 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6308 on low_bound and length.
6309
083e891e
MP
63102014-09-24 Marek Polacek <polacek@redhat.com>
6311
6312 PR c/61405
6313 PR c/53874
6314 * c-parser.c: Don't define CPP_KEYWORD.
6315 (c_parser_switch_statement): Pass original type to c_finish_case.
6316 * c-tree.h (c_finish_case): Update declaration.
6317 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6318 conditionally to c_do_switch_warnings.
6319
8d95fe25
MP
63202014-09-03 Marek Polacek <polacek@redhat.com>
6321
6322 PR c/62024
6323 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6324 conversions.
6325
9a771876
JJ
63262014-09-02 Jakub Jelinek <jakub@redhat.com>
6327 Balaji V. Iyer <balaji.v.iyer@intel.com>
6328 Igor Zamyatin <igor.zamyatin@intel.com>
6329
6330 * c-parser.c (c_parser_cilk_for): New function.
6331 (c_parser_cilk_grainsize): Likewise.
6332 (c_get_temp_regvar): Likewise.
6333 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6334 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6335 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6336 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6337 case.
6338
b7679d96
CG
63392014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6340
6341 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6342 with using HOST_WIDE_INT without truncation to 'int'
6343
59ea0364
MP
63442014-08-22 Marek Polacek <polacek@redhat.com>
6345
6346 PR c++/62199
6347 * c-typeck.c (parser_build_binary_op): Adjust call to
6348 warn_logical_not_parentheses.
6349
671a475e
IZ
63502014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6351
6352 PR other/62008
6353 * c-parser.c (c_parser_array_notation): Check for correct
6354 type of an array added.
6355
04159acf
MP
63562014-08-19 Marek Polacek <polacek@redhat.com>
6357
6358 PR c++/62153
6359 * c-typeck.c (build_binary_op): If either operand of a comparison
6360 is a boolean expression, call maybe_warn_bool_compare.
6361
c77935ee
PP
63622014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6363
6364 PR c/45584
6365 * c-typeck.c (build_c_cast): Do a conversion even when the
6366 TYPE_MAIN_VARIANTs are the same.
6367
35aff4fb
MP
63682014-08-19 Marek Polacek <polacek@redhat.com>
6369
6370 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6371 pedwarn_c99 instead of pedwarn.
6372 (grokfield): Likewise.
6373 (warn_defaults_to): New function.
6374 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6375 Unconditionally call pedwarn_c99 instead of pedwarn.
6376 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6377 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6378 check flag_isoc11 before.
6379 * c-errors.c (pedwarn_c99): Change the return type to bool.
6380 Handle -Wc99-c11-compat.
6381 * c-parser.c (disable_extension_diagnostics): Handle
6382 warn_c99_c11_compat.
6383 (restore_extension_diagnostics): Likewise.
6384 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6385 instead of pedwarn, don't check flag_isoc11 before.
6386 (c_parser_declspecs): Likewise.
6387 (c_parser_alignas_specifier): Likewise.
6388 (c_parser_alignof_expression): Likewise.
6389 (c_parser_generic_selection): Likewise.
6390 * c-tree.h (pedwarn_c99): Update declaration.
6391 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6392 of pedwarn_c99.
6393
177cce46
MP
63942014-08-19 Marek Polacek <polacek@redhat.com>
6395
6396 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6397 to pedwarn_c90.
6398 * c-errors.c: Include "opts.h".
6399 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6400 * c-parser.c (disable_extension_diagnostics): Handle negative value
6401 of warn_c90_c99_compat, too.
6402 (restore_extension_diagnostics): Likewise.
6403 (c_parser_compound_statement_nostart): Pass
6404 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6405
6dc99c33
MP
64062014-08-12 Marek Polacek <polacek@redhat.com>
6407
6408 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6409 Add pedwarn.
6410 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6411 Likewise.
6412 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6413
3f8257db 64142014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6415
6416 PR c/51849
6417 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6418 Call pedwarn_c90 instead of pedwarn.
6419 (check_bitfield_type_and_width): Likewise.
6420 (declspecs_add_qual): Likewise.
6421 (declspecs_add_type): Likewise.
6422 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6423 Adjust to only call pedwarn_c90.
6424 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6425 pedwarn_c90 instead of pedwarn.
6426 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6427 * c-parser.c (disable_extension_diagnostics): Handle
6428 warn_c90_c99_compat.
6429 (restore_extension_diagnostics): Likewise.
6430 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6431 pedwarn_c90 instead of pedwarn.
6432 (c_parser_initelt): Likewise.
6433 (c_parser_postfix_expression): Likewise.
6434 (c_parser_postfix_expression_after_paren_type): Likewise.
6435 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6436 * c-tree.h: Fix formatting.
6437 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6438 pedwarn_c90 instead of pedwarn.
6439
9f25a338
TS
64402014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6441
6442 * c-typeck.c: Remove include of pointer-set.h.
6443
044331a8
MP
64442014-08-07 Marek Polacek <polacek@redhat.com>
6445
6446 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6447
b787e7a2
TS
64482014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6449
6450 * c-typeck.c: Use hash_map instead of pointer_map.
6451
6e2830c3
TS
64522014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6453
6454 * c-decl.c: Use hash_set instead of pointer_set.
6455
a7ee52fb
IZ
64562014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6457
6458 PR middle-end/61455
6459 * c-array-notation.c (expand_array_notations): Handling
6460 of DECL_EXPR added.
6461
b4dfdc11
MG
64622014-07-31 Marc Glisse <marc.glisse@inria.fr>
6463
6464 PR c++/60517
6465 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6466 a local variable.
6467
976d5a22
TT
64682014-07-30 Tom Tromey <tromey@redhat.com>
6469
6470 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6471 field.
6472 (really_start_incremental_init, push_init_level): Initialize
6473 designator_depth.
6474 (pop_init_level): Set global designator_depth.
6475 (process_init_element): Check for designated_init attribute.
6476
30281de2
MP
64772014-07-20 Marek Polacek <polacek@redhat.com>
6478
6479 PR c/61852
6480 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6481 (implicitly_declare): Pass location to implicit_decl_warning.
6482
b108f48f
JJ
64832014-07-14 Jakub Jelinek <jakub@redhat.com>
6484
6485 PR middle-end/61294
6486 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6487 If non-NULL, call c_parser_check_literal_zero.
6488 (c_parser_check_literal_zero): New function.
6489 (c_parser_postfix_expression_after_primary): Adjust
6490 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6491
773ec47f
MP
64922014-07-06 Marek Polacek <polacek@redhat.com>
6493
6494 PR c/6940
6495 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6496 * c-tree.h (C_ARRAY_PARAMETER): Define.
6497 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6498 function parameter.
6499
22e1cf1c 65002014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6501 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6502
6503 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6504 releasing symbol.
6505
52ec0ea3
MP
65062014-07-01 Marek Polacek <polacek@redhat.com>
6507
6508 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6509 instead of 0 to WARN_FOR_ASSIGNMENT.
6510
d5c3d343
MP
65112014-07-01 Marek Polacek <polacek@redhat.com>
6512
6513 PR c/58286
6514 * c-typeck.c (convert_for_assignment): Pass
6515 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6516
6a7253a4
MP
65172014-06-30 Marek Polacek <polacek@redhat.com>
6518
6519 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6520 has no_sanitize_undefined attribute.
6521
5e88a8f4
IZ
65222014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6523
6524 PR middle-end/57541
6525 * c-array-notation.c (fix_builtin_array_notation_fn):
6526 Check for 0 arguments in builtin call. Check that bultin argument is
6527 correct.
6528 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6529 index.
6530
9698b078
SH
65312014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6532
6533 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6534 qualifiers in __auto_type for atomic types.
6535 (c_parser_typeof_specifier): Discard all type qualifiers in
6536 __typeof__ for atomic types.
6537
6e07c515
MP
65382014-06-25 Marek Polacek <polacek@redhat.com>
6539
6540 PR c/61162
6541 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6542 the return expression to c_finish_return.
6543
da6f124d
JJ
65442014-06-25 Jakub Jelinek <jakub@redhat.com>
6545
6546 * c-typeck.c (c_finish_omp_clauses): Make sure
6547 OMP_CLAUSE_LINEAR_STEP has correct type.
6548
c203e8a7
TS
65492014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6550
6551 * c-decl.c: Adjust.
6552
56ad0e38
JJ
65532014-06-24 Jakub Jelinek <jakub@redhat.com>
6554
6555 * c-parser.c (c_parser_omp_for_loop): For
6556 #pragma omp parallel for simd move lastprivate clause from parallel
6557 to for rather than simd.
6558
47c2554f
MP
65592014-06-23 Marek Polacek <polacek@redhat.com>
6560
6561 * c-typeck.c (parser_build_binary_op): Don't call
6562 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6563
56363ffd
JH
65642014-06-15 Jan Hubicka <hubicka@ucw.cz>
6565
6566 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6567 * c-decl.c (merge_decls): Likewise.
6568
d7ff7ae5
MP
65692014-06-09 Marek Polacek <polacek@redhat.com>
6570
6571 PR c/36446
6572 * c-typeck.c (error_init): Call inform instead of error_at.
6573 (pedwarn_init): Call inform instead of pedwarn.
6574 (warning_init): Call inform instead of warning_at.
6575
24d047a3
JH
65762014-06-07 Jan Hubicka <hubicka@ucw.cz>
6577
6578 * c-decl.c (merge_decls): Use set_decl_section_name.
6579 (duplicate_decls): Remove node if it exists.
6580
9bac5cbb
G
65812014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6582
6583 PR c/53119
6584 * c-typeck.c (push_init_level, process_init_element,
6585 pop_init_level): Correct check for zero initialization, move
6586 missing brace warning to respect zero initialization.
6587
8ffcdea8
MP
65882014-06-05 Marek Polacek <polacek@redhat.com>
6589
6590 PR c/56724
6591 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6592
742938c9
MP
65932014-06-05 Marek Polacek <polacek@redhat.com>
6594
6595 PR c/49706
6596 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6597 on the left hand side operand of a comparison.
742938c9 6598
6447c55d
MP
65992014-06-05 Marek Polacek <polacek@redhat.com>
6600
6601 PR c/48062
6602 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6603 Print note only if the warning was printed.
6604
9dc7743c
IZ
66052014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6606
6607 PR c/58942
6608 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6609 with a pointer.
6610
fedfecef
MP
66112014-06-03 Marek Polacek <polacek@redhat.com>
6612
6613 PR c/60439
6614 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6615 c_start_case.
6616 * c-tree.h (c_start_case): Update.
6617 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6618 switch condition has boolean value.
6619
9b2b7279
AM
66202014-06-02 Andrew MacLeod <amacleod@redhat.com>
6621
6622 * c-decl.c: Include builtins.h.
6623 * c-parser.c: Likewise.
6624
5c1bc275
MP
66252014-05-27 Marek Polacek <polacek@redhat.com>
6626
6627 PR c/56724
6628 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6629 error and warning calls to error_at and warning_at. Pass location of
6630 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6631 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6632 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6633
97563bc8
IZ
66342014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6635
6636 PR c/61191
6637 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6638 function parameters.
6639
aede2c10
JH
66402014-05-23 Jan Hubicka <hubicka@ucw.cz>
6641
6642 * c-decl.c (merge_decls): Preserve symtab node pointers.
6643 (duplicate_decls): Free new decl.
6644
edbba2ce
TS
66452014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6646
f3316c6d
TS
6647 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6648 initialization.
6649
edbba2ce
TS
6650 * c-parser.c (c_parser_omp_target): Return bool values.
6651
68c81f24
TS
66522014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6653
6654 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6655 num_teams_loc variable to num_thread_limit_loc.
6656
632f2871
RS
66572014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6658
6659 * c-array-notation.c (expand_array_notations): Use void_node
6660 instead of void_zero_node.
6661
766090c2
TS
66622014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6663
6664 * c-decl.c (finish_struct): Adjust.
6665 (finish_enum): Likewise.
6666 (bind): Adjust.
6667 (record_inline_static): Likewise.
6668 (push_scope): Likewise.
6669 (make_label): Likewise.
6670 (lookup_label_for_goto): Likewise.
6671 (finish_struct): Likewise.
6672 (finish_enum): Likewise.
6673 (store_parm_decls): Likewise.
6674 (c_push_function_context): Likewise.
6675 * c-lang.h: Remove usage of variable_size gty attribute.
6676 * c-parser.c (c_parse_init): Adjust.
6677 (c_parse_file): Likewise.
6678
2b107f6b
MP
66792014-05-13 Marek Polacek <polacek@redhat.com>
6680
6681 PR c/61162
6682 * c-typeck.c (convert_for_assignment): Pass location to
6683 WARN_FOR_ASSIGNMENT instead of input_location.
6684
d033409e
MP
66852014-05-10 Marek Polacek <polacek@redhat.com>
6686
6687 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6688 maybe_warn_string_init.
6689 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6690 maybe_warn_string_init.
6691 * c-tree.h (maybe_warn_string_init): Update declaration.
6692 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6693 Call pedwarn_init with loc instead of with input_location.
6694 (digest_init): Pass init_loc to maybe_warn_string_init.
6695 (pop_init_level): Call pedwarn_init with loc instead of with
6696 input_location.
6697 (set_init_index): Likewise.
6698 (process_init_element): Likewise.
6699
ea58ef42
MP
67002014-05-09 Marek Polacek <polacek@redhat.com>
6701
6702 PR c/61096
6703 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6704 (c_parser_initelt): Pass location to set_init_label. Pass array index
6705 location to set_init_index.
6706 * c-tree.h (push_init_level): Update declaration.
6707 (pop_init_level): Likewise.
6708 (set_init_index): Likewise.
6709 (set_init_label): Likewise.
6710 * c-typeck.c (error_init): Add location parameter. Call error_at
6711 instead of error.
6712 (digest_init): Pass init_loc to error_init.
6713 (really_start_incremental_init):
6714 (push_init_level): Add location parameter. Pass loc to pop_init_level
6715 and error_init.
6716 (pop_init_level): Likewise.
6717 (set_designator): Add location parameter. Pass loc to pop_init_level,
6718 push_init_level, and error_init.
6719 (set_init_index): Add location parameter. Pass loc to error_init and
6720 set_designator.
6721 (set_init_label): Likewise.
6722 (output_init_element): Pass loc to error_init.
6723 (process_init_element): Pass loc to error_init, pop_init_level,
6724 pedwarn_init, and push_init_level.
6725
661a0813
MP
67262014-05-09 Marek Polacek <polacek@redhat.com>
6727
6728 PR c/50459
6729 * c-parser.c (c_parser_attributes): Parse the arguments as an
6730 expression-list if the attribute takes identifier.
6731
2793eeab
MP
67322014-05-08 Marek Polacek <polacek@redhat.com>
6733
6734 PR c/61053
6735 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6736 TYPE_ALIGN_UNIT.
6737
f827930a
MP
67382014-05-08 Marek Polacek <polacek@redhat.com>
6739
6740 PR c/61077
6741 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6742 of main.
6743
1d60af08
KZ
67442014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6745 Mike Stump <mikestump@comcast.net>
6746 Richard Sandiford <rdsandiford@googlemail.com>
6747
6748 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6749 (finish_enum): Use wide-int interfaces.
6750 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6751 * c-typeck.c (build_c_cast): Likewise.
6752 (set_nonincremental_init_from_string): Likewise.
6753 (c_tree_equal): Likewise.
6754
a0e24419
MP
67552014-05-02 Marek Polacek <polacek@redhat.com>
6756
6757 PR c/25801
6758 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6759 Return size_one_node when the type is not complete.
6760 (pointer_diff): Remove comment.
6761 (build_unary_op): Improve error messages.
6762
19fc9faa
MP
67632014-05-02 Marek Polacek <polacek@redhat.com>
6764
6765 * c-typeck.c (c_finish_return): Separate warning_at calls.
6766
63bc4e87
MP
67672014-05-02 Marek Polacek <polacek@redhat.com>
6768
6769 * c-tree.h (error_init): Remove declaration.
6770 (pedwarn_init): Likewise.
6771 * c-typeck.c (error_init): Make static and move above.
6772 (pedwarn_init): Likewise.
6773 (warning_init): Move above.
6774 (maybe_warn_string_init): Likewise.
6775
4bd2511b
JL
67762014-05-01 Jeff Law <law@redhat.com>
6777
6778 Revert:
6779
6780 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6781 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6782 avoid goto.
6783
6a358dcb
MP
67842014-05-02 Marek Polacek <polacek@redhat.com>
6785
6786 PR c/60784
6787 * c-typeck.c (push_init_level): Set constructor_designated to
6788 p->designated for structures.
6789
ae5ebda4
MP
67902014-05-01 Marek Polacek <polacek@redhat.com>
6791
6792 PR c/60915
6793 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6794 function-definition has an attribute after the declarator.
6795
96b40f8d
MP
67962014-05-01 Marek Polacek <polacek@redhat.com>
6797
6798 PR c/60257
6799 * c-typeck.c (warning_init): Add location_t parameter. Call
6800 warning_at instead of warning.
6801 (push_init_level): Pass input_location to warning_init.
6802 (add_pending_init): Add location_t parameter. Pass loc to
6803 warning_init.
6804 (set_nonincremental_init): Pass input_location to add_pending_init.
6805 (set_nonincremental_init_from_string): Likewise.
6806 (output_init_element): Pass loc to warning_init and to
6807 add_pending_init.
6808
32e00768
MP
68092014-05-01 Marek Polacek <polacek@redhat.com>
6810
6811 PR c/43395
6812 * c-typeck.c (c_finish_return): Distinguish between label and variable
6813 when warning about returning local address.
6814
c9379ce2
MP
68152014-05-01 Marek Polacek <polacek@redhat.com>
6816
6817 PR c/29467
6818 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6819 in C89 mode.
6820
d00887e8
MP
68212014-05-01 Marek Polacek <polacek@redhat.com>
6822
6823 PR c/43245
6824 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6825 instead of 0 to WARN_FOR_QUALIFIERS.
6826
5436fa2e
MP
68272014-05-01 Marek Polacek <polacek@redhat.com>
6828
6829 PR c/56989
6830 * c-typeck.c (default_conversion): Use better location for
6831 error call.
6832
f8ed5150
MP
68332014-04-30 Marek Polacek <polacek@redhat.com>
6834
6835 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6836 also when SANITIZE_FLOAT_DIVIDE is on.
6837
8337d1db
MP
68382014-04-30 Marek Polacek <polacek@redhat.com>
6839
6840 PR c/60139
6841 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6842 and pedwarn_init. Use loc insted of input_location.
6843
c4bdc42f
MP
68442014-04-30 Marek Polacek <polacek@redhat.com>
6845
6846 PR c/60351
6847 * c-typeck.c (build_binary_op): Use location when warning about
6848 shift count.
6849
45484dcf
MP
68502014-04-25 Marek Polacek <polacek@redhat.com>
6851
6852 PR c/18079
6853 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6854 always_inline/noinline and hot/cold attributes.
6855
34cf811f
MP
68562014-04-25 Marek Polacek <polacek@redhat.com>
6857
6858 PR c/60114
6859 * c-parser.c (c_parser_initelt): Pass input_location to
6860 process_init_element.
6861 (c_parser_initval): Pass loc to process_init_element.
6862 * c-tree.h (process_init_element): Adjust declaration.
6863 * c-typeck.c (push_init_level): Pass input_location to
6864 process_init_element.
6865 (pop_init_level): Likewise.
6866 (set_designator): Likewise.
6867 (output_init_element): Add location_t parameter. Pass loc to
6868 digest_init.
6869 (output_pending_init_elements): Pass input_location to
6870 output_init_element.
6871 (process_init_element): Add location_t parameter. Pass loc to
6872 output_init_element.
6873
42056eac
JJ
68742014-04-24 Jakub Jelinek <jakub@redhat.com>
6875
6876 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6877 atomic-clause, allow comma in between atomic-clause and
6878 seq_cst.
6879
e162a134
JJ
68802014-04-22 Jakub Jelinek <jakub@redhat.com>
6881
6882 PR c/59073
6883 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6884 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6885
2f6babac
IZ
68862014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6887
6888 PR middle-end/60469
6889 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6890 create_tmp_var instead build_decl for creating temps.
6891 (build_array_notation_expr): Likewise.
6892 (fix_conditional_array_notations_1): Likewise.
6893 (fix_array_notation_expr): Likewise.
6894 (fix_array_notation_call_expr): Likewise.
6895
8edbfaa6
JJ
68962014-03-28 Jakub Jelinek <jakub@redhat.com>
6897
6898 PR c++/60689
6899 * c-tree.h (c_build_function_call_vec): New prototype.
6900 * c-typeck.c (build_function_call_vec): Don't call
6901 resolve_overloaded_builtin here.
6902 (c_build_function_call_vec): New wrapper function around
6903 build_function_call_vec. Call resolve_overloaded_builtin here.
6904 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6905 Call c_build_function_call_vec instead of build_function_call_vec.
6906 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6907 * c-decl.c (finish_decl): Likewise.
6908
7485aeea
MLI
69092014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6910
6911 PR c/55383
6912 * c-typeck.c: Use correct format string in cast-qual warning
6913
b17a8b07
TS
69142014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6915
6916 * c-decl.c (c_decl_attributes): Use
6917 lang_hooks.types.omp_mappable_type.
6918 * c-typeck.c (c_finish_omp_clauses): Likewise.
6919
3af9c5e9
MP
69202014-03-06 Marek Polacek <polacek@redhat.com>
6921
6922 PR c/60197
6923 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6924 of checking tree code.
6925
1c9f5f33
PK
69262014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6927
6928 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6929 (c_parser_parameter_declaration): Likewise.
6930
cc28fc7f
MP
69312014-02-19 Marek Polacek <polacek@redhat.com>
6932
6933 PR c/60195
6934 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6935 Call mark_exp_read on exp.value.
6936 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6937 TREE_ADDRESSABLE on old instead of val.
6938 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6939
b581c05c
PK
69402014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6941
6942 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6943 C_EXPR_APPEND by vec_safe_push.
6944 * c-tree.h (C_EXPR_APPEND): Remove.
6945
81e5eca8
MP
69462014-01-31 Marek Polacek <polacek@redhat.com>
6947
6948 PR c/59963
6949 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6950 build_function_call_vec.
6951 (build_function_call): Likewise.
6952 (build_atomic_assign): Likewise.
6953 (build_function_call_vec): Add arg_loc parameter. Use it.
6954 (convert_arguments): Likewise.
6955 (convert_for_assignment): Rename rhs_loc to expr_loc.
6956 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6957 (c_parser_objc_keywordexpr): Likewise.
6958 (c_parser_postfix_expression_after_primary): Call
6959 build_function_call_vec with expr_loc rather than op_loc.
6960 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6961 build_function_call_vec.
6962 (c_parser_expr_list): Add locations parameter. Fill it with locations
6963 of function arguments.
6964 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6965
68fca595
MP
69662014-01-30 Marek Polacek <polacek@redhat.com>
6967
6968 PR c/59940
6969 * c-typeck.c (build_function_call_vec): Use loc parameter.
6970 (convert_arguments): Add location parameter. Use it.
6971 (ep_convert_and_check): Likewise.
6972 (build_atomic_assign): Adjust convert_for_assignment call.
6973 (build_modify_expr): Likewise.
6974 (digest_init): Likewise.
6975 (c_finish_return): Likewise.
6976 (build_conditional_expr): Adjust ep_convert_and_check calls.
6977 (convert_for_assignment): Add rhs_loc parameter. Use it.
6978 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6979 calls.
6980
fa337f3a
RB
69812014-01-30 Richard Biener <rguenther@suse.de>
6982
6983 PR c/59905
6984 * c-typeck.c (build_function_call_vec): Do not replace calls
6985 to a function via an incompatible type with a runtime abort.
6986
b72271b9
BI
69872014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6988
6989 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6990 flag_enable_cilkplus with flag_cilkplus.
6991 (c_parser_direct_declarator_inner): Likewise.
6992 (c_parser_attribute_any_word): Likewise.
6993 (c_parser_attributes): Likewise.
6994 (c_parser_compound_statement): Likewise.
6995 (c_parser_statement_after_labels): Likewise.
6996 (c_parser_if_statement): Likewise.
6997 (c_parser_switch_statement): Likewise.
6998 (c_parser_do_statement): Likewise.
6999 (c_parser_for_statement): Likewise.
7000 (c_parser_unary_expression): Likewise.
7001 (c_parser_postfix_expression): Likewise.
7002 (c_parser_postfix_expression_after_primary): Likewise.
7003 (c_parser_postfix_expression_after_primary): Likewise.
7004 (c_parser_omp_clause_name): Likewise.
7005 (c_finish_omp_declare_simd): Likewise.
7006 (c_parser_cilk_verify_simd): Likewise.
7007 * c-typeck.c (build_array_ref): Likewise.
7008 (build_function_call_vec): Likewise.
7009 (convert_arguments): Likewise.
7010 (build_compound_expr): Likewise.
7011 (c_finish_return): Likewise.
7012 (c_finish_if_stmt): Likewise.
7013 (c_finish_loop): Likewise.
7014 (build_binary_op): Likewise.
7015
393e8e8b
MP
70162014-01-23 Marek Polacek <polacek@redhat.com>
7017
7018 PR c/59846
7019 * c-typeck.c (parser_build_binary_op): Use location instead of
7020 input_location.
7021 (build_binary_op): Pass location to shorten_compare.
7022
f04dda30
MP
70232014-01-23 Marek Polacek <polacek@redhat.com>
7024
7025 PR c/58346
7026 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7027 an empty aggregate.
7028
789eadcd
MP
70292014-01-23 Marek Polacek <polacek@redhat.com>
7030
7031 PR c/59871
7032 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7033 of a comma expression.
7034 (emit_side_effect_warnings): Likewise.
7035
40f14e9f
BI
70362014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7037
7038 PR c/59825
7039 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7040 function to use walk_tree and moved a lot of its functionality to
7041 expand_array_notations.
7042 (expand_array_notations): New function.
7043
74558dd9
BI
70442014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7045
7046 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7047 attribute an attribute without value.
7048
652fea39
JJ
70492014-01-23 Jakub Jelinek <jakub@redhat.com>
7050
7051 PR middle-end/58809
7052 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7053 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7054
f34f1c87
MP
70552014-01-22 Marek Polacek <polacek@redhat.com>
7056
7057 PR c/59891
7058 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7059 of remove_c_maybe_const_expr on op1 and op2.
7060
241f845a
JJ
70612014-01-15 Jakub Jelinek <jakub@redhat.com>
7062
7063 PR c/58943
7064 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7065 effects, preevaluate rhs using SAVE_EXPR first.
7066
9a74f20c
BI
70672014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7068
7069 PR c++/59631
7070 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7071 statements with if-elseif statements.
7072
96066ce1
MP
70732014-01-06 Marek Polacek <polacek@redhat.com>
7074
7075 PR c/57773
7076 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7077 defined bit-field types only in ISO C.
7078
23a5b65a
RS
70792014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7080
7081 Update copyright years
7082
f9030485
RS
70832014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7084
7085 * c-array-notation.c: Use the standard form for the copyright notice.
7086
41958c28
BI
70872013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7088
7089 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7090 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7091 field in parser is not empty. If not-empty, call the function
7092 c_parser_finish_omp_declare_simd.
7093 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7094 between SIMD-enabled functions and #pragma simd. Added new parameter.
7095 (c_parser_cilk_all_clauses): Modified the usage of the function
7096 c_parser_cilk_clause_vectorlength as mentioned above.
7097 (c_parser_cilk_simd_fn_vector_attrs): New function.
7098 (c_finish_cilk_simd_fn_tokens): Likewise.
7099 (is_cilkplus_vector_p): Likewise.
7100 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7101 "nomask," and "mask" strings in clause name.
7102 (c_parser_omp_all_clauses): Added 3 new case statements:
7103 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7104 PRAGMA_CILK_CLAUSE_NOMASK.
7105 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7106 check for vector attribute and if so call the function
7107 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7108 called the function c_finish_cilk_simd_fn_tokens.
7109 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7110 parser field is non-empty. If so, parse them as you would parse
7111 the omp declare simd pragma.
7112 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7113 Added a check when step is a parameter and flag it as error.
7114 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7115 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7116 pragma_omp_clause.
7117
cef0fd0e
TS
71182013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7119
7120 * c-parser.c (c_parser_omp_parallel): Fix description.
7121
12893402
BI
71222013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7123
7124 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7125 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7126 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7127 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7128
296674db
JM
71292013-12-04 Joseph Myers <joseph@codesourcery.com>
7130
7131 PR c/52023
7132 * c-parser.c (c_parser_alignas_specifier): Use
7133 c_sizeof_or_alignof_type instead of c_alignof.
7134 (c_parser_alignof_expression): Likewise, with min_alignof
7135 parameter depending on alignof spelling used.
7136
edd28054
MP
71372013-12-04 Marek Polacek <polacek@redhat.com>
7138
7139 PR c/54113
7140 * c-decl.c (start_function): Don't warn for missing prototype for
7141 inline functions.
7142
da0fc454
MP
71432013-12-03 Marek Polacek <polacek@redhat.com>
7144
7145 PR c/59351
7146 * c-decl.c (build_compound_literal): Allow compound literals with
7147 empty initial value.
7148
4c2ecab0
JM
71492013-12-02 Joseph Myers <joseph@codesourcery.com>
7150
7151 PR c/58235
7152 * c-typeck.c (build_modify_expr): Diagnose assignment to
7153 expression with array type.
7154
340baef7
JM
71552013-11-29 Joseph Myers <joseph@codesourcery.com>
7156
7157 PR c/42262
7158 * c-typeck.c (process_init_element): Do not treat a string as
7159 initializing a whole array when used with a designator for an
7160 individual element.
7161
6763b9f7
JM
71622013-11-29 Joseph Myers <joseph@codesourcery.com>
7163
7164 PR c/57574
7165 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7166 an inline function following a static declaration.
7167
e7bd1de1
JJ
71682013-11-28 Jakub Jelinek <jakub@redhat.com>
7169
7170 PR c/59310
7171 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7172 to p_name before calling c_parser_omp_teams instead of after.
7173 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7174 argument. Remove unused p_name variable.
7175
0136f8f0
AH
71762013-11-27 Aldy Hernandez <aldyh@redhat.com>
7177 Jakub Jelinek <jakub@redhat.com>
7178
7179 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7180 external_scope is NULL.
7181
241b71bb
TV
71822013-11-27 Tom de Vries <tom@codesourcery.com>
7183 Marc Glisse <marc.glisse@inria.fr>
7184
7185 PR c++/59032
7186 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7187
2fb9a547
AM
71882013-11-22 Andrew MacLeod <amacleod@redhat.com>
7189
7190 * c-typeck.c: Add required include files from gimple.h.
7191
8400e75e
DM
71922013-11-22 David Malcolm <dmalcolm@redhat.com>
7193
7194 * c-decl.c (define_label, shadow_tag_warned)
7195 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7196 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7197 (declspecs_add_type): Remove use of in_system_header macro.
7198 * c-parser.c (c_parser_unary_expression): Likewise.
7199 * c-typeck.c (store_init_value, process_init_element)
7200 (c_start_case): Likewise.
7201
7202 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7203 macro.
7204
7205 * c-parser.c (c_parser_set_source_position_from_token): Remove
7206 reference to in_system_header from comment.
7207
386b1f1f
RS
72082013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7209
7210 * c-decl.c (grokdeclarator): Update comment to refer to
7211 tree_to_[su]hwi rather than tree_low_cst.
7212
ae7e9ddd
RS
72132013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7214
7215 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7216 tree_to_uhwi throughout.
7217
9439e9a1
RS
72182013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7219
7220 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7221 throughout.
7222
9541ffee
RS
72232013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7224
7225 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7226 throughout.
7227
c02065fc
AH
72282013-11-15 Aldy Hernandez <aldyh@redhat.com>
7229
7230 * c-parser.c (c_parser_cilk_simd): New.
7231 (c_parser_cilk_verify_simd): New.
7232 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7233 (c_parser_omp_for_loop): Add case for NE_EXPR.
7234 Set c_break_label for CILK_SIMD.
7235 (c_parser_cilk_clause_vectorlength): New.
7236 (c_parser_cilk_clause_linear): New.
7237 (c_parser_cilk_clause_name): New.
7238 (c_parser_cilk_all_clauses): New.
7239 * c-typeck.c (build_unary_op): Pass location argument to
7240 readonly_error.
7241 (build_modify_expr): Same.
7242 (build_asm_expr): Same.
7243 (c_finish_bc_stmt): Error on break/continue in loops.
7244
18f429e2
AM
72452013-11-14 Andrew MacLeod <amacleod@redhat.com>
7246
7247 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7248
d8a2d370
DN
72492013-11-14 Diego Novillo <dnovillo@google.com>
7250
7251 * c-decl.c: Include print-tree.h.
7252 Include stor-layout.h.
7253 Include varasm.h.
7254 Include attribs.h.
7255 Include stringpool.h.
7256 * c-lang.c: Include fold-const.h.
7257 * c-parser.c: Include stringpool.h.
7258 Include attribs.h.
7259 Include stor-layout.h.
7260 Include varasm.h.
7261 Include trans-mem.h.
7262 * c-typeck.c: Include stor-layout.h.
7263 Include trans-mem.h.
7264 Include varasm.h.
7265 Include stmt.h.
7266
38b7bc7f
JM
72672013-11-13 Joseph Myers <joseph@codesourcery.com>
7268
7269 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7270 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7271 __auto_type.
7272 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7273 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7274 RID_AUTO_TYPE.
7275 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7276 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7277 (c_parser_declarator, c_parser_direct_declarator_inner)
7278 (c_parser_parameter_declaration, c_parser_type_name): All callers
7279 changed.
7280 (c_parser_declaration_or_fndef): Handle declarations with type
7281 determined from the initializer.
7282
45b0be94
AM
72832013-11-12 Andrew MacLeod <amacleod@redhat.com>
7284
18f429e2 7285 * c-typeck.c: Include gimplify.h.
45b0be94 7286
582d9b50
JM
72872013-11-12 Joseph Myers <joseph@codesourcery.com>
7288
7289 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7290 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7291 comment.
7292 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7293 or _Thread_local as appropriate in diagnostics.
7294 (build_null_declspecs): Initialize ret->thread_gnu_p.
7295 (declspecs_add_scspec): Handle either __thread or _Thread_local
7296 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7297 pedantic. Do not disallow _Thread_local extern and _Thread_local
7298 static.
7299
267bac10
JM
73002013-11-07 Joseph Myers <joseph@codesourcery.com>
7301 Andrew MacLeod <amacleod@redhat.com>
7302
7303 * c-aux-info.c (gen_type): Handle atomic qualifier.
7304 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7305 qualifiers when compating types.
7306 (shadow_tag_warned): Handle atomic_p in declspecs.
7307 (quals_from_declspecs): Likewise.
7308 (start_decl): Use c_type_promotes_to when promoting argument
7309 types.
7310 (grokdeclarator): Handle _Atomic.
7311 (get_parm_info): Diagnose any qualifier on "void" as only
7312 parameter.
7313 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7314 comparing types. Use c_type_promotes_to when promoting argument
7315 types.
7316 (finish_function): Use c_type_promotes_to when promoting argument
7317 types.
7318 (build_null_declspecs): Handle atomic_p in declspecs.
7319 (declspecs_add_qual): Handle RID_ATOMIC.
7320 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7321 (c_token_starts_declspecs): Handle RID_ATOMIC.
7322 (c_parser_declspecs): Handle atomic type specifiers and
7323 qualifiers.
7324 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7325 from types of expressions with atomic type.
7326 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7327 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7328 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7329 (c_parser_statement_after_labels, c_parser_switch_statement)
7330 (c_parser_for_statement, c_parser_expr_no_commas)
7331 (c_parser_conditional_expression, c_parser_binary_expression)
7332 (c_parser_cast_expression, c_parser_unary_expression)
7333 (c_parser_postfix_expression)
7334 (c_parser_postfix_expression_after_primary, c_parser_expression):
7335 Use convert_lvalue_to_rvalue.
7336 (c_parser_expression_conv, c_parser_expr_list): Document
7337 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7338 (c_parser_objc_synchronized_statement): Use
7339 convert_lvalue_to_rvalue.
7340 (c_parser_objc_selector): Handle RID_ATOMIC.
7341 (c_parser_objc_receiver, c_parser_array_notation): Use
7342 convert_lvalue_to_rvalue.
7343 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7344 _Atomic (type-name).
7345 (struct c_declspecs): Add atomic_p field.
7346 (convert_lvalue_to_rvalue): Declare.
7347 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7348 corresponding atomic types.
7349 (qualify_type): Don't add _Atomic qualifiers from second argument.
7350 (comp_target_types): Do not allow _Atomic mismatches.
7351 (type_lists_compatible_p): Do not remove atomic qualifiers when
7352 comparing types.
7353 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7354 (build_atomic_assign): New functions.
7355 (build_unary_op): Use build_atomic_assign for atomic increment and
7356 decrement.
7357 (build_conditional_expr): Do not treat _Atomic void as a qualified
7358 version of void.
7359 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7360 (find_anonymous_field_with_type, convert_to_anonymous_field)
7361 (convert_for_assignment): Do not remove atomic qualifiers when
7362 comparing types.
7363 (digest_init): Do not accept initialization of arrays of atomic
7364 elements by string constants.
7365 (build_asm_expr): Use convert_lvalue_to_rvalue.
7366 (build_binary_op): Do not treat _Atomic void as a qualified
7367 version of void.
7368
0c249d4b
DD
73692013-11-06 DJ Delorie <dj@redhat.com>
7370
7371 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7372 both explicit and builtin, print the location of the explicit one.
7373
6d7f7e0a
TB
73742013-11-05 Tobias Burnus <burnus@net-b.de>
7375
7376 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7377 c_parser_omp_distribute, c_parser_omp_teams,
7378 c_parser_omp_target, c_parser_omp_declare): Handle
7379 -fopenmp-simd.
7380
b906f4ca
MP
73812013-11-03 Marek Polacek <polacek@redhat.com>
7382
7383 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7384
ee1d5a02
JJ
73852013-11-01 Jakub Jelinek <jakub@redhat.com>
7386
7387 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7388 check_dup_generic at the end, unless remove is true.
7389 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7390 remove = true;.
7391 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7392
5a9785fb
JJ
73932013-10-31 Jakub Jelinek <jakub@redhat.com>
7394
7395 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7396 with decl that is not pointer nor array.
7397
939b37da
BI
73982013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7399
7400 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7401 a spawning function is found.
7402 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7403 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7404 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7405 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7406 case.
7407 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7408 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7409 expr.
7410 (c_finish_return): Added a check to reject _Cilk_spawn in return
7411 expression.
7412 (build_cilk_spawn): New function.
7413 (build_cilk_sync): Likewise.
7414 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7415
d4af74d4
TB
74162013-10-27 Tobias Burnus <burnus@net-b.de>
7417
7418 PR other/33426
7419 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7420 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7421 (c_parser_statement_after_labels): Update calls.
7422
d73749df 74232013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7424
7425 PR other/33426
7426 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7427 Handle PRAGMA_IVDEP.
7428 (c_parser_statement_after_labels): Update call.
7429
f28aa681
MP
74302013-10-24 Marek Polacek <polacek@redhat.com>
7431
7432 * c-parser.c (c_parser_struct_declaration): Add a comment.
7433 (c_parser_declarator): Don't allow _Alignas here.
7434
0645c1a2
AM
74352013-10-17 Andrew MacLeod <amacleod@redhat.com>
7436
7437 * c-parser.c: Include omp-low.h.
7438 * c-typeck.c: Likewise.
7439
568a31f2
MP
74402013-10-17 Marek Polacek <polacek@redhat.com>
7441
7442 PR c/58267
7443 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7444 Document syntax of the array-declarator.
7445 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7446 are not permitted.
7447 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7448 (c_parser_struct_declaration): Likewise.
7449 (c_parser_declarator): Likewise.
7450 (c_parser_direct_declarator_inner): Likewise.
7451 (c_parser_parameter_declaration): Likewise.
7452 (c_parser_type_name): Likewise.
7453
acf0174b
JJ
74542013-10-11 Jakub Jelinek <jakub@redhat.com>
7455
7456 * c-lang.h (current_omp_declare_target_attribute): New extern
7457 decl.
7458 * c-parser.c: Include c-lang.h.
7459 (struct c_parser): Change tokens to c_token *.
7460 Add tokens_buf field. Change tokens_avail type to unsigned int.
7461 (c_parser_consume_token): If parser->tokens isn't
7462 &parser->tokens_buf[0], increment parser->tokens.
7463 (c_parser_consume_pragma): Likewise.
7464 (enum pragma_context): Add pragma_struct and pragma_param.
7465 (c_parser_external_declaration): Adjust
7466 c_parser_declaration_or_fndef caller.
7467 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7468 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7469 Adjust recursive call.
7470 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7471 of pragma_external.
7472 (c_parser_parameter_declaration): Use pragma_param instead of
7473 pragma_external.
7474 (c_parser_compound_statement_nostart, c_parser_label,
7475 c_parser_for_statement): Adjust
7476 c_parser_declaration_or_fndef callers.
7477 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7478 it through to c_parser_conditional_expression.
7479 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7480 pass it through to c_parser_binary_expression. Adjust recursive
7481 call.
7482 (c_parser_binary_expression): Remove prec argument, add
7483 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7484 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7485 binop matches it, use build2 instead of parser_build_binary_op.
7486 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7487 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7488 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7489 Handle pragma_struct and pragma_param the same as pragma_external.
7490 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7491 (c_parser_omp_variable_list): Parse array sections for
7492 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7493 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7494 (c_parser_omp_clause_reduction): Handle user defined reductions.
7495 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7496 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7497 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7498 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7499 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7500 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7501 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7502 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7503 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7504 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7505 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7506 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7507 (c_parser_omp_for_loop): Add CODE argument, pass it through
7508 to c_finish_omp_for. Change last argument to cclauses,
7509 and adjust uses to grab parallel clauses from the array of all
7510 the split clauses. Adjust c_parser_binary_expression,
7511 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7512 (omp_split_clauses): New function.
7513 (c_parser_omp_simd): New function.
7514 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7515 Allow the function to be called also when parsing combined constructs,
7516 and call c_parser_omp_simd when parsing for simd.
7517 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7518 #pragma omp section, require exactly one structured-block instead of
7519 sequence of statements.
7520 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7521 Allow the function to be called also when parsing combined constructs.
7522 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7523 Allow the function to be called also when parsing combined
7524 constructs.
7525 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7526 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7527 c_parser_omp_teams, c_parser_omp_target_data,
7528 c_parser_omp_target_update, c_parser_omp_target,
7529 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7530 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7531 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7532 (c_parser_omp_construct): Add p_name and mask vars. Handle
7533 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7534 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7535 and c_parser_omp_sections callers.
7536 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7537 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7538 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7539 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7540 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7541 OMP_CLAUSE_DEPEND.
7542 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7543 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7544 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7545 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7546 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7547 * c-typeck.c: Include tree-inline.h.
7548 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7549 handle_omp_array_sections_1, handle_omp_array_sections,
7550 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7551 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7552 user defined reductions.
7553 (c_tree_equal): New function.
7554 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7555 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7556 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7557 c_check_omp_declare_reduction_r): New prototypes.
7558 * c-decl.c (current_omp_declare_target_attribute): New variable.
7559 (c_decl_attributes): New function.
7560 (start_decl, start_function): Use it instead of decl_attributes.
7561 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7562 c_omp_reduction_decl, c_omp_reduction_lookup,
7563 c_check_omp_declare_reduction_r): New functions.
7564
0a6c2227
TT
75652013-09-25 Tom Tromey <tromey@redhat.com>
7566
7567 * Make-lang.in (c/gccspec.o): Remove.
7568 (CFLAGS-c/gccspec.o): New variable.
7569 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7570 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7571 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7572
f3bc55f0
TT
75732013-09-25 Tom Tromey <tromey@redhat.com>
7574
7575 * Make-lang.in (c/gccspec.o): Don't use subshell.
7576
a24d975c
MP
75772013-09-18 Marek Polacek <polacek@redhat.com>
7578
7579 PR sanitize/58443
7580 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7581 Remove unnecessary check.
7582
ce6923c5
MP
75832013-09-18 Marek Polacek <polacek@redhat.com>
7584
7585 PR sanitizer/58411
7586 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7587 no_sanitize_undefined attribute.
7588
a1e51df9
KT
75892013-09-13 Kai Tietz <ktietz@redhat.com>
7590
7591 PR target/57848
7592 * c-decl.c (c_builtin_function_ext_scope): Remove
7593 wrong assumption that it is never called on prexisting
7594 symbol.
7595
0af94e6f
JR
75962013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7597
7598 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7599
20059c8b
GDR
76002013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7601
7602 * c-objc-common.c (c_tree_printer): Tidy.
7603
de5a5fa1
MP
76042013-08-30 Marek Polacek <polacek@redhat.com>
7605
7606 * c-typeck.c (build_binary_op): Add division by zero and shift
7607 instrumentation.
7608
2531a1d9 76092013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7610 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7611
6e2bcc98 7612 PR c/35649
2531a1d9
JR
7613 * c-typeck.c (c_common_type): Prefer double_type_node over
7614 other REAL_TYPE types with the same precision.
7615 (convert_arguments): Likewise.
7616
025311c4
GDR
76172013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7618
7619 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7620 (c_initialize_diagnostics): Call a destructor for the early printer.
7621
da6ca2b5
GDR
76222013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7623
7624 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7625 printer initialization.
7626
318cda85 76272013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7628
318cda85
BI
7629 PR c/57490
7630 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7631 check for truth values.
7632 (expand_array_notation_exprs): Added truth values case. Removed an
7633 unwanted else. Added for-loop to walk through subtrees in default
7634 case.
7635
b066401f
GDR
76362013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7637
7638 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7639
fb48aadc
JM
76402013-07-23 Joseph Myers <joseph@codesourcery.com>
7641
7642 * c-parser.c (struct c_generic_association): Fix typo.
7643
433cc7b0
TT
76442013-07-23 Tom Tromey <tromey@redhat.com>
7645 Joseph Myers <joseph@codesourcery.com>
7646
7647 * c-parser.c (struct c_generic_association): New.
7648 (c_generic_association_d): New typedef.
7649 (c_parser_generic_selection): New function.
7650 (c_parser_postfix_expression): Handle RID_GENERIC.
7651
26d40c3d
JM
76522013-07-13 Jason Merrill <jason@redhat.com>
7653
7654 PR c++/57793
7655 * c-decl.c (finish_struct): Check for too-large class.
7656
ecdbd01a 76572013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7658
7659 PR c/57821
7660 * c-typeck.c (set_init_index): When folding, check for index overflow.
7661
1141ed3f
BI
76622013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7663
7664 * c-parser.c (c_parser_array_notation): Removed rejection of array
7665 notations in an array of function pointers.
7666
713b46fa
BI
76672013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7668
7669 * c-array-notation.c (make_triplet_val_inv): New function.
7670 (create_cmp_incr): Likewise.
7671 (create_array_refs): Likewise.
7672 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7673 Also modularized common parts between functions and called the function.
7674 (build_array_notation_expr): Likewise.
7675 (fix_conditional_array_notations_1): Likewise.
7676 (fix_array_notation_expr): Likewise.
7677 (fix_array_notation_call_expr): Likewise.
7678
92f20202
MP
76792013-06-18 Marek Polacek <polacek@redhat.com>
7680
7681 PR c/57630
7682 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7683
73a23b06
BI
76842013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7685
7686 * c-array-notation.c (build_array_notation_expr): Reject array notation
7687 mismatch between LHS and RHS even inside a call_expr. Also, removed
7688 a couple while statements that were dead code.
7689
00b8517d
BI
76902013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7691
7692 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7693 excessive precision expressions in function parameters. Also removed
7694 couple unwanted while statements.
7695
1509bdda
BI
76962013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7697
7698 * c-array-notation.c (expand_array_notation_exprs): Added
7699 ARRAY_NOTATION_REF case.
ab20d992 7700
d60f1706
BI
77012013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7702
7703 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7704 function to c-family/array-notation-common.c.
7705 (is_cilkplus_reduce_builtin): Likewise.
7706 (find_rank): Likewise.
7707 (extract_array_notation_exprs): Likewise.
7708 (replace_array_notations): Likewise.
7709 (find_inv_trees): Likewise.
7710 (replace_inv_trees): Likewise.
7711 (contains_array_notation_expr): Likewise.
7712 (find_correct_array_notation_type): Likewise.
7713 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7714 (struct inv_list): Moved this to c-family/array-notation-common.c.
7715 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7716
6d6efbb3
BI
77172013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7718
7719 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7720 reduction functions outside the for-loop. Added a check if the fundecl
7721 is non-NULL. Finally, removed an unwanted if-statement, and made the
7722 body unconditional.
7723
25c22937
BI
77242013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7725
7726 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7727 condition of the if-statement matches the rank of else-block and then-
7728 block when array notations are used.
7729 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7730 expression after the entire function body is parsed.
7731 (c_parser_expr_no_commas): Delayed creating array notation expressions
7732 to the end of function parsing.
7733 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7734 whole if-statement instead of just the condition.
ab20d992 7735 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7736
edd25645
BI
77372013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7738
7739 PR c/57474
7740 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7741 array to NULL_TREE if they are unused. Also added a check for the
7742 field to be NULL before its fields are used in future.
ab20d992 7743
065ce7f1
RO
77442013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7745
7746 PR bootstrap/57450
7747 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7748 (build_array_notation_expr): Likewise.
7749
36536d79
BI
77502013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7751
7752 * c-typeck.c (build_array_ref): Added a check to see if array's
7753 index is greater than one. If true, then emit an error.
7754 (build_function_call_vec): Exclude error reporting and checking
7755 for builtin array-notation functions.
7756 (convert_arguments): Likewise.
7757 (c_finish_return): Added a check for array notations as a return
7758 expression. If true, then emit an error.
7759 (c_finish_loop): Added a check for array notations in a loop
7760 condition. If true then emit an error.
7761 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7762 (build_binary_op): Added a check for array notation expr inside
7763 op1 and op0. If present, we call another function to find correct
7764 type.
7765 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7766 * c-parser.c (c_parser_compound_statement): Check if array
7767 notation code is used in tree, if so, then transform them into
7768 appropriate C code.
7769 (c_parser_expr_no_commas): Check if array notation is used in LHS
7770 or RHS, if so, then build array notation expression instead of
7771 regular modify.
7772 (c_parser_postfix_expression_after_primary): Added a check for
7773 colon(s) after square braces, if so then handle it like an array
7774 notation. Also, break up array notations in unary op if found.
7775 (c_parser_direct_declarator_inner): Added a check for array
7776 notation.
7777 (c_parser_compound_statement): Added a check for array notation in
7778 a stmt. If one is present, then expand array notation expr.
7779 (c_parser_if_statement): Likewise.
7780 (c_parser_switch_statement): Added a check for array notations in
7781 a switch statement's condition. If true, then output an error.
7782 (c_parser_while_statement): Similarly, but for a while.
7783 (c_parser_do_statement): Similarly, but for a do-while.
7784 (c_parser_for_statement): Similarly, but for a for-loop.
7785 (c_parser_unary_expression): Check if array notation is used in a
7786 pre-increment or pre-decrement expression. If true, then expand
7787 them.
7788 (c_parser_array_notation): New function.
7789 * c-array-notation.c: New file.
7790 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7791
cd192ccc
MS
77922013-05-23 Mike Stump <mikestump@comcast.net>
7793
7794 * c-typeck.c (convert_for_assignment): Handle references to memory
7795 spaces better.
7796
427b248d
JM
77972013-05-16 Jason Merrill <jason@redhat.com>
7798
7799 * Make-lang.in (cc1$(exeext)): Use link mutex.
7800
44d90fe1
PC
78012013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7802
7803 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7804 to simply use OPT_Wpointer_arith.
7805 (build_unary_op): Likewise.
7806
4e7d7b3d
JJ
78072013-04-03 Jakub Jelinek <jakub@redhat.com>
7808
7809 PR c/19449
7810 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7811 argument. If set, or it temporarily for parsing of the first
7812 argument into force_folding_builtin_constant_p.
7813 (c_parser_postfix_expression): Adjust callers.
7814
839b422f
RB
78152013-03-21 Richard Biener <rguenther@suse.de>
7816
7817 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7818 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7819
2ee028f1
MP
78202013-02-12 Marek Polacek <polacek@redhat.com>
7821
7822 PR c/44938
7823 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7824 origtypes to NULL.
7825
8824edff
JJ
78262013-01-24 Jakub Jelinek <jakub@redhat.com>
7827
7828 PR c/56078
7829 * c-typeck.c (set_nonincremental_init_from_string): If
7830 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7831 returned false.
7832 (process_init_element): Likewise.
7833
eadd3d0d
JJ
78342012-12-20 Jakub Jelinek <jakub@redhat.com>
7835
7836 PR c++/55619
7837 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7838 argument, don't call default_function_array_conversion
7839 nor c_fully_fold here.
7840 (c_parser_asm_statement): Adjust callers.
7841 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7842 and outputs here, and call default_function_array_conversion
7843 on inputs that don't need to be addressable.
7844
f8a93a2e
JJ
78452012-12-18 Jakub Jelinek <jakub@redhat.com>
7846
7847 PR c/39464
7848 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7849 warning require that both c_common_unsigned_type as well as
7850 c_common_signed_type is the same for both mvl and mvr types.
7851
9771b263
DN
78522012-11-16 Diego Novillo <dnovillo@google.com>
7853
7854 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7855
7856 * c-common.c: Use new vec API in vec.h.
7857 * c-common.h: Likewise.
7858 * c-gimplify.c: Likewise.
7859 * c-pragma.c: Likewise.
7860 * c-pretty-print.c: Likewise.
7861 * c-pretty-print.h: Likewise.
7862 * c-semantics.c: Likewise.
7863 * c-decl.c: Likewise.
7864 * c-parser.c: Likewise.
7865 * c-tree.h: Likewise.
7866 * c-typeck.c: Likewise.
7867
880661a4
JW
78682012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7869
7870 PR c++/54930
7871 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7872
077d1abe
MLI
78732012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7874
7875 PR c/53066
7876 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7877 shadows a function, unless the variable is a function or a
7878 pointer-to-function.
7879
3a785c97
JJ
78802012-10-12 Jakub Jelinek <jakub@redhat.com>
7881
7882 PR c/54381
7883 * c-parser.c (struct c_tree_loc_pair): Removed.
7884 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7885 add location_t * and tree * arguments, fill in array of 3
7886 sizeof_arg trees and corresponding locs.
7887 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7888 c_parser_expr_list callers.
7889 (c_parser_postfix_expression_after_primary): Likewise. Pass
7890 array of 3 sizeof_arg trees and locs (corresponding to first
7891 3 arguments) to sizeof_pointer_memaccess_warning.
7892
703c8606
LC
78932012-10-09 Lawrence Crowl <crowl@google.com>
7894
7895 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7896 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7897 hash table.
7898
5d9de0d0
PC
78992012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7900
7901 PR c++/54194
7902 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7903 call.
7904
a212e43f
MG
79052012-10-09 Marc Glisse <marc.glisse@inria.fr>
7906
7907 PR c++/54427
7908 * c-typeck.c: Include c-common.h.
7909 (enum stv_conv): Moved to c-common.h.
7910 (scalar_to_vector): Moved to c-common.c.
7911 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7912 * Make-lang.in: c-typeck.c depends on c-common.h.
7913
3b78de56
AC
79142012-10-04 Arnaud Charlet <charlet@adacore.com>
7915
7916 * c-decl.c (c_write_global_declarations): Fix handling of
7917 -fdump-ada-spec*.
7918
78c60e3d
SS
79192012-09-30 Sharad Singhai <singhai@google.com>
7920
7921 * c-decl.c (c_write_global_declarations): Use a different method
7922 to determine if the dump has ben initialized.
7923
9f33203d
JM
79242012-09-14 Joseph Myers <joseph@codesourcery.com>
7925
7926 PR c/54552
7927 * c-typeck.c (c_cast_expr): When casting to a type requiring
7928 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7929 c_fully_fold first.
7930
a27d595d
JM
79312012-09-14 Joseph Myers <joseph@codesourcery.com>
7932
7933 PR c/54103
7934 * c-typeck.c (build_unary_op): Pass original argument of
7935 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7936 any C_MAYBE_CONST_EXPR, if it has integer operands.
7937 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7938 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7939 to c_objc_common_truthvalue_conversion, then remove any
7940 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7941 c_objc_common_truthvalue_conversion not
7942 c_common_truthvalue_conversion.
7943 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7944 call note_integer_operands for arguments with integer operands
7945 that are not integer constants.
7946
9feb29df
JJ
79472012-09-13 Jakub Jelinek <jakub@redhat.com>
7948
7949 PR c/54559
7950 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7951 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7952
d409320c
JJ
79532012-08-31 Jakub Jelinek <jakub@redhat.com>
7954
7955 PR c/54428
7956 * c-convert.c (convert): Don't call fold_convert_loc if
7957 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7958 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7959 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7960
6265d07c
JJ
79612012-08-24 Jakub Jelinek <jakub@redhat.com>
7962
7963 PR c/54355
7964 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7965 for nested and empty_ok arguments in the call to
7966 c_parser_declaration_or_fndef.
7967
1a4049e7
JJ
79682012-08-17 Jakub Jelinek <jakub@redhat.com>
7969
7970 * c-tree.h (c_last_sizeof_arg): Declare.
7971 * c-parser.c (struct c_tree_loc_pair): New type.
7972 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7973 non-NULL.
7974 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7975 (c_parser_postfix_expression_after_primary): Likewise. Call
7976 sizeof_pointer_memaccess_warning if needed.
7977 (sizeof_ptr_memacc_comptypes): New function.
7978 * c-typeck.c (c_last_sizeof_arg): New global variable.
7979 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7980
0229aee9
UB
79812012-07-24 Uros Bizjak <ubizjak@gmail.com>
7982
7983 * c-lang.h (lang_decl): Add variable_size GTY option.
7984
7ee2468b
SB
79852012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7986
7987 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7988 * Make-lang.in: Fix dependencies.
7989
d4a10d0a
SB
79902012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7991
7992 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7993 and add language Makefile hooks.
7994 * config-lang.in: New file.
7995 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7996 add the required "normal" config-lang.in rules.
7997 * c-lang.h: Moved from gcc/ to here.
7998 * c-tree.h: Likewise.
7999 * c-objc-common.c: Likewise.
8000 * c-objc-common.h: Likewise.
8001 * c-typeck.c: Likewise.
8002 * c-convert.c: Likewise.
8003 * c-lang.c: Likewise.
8004 * c-aux-info.c: Likewise.
8005 * c-errors.c: Likewise.
8006 * gccspec.c: Likewise.
8007 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8008 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8009\f
c48514be 8010Copyright (C) 2012-2021 Free Software Foundation, Inc.
d4a10d0a
SB
8011
8012Copying and distribution of this file, with or without modification,
8013are permitted in any medium without royalty provided the copyright
8014notice and this notice are preserved.