]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Replace gnu::unique_ptr with std::unique_ptr
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
4b4839e3
GA
12021-12-09 Jakub Jelinek <jakub@redhat.com>
2
3 PR pch/71934
4 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
5 to resort_data.new_value.
6
641ff219
GA
72021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
8
9 * c-parser.c (struct omp_dim): New struct type for use inside
10 c_parser_omp_variable_list.
11 (c_parser_omp_variable_list): Allow multiple levels of array and
12 component accesses in array section base-pointer expression.
13 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
14 c_parser_omp_var_list_parens.
15 (c_parser_omp_clause_from): Likewise.
16 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
17 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
18 POINTER_PLUS_EXPR.
19 (c_finish_omp_clauses): Extend allowed ranged of expressions
20 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
21
222021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
23
24 PR middle-end/92120
25 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
26 call to c_parser_omp_variable_list to 'true'.
27 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
28 array base handling.
29 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
30
c177e806
GA
312021-11-30 Thomas Schwinge <thomas@codesourcery.com>
32
33 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
34 orphan loop" checking.
35
362021-11-30 Cesar Philippidis <cesar@codesourcery.com>
37 Thomas Schwinge <thomas@codesourcery.com>
38
39 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
40 OpenACC gang reductions.
41
422021-11-30 Richard Biener <rguenther@suse.de>
43
44 * gimple-parser.c (c_parser_gimple_postfix_expression):
45 avoid unreachable code after break.
46
87cd82c8
GA
472021-11-29 Eric Gallager <egallager@gcc.gnu.org>
48
49 PR other/103021
50 * Make-lang.in: Use ETAGS variable in TAGS target.
51
522021-11-29 Richard Biener <rguenther@suse.de>
53
54 * c-typeck.c (c_tree_equal): Remove unreachable return.
55 * c-parser.c (get_matching_symbol): Likewise.
56
e1d43592
GA
572021-11-23 Jakub Jelinek <jakub@redhat.com>
58
59 * c-typeck.c (c_clone_omp_udr): Don't initialize
60 id.transform_lang_insert_block.
61
9c077398
GA
622021-11-19 Martin Sebor <msebor@redhat.com>
63
64 PR c++/33925
65 PR c/102867
66 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
67 code resulting from macro expansion.
68
692021-11-19 Martin Liska <mliska@suse.cz>
70
71 Revert:
72 2021-11-19 Martin Liska <mliska@suse.cz>
73
74 * c-parser.c (add_debug_begin_stmt): Use option directly.
75
483092d3
GA
762021-11-18 Matthias Kretz <m.kretz@gsi.de>
77
78 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
79 * c-parser.c (c_parser_postfix_expression): Likewise.
80
812021-11-18 Martin Liska <mliska@suse.cz>
82
83 * c-parser.c (add_debug_begin_stmt): Use option directly.
84
280d2838
GA
852021-11-17 Martin Sebor <msebor@redhat.com>
86
87 PR c/101702
88 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
89 bounds before deciding if they're constant.
90
e2b57363
GA
912021-11-15 Jakub Jelinek <jakub@redhat.com>
92
93 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
94 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
95
b39265d4
GA
962021-11-11 Jakub Jelinek <jakub@redhat.com>
97
98 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
99 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
100 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
101 OMP_CLAUSE_NUM_TEAMS_EXPR.
102 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
103 combined target teams even lower-bound expression.
104
1052021-11-11 Richard Biener <rguenther@suse.de>
106
107 * gimple-parser.c: Shuffle bitmap.h include.
108
18ae471f
GA
1092021-11-03 Joseph Myers <joseph@codesourcery.com>
110
111 PR c/103031
112 * c-convert.c (c_convert): New function, based on convert.
113 (convert): Make into wrapper of c_convert.
114 (convert_init): New function.
115 * c-typeck.c (enum impl_conv): Add ic_init_const.
116 (convert_for_assignment): Handle ic_init_const like ic_init. Add
117 new argument to convert_and_check call.
118 (digest_init): Pass ic_init_const to convert_for_assignment for
119 initializers required to be constant.
120
b4df2dd3
GA
1212021-11-02 Richard Sandiford <richard.sandiford@arm.com>
122
123 * c-tree.h (c_simulate_record_decl): Declare.
124 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
125 * c-decl.c (c_simulate_record_decl): New function.
126
c2bd5d8a
GA
1272021-10-22 Eric Gallager <egallager@gcc.gnu.org>
128
129 PR other/102663
130 * Make-lang.in: Add dummy c.install-dvi target.
131
93d183a5
GA
1322021-10-15 Richard Biener <rguenther@suse.de>
133
134 PR c/102763
135 * gimple-parser.c
136 (c_parser_gimple_postfix_expression_after_primary): Check
137 for a pointer do be dereferenced by ->.
138
5d5885c9
GA
1392021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
140
141 * c-parser.c (c_finish_omp_declare_variant): Change call from
142 c_omp_check_context_selector to omp_check_context_selector. Change
143 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
144
c9db17b8
GA
1452021-10-09 Jakub Jelinek <jakub@redhat.com>
146
147 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
148 (c_parser_omp_scan_loop_body): Use it.
149 (c_parser_omp_sections_scope): Likewise.
150
50e20ee6
GA
1512021-10-07 Richard Biener <rguenther@suse.de>
152
153 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
154
bb6194e0
GA
1552021-10-05 Richard Biener <rguenther@suse.de>
156
157 PR c/102605
158 * gimple-parser.c (c_parser_gimple_postfix_expression):
159 Accept more address _Literals.
160
da9c5f78
GA
1612021-10-04 Marek Polacek <polacek@redhat.com>
162
163 PR c++/97573
164 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
165
9d116bcc
GA
1662021-10-01 Martin Sebor <msebor@redhat.com>
167
168 PR c/102103
169 * c-typeck.c (maybe_warn_for_null_address): New function.
170 (build_binary_op): Call it.
171
1722021-10-01 Jakub Jelinek <jakub@redhat.com>
173 Richard Biener <rguenther@suse.de>
174
175 PR sanitizer/102515
176 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
177 for division even for SANITIZE_SI_OVERFLOW.
178
1792021-10-01 Jakub Jelinek <jakub@redhat.com>
180
181 * c-parser.c (c_parser_omp_clause_order): Set
182 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
183
fd133479
GA
1842021-09-28 Andrew Pinski <apinski@marvell.com>
185
186 PR c/32122
187 * c-parser.c (c_parser_statement_after_labels): Pass
188 the c_expr instead of the tree to c_finish_goto_ptr.
189 * c-typeck.c (c_finish_goto_ptr): Change the second
190 argument type to c_expr.
191 * c-tree.h (c_finish_goto_ptr): Likewise.
192 Error out if the expression was not of a pointer type.
193
e4777439
GA
1942021-09-22 Jakub Jelinek <jakub@redhat.com>
195
196 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
197 modifiers.
198
cf74e7b5
GA
1992021-09-18 Jakub Jelinek <jakub@redhat.com>
200
201 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
202 and reproducible modifiers.
203 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
204
2052021-09-18 Jakub Jelinek <jakub@redhat.com>
206
207 * c-parser.c (c_parser_omp_clause_default): Handle private and
208 firstprivate arguments, adjust diagnostics on unknown argument.
209
0a4cb439
GA
2102021-09-17 Jakub Jelinek <jakub@redhat.com>
211
212 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
213 is true.
214
a26206ec
GA
2152021-09-10 Jakub Jelinek <jakub@redhat.com>
216
217 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
218 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
219 don't call build_conditional_expr, instead build a COND_EXPR directly.
220 (c_parser_binary_expression): Avoid calling parser_build_binary_op
221 if omp_atomic_lhs even in more cases for >, < or ==.
222 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
223 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
224 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
225 * c-typeck.c (build_binary_op): For flag_openmp only handle
226 MIN_EXPR/MAX_EXPR.
227
b2748138
GA
2282021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
229
230 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
231 directive.
232
e11c6046
GA
2332021-09-01 Iain Sandoe <iain@sandoe.co.uk>
234
235 * c-decl.c (enum deprecated_states): Add unavailable state.
236 (merge_decls): Copy unavailability.
237 (quals_from_declspecs): Handle unavailable case.
238 (start_decl): Amend the logic handling suppression of nested
239 deprecation states to include unavailability.
240 (smallest_type_quals_location): Amend comment.
241 (grokdeclarator): Handle the unavailable deprecation state.
242 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
243 * c-tree.h (struct c_declspecs): Add unavailable_p.
244 * c-typeck.c (build_component_ref): Handle unavailability.
245 (build_external_ref): Likewise.
246
2472021-09-01 Roger Sayle <roger@nextmovesoftware.com>
248 Joseph Myers <joseph@codesourcery.com>
249
250 PR c/79412
251 * c-decl.c (duplicate_decls): On significant mismatches, mark the
252 types of both (non-function) decls as error_mark_node, so that the
253 middle-end can see the code is malformed.
254 (free_attr_access_data): Don't process if the type has been set to
255 error_mark_node.
256
6d51ee43
GA
2572021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
258
259 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
260 and 'ancestor' in 'target device' clauses.
261
38b19c5b
GA
2622021-08-23 Jakub Jelinek <jakub@redhat.com>
263
264 * c-parser.c (c_parser_omp_clause_num_tasks,
265 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
266
5b2876f9
GA
2672021-08-22 Martin Uecker <muecker@gwdg.de>
268
269 PR c/98397
270 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
271 for pointers to arrays with qualifiers.
272 (build_conditional_expr): For C23 don't lose qualifiers for pointers
273 to arrays when the other pointer is a void pointer. Update warnings.
274 (convert_for_assignment): Update warnings for C2X when converting from
275 void* with qualifiers to a pointer to array with the same qualifiers.
276
7c9e1645
GA
2772021-08-20 Jakub Jelinek <jakub@redhat.com>
278
279 * c-parser.c (c_parser_omp_error): New function.
280 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
281
2822021-08-20 Jakub Jelinek <jakub@redhat.com>
283
284 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
285 comma at the end of list.
286 (c_parser_omp_requires): Likewise.
287
b57fba5e
GA
2882021-08-19 Jakub Jelinek <jakub@redhat.com>
289
290 * c-parser.c (c_parser_omp_requires): Don't call
291 c_parser_peek_2nd_token and optionally consume token if current
292 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
293
6e529985
GA
2942021-08-18 Jakub Jelinek <jakub@redhat.com>
295
296 * c-parser.c (c_parser_omp_nothing): New function.
297 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
298
2992021-08-18 Jakub Jelinek <jakub@redhat.com>
300
301 * c-parser.c (c_parser_statement_after_labels): Add restart label
302 near the start of the function. If c_parser_pragma returns false,
303 goto restart.
304 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
305 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
306 return what c_parser_omp_declare returned. Return true instead of
307 false after emitting errors that the directive is not allowed in
308 pragma_stmt context.
309 (c_parser_omp_ordered): Return true instead of
310 false after emitting errors that the directive is not allowed in
311 pragma_stmt context.
312 (c_parser_omp_target_update): Likewise.
313 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
314 Change return type from tree to bool, return false if the
315 directive should be ignored in pragma_stmt contexts.
316 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
317 return their result directly.
318 (c_parser_omp_cancellation_point): Change return type from void to
319 bool, return false if the directive should be ignored in pragma_stmt
320 contexts.
321 (c_parser_omp_declare): Likewise.
322
2d14d64b
GA
3232021-08-17 Jakub Jelinek <jakub@redhat.com>
324
325 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
326 (c_parser_omp_scope): New function.
327 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
328
72be20e2
GA
3292021-08-12 Jakub Jelinek <jakub@redhat.com>
330
331 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
332 (c_parser_omp_clause_filter): New function.
333 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
334 (OMP_MASKED_CLAUSE_MASK): Define.
335 (c_parser_omp_masked): New function.
336 (c_parser_omp_parallel): Handle parallel masked.
337 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
338 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
339
3402021-08-12 Martin Uecker <muecker@gwdg.de>
341
342 PR c/101838
343 PR c/29970
344 * c-typeck.c (c_expr_sizeof_type): Evaluate
345 size expressions for structs of variable size.
346
3472021-08-12 Tobias Burnus <tobias@codesourcery.com>
348
349 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
350 'primary' as alias for 'master'.
351
3ae564ea
GA
3522021-08-10 Martin Uecker <muecker@gwdg.de>
353
354 PR c/29970
355 * c-typeck.c (c_expr_sizeof_expr): Evaluate
356 size expressions for structs of variable size.
357
f92f4778
GA
3582021-08-06 Tamar Christina <tamar.christina@arm.com>
359
360 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
361 * c-tree.h (c_simulate_enum_decl): Likewise.
362
3632021-08-06 Martin Sebor <msebor@redhat.com>
364
365 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
366 vec arguments to by-reference.
367 (c_finish_omp_declare_simd): Same.
368 (c_parser_compound_statement_nostart): Same.
369 (c_parser_for_statement): Same.
370 (c_parser_objc_methodprotolist): Same.
371 (c_parser_oacc_routine): Same.
372 (c_parser_omp_for_loop): Same.
373 (c_parser_omp_declare_simd): Same.
374
419c6c68
GA
3752021-07-21 Thomas Schwinge <thomas@codesourcery.com>
376 Joseph Myers <joseph@codesourcery.com>
377 Cesar Philippidis <cesar@codesourcery.com>
378
379 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
380 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
381 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
382 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
383
92d45509
GA
3842021-07-20 Martin Sebor <msebor@redhat.com>
385
386 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
387 by-const-reference.
388 * c-typeck.c (c_build_function_call_vec): Same.
389
d97d71a1
GA
3902021-07-15 Martin Sebor <msebor@redhat.com>
391
392 PR c/101289
393 PR c/97548
394 * c-decl.c (get_parm_array_spec): Strip nops.
395
6fba0eea
GA
3962021-07-06 Martin Sebor <msebor@redhat.com>
397
398 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
399
7a60a6e8
GA
4002021-07-02 Jakub Jelinek <jakub@redhat.com>
401
402 PR c/101297
403 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
404 appears before a CPP_NAME.
405
90708f87
GA
4062021-06-25 Martin Sebor <msebor@redhat.com>
407
408 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
409 warning_suppressed_p, suppress_warning, and copy_no_warning.
410 (diagnose_mismatched_decls): Same.
411 (duplicate_decls): Same.
412 (grokdeclarator): Same.
413 (finish_function): Same.
414 (c_write_global_declarations_1): Same.
415 * c-fold.c (c_fully_fold_internal): Same.
416 * c-parser.c (c_parser_expr_no_commas): Same.
417 (c_parser_postfix_expression): Same.
418 * c-typeck.c (array_to_pointer_conversion): Same.
419 (function_to_pointer_conversion): Same.
420 (default_function_array_conversion): Same.
421 (convert_lvalue_to_rvalue): Same.
422 (default_conversion): Same.
423 (build_indirect_ref): Same.
424 (build_function_call_vec): Same.
425 (build_atomic_assign): Same.
426 (build_unary_op): Same.
427 (c_finish_return): Same.
428 (emit_side_effect_warnings): Same.
429 (c_finish_stmt_expr): Same.
430 (c_omp_clause_copy_ctor): Same.
431
9aa8327e
GA
4322021-06-24 Jakub Jelinek <jakub@redhat.com>
433
434 PR c/101176
435 * c-parser.c (c_parser_has_attribute_expression): Set source range for
436 the result.
437
4382021-06-24 Jakub Jelinek <jakub@redhat.com>
439
440 PR c/101171
441 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
442 error_mark_node.
443
4442021-06-24 Jakub Jelinek <jakub@redhat.com>
445
446 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
447 C_ORT_OMP for clauses on target construct.
448 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
449 (c_parser_omp_target): For non-combined target add
450 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
451 C_ORT_OMP_TARGET to c_finish_omp_clauses.
452 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
453 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
454 never present on C_ORT_*DECLARE_SIMD.
455 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
456 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
457 corresponding map clauses.
458
2f080224
GA
4592021-06-21 Jakub Jelinek <jakub@redhat.com>
460
461 PR inline-asm/100785
462 * c-typeck.c (c_mark_addressable): Diagnose trying to make
463 bit-fields addressable.
464
ede6c356
GA
4652021-06-15 Robin Dapp <rdapp@linux.ibm.com>
466
467 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
468 similar.
469
8dc48181
GA
4702021-06-14 Tobias Burnus <tobias@codesourcery.com>
471
472 PR c/100913
473 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
474 var in the error case.
475
438aac59
GA
4762021-06-07 Eric Botcazou <ebotcazou@adacore.com>
477
478 PR c/100920
479 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
480 spot built-in functions.
481
7d6987e9
GA
4822021-06-06 Jakub Jelinek <jakub@redhat.com>
483
484 PR c/100902
485 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
486 even when target is combined with other constructs.
487
4882021-06-06 Eric Botcazou <ebotcazou@adacore.com>
489
490 PR c/100920
491 * c-decl.c (finish_struct): Fix thinko in previous change.
492 * c-typeck.c (convert_for_assignment): Do not warn on pointer
493 assignment and initialization for storage order purposes if the
494 RHS is a call to a DECL_IS_MALLOC function.
495
600f90cb
GA
4962021-06-04 Martin Sebor <msebor@redhat.com>
497
498 PR c/100783
499 * c-objc-common.c (print_type): Handle erroneous types.
500
440c8a0a
GA
5012021-06-03 Jakub Jelinek <jakub@redhat.com>
502
503 PR c++/100859
504 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
505 after depend only cases.
506
ee682192
GA
5072021-05-31 Richard Biener <rguenther@suse.de>
508
509 PR c++/88601
510 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
511 * c-parser.c (c_parser_postfix_expression): Likewise.
512
48166757
GA
5132021-05-28 Richard Biener <rguenther@suse.de>
514
515 PR c/100803
516 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
517 invalid if conditions.
518
5192021-05-28 Jakub Jelinek <jakub@redhat.com>
520
521 PR middle-end/99928
522 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
523 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
524 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
525 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
526 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
527 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
528 if present in map_head, map_field_head or map_firstprivate_head
529 bitmaps.
530
5312021-05-28 Tobias Burnus <tobias@codesourcery.com>
532
533 * c-parser.c (c_parser_omp_clause_affinity): New.
534 (c_parser_omp_clause_name, c_parser_omp_variable_list,
535 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
536 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
537 c_finish_omp_clauses): Likewise.
538
01c59ef2
GA
5392021-05-26 Eric Botcazou <ebotcazou@adacore.com>
540
541 PR c/100653
542 * c-decl.c (finish_struct): Warn for a union containing an aggregate
543 field with a differing scalar storage order.
544
2832d51b
GA
5452021-05-21 Jakub Jelinek <jakub@redhat.com>
546
547 PR middle-end/99928
548 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
549 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
550 if a decl is mentioned both in map clause and in such firstprivate
551 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
552
65f32e5d
GA
5532021-05-19 Jakub Jelinek <jakub@redhat.com>
554
555 PR middle-end/99928
556 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
557 master when combined with taskloop.
558 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
559 parallel master when not combined with taskloop.
560
a8daf9a1
GA
5612021-05-18 Richard Biener <rguenther@suse.de>
562
563 PR c/100522
564 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
565 Diagnose calls to non-functions.
566 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
567
a7ffc1ef
GA
5682021-05-17 Richard Biener <rguenther@suse.de>
569
570 PR c/100625
571 * gimple-parser.c (c_parser_gimple_label): Avoid building
572 a GIMPLE label with NULL label decl.
573
f9af11c7
GA
5742021-05-13 Martin Sebor <msebor@redhat.com>
575
576 PR c/100550
577 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
578
0ff3a0f2
GA
5792021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
580
581 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
582 'close'.
583
aa891c56
GA
5842021-05-10 Martin Liska <mliska@suse.cz>
585
586 * c-aux-info.c (affix_data_type): Use startswith
587 function instead of strncmp.
588 * c-typeck.c (build_function_call_vec): Likewise.
589 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
590
62d87a32
GA
5912021-05-07 Eric Botcazou <ebotcazou@adacore.com>
592
593 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
594 on the address of a pointer field in a record with reverse SSO.
595
99e8df7a
GA
5962021-05-04 Tobias Burnus <tobias@codesourcery.com>
597
598 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
599 for || and && reductions.
600
3c8e539d
GA
6012021-04-29 Joseph Myers <joseph@codesourcery.com>
602
603 * c-typeck.c (function_types_compatible_p): For C2X, treat
604 unprototyped function as compatible with non-variadic prototyped
605 function even if some argument types are changed by the default
606 argument promotions.
607
ee351f7f
GA
6082021-04-15 Martin Sebor <msebor@redhat.com>
609
610 PR c/99420
611 PR c/99972
612 * c-decl.c (pushdecl): Always propagate type attribute.
613
6142021-04-15 Richard Sandiford <richard.sandiford@arm.com>
615
616 PR c/98852
617 * c-typeck.c (c_common_type): Do not drop attributes that
618 affect type identity.
619
1d54b138
GA
6202021-04-10 Jakub Jelinek <jakub@redhat.com>
621
622 PR c/99990
623 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
624 error_mark_node.
625
4493b1c1
GA
6262021-03-25 Jakub Jelinek <jakub@redhat.com>
627
628 PR c++/99565
629 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
630 to operand_equal_p.
631
5f256a70
GA
6322021-03-19 Jakub Jelinek <jakub@redhat.com>
633
634 PR c/99588
635 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
636 with modifycode NOP_EXPR produces and mark the _Atomic var as read
637 if found.
638 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
639 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
640 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
641
3c5b6d24
GA
6422021-03-15 Tobias Burnus <tobias@codesourcery.com>
643
644 PR c++/99509
645 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
646 ensure that the varpool node is marked as offloadable.
647
ceae9533
GA
6482021-03-05 Tobias Burnus <tobias@codesourcery.com>
649
650 PR c/99137
651 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
652
4028d01a
GA
6532021-02-24 Martin Sebor <msebor@redhat.com>
654
655 PR middle-end/97172
656 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
657
bf81237e
GA
6582021-02-18 Jakub Jelinek <jakub@redhat.com>
659
660 PR c/99136
661 * c-typeck.c (c_finish_return): Don't wrap retval into
662 EXCESS_PRECISION_EXPR in functions that return void.
663
0c5cdb31
GA
6642021-02-11 Marek Polacek <polacek@redhat.com>
665
666 * c-parser.c (c_parser_if_statement): Use vec_free.
667
a19dd5e6
GA
6682021-02-04 Martin Sebor <msebor@redhat.com>
669
670 PR c/97882
671 * c-decl.c (locate_old_decl): Add type to diagnostic output.
672 (diagnose_mismatched_decls): Same.
673 (start_function): Introduce temporaries for better readability.
674 * c-typeck.c (comptypes_internal): Only consider complete enum
675 types in comparisons with integers.
676
f7884fb1
GA
6772021-02-01 Martin Sebor <msebor@redhat.com>
678
679 PR middle-end/97172
680 * c-decl.c (free_attr_access_data): New function.
681 (c_parse_final_cleanups): Call free_attr_access_data.
682
59cf67d1
GA
6832021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
684
685 * c-parser.c (c_parser_omp_clause_detach): New.
686 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
687 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
688 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
689 clause. Prevent use of detach with mergeable and overriding the
690 data sharing mode of the event handle.
691
2f7f0d32
GA
6922021-01-15 Jakub Jelinek <jakub@redhat.com>
693
694 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
695 unqualified element type and then call c_build_qualified_type on the
696 ARRAY_TYPE.
697
7d187e4f
GA
6982021-01-07 Richard Biener <rguenther@suse.de>
699
700 * gimple-parser.c (c_parser_gimple_compound_statement): Only
701 reallocate loop array if it is too small.
702
eefe499f
GA
7032020-12-16 Martin Uecker <muecker@gwdg.de>
704
705 PR c/98047
706 * c-typeck.c (build_modify_expr): Drop qualifiers.
707
7082020-12-16 Martin Uecker <muecker@gwdg.de>
709
710 PR c/98260
711 * c-parser.c (c_parser_expression): Look into
712 nop expression when marking expressions as read.
713
d52945ce
GA
7142020-12-14 Martin Liska <mliska@suse.cz>
715
716 PR sanitizer/98204
717 * c-typeck.c (pointer_diff): Do not emit a top-level
718 sanitization.
719 (build_binary_op): Likewise.
720
ca2bd949
GA
7212020-12-09 Tobias Burnus <tobias@codesourcery.com>
722
723 * c-parser.c (c_parser_omp_allocate): New.
724 (c_parser_omp_construct): Call it.
725
7262020-12-09 Richard Biener <rguenther@suse.de>
727
728 PR c/98200
729 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
730 early on error.
731
bc8a7013
GA
7322020-12-07 Martin Uecker <muecker@gwdg.de>
733
734 PR c/97981
735 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
736 that drops qualifiers to the end of the function.
737
d48df6f2
GA
7382020-11-26 Martin Uecker <muecker@gwdg.de>
739
740 PR c/65455
741 PR c/92935
742 * c-parser.c (c_parser_declaration_or_fndef): Remove
743 redundant code to drop qualifiers of _Atomic types for __auto_type.
744 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
745 types for __typeof__.
746
1e2c9a27
GA
7472020-11-24 Jakub Jelinek <jakub@redhat.com>
748
749 PR c/97958
750 * c-parser.c (c_parser_binary_expression): For omp atomic binary
751 expressions, use make_node instead of build2 to avoid checking build2
752 performs.
753
8e6198d0
GA
7542020-11-23 Joseph Myers <joseph@codesourcery.com>
755
756 PR c/95630
757 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
758 for comparisons of complete and incomplete pointers.
759
7a97e2fc
GA
7602020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
761
762 * c-aux-info.c (gen_type): Support opaque types.
763
82e5048e
GA
7642020-11-20 Martin Sebor <msebor@redhat.com>
765
766 PR middle-end/97879
767 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
768
7692020-11-20 Jakub Jelinek <jakub@redhat.com>
770
771 PR other/97911
772 * Make-lang.in (c.serial): Change from goal to a variable.
773 (.PHONY): Drop c.serial.
774
7752020-11-20 Martin Uecker <muecker@gwdg.de>
776
777 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
778
d62586ee
GA
7792020-11-19 Jakub Jelinek <jakub@redhat.com>
780
781 PR c/97860
782 * c-decl.c (get_parm_array_spec): Bail out of nelts is
783 error_operand_p.
784
25bb75f8
GA
7852020-11-18 Jakub Jelinek <jakub@redhat.com>
786
787 * Make-lang.in (c.serial): New goal.
788 (.PHONY): Add c.serial c.prev.
789 (cc1$(exeext)): Call LINK_PROGRESS.
790
77f67db2
GA
7912020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
792
793 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
794 goto too.
795 * c-typeck.c (build_asm_expr): Remove an assert checking output
796 absence for asm goto.
797
7982020-11-13 Jakub Jelinek <jakub@redhat.com>
799
800 * c-typeck.c (c_finish_omp_clauses): Don't clear
801 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
802
8032020-11-13 Iain Sandoe <iain@sandoe.co.uk>
804
805 PR objc/77404
806 * c-parser.c (c_parser_objc_class_definition): Pass the
807 location of the class name to the interface declaration.
808
bb622641
GA
8092020-11-10 Strager Neds <strager.nds@gmail.com>
810
811 * c-decl.c (merge_decls): Use new overload of
812 set_decl_section_name.
813
8142020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
815
816 * c-parser.c (c_parser_omp_target_data): Add use of
817 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
818 handled map clause kind.
819 (c_parser_omp_target_enter_data): Likewise.
820 (c_parser_omp_target_exit_data): Likewise.
821 (c_parser_omp_target): Likewise.
822 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
823 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
824 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
825 same struct field access to co-exist on OpenMP construct.
826
2da7ee05
GA
8272020-11-07 Martin Uecker <muecker@gwdg.de>
828
829 * c-parser.c (c_parser_label): Implement mixing of labels and code.
830 (c_parser_all_labels): Likewise.
831
44cab2d8
GA
8322020-11-06 Iain Sandoe <iain@sandoe.co.uk>
833
834 * c-parser.c (c_parser_objc_at_property_declaration):
835 Improve parsing fidelity. Associate better location info
836 with @property attributes. Clean up the interface to
837 objc_add_property_declaration ().
838
8392020-11-06 Nathan Sidwell <nathan@acm.org>
840
841 * c-decl.c (diagnose_mismatched_decls): Rename
842 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
843 (warn_if_shadowing, implicitly_declare, names_builtin_p)
844 (collect_source_refs): Likewise.
845 * c-typeck.c (inform_declaration, inform_for_arg)
846 (convert_for_assignment): Likewise.
847
8482020-11-06 Tobias Burnus <tobias@codesourcery.com>
849
850 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
851 OpenACC matching.
852 (c_parser_omp_construct): Update call.
853
35c125cb
GA
8542020-11-04 Jakub Jelinek <jakub@redhat.com>
855
856 PR c++/97670
857 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
858 find underlying decl to clear in the aligned_head bitmap.
859
8602020-11-04 Joseph Myers <joseph@codesourcery.com>
861
862 * c-decl.c (handle_nodiscard_attribute): New.
863 (std_attribute_table): Add nodiscard.
864 * c-parser.c (c_parser_std_attribute): Expect argument to
865 nodiscard attribute to be a string. Do not special-case ignoring
866 nodiscard.
867 * c-typeck.c (maybe_warn_nodiscard): New.
868 (build_compound_expr, emit_side_effect_warnings): Call
869 maybe_warn_nodiscard.
870 (c_process_expr_stmt, c_finish_stmt_expr): Also call
871 emit_side_effect_warnings if warn_unused_result.
872
4f0606fe
GA
8732020-10-29 Asher Gordon <AsDaGo@posteo.net>
874
875 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
876 with XDELETE.
877 (finish_init): Likewise.
878 (pop_init_level): Likewise.
879
e93aae4a
GA
8802020-10-28 Joseph Myers <joseph@codesourcery.com>
881
882 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
883 error_at for omitted parameter name.
884
8852020-10-28 Jakub Jelinek <jakub@redhat.com>
886
887 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
888 (c_parser_omp_clause_allocate): New function.
889 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
890 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
891 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
892 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
893 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
894 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
895 PRAGMA_OMP_CLAUSE_ALLOCATE.
896 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
897
89bb01e7
GA
8982020-10-27 Joseph Myers <joseph@codesourcery.com>
899
900 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
901 standard attributes.
902
efe71fcc
GA
9032020-10-23 Marek Polacek <polacek@redhat.com>
904
905 PR c++/91741
906 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
907 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
908 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
909 * c-tree.h (char_type_p): Declare.
910 * c-typeck.c (char_type_p): No longer static.
911
9122020-10-23 Martin Sebor <msebor@redhat.com>
913
914 PR middle-end/97552
915 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
916
2fe5b7d1
GA
9172020-09-19 Martin Sebor <msebor@redhat.com>
918
919 PR c/50584
920 * c-decl.c (lookup_last_decl): Define new function.
921 (c_decl_attributes): Call it.
922 (start_decl): Add argument and use it.
923 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
924 (get_parm_array_spec): Define new function.
925 (push_parm_decl): Call get_parm_array_spec.
926 (start_function): Call warn_parm_array_mismatch. Build attribute
927 access and add it to current function.
928 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
929 in forms of array parameters.
930 * c-tree.h (start_decl): Add argument.
931
9322020-09-19 Sandra Loosemore <sandra@codesourcery.com>
933
934 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
935 with...
936 (in_statement): New.
937 (start_function): Adjust for above change.
938 (c_push_function_context, c_pop_function_context): Likewise.
939 * c-lang.h (struct language_function): Likewise.
940 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
941 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
942 New.
943 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
944 (c_parser_switch_statement): Adjust break/switch context handling
945 and calls to renamed functions.
946 (c_parser_while_statement): Adjust break/switch context handling and
947 build a WHILE_STMT.
948 (c_parser_do_statement): Ditto, with DO_STMT respectively.
949 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
950 (c_parser_omp_for_loop): Adjust break/switch context handling.
951 * c-tree.h (c_break_label, c_cont_label): Delete.
952 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
953 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
954 (in_statement, switch_statement_break_seen_p): Declare.
955 (c_start_case, c_finish_case): Renamed to...
956 (c_start_switch, c_finish_switch).
957 (c_finish_bc_stmt): Adjust arguments.
958 * c-typeck.c (build_function_call_vec): Don't try to print
959 statements with %qE format.
960 (struct c_switch): Rename switch_expr field to switch_stmt.
961 Add break_stmt_seen_p field.
962 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
963 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
964 (do_case): Update for changes to struct c_switch.
965 (c_finish_case): Rename to c_finish_switch. Update for changes to
966 struct c_switch and change of representation from SWITCH_EXPR to
967 SWITCH_STMT.
968 (c_finish_loop): Delete.
969 (c_finish_bc_stmt): Update to reflect changes to break/continue
970 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
971 of a GOTO_EXPR except for objc foreach loops.
972
e1a4a8a0
GA
9732020-09-01 Jakub Jelinek <jakub@redhat.com>
974
975 PR c++/96867
976 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
977 only on PARM_DECLs.
978
8f7ea26a
GA
9792020-08-28 Martin Sebor <msebor@redhat.com>
980
981 PR c/96596
982 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
983 argument type.
984
8b394f01
GA
9852020-08-27 Martin Liska <mliska@suse.cz>
986
987 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
988 growth function to true.
989
db0f6efe
GA
9902020-08-25 Tobias Burnus <tobias@codesourcery.com>
991
992 PR c/96678
993 * c-typeck.c (handle_omp_array_sections_1): Talk about
994 array function parameter in the error message.
995
5c265693
GA
9962020-08-18 Jakub Jelinek <jakub@redhat.com>
997
998 PR c/96571
999 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1000 to int, holding index of the match. Call mark_exp_read on the selector
1001 expression and on expressions other than the selected one.
1002
4967ca2f
GA
10032020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1004
1005 PR c/96377
1006 * c-typeck.c (process_init_element): Split test for whether to
1007 recurse into a record, union or array into...
1008 (initialize_elementwise_p): ...this new function. Don't recurse
1009 into a vector type if the initialization value is also a vector.
1010
48cc2e46
GA
10112020-07-31 Richard Biener <rguenther@suse.de>
1012
1013 PR debug/96383
1014 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1015 Define to c_common_finalize_early_debug.
1016
3ea9abca
GA
10172020-07-22 Tobias Burnus <tobias@codesourcery.com>
1018
1019 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1020 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1021 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1022
30430061
GA
10232020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1024
1025 PR target/95237
1026 * c-decl.c (finish_decl): Call target hook
1027 lower_local_decl_alignment to lower local decl alignment.
1028
3f8ca9cb
GA
10292020-07-09 Julian Brown <julian@codesourcery.com>
1030 Thomas Schwinge <thomas@codesourcery.com>
1031
1032 PR middle-end/95270
1033 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1034 for standalone attach/detach clauses.
1035
a82c4c4c 10362020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1037
1038 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1039 set, warn for conversion between pointers that point to incompatible
1040 scalar storage orders.
1041
f60ee68d
GA
10422020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1043
1044 * c-parser.c (c_parser_statement_after_labels): Pass correct
1045 parameters to c_parser_do_statement.
1046
56638b9b
GA
10472020-06-16 Jakub Jelinek <jakub@redhat.com>
1048
1049 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1050 c_in_omp_for.
1051 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1052 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1053 c_finish_omp_for.
1054 * c-tree.h (c_in_omp_for): Declare.
1055 * c-typeck.c (c_in_omp_for): Define.
1056 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1057 (digest_init): Likewise.
1058 (build_binary_op): Likewise.
1059
10602020-06-16 Jakub Jelinek <jakub@redhat.com>
1061
1062 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1063 from kind by comma rather than colon.
1064
1a59f3db
GA
10652020-06-05 Mark Wielaard <mark@klomp.org>
1066
1067 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1068 an undeclared builtin, then add a fixit header hint, if found.
1069 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1070 warning_at about implicit builtin declaration type mismatch.
1071
9a5b7438
GA
10722020-06-03 Mark Wielaard <mark@klomp.org>
1073
1074 * c-parser.c (struct c_parser): Add seen_string_literal
1075 bitfield.
1076 (c_parser_consume_token): Reset seen_string_literal.
1077 (c_parser_error_richloc): Add name_hint if seen_string_literal
1078 and next token is a CPP_NAME and we have a missing header
1079 suggestion for the name.
1080 (c_parser_string_literal): Set seen_string_literal.
1081
10822020-06-03 Mark Wielaard <mark@klomp.org>
1083
1084 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1085 scope with matching_parens after CPP_OPEN_PAREN.
1086
10872020-06-03 Tobias Burnus <tobias@codesourcery.com>
1088
1089 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1090
53ffb43a
GA
10912020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1092
1093 * Make-lang.in: Remove extra slash.
1094
8f66f175
ML
10952020-05-19 Martin Liska <mliska@suse.cz>
1096
1097 * c-parser.c: Fix typo.
1098
49ddde69
JJ
10992020-05-14 Jakub Jelinek <jakub@redhat.com>
1100
1101 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1102
eb72dc66
RB
11032020-05-07 Richard Biener <rguenther@suse.de>
1104
1105 PR middle-end/94703
1106 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1107 DECL_GIMPLE_REG_P.
1108
bf915591
JJ
11092020-04-30 Jakub Jelinek <jakub@redhat.com>
1110
1111 PR c/94842
1112 * c-decl.c (set_labels_context_r): In addition to context-less
1113 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1114 parent function if any.
1115 (store_parm_decls): Adjust comment.
1116
e1113ffb
JJ
11172020-04-19 Jakub Jelinek <jakub@redhat.com>
1118
1119 PR objc/94637
1120 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1121 two CPP_COLON tokens.
1122
2e389749
JJ
11232020-04-17 Jakub Jelinek <jakub@redhat.com>
1124
1125 PR other/94629
1126 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1127 to data.clauses.
1128
2dc9294c
JJ
11292020-04-15 Jakub Jelinek <jakub@redhat.com>
1130
1131 PR c/94593
1132 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1133 requires directive when not at file scope.
1134
13e41d8b
TB
11352020-04-08 Tobias Burnus <tobias@codesourcery.com>
1136
1137 PR middle-end/94120
1138 * c-decl.c (c_check_in_current_scope): New function.
1139 * c-tree.h (c_check_in_current_scope): Declare it.
1140 * c-parser.c (c_parser_oacc_declare): Add check that variables
1141 are declared in the same scope as the directive. Fix handling
1142 of namespace vars.
1143
4df50a05
JJ
11442020-04-07 Jakub Jelinek <jakub@redhat.com>
1145
1146 PR c++/94512
1147 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1148 if c_parser_omp_master succeeded.
1149
5db9e893
JJ
11502020-03-23 Jakub Jelinek <jakub@redhat.com>
1151
1152 PR gcov-profile/94029
1153 PR c/94239
1154 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1155 the function_start_locus location. Don't do that afterwards for the
1156 __GIMPLE body parsing.
1157
9def91e9
JJ
11582020-03-19 Jakub Jelinek <jakub@redhat.com>
1159
1160 PR gcov-profile/94029
1161 * c-tree.h (finish_function): Add location_t argument defaulted to
1162 input_location.
1163 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1164 set it to the locus of closing } if non-NULL.
1165 (c_parser_compound_statement_nostart): Return locus of closing }.
1166 (c_parser_parse_rtl_body): Likewise.
1167 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1168 finish_function.
1169 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1170 input_location to set function_end_locus.
1171
046c5890
JJ
11722020-03-17 Jakub Jelinek <jakub@redhat.com>
1173
1174 PR c/94172
1175 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1176 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1177 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1178 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1179 ENUMERAL_TYPEs.
1180 (finish_incomplete_vars): New function, moved from finish_struct. Use
1181 relayout_decl instead of layout_decl.
1182 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1183 being TYPE_VFIELD. Use finish_incomplete_vars.
1184 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1185 finish_incomplete_vars.
1186 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1187 also on ENUMERAL_TYPEs.
1188
c015ff8c
JJ
11892020-03-16 Jakub Jelinek <jakub@redhat.com>
1190
1191 PR c/94179
1192 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1193
f2e9fe5f
MS
11942020-03-13 Martin Sebor <msebor@redhat.com>
1195
1196 PR c/94040
1197 * c-decl.c (builtin_structptr_type_count): New constant.
1198 (match_builtin_function_types): Reject decls that are incompatible
1199 in types pointed to by pointers.
1200 (diagnose_mismatched_decls): Adjust comments.
1201
c9d70946
JM
12022020-03-05 Joseph Myers <joseph@codesourcery.com>
1203
1204 PR c/93577
1205 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1206 empty when initialized type is error_mark_node.
1207 (set_designator, process_init_element): Ignore initializers for
1208 elements of a variable-size type or of error_mark_node.
1209
726e292d
MS
12102020-03-01 Martin Sebor <msebor@redhat.com>
1211
1212 PR middle-end/93926
1213 * c-decl.c (types_close_enough_to_match): New function.
1214 (match_builtin_function_types):
1215 (diagnose_mismatched_decls): Add missing inform call to a warning.
1216
a499c2f8
MS
12172020-03-01 Martin Sebor <msebor@redhat.com>
1218
1219 PR c/93812
1220 * c-typeck.c (build_functype_attribute_variant): New function.
1221 (composite_type): Call it.
1222
9c3da8cc
JJ
12232020-02-25 Jakub Jelinek <jakub@redhat.com>
1224
1225 PR other/93912
1226 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1227 Rename last argument from probablity to probability.
1228
bacdd5e9
JJ
12292020-02-13 Jakub Jelinek <jakub@redhat.com>
1230
1231 PR c/93576
1232 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1233 *expr if it has side effects.
1234
f9eb0973
JL
12352020-01-30 Jeff Law <law@redhat.com>
1236
1237 PR c/88660
1238 * c-parser.c (c_parser_switch_statement): Make sure to request
1239 marking the switch expr as used.
1240
ac68e287
JM
12412020-01-22 Joseph Myers <joseph@codesourcery.com>
1242
1243 PR c/93348
1244 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1245 argument with integer operands.
1246
852f0ae8
KK
12472020-01-16 Kerem Kat <keremkat@gmail.com>
1248
1249 PR c/92833
1250 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1251 to support 4 available tokens.
1252
e2346a33
JM
12532020-01-15 Joseph Myers <joseph@codesourcery.com>
1254
1255 PR c/93072
1256 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1257 determine whether to set DECL_CONTEXT.
1258
3d77686d
JM
12592020-01-13 Joseph Myers <joseph@codesourcery.com>
1260
1261 PR c/93241
1262 * c-typeck.c (build_c_cast): Check for expressions with integer
1263 operands that can occur in an unevaluated part of an integer
1264 constant expression and call note_integer_operands as needed.
1265
f74c4b2c
RB
12662019-01-08 Richard Biener <rguenther@suse.de>
1267
1268 PR middle-end/93199
1269 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1270 permanently.
1271
8d9254fc
JJ
12722020-01-01 Jakub Jelinek <jakub@redhat.com>
1273
1274 Update copyright years.
1275
39292e25
EB
12762019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1277
1278 * c-decl.c (collect_source_ref_cb): Delete.
1279 (for_each_global_decl): Rename into...
1280 (collect_source_refs): ...this. Call collect_source_ref directly.
1281 (c_parse_final_cleanups): Always call collect_source_ref on the main
1282 input filename.
1283
519d7496
JB
12842019-12-19 Julian Brown <julian@codesourcery.com>
1285 Cesar Philippidis <cesar@codesourcery.com>
1286
1287 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1288 detach clauses.
1289 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1290 Allow deref (->) in variable lists if true.
1291 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1292 Pass to c_parser_omp_variable_list.
1293 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1294 call to c_parser_omp_variable_list.
1295 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1296 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1297 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1298 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1299 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1300 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1301 and detach. Support deref.
1302 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1303 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1304 (c_oacc_check_attachments): New function.
1305 (c_finish_omp_clauses): Check attach/detach arguments for being
1306 pointers using above. Support deref.
1307
a6163563
JB
13082019-12-19 Julian Brown <julian@codesourcery.com>
1309 Maciej W. Rozycki <macro@codesourcery.com>
1310 Tobias Burnus <tobias@codesourcery.com>
1311 Thomas Schwinge <thomas@codesourcery.com>
1312
1313 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1314 (c_parser_oacc_data_clause): Likewise.
1315 (c_parser_oacc_all_clauses): Likewise.
1316 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1317 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1318 PRAGMA_OACC_CLAUSE_NO_CREATE.
1319 * c-typeck.c (handle_omp_array_sections): Support
1320 GOMP_MAP_NO_ALLOC.
1321
d68f5d45
DM
13222019-12-09 David Malcolm <dmalcolm@redhat.com>
1323
1324 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1325 Replace label_text ctor calls.
1326
4691bf46
JM
13272019-12-04 Joseph Myers <joseph@codesourcery.com>
1328
1329 PR c/36941
1330 PR c/88827
1331 * c-typeck.c (convert_lvalue_to_rvalue): Call
1332 require_complete_type for arguments not of void types.
1333 (build_indirect_ref): Do not diagnose dereferencing pointers to
1334 incomplete types.
1335 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1336
85d11957
JM
13372019-12-03 Joseph Myers <joseph@codesourcery.com>
1338
1339 PR c/88704
1340 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1341 old-style parameter definitions.
1342
4569f8b3
SL
13432019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1344
1345 PR target/92499
1346
1347 * c-decl.c (flexible_array_type_p): Move to common code.
1348
65ef05d0
RS
13492019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1350
1351 * c-decl.c (start_decl): Allow initialization of variables whose
1352 size is a POLY_INT_CST.
1353 (finish_decl): Use verify_type_context to check whether the target
1354 allows variables with a particular type to have static or thread-local
1355 storage duration. Don't raise a second error if such variables do
1356 not have a constant size.
1357 (grokdeclarator): Use verify_type_context to check whether the
1358 target allows fields or array elements to have a particular type.
1359 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1360 the target allows pointer difference for the types involved.
1361 (build_unary_op): Likewise for pointer increment and decrement.
1362
34b43828
JM
13632019-11-29 Joseph Myers <joseph@codesourcery.com>
1364
1365 * c-parser.c (struct c_parser): Add members raw_tokens and
1366 raw_tokens_used.
1367 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1368 using previously-lexed raw tokens.
1369 (c_parser_peek_nth_token_raw)
1370 (c_parser_check_balanced_raw_token_sequence): New functions.
1371 (c_parser_nth_token_starts_std_attributes): Use
1372 c_parser_check_balanced_raw_token_sequence for Objective-C.
1373
5b8d9367
JM
13742019-11-25 Joseph Myers <joseph@codesourcery.com>
1375
1376 PR c/91985
1377 * c-decl.c (finish_declspecs): Use int instead of decimal
1378 floating-point types if decimal floating-point not supported.
1379
1723e1be
JM
13802019-11-25 Joseph Myers <joseph@codesourcery.com>
1381
1382 * c-tree.h (struct c_declarator): Use a structure for id member.
1383 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1384 declarators at the start, not when handling individual declarators
1385 later. Use u.id.id instead of u.id.
1386 (grokfield): Use u.id.id instead of u.id.
1387 (build_id_declarator): Set u.id.id and u.id.attrs.
1388 (finish_declspecs): Handle postfix attributes in case of typedef
1389 name or typeof used.
1390 * c-parser.c (c_parser_direct_declarator)
1391 (c_parser_direct_declarator_inner): Place declarator for
1392 attributes inside that for function or array, not outside. Set
1393 u.id.attrs for identifiers.
1394 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1395 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1396 instead of u.id.
1397
bdaf8be1
JJ
13982019-11-22 Jakub Jelinek <jakub@redhat.com>
1399
1400 PR c/90677
1401 * c-decl.c (identifier_global_tag): Define.
1402
3e00ba47
RB
14032019-11-20 Richard Biener <rguenther@suse.de>
1404
1405 PR c/92088
1406 * c-decl.c (grokdeclarator): Prevent inlining of nested
1407 function with VLA arguments.
1408
8c5b727a
JM
14092019-11-20 Joseph Myers <joseph@codesourcery.com>
1410
1411 * c-decl.c (c_warn_type_attributes): New function.
1412 (groktypename, grokdeclarator, finish_declspecs): Call
1413 c_warn_type_attributes before applying attributes to types.
1414 * c-tree.h (c_warn_type_attributes): Declare.
1415
192961ff
JM
14162019-11-19 Joseph Myers <joseph@codesourcery.com>
1417
1418 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1419 standard attributes.
1420 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1421 pedwarn for unknown standard attributes and return error_mark_node
1422 for them.
1423
20a38017
MM
14242019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1425
1426 * c-parser.c (c_parser_parse_rtl_body): Always call
1427 run_rtl_passes, even if startwith pass is not provided.
1428
d5fbe5e0
JM
14292019-11-15 Joseph Myers <joseph@codesourcery.com>
1430
1431 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1432 duplicate standard attributes.
1433
97cc1187
JM
14342019-11-15 Joseph Myers <joseph@codesourcery.com>
1435
1436 * c-decl.c (std_attribute_table): Add maybe_unused.
1437
f8aea5e3
JM
14382019-11-15 Joseph Myers <joseph@codesourcery.com>
1439
1440 * c-decl.c (std_attribute_table): Add fallthrough.
1441 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1442 attribute at top level.
1443
2cc94aa8
JM
14442019-11-15 Joseph Myers <joseph@codesourcery.com>
1445
1446 * c-decl.c (std_attribute_table): New.
1447 (c_init_decl_processing): Register attributes from
1448 std_attribute_table.
1449 * c-parser.c (c_parser_attribute_arguments): Add arguments
1450 require_string and allow_empty_args. All callers changed.
1451 (c_parser_std_attribute): Set require_string argument for
1452 "deprecated" attribute.
1453
7c5890cc
JM
14542019-11-14 Joseph Myers <joseph@codesourcery.com>
1455
1456 * c-parser.c (c_parser_postfix_expression)
1457 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1458 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1459
e8738f4e
RS
14602019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1461
1462 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1463 of build_same_sized_truth_vector_type.
1464 (build_vec_cmp): Likewise.
1465
b2417b59
JJ
14662019-11-14 Jakub Jelinek <jakub@redhat.com>
1467
bedb7f04
JJ
1468 * c-parser.c (c_parser_omp_context_selector): Don't require score
1469 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1470 negative score.
1471
b2417b59
JJ
1472 * c-parser.c (c_parser_omp_context_selector): Rename
1473 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1474 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1475 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1476 and string literals.
1477
4e03c3a7
JM
14782019-11-14 Joseph Myers <joseph@codesourcery.com>
1479
1480 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1481 ctsk_tagfirstref_attrs.
1482 (struct c_declspecs): Update description of attrs. Add
1483 postfix_attrs and non_std_attrs_seen_p. Increase size of
1484 typespec_kind bit-field.
1485 (c_warn_unused_attributes): New declaration.
1486 (parser_xref_tag): Update prototype.
1487 * c-decl.c (c_warn_unused_attributes): New function.
1488 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1489 ctsk_tagref_attrs. Handle attribute declarations.
1490 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1491 (grokdeclarator): Handle standard attributes.
1492 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1493 attributes to incomplete type reference.
1494 (xref_tag): Update call to parser_xref_tag.
1495 (declspecs_add_addrspace, declspecs_add_type)
1496 (declspecs_add_scspec, declspecs_add_attrs): Set
1497 non_std_attrs_seen_p.
1498 (finish_declspecs): Apply postfix standard attributes to type.
1499 * c-parser.c (c_token_starts_declspecs)
1500 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1501 (c_parser_next_tokens_start_declaration): Update comments.
1502 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1503 parser->tokens[2] to parser->tokens[1].
1504 (c_parser_nth_token_starts_std_attributes)
1505 (c_parser_std_attribute_specifier_sequence): New functions.
1506 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1507 attrs. All callers changed. Handle standard attributes.
1508 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1509 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1510 All callers changed.
1511 (c_parser_declspecs): Add arguments start_std_attr_ok and
1512 end_std_attr_ok. All callers changed. Handle standard
1513 attributes.
1514 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1515 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1516 (c_parser_compound_statement_nostart, c_parser_all_labels)
1517 (c_parser_label, c_parser_statement, c_parser_for_statement):
1518 Handle standard attributes.
1519 * c-parser.h (c_parser_declspecs): Update prototype.
1520 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1521 c_parser_declspecs.
1522
0c29cac4
ML
15232019-11-12 Martin Liska <mliska@suse.cz>
1524
1525 * gimple-parser.c: Do not include params.h.
1526
028d4092
ML
15272019-11-12 Martin Liska <mliska@suse.cz>
1528
1529 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1530 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1531 macro.
1532
62aee289
MR
15332019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1534 Frederik Harwath <frederik@codesourcery.com>
1535
1536 gcc/c/
1537 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1538 (c_parser_oacc_kernels_parallel): Rename function to...
1539 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1540 (c_parser_omp_construct): Update accordingly.
1541
1542
7cec9588
JJ
15432019-11-11 Jakub Jelinek <jakub@redhat.com>
1544
1545 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1546 without corresponding end declare target.
1547
f486280c
RS
15482019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1549
1550 * c-convert.c (convert): Only handle vector conversions if one of
1551 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1552 allows it.
1553 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1554 vectors satisfy gnu_vector_type_p.
1555 (build_unary_op): Only allow unary operators to be applied to
1556 vectors if they satisfy gnu_vector_type_p.
1557 (digest_init): Only allow by-element initialization of vectors
1558 if they satisfy gnu_vector_type_p.
1559 (really_start_incremental_init): Likewise.
1560 (push_init_level): Likewise.
1561 (pop_init_level): Likewise.
1562 (process_init_element): Likewise.
1563 (build_binary_op): Only allow binary operators to be applied to
1564 vectors if they satisfy gnu_vector_type_p.
1565
017c6491
JM
15662019-11-08 Joseph Myers <joseph@codesourcery.com>
1567
1568 * c-decl.c (grokparms): Convert () in a function definition to
1569 (void) for C2x.
1570 (store_parm_decls_oldstyle): Pedwarn for C2x.
1571 (store_parm_decls): Update comment about () not generating a
1572 prototype.
1573
c01bd174
JM
15742019-11-07 Joseph Myers <joseph@codesourcery.com>
1575
1576 * c-parser.c (c_parser_attribute_arguments): New function.
1577 Factored out of c_parser_gnu_attribute.
1578 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1579 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1580 (c_parser_std_attribute_specifier): New functions.
1581 (c_parser_transaction_attributes): Use
1582 c_parser_std_attribute_specifier.
1583
471c5330
JM
15842019-11-07 Joseph Myers <joseph@codesourcery.com>
1585
1586 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1587 lex_joined_string and translate_strings_p.
1588 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1589 c_lex_with_flags.
1590 (c_parser_string_literal): New function.
1591 (c_parser_static_assert_declaration_no_semi): Use
1592 c_parser_string_literal. Do not set lex_untranslated_string.
1593 (c_parser_asm_string_literal): Use c_parser_string_literal.
1594 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1595 (c_parser_gnu_attributes): Set and restore translate_strings_p
1596 instead of lex_untranslated_string.
1597 (c_parser_asm_statement): Do not set lex_untranslated_string.
1598 (c_parser_asm_operands): Likewise.
1599 (c_parser_has_attribute_expression): Set and restore
1600 translate_strings_p instead of lex_untranslated_string.
1601 (c_parser_postfix_expression): Use c_parser_string_literal.
1602 (pragma_lex): Likewise.
1603 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1604 (c_parse_file): Set translate_strings_p.
1605 * gimple-parser.c (c_parser_gimple_postfix_expression)
1606 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1607 * c-parser.c (c_parser_string_literal): Declare function.
1608
d0c464d2
JJ
16092019-11-02 Jakub Jelinek <jakub@redhat.com>
1610
1611 * c-parser.c (c_finish_omp_declare_variant): Use
1612 omp_get_context_selector instead of c_omp_get_context_selector.
1613
ac2cfa6c
RS
16142019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1615
1616 * c-tree.h (c_simulate_enum_decl): Declare.
1617 * c-decl.c (c_simulate_enum_decl): New function.
1618 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1619
74078538
RS
16202019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1621
1622 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1623 * c-decl.c (c_simulate_builtin_function_decl): New function.
1624 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1625 to the above.
1626
ad1539d5
MS
16272019-10-28 Martin Sebor <msebor@redhat.com>
1628
1629 PR c/66970
1630 * c-decl.c (names_builtin_p): Define a new function.
1631
cb73e4e7
RB
16322019-10-28 Richard Biener <rguenther@suse.de>
1633
1634 PR c/92249
1635 * gimple-parser.c (c_parser_parse_gimple_body): Make
1636 current_bb the entry block initially to easier recover
1637 from errors.
1638 (c_parser_gimple_compound_statement): Adjust.
1639
135df52c
JJ
16402019-10-24 Jakub Jelinek <jakub@redhat.com>
1641
1642 * c-parser.c (c_finish_omp_declare_variant): Use
1643 omp_context_selector_matches instead of
1644 c_omp_context_selector_matches.
1645 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1646 attribute in between declare target and end declare target
1647 pragmas.
1648
783bfe5e
JM
16492019-10-15 Joseph Myers <joseph@codesourcery.com>
1650
1651 * c-parser.c (c_parser_attribute_any_word): Rename to
1652 c_parser_gnu_attribute_any_word. All callers changed.
1653 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1654 callers changed.
1655 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1656 callers changed.
1657 (c_parser_declaration_or_fndef, c_parser_declspecs)
1658 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1659 (c_parser_struct_declaration, c_parser_declarator)
1660 (c_parser_gnu_attribute, c_parser_compound_statement)
1661 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1662 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1663 attribute-related syntax productions.
1664
56898e43
RS
16652019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1666
1667 * c-objc-common.c (useful_aka_type_p): Replace with...
1668 (get_aka_type): ...this new function. Given the original type,
1669 decide which aka type to print (if any). Only look through typedefs
1670 if user_facing_original_type_p.
1671 (print_type): Update accordingly.
1672
b9424661
JJ
16732019-10-14 Jakub Jelinek <jakub@redhat.com>
1674
1675 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1676 into int NESTED, if it is 2, diagnose missing commas in between
1677 clauses.
1678 (c_parser_omp_context_selector): Pass 2 as last argument to
1679 c_parser_omp_all_clauses.
1680
20de9568
JJ
16812019-10-12 Jakub Jelinek <jakub@redhat.com>
1682
1683 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1684 For simd properties, put them directly into TREE_VALUE.
1685 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1686 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1687 add "omp declare variant base" attribute rather than
1688 "omp declare variant".
1689
fe2bc27c
JM
16902019-10-11 Joseph Myers <joseph@codesourcery.com>
1691
1692 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1693
94e7f906
JJ
16942019-10-10 Jakub Jelinek <jakub@redhat.com>
1695
1696 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1697 true, terminate processing on closing paren and don't skip to end of
1698 pragma line.
1699 (c_parser_omp_declare_simd): Handle also declare variant.
1700 (omp_construct_selectors, omp_device_selectors,
1701 omp_implementation_selectors, omp_user_selectors): New variables.
1702 (c_parser_omp_context_selector,
1703 c_parser_omp_context_selector_specification,
1704 c_finish_omp_declare_variant): New functions.
1705 (c_finish_omp_declare_simd): Handle both declare simd and
1706 declare variant.
1707 (c_parser_omp_declare): Handle declare variant.
1708
93313b94
JM
17092019-10-02 Joseph Myers <joseph@codesourcery.com>
1710
1711 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1712 CPP_COLON tokens.
1713
55879815
RS
17142019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1715
1716 * c-objc-common.c (useful_aka_type_p): New function.
1717 (print_type): Use it to decide whether an aka type is worth printing.
1718
59bc434a
JJ
17192019-09-27 Jakub Jelinek <jakub@redhat.com>
1720
1721 PR c++/88203
1722 * c-parser.c (c_parser_predefined_identifier): New function.
1723 (c_parser_postfix_expression): Use it.
1724 (c_parser_omp_variable_list): Parse predefined identifiers.
1725 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1726 in shared and firstprivate clauses, even when they are predetermined
1727 shared.
1728
c6447c20
RS
17292019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1730
1731 * c-typeck.c (build_function_call_vec): Take the original function
1732 decl as an optional final parameter. Pass all built-in calls to
1733 check_builtin_function_arguments.
1734
522da4c2
EB
17352019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1736
1737 PR c/91815
1738 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1739 of identifiers in the external scope only for variables and functions.
1740
68e2c199
PK
17412019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1742
1743 PR c/78736
1744 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1745
22f8849d
IS
17462019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1747
1748 PR pch/61250
1749 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1750 after determining that the first token is not
1751 PRAGMA_GCC_PCH_PREPROCESS.
1752
db376f45
EB
17532019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1754
1755 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1756 FUNCTION_DECL to the right value in the presence of nested declarators.
1757
4d732405
RS
17582019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1759
1760 PR middle-end/91421
1761 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1762
cb1180d5
RS
17632019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1764
1765 PR middle-end/91421
1766 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1767 of a built_in_function.
1768 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1769
77eb117f
JJ
17702019-08-10 Jakub Jelinek <jakub@redhat.com>
1771
1772 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1773 (c_parser_omp_clause_device_type): New function.
1774 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1775 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1776 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1777 diagnostics for declare target with clauses nested in clause-less
1778 declare target declaration-definition-seq.
1779 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1780
2c3b8bad
JJ
17812019-08-09 Jakub Jelinek <jakub@redhat.com>
1782
bb522e2e
JJ
1783 * c-parser.c (check_no_duplicate_clause): Simplify using
1784 omp_find_clause.
1785 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1786 directive name modifiers.
1787 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1788
2c3b8bad
JJ
1789 PR c/91401
1790 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1791 check_no_duplicate_clause call. Comment it out, instead emit a
1792 warning for duplicate dist_schedule clauses.
1793
99769e7f
RS
17942019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1795
1796 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1797
8860d270
JJ
17982019-08-08 Jakub Jelinek <jakub@redhat.com>
1799
1800 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1801 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1802 instead of generic_head to track duplicates.
1803
398e3feb
JJ
18042019-08-07 Jakub Jelinek <jakub@redhat.com>
1805
1806 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1807 (c_parser_omp_clause_use_device_addr): New function.
1808 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1809 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1810 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1811 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1812 map or use_device_* clauses.
1813 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1814 in OpenMP, require pointer type rather than pointer or array type.
1815 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1816
a28351e7
JJ
18172019-07-31 Jakub Jelinek <jakub@redhat.com>
1818
1819 PR c/91192
1820 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1821 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1822 case.
1823
6343b6bf
ML
18242019-07-25 Martin Liska <mliska@suse.cz>
1825 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1826
1827 PR c++/23383
1828 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1829
cb50701e
ML
18302019-07-25 Martin Liska <mliska@suse.cz>
1831
1832 * c-decl.c (merge_decls): Use new macros
1833 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1834
62e3e66f
RB
18352019-07-23 Richard Biener <rguenther@suse.de>
1836
1837 PR tree-optimization/83518
1838 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1839 a CFG also rebuild cgraph edges.
1840
554a530f
JJ
18412019-07-20 Jakub Jelinek <jakub@redhat.com>
1842
1843 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1844 (c_parser_omp_clause_bind): New function.
1845 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1846 (OMP_LOOP_CLAUSE_MASK): Define.
1847 (c_parser_omp_loop): New function.
1848 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1849 loop combined with parallel or teams.
1850 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1851 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1852
d119bf79
RS
18532019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1854
1855 PR c/53633
1856 * c-decl.c (finish_function): Check targetm.warn_func_return
1857 before issuing a -Wreturn-type warning.
1858
ab20d992 18592019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1860
1861 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1862 (c_parser_compound_statement): Call it.
1863
1fdd6f04
JJ
18642019-07-12 Jakub Jelinek <jakub@redhat.com>
1865
1866 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1867 (c_parser_omp_clause_order): New function.
1868 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1869 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1870 PRAGMA_OMP_CLAUSE_ORDER.
1871 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1872
8389386c
RB
18732019-07-10 Richard Biener <rguenther@suse.de>
1874
1875 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1876 _Literal (int *) &x for address literals.
1877
99b1c316
MS
18782019-07-09 Martin Sebor <msebor@redhat.com>
1879
1880 PR c++/61339
1881 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1882 to class.
1883 (field_decl_cmp): Same.
1884 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1885 * c-tree.h: Same.
1886 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1887
6c1dae73
MS
18882019-07-09 Martin Sebor <msebor@redhat.com>
1889
1890 PR c++/61339
1891 * c-decl.c: Change class-key from class to struct and vice versa
1892 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1893 * gimple-parser.c: Same.
1894
69b5279e
RB
18952019-07-01 Richard Biener <rguenther@suse.de>
1896
1897 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1898 _Literal (char *) &"foo" for address literals pointing to
1899 STRING_CSTs.
1900
ab20d992
JJ
19012019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1902
1903 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1904 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1905 C incompatibility if alternate "__intN__" form is used.
1906
1e3d475e
MS
19072019-06-24 Martin Sebor <msebor@redhat.com>
1908
1909 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1910
bf38f7e9
JJ
19112019-06-10 Jakub Jelinek <jakub@redhat.com>
1912
1913 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1914 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1915 (c_parser_omp_scan_loop_body): New function.
1916 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1917 inscan reduction clauses.
1918 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1919 non-inscan reductions on the same construct, or inscan reductions with
1920 ordered or schedule clauses, or inscan array reductions.
1921
65985d78
MS
19222019-06-05 Martin Sebor <msebor@redhat.com>
1923
1924 PR c/90737
1925 * c-typeck.c (c_finish_return): Only consider functions returning
1926 pointers as candidates for -Wreturn-local-addr.
1927
0ecf545c
MS
19282019-06-05 Martin Sebor <msebor@redhat.com>
1929
1930 * c-decl.c (start_decl): Adjust quoting and hyphenation
1931 in diagnostics.
1932 (finish_decl): Same.
1933 (finish_enum): Same.
1934 (start_function): Same.
1935 (declspecs_add_type): Same.
1936 * c-parser.c (warn_for_abs): Same.
1937 * c-typeck.c (build_binary_op): Same.
1938
e03436e7
TS
19392019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1940
b48f44bf
TS
1941 PR c/89433
1942 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1943 marked with an OpenACC 'routine' directive.
1944
5bf04509
TS
1945 PR c/89433
1946 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1947 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1948
e03436e7
TS
1949 PR c/89433
1950 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1951 clauses from "omp declare target" attribute.
1952
a9c697b8
MS
19532019-05-16 Martin Sebor <msebor@redhat.com>
1954
ab20d992
JJ
1955 * c-decl.c (start_decl): Quote keywords, operators, and
1956 types in diagnostics.
1957 (finish_decl): Same.
1958 * c-parser.c (c_parser_asm_statement): Same.
1959 (c_parser_conditional_expression): Same.
1960 (c_parser_transaction_cancel): Same.
1961 * c-typeck.c (c_common_type): Same.
1962 (build_conditional_expr): Same.
1963 (digest_init): Same.
1964 (process_init_element): Same.
1965 (build_binary_op): Same.
a9c697b8 1966
c4499192
RB
19672019-05-17 Richard Biener <rguenther@suse.de>
1968
1969 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1970 (c_parser_gimple_unary_expression): Likewise.
1971 (c_parser_gimple_parentized_ternary_expression): New function.
1972
adfe6e4b
RB
19732019-05-16 Richard Biener <rguenther@suse.de>
1974
1975 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1976 (c_parser_gimple_unary_expression): Likewise.
1977
186dabf2
RB
19782019-05-15 Richard Biener <rguenther@suse.de>
1979
1980 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1981 __BIT_FIELD_REF.
1982
1158c5b4
RB
19832019-05-14 Richard Biener <rguenther@suse.de>
1984
1985 * gimple-parser.c (c_parser_gimple_statement): Remove
1986 questionable auto-promotion to VIEW_CONVERT_EXPR.
1987 (c_parser_gimple_typespec): Split out from __MEM parsing.
1988 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1989 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1990 as __VIEW_CONVERT with -gimple.
1991
fd4485aa
ML
19922019-05-09 Martin Liska <mliska@suse.cz>
1993
1994 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1995 __MAX.
1996 (c_parser_gimple_unary_expression): Parse also binary expression
1997 __MIN and __MAX.
1998 (c_parser_gimple_parentized_binary_expression): New function.
1999
d276406a
ML
20002019-05-09 Martin Liska <mliska@suse.cz>
2001
2002 * gimple-parser.c (struct gimple_parser): Add probability.
2003 for gimple_parser_edge.
2004 (gimple_parser::push_edge): Add new argument probability.
2005 (c_parser_gimple_parse_bb_spec): Parse also probability
2006 if present.
2007 (c_parser_parse_gimple_body): Set edge probability.
2008 (c_parser_gimple_compound_statement): Consume token
2009 before calling c_parser_gimple_goto_stmt.
2010 Parse BB counts.
2011 (c_parser_gimple_statement): Pass new argument.
2012 (c_parser_gimple_goto_stmt): Likewise.
2013 (c_parser_gimple_if_stmt): Likewise.
2014 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2015 * c-parser.c (c_parser_declaration_or_fndef): Pass
2016 hot_bb_threshold argument.
2017 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2018 field.
2019 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2020
f179b64e
JJ
20212019-04-26 Jakub Jelinek <jakub@redhat.com>
2022
2023 PR debug/90197
2024 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2025 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2026 (c_parser_do_statement): Likewise.
2027 (c_parser_for_statement): Likewise. Formatting fixes.
2028 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2029 emit DEBUG_BEGIN_STMTs if needed.
2030
e7178413
JJ
20312019-04-19 Jakub Jelinek <jakub@redhat.com>
2032
c280b7ee
JJ
2033 PR c/89888
2034 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2035 (c_start_case): Don't clear it.
2036 (do_case): Adjust c_add_case_label caller.
2037 (c_finish_case): Adjust c_do_switch_warnings caller.
2038
e7178413
JJ
2039 PR c++/90108
2040 * c-decl.c (merge_decls): If remove is main variant and
2041 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2042 variant that has newdecl as TYPE_NAME if any.
2043
60a2c645
JJ
20442019-04-12 Jakub Jelinek <jakub@redhat.com>
2045
2046 PR c/89933
2047 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2048 don't try to remove it from the variant list, but instead assert
2049 it has no variants.
2050
2a82beaa
RB
20512019-04-01 Richard Biener <rguenther@suse.de>
2052
2053 PR c/71598
2054 * c-tree.h (c_get_alias_set): Declare.
2055 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2056 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2057 as the underlying integer type.
2058
bec1da64
MS
20592019-03-19 Martin Sebor <msebor@redhat.com>
2060
2061 PR tree-optimization/89688
2062 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2063 kinds of initializers.
2064
855cd9b1
JJ
20652019-03-19 Jakub Jelinek <jakub@redhat.com>
2066
2067 PR c/89734
2068 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2069 return type even if quals_used is 0. Formatting fixes.
2070
baa09dc5
RB
20712019-03-14 Richard Biener <rguenther@suse.de>
2072
2073 * c-tree.h (enum c_declspec_il): New.
2074 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2075 enum bitfield.
2076 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2077 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2078 (c_parser_declspecs): Adjust.
2079 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2080 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2081 and bitmap.h.
2082 (struct gimple_parser): New.
2083 (gimple_parser::push_edge): New method.
2084 (c_parser_gimple_parse_bb_spec): New helper.
2085 (c_parser_parse_gimple_body): Get start pass and IL specification.
2086 Initialize SSA and CFG.
2087 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2088 Build a gimple_parser parsing state and pass it along.
2089 (c_parser_gimple_statement): Change intermittend __PHI internal
2090 function argument for the edge.
2091 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2092 (c_parser_gimple_goto_stmt): Record edges to build.
2093 (c_parser_gimple_if_stmt): Likewise.
2094 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2095 (c_parser_gimple_or_rtl_pass_list): Likewise.
2096
a3f9f006
ML
20972019-03-11 Martin Liska <mliska@suse.cz>
2098
2099 * c-decl.c (check_for_loop_decls): Wrap an option name
2100 in a string format message and fix GNU coding style.
2101 * c-parser.c (c_parser_declspecs): Likewise.
2102
1db01ff9
JJ
21032019-03-08 Jakub Jelinek <jakub@redhat.com>
2104
2105 PR tree-optimization/89550
2106 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2107 returned true.
2108 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2109 or warning returned true.
2110
66dcb747
JJ
21112019-02-28 Jakub Jelinek <jakub@redhat.com>
2112
2113 PR c/89525
2114 * c-typeck.c (convert_arguments): Call inform_declaration only if
2115 the previous warning_at call returned true.
2116
2263c9f2
TS
21172019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2118
2119 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2120 parameter. Adjust all users.
2121 (c_parser_oacc_simple_clause): Replace parser with loc formal
2122 parameter. Adjust all users.
2123
ab20d992 21242019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2125
2126 PR c/87924
2127 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2128 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2129
5f88ba10
JJ
21302019-02-15 Jakub Jelinek <jakub@redhat.com>
2131
2132 PR c/89340
2133 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2134 before c_decl_attributes rather than after it.
2135
cfc30fd1
JJ
21362019-02-06 Jakub Jelinek <jakub@redhat.com>
2137
2138 PR c/89211
2139 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2140 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2141 instead of 3 nested ifs.
2142
fbe83e6b
JM
21432019-02-06 Joseph Myers <joseph@codesourcery.com>
2144
2145 PR c/88584
2146 * c-decl.c (finish_decl): Do not complete array types for arrays
2147 with external linkage not at file scope.
2148
f461f938
RB
21492019-02-05 Richard Biener <rguenther@suse.de>
2150
2151 PR c/88606
2152 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2153 all type variants when not supported.
2154
fe509359
JJ
21552019-01-30 Jakub Jelinek <jakub@redhat.com>
2156
2157 PR c/89061
2158 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2159 * c-decl.c (decl_jump_unsafe): Return false for
2160 C_DECL_COMPOUND_LITERAL_P decls.
2161 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2162
6a335b96
JJ
21632019-01-29 Jakub Jelinek <jakub@redhat.com>
2164
f4b7e754
JJ
2165 PR c/89045
2166 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2167 scope.
2168
6a335b96
JJ
2169 PR c/86125
2170 * c-decl.c (last_fileptr_type): Remove.
2171 (last_structptr_types): New variable.
2172 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2173 {old,new}rettype instead of the types themselves. Assert
2174 last_structptr_types array has the same number of elements
2175 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2176 argument oldtype and newtype. Instead of handling
2177 just fileptr_type_node specially, handle all builtin_structptr_types
2178 pointer nodes. Formatting fix.
2179
d8b5a1a0
MS
21802019-01-24 Martin Sebor <msebor@redhat.com>
2181
2182 PR c/86125
2183 PR c/88886
2184 PR middle-end/86308
2185 * c-decl.c (match_builtin_function_types): Add arguments.
2186 (diagnose_mismatched_decls): Diagnose mismatched declarations
2187 of built-ins more strictly.
2188
e21c4491
JJ
21892019-01-24 Jakub Jelinek <jakub@redhat.com>
2190
2191 PR c++/88976
2192 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2193 on #pragma omp cancel with different modifiers.
2194
420183d9
L
21952019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2196
2197 PR c/51628
2198 PR c/88664
2199 * c-typeck.c (convert_for_assignment): Upate the
2200 warn_for_address_or_pointer_of_packed_member call.
2201
17ad43dd
TH
22022019-01-16 Tom Honermann <tom@honermann.net>
2203 Jason Merrill <jason@redhat.com>
2204
2205 * c-typeck.c (digest_init): Revised the error message produced for
2206 ill-formed cases of array initialization with a string literal.
2207 (error_init): Make variadic.
2208
5f07d78a
JJ
22092019-01-12 Jakub Jelinek <jakub@redhat.com>
2210
2211 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2212
c4581bbf
JJ
22132019-01-07 Jakub Jelinek <jakub@redhat.com>
2214
2215 PR c/88701
2216 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2217 if current_function_decl is non-NULL.
2218
65c5b1eb
JM
22192019-01-07 Joseph Myers <joseph@codesourcery.com>
2220
2221 PR c/88720
2222 PR c/88726
2223 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2224 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2225 functions declared but never defined only for external scope, not
2226 for other scopes.
2227
d8fcab68
JJ
22282019-01-07 Jakub Jelinek <jakub@redhat.com>
2229
2230 PR c++/85052
2231 * c-parser.c (c_parser_postfix_expression): Parse
2232 __builtin_convertvector.
2233
a5544970
JJ
22342019-01-01 Jakub Jelinek <jakub@redhat.com>
2235
2236 Update copyright years.
2237
da77eace
L
22382018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2239
2240 PR c/51628
2241 * c-typeck.c (convert_for_assignment): Call
2242 warn_for_address_or_pointer_of_packed_member.
2243
1edf8866
SB
22442018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2245
2246 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2247 a more specific error message (instead of just falling through).
2248
db4fd626
SB
22492018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2250
2251 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2252 asm qualifier is first seen; use that to give nicer "duplicate asm
2253 qualifier" messages. Delete 'quals" variable, instead pass the
2254 "is_volatile_ flag to build_asm_stmt directly.
2255 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2256 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2257
9c9cfcbb
SB
22582018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2259
2260 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2261 "done" boolean variable.
2262
a14feb3c
DM
22632018-12-19 David Malcolm <dmalcolm@redhat.com>
2264
2265 PR c++/87504
2266 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2267 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2268 (build_binary_op): Use struct op_location_t and
2269 class binary_op_rich_location.
2270
6d939173
JJ
22712018-12-11 Jakub Jelinek <jakub@redhat.com>
2272
2273 PR sanitizer/88426
2274 * c-convert.c (convert): Call c_fully_fold before calling
2275 ubsan_instrument_float_cast.
2276
b7055028
SB
22772018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2278
2279 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2280 setting "quals".
2281
5b76e75f
SB
22822018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2283
2284 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2285 after asm. Pass a flag for it to build_asm_expr.
2286 * c-tree.h (build_asm_expr): Update declaration.
2287 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2288 set ASM_INLINE_P.
2289
30bd42b9
SB
22902018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2291
2292 PR inline-asm/55681
2293 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2294 combination of volatile and goto, in any order, without repetitions.
2295
9df6c0e4
JB
22962018-12-04 James Norris <jnorris@codesourcery.com>
2297 Cesar Philippidis <cesar@codesourcery.com>
2298 Julian Brown <julian@codesourcery.com>
2299
2300 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2301 code.
2302
f44697b7
RB
23032018-11-30 Richard Biener <rguenther@suse.de>
2304
2305 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2306 _Literal (type) { ... } as empty aggregate or vector constructor.
2307
550dfbdc
MS
23082018-11-29 Martin Sebor <msebor@redhat.com>
2309
2310 PR c/88091
2311 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2312 (convert_arguments): Add comments. Pass additional argument to
2313 the function above.
2314
673670da
MS
23152018-11-29 Martin Sebor <msebor@redhat.com>
2316
2317 PR c/88172
2318 PR testsuite/88208
2319 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2320
db1d09b0
MS
23212018-11-23 Martin Sebor <msebor@redhat.com>
2322
2323 PR testsuite/88098
2324 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2325 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2326
98f08eb8
MS
23272018-11-20 Martin Sebor <msebor@redhat.com>
2328
2329 * c-parser.c (c_parser_has_attribute_expression): New function.
2330 (c_parser_attribute): New function.
2331 (c_parser_attributes): Move code into c_parser_attribute.
2332 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2333
cd5da983
MS
23342018-11-15 Martin Sebor <msebor@redhat.com>
2335
2336 PR c/83656
2337 * c-decl.c (header_for_builtin_fn): Declare.
2338 (diagnose_mismatched_decls): Diagnose declarations of built-in
2339 functions without a prototype.
2340 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2341 (convert_argument): Same.
2342 (convert_arguments): Factor code out into convert_argument.
2343 Detect mismatches between built-in formal arguments in calls
2344 to built-in without prototype.
2345 (build_conditional_expr): Same.
2346 (type_or_builtin_type): New function.
2347 (convert_for_assignment): Add argument. Conditionally issue
2348 warnings instead of errors for mismatches.
2349
620e594b
DM
23502018-11-13 David Malcolm <dmalcolm@redhat.com>
2351
2352 * c-decl.c: Replace "source_location" with "location_t".
2353 * c-tree.h: Likewise.
2354 * c-typeck.c: Likewise.
2355 * gimple-parser.c: Likewise.
2356
3179ebae
JJ
23572018-11-09 Jakub Jelinek <jakub@redhat.com>
2358
81a227c6
JJ
2359 * c-parser.c (c_parser_omp_clause_final): Use
2360 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2361 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2362 parsing instead of c_parser_paren_condition.
2363 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2364 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2365 c_fully_fold instead of c_parser_condition.
2366 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2367 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2368 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2369 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2370 c_parser_expr_no_commas instead of c_parser_expression.
2371
98c91c56
JJ
2372 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2373 reduction clause with inscan modifier.
2374
3179ebae
JJ
2375 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2376 clauses other than atomic_default_mem_order.
2377
28567c40
JJ
23782018-11-08 Jakub Jelinek <jakub@redhat.com>
2379
2380 * c-parser.c: Include memmode.h.
2381 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2382 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2383 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2384 task_reduction clauses.
2385 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2386 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2387 section, or lvalue assignment expression.
2388 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2389 (c_parser_omp_clause_lastprivate): Parse optional
2390 conditional: modifier.
2391 (c_parser_omp_clause_hint): Require constant integer expression rather
2392 than just integer expression.
2393 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2394 clause.
2395 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2396 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2397 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2398 functions.
2399 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2400 iterators. Parse mutexinoutset and depobj kinds.
2401 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2402 callers.
2403 (c_parser_omp_all_clauses): Likewise. Handle
2404 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2405 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2406 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2407 default memory order from requires directive if any. Adjust
2408 c_finish_omp_atomic caller.
2409 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2410 (c_parser_omp_flush): Parse flush with memory-order-clause.
2411 (c_parser_omp_for_loop): Allow NE_EXPR even in
2412 OpenMP loops, adjust c_finish_omp_for caller.
2413 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2414 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2415 Allow to be called while parsing combined parallel master.
2416 Parse combined master taskloop{, simd}.
2417 (c_parser_omp_parallel): Parse combined
2418 parallel master{, taskloop{, simd}} constructs.
2419 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2420 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2421 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2422 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2423 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2424 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2425 around teams body. Use SET_EXPR_LOCATION.
2426 (c_parser_omp_target_data): Allow target data
2427 with only use_device_ptr clauses.
2428 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2429 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2430 (c_parser_omp_requires): New function.
2431 (c_finish_taskloop_clauses): New function.
2432 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2433 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2434 declaration. Disallow in_reduction clause when combined with parallel
2435 master.
2436 (c_parser_omp_construct): Adjust c_parser_omp_master and
2437 c_parser_omp_taskgroup callers.
2438 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2439 other than cancel.
2440 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2441 like OMP_CLAUSE_REDUCTION.
2442 (handle_omp_array_sections): Likewise. Call save_expr on array
2443 reductions before calling build_index_type. Handle depend clauses
2444 with iterators.
2445 (struct c_find_omp_var_s): New type.
2446 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2447 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2448 with static, runtime or auto schedule kinds. Call save_expr for whole
2449 array reduction sizes. Diagnose reductions with zero sized elements
2450 or variable length structures. Diagnose nogroup clause used with
2451 reduction clause(s). Handle depend clause with
2452 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2453 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2454 some different type for other kinds. Use build_unary_op with
2455 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2456 Handle depend clauses with iterators. Remove no longer needed special
2457 case that predetermined const qualified vars may be specified in
2458 firstprivate clause. Complain if const qualified vars are mentioned
2459 in data-sharing clauses other than firstprivate or shared. Use
2460 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2461 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2462 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2463 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2464
7e2de6df
DM
24652018-10-29 David Malcolm <dmalcolm@redhat.com>
2466
2467 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2468 logic for change to name_hint::operator bool.
2469 (undeclared_variable): Likewise.
2470 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2471 (c_parser_parameter_declaration): Likewise.
2472
9f936c86
JM
24732018-10-17 Joseph Myers <joseph@codesourcery.com>
2474
2475 * c-errors.c (pedwarn_c11): New function.
2476 * c-parser.c (disable_extension_diagnostics): Save
2477 warn_c11_c2x_compat and set it to 0.
2478 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2479 (c_parser_static_assert_declaration_no_semi): Handle
2480 _Static_assert without string constant.
2481 * c-tree.h (pedwarn_c11): New prototype.
2482
033eb567
DM
24832018-10-17 David Malcolm <dmalcolm@redhat.com>
2484
2485 * Make-lang.in (selftest-c): New.
2486 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2487 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2488 from gcc/Makefile.in.
2489
0edf3afe
RB
24902018-10-02 Richard Biener <rguenther@suse.de>
2491
2492 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2493
8313a764
JM
24942018-09-26 Joseph Myers <joseph@codesourcery.com>
2495
2496 PR c/87390
2497 * c-typeck.c (build_binary_op): Use excess precision for
2498 comparisons of integers and floating-point for C11 and later.
2499
ce6f0888
MJ
25002018-09-26 Martin Jambor <mjambor@suse.cz>
2501
2502 PR c/87347
2503 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2504 comment.
ce6f0888 2505
9c4a4b3c
DM
25062018-09-17 David Malcolm <dmalcolm@redhat.com>
2507
2508 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2509 Update for new param.
2510 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2511 Likewise.
2512
80c6d1f4
MJ
25132018-09-17 Martin Jambor <mjambor@suse.cz>
2514
2515 PR c/63886
2516 * c-parser.c: (warn_for_abs): New function.
2517 (c_parser_postfix_expression_after_primary): Call it.
2518
4a426e36
BE
25192018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2520
2521 * c-typeck.c (digest_init): Shorten overlength strings.
2522
6d900107
BE
25232018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2524
2525 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2526
b5764229
BE
25272018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2528
2529 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2530 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2531
22eea6b2
AM
25322018-08-30 Alexander Monakov <amonakov@ispras.ru>
2533
2534 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2535 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2536
85204e23
DM
25372018-08-27 David Malcolm <dmalcolm@redhat.com>
2538
2539 PR 87091
2540 * c-decl.c (implicitly_declare): Update call to
2541 maybe_add_include_fixit to suggest overriding the location, as it
2542 is for a note.
2543 * c-objc-common.c (c_tree_printer): Update for conversion of
2544 show_caret_p to a tri-state.
2545
3d78e008
ML
25462018-08-27 Martin Liska <mliska@suse.cz>
2547
2548 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2549 fndecl_built_in_p and remove check for FUNCTION_DECL if
2550 possible.
3d78e008
ML
2551 (diagnose_mismatched_decls): Likewise.
2552 (merge_decls): Likewise.
2553 (warn_if_shadowing): Likewise.
2554 (pushdecl): Likewise.
2555 (implicitly_declare): Likewise.
2556 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2557 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2558 * c-typeck.c (build_function_call_vec): Likewise.
2559 (convert_arguments): Likewise.
2560
097f82ec
DM
25612018-08-20 David Malcolm <dmalcolm@redhat.com>
2562
2563 PR other/84889
2564 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2565 (diagnose_mismatched_decls): Likewise, in various places.
2566 (warn_if_shadowing): Likewise.
2567 (implicit_decl_warning): Likewise.
2568 (implicitly_declare): Likewise.
2569 (undeclared_variable): Likewise.
2570 (declare_label): Likewise.
2571 (grokdeclarator): Likewise.
2572 (start_function): Likewise.
2573 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2574 (c_parser_parameter_declaration): Likewise.
2575 (c_parser_binary_expression): Likewise.
2576 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2577 (parser_build_binary_op): Likewise.
2578 (build_unary_op): Likewise.
2579 (error_init): Likewise.
2580 (pedwarn_init): Likewise.
2581 (warning_init): Likewise.
2582 (convert_for_assignment): Likewise.
2583
96e6ae57
DM
25842018-08-15 David Malcolm <dmalcolm@redhat.com>
2585
2586 * c-objc-common.c: Include "gcc-rich-location.h".
2587 (c_tree_printer): Move implemenation of '%T' to...
2588 (print_type): ...this new function.
2589 (range_label_for_type_mismatch::get_text): New function.
2590 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2591 range for the various ic_argpass cases.
2592 (class maybe_range_label_for_tree_type_mismatch): New class.
2593 (build_binary_op): Use it when calling binary_op_error.
2594
0cd020ae 25952018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2596
0cd020ae
PK
2597 * c-decl.c (start_decl): Do not warn if variables is named as main
2598 and is a local variable.
2599
72733314
IS
26002018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2601
2602 PR c/19315
2603 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2604 objects of unknown size.
2605
23aa9f7c
MS
26062018-08-13 Martin Sebor <msebor@redhat.com>
2607
2608 PR tree-optimization/71625
2609 * c-parser.c (c_parser_declaration_or_fndef): Call
2610 braced_list_to_string.
2611
e5e7e50d
BH
26122018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2613
2614 PR c/86690
2615 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2616 errors.
2617
8a45b051
MS
26182018-08-01 Martin Sebor <msebor@redhat.com>
2619
2620 PR tree-optimization/86650
2621 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2622 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2623
5922dcb5
JJ
26242018-08-01 Jakub Jelinek <jakub@redhat.com>
2625
2626 PR c/85704
2627 * c-typeck.c (init_field_decl_cmp): New function.
2628 (output_pending_init_elements): Use it for field comparisons
2629 instead of pure bit_position comparisons.
2630
9b452033
JJ
26312018-07-12 Jakub Jelinek <jakub@redhat.com>
2632
2633 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2634 type here, instead add "omp declare target implicit" attribute.
2635 (finish_decl): Diagnose vars without mappable type here.
2636
ab20d992
JJ
26372018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2638 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2639 Cesar Philippidis <cesar@codesourcery.com>
2640
2641 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2642 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2643 to their non-present_or_* counterparts. Make 'self' an alias to
2644 PRAGMA_OACC_CLAUSE_HOST.
2645 (c_parser_oacc_data_clause): Update GOMP mappings for
2646 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2647 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2648 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2649 Remove support for present_or_* clauses.
2650 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2651 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2652 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2653 (OACC_DATA_CLAUSE_MASK): Likewise.
2654 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2655 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2656 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2657 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2658 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2659
e197e64e
KV
26602018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2661
2662 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2663 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2664 (c_parser_gimple_unary_expression): Likewise.
2665
487f2f61
JJ
26662018-06-15 Jakub Jelinek <jakub@redhat.com>
2667
2668 PR c/86093
2669 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2670 before doing POINTER_DIFF_EXPR.
2671
e4d44a37
MP
26722018-06-07 Marek Polacek <polacek@redhat.com>
2673
2674 PR c/85318
2675 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2676 for loop initial declarations.
2677
b67b9225
DP
26782018-05-30 David Pagan <dave.pagan@oracle.com>
2679
2680 PR c/55976
2681 * c-decl.c (grokdeclarator): Update check for return type warnings.
2682 (start_function): Likewise.
2683 (finish_function): Likewise.
2684 * c-typeck.c (c_finish_return): Update check for return type warnings.
2685 Pass OPT_Wreturn_type to pedwarn when appropriate.
2686
c566cc9f
RS
26872018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2688
2689 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2690 __FMA_EXPR handlng.
2691
e4f81565
RS
26922018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2693
2694 * gimple-parser.c: Include internal-fn.h.
2695 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2696 (c_parser_gimple_call_internal): New function.
2697 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2698 Fix typos in comment.
2699
79e7b1fe
JJ
27002018-05-10 Jakub Jelinek <jakub@redhat.com>
2701
2702 PR c++/85662
2703 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2704 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2705 fold_convert_loc.
2706 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2707 fold_offsetof_1, pass argtype as TYPE to it and drop the
2708 fold_convert_loc.
2709
f7584c81
DP
27102018-05-02 David Pagan <dave.pagan@oracle.com>
2711
2712 PR c/30552
2713 * c-decl.c (old_style_parameter_scope): New function.
2714 * c-parser.c (c_parser_postfix_expression): Check for statement
2715 expressions in old-style function parameter list declarations.
2716 * c-parser.h (old_style_parameter_scope): New extern declaration.
2717
b33a0cb3
JJ
27182018-04-25 Jakub Jelinek <jakub@redhat.com>
2719
2720 PR sanitizer/84307
2721 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2722 it is not TREE_STATIC.
2723 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2724 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2725 its COMPOUND_LITERAL_EXPR_DECL.
2726
c5c5822a
JM
27272018-03-21 Joseph Myers <joseph@codesourcery.com>
2728
2729 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2730 where all functions return the same _FloatN or _FloatNx type,
2731 treat integer types as _Float64 instead of double.
2732
aa1c9429
JJ
27332018-03-21 Jakub Jelinek <jakub@redhat.com>
2734
2735 PR c/84999
2736 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2737 building vector comparison, diagnose it and return error_mark_node.
2738
9bb45a95
JJ
27392018-03-15 Jakub Jelinek <jakub@redhat.com>
2740
2741 PR c/84853
2742 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2743 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2744 INTEGER_TYPE element type.
2745
ada6bad9
DP
27462018-03-13 David Pagan <dave.pagan@oracle.com>
2747
2748 PR c/46921
2749 * c-typeck.c (output_init_element): Ensure field initializer
2750 expression is always evaluated if there are side effects.
2751
849bbdb9
JJ
27522018-03-06 Jakub Jelinek <jakub@redhat.com>
2753
2754 PR c/84721
2755 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2756 !building_stmt_list_p ().
2757
d74641bd
RS
27582018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2759
2760 PR c/84305
2761 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2762 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2763 and include the BIND_EXPR in the list of things that need to be
2764 pre-evaluated.
2765
0444aa9c
NS
27662018-02-09 Nathan Sidwell <nathan@acm.org>
2767
2768 PR c/84293
2769 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2770 to strict_aliasing_warning.
2771
7c30b12a
PC
27722018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2773
2774 * c-typeck.c (really_start_incremental_init, push_init_level,
2775 set_nonincremental_init, output_init_element, process_init_element):
2776 Use DECL_UNNAMED_BIT_FIELD.
2777
2be4dfcb
MP
27782018-01-31 Marek Polacek <polacek@redhat.com>
2779
2780 PR c/81779
2781 * c-parser.c (c_parser_compound_statement_nostart): Call
2782 expansion_point_location_if_in_system_header.
2783
bb9869d5
DM
27842018-01-17 David Malcolm <dmalcolm@redhat.com>
2785
2786 PR c++/83814
2787 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2788 the C part.
2789
b4923738
JJ
27902018-01-13 Jakub Jelinek <jakub@redhat.com>
2791
2792 PR c/83801
2793 * c-tree.h (decl_constant_value_1): Add a bool argument.
2794 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2795 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2796 (decl_constant_value): Adjust caller.
2797 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2798 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2799 decl_constant_value returns initializer that has BLKmode or
2800 array type.
2801 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2802
928686b1
RS
28032018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2804 Alan Hayward <alan.hayward@arm.com>
2805 David Sherwood <david.sherwood@arm.com>
2806
2807 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2808 TYPE_VECTOR_SUBPARTS.
2809
85ec4feb
JJ
28102018-01-03 Jakub Jelinek <jakub@redhat.com>
2811
2812 Update copyright years.
2813
913884f7
JJ
28142018-01-01 Jakub Jelinek <jakub@redhat.com>
2815
2816 PR c/83595
2817 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2818 c_parser_conditional_expression, c_parser_cast_expression,
2819 c_parser_sizeof_expression, c_parser_alignof_expression,
2820 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2821 c_parser_transaction_expression): Use set_error () method instead
2822 of setting value member to error_mark_node.
2823
c6cfa2bf
MM
28242017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2825
2826 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2827 and _Float<N>X built-in functions.
2828
11d29d63
JJ
28292017-12-22 Jakub Jelinek <jakub@redhat.com>
2830
14ec014e
JJ
2831 PR debug/83550
2832 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2833 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2834 incomplete vars rather than after it.
2835
11d29d63
JJ
2836 PR debug/83547
2837 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2838 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2839 and consider empty ones if there are no other stmts. For
2840 -Wunused-value walk all statements before the one only followed by
2841 DEBUG_BEGIN_STMTs.
2842
170a8bd6 28432017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2844 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2845
2846 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2847 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2848 (c_parser_do_statement): Likewise.
2849 (c_parser_for_statement): Likewise.
2850 (c_parser_statement_after_labels): Adjust calls to above.
2851 (c_parse_pragma_ivdep): New static function.
2852 (c_parser_pragma_unroll): Likewise.
2853 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2854 <PRAGMA_UNROLL>: New case.
2855
01512446
JJ
28562017-12-19 Jakub Jelinek <jakub@redhat.com>
2857
2858 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2859 perform_integral_promotions, digest_init): Replace Yoda conditions
2860 with typical order conditions.
2861 * c-decl.c (check_bitfield_type_and_width): Likewise.
2862
c65e18d3
BE
28632017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2864
2865 * c-typeck.c (c_safe_arg_type_equiv_p,
2866 c_safe_function_type_cast_p): New function.
2867 (build_c_cast): Implement -Wcast-function-type.
2868
b7280579
RB
28692017-12-14 Richard Biener <rguenther@suse.de>
2870
2871 PR c/83415
2872 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2873 like REALPART_EXPR for the behavior of whether its operand
2874 is an lvalue.
2875
49e6a6c0
MP
28762017-12-12 Marek Polacek <polacek@redhat.com>
2877
2878 PR c/82679
2879 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2880
ab20d992 28812017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2882
2883 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2884 * c-parser.c (add_debug_begin_stmt): New.
2885 (c_parser_declaration_or_fndef): Call it.
2886 (c_parser_compound_statement_nostart): Likewise.
2887 (c_parser_statement_after_labels): Likewise.
2888 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2889
4b2b493f
JM
28902017-12-07 Joseph Myers <joseph@codesourcery.com>
2891
2892 * c-decl.c (build_compound_literal): Add parameter alignas_align
2893 and set alignment of decl if nonzero.
2894 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2895 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2896 qualifier.
2897 (c_parser_struct_declaration): Update syntax comment.
2898 (c_parser_type_name): Add alignas_ok argument and pass it to
2899 c_parser_declspecs.
2900 (c_parser_cast_expression): Pass true to c_parser_type_name and
2901 give error if a cast used an _Alignas specifier.
2902 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2903 give error if sizeof (type-name) used an _Alignas specifier.
2904 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2905 give error if _Alignof (type-name) used an _Alignas specifier.
2906 (c_parser_postfix_expression_after_paren_type): Check specified
2907 alignment for a compound literal and pass it to
2908 build_compound_literal.
2909 * c-parser.h (c_parser_type_name): Update prototype.
2910 * c-tree.h (build_compound_literal): Update prototype.
2911
5d9ae53d
MS
29122017-12-07 Martin Sebor <msebor@redhat.com>
2913
2914 PR c/81544
2915 * c-decl.c (c_decl_attributes): Look up existing declaration and
2916 pass it to decl_attributes.
2917
c79144f8
DM
29182017-12-06 David Malcolm <dmalcolm@redhat.com>
2919
2920 PR c/83236
2921 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2922 reserved for use by the implementation.
2923
613bc14f
DM
29242017-12-06 David Malcolm <dmalcolm@redhat.com>
2925
2926 * c-decl.c: Include "c-family/c-spellcheck.h".
2927
05abad4c
ML
29282017-12-05 Martin Liska <mliska@suse.cz>
2929 Jakub Jelinek <jakub@redhat.com>
2930
2931 * c-typeck.c (pointer_diff): Add new argument and instrument
2932 pointer subtraction.
2933 (build_binary_op): Similar for pointer comparison.
2934
cc6534d4
JJ
29352017-12-01 Jakub Jelinek <jakub@redhat.com>
2936
65791f42
JJ
2937 PR c/79153
2938 * c-parser.c: Include tree-iterator.h.
2939 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2940 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2941 on it.
2942
cc6534d4
JJ
2943 PR c/83222
2944 * c-tree.h (decl_constant_value_1): Declare.
2945 * c-typeck.c (decl_constant_value_1): New function.
2946 (decl_constant_value): Use it.
2947 * c-fold.c (c_fully_fold_internal): If in_init, use
2948 decl_constant_value_1 instead of decl_constant_value.
2949
5de73c05
JJ
29502017-11-30 Jakub Jelinek <jakub@redhat.com>
2951
2952 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2953
058f0b9e
JJ
29542017-11-28 Jakub Jelinek <jakub@redhat.com>
2955
2956 PR sanitizer/81275
2957 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2958 c_switch_covers_all_cases_p returns true.
2959
5e9d6aa4 29602017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2961 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2962
2963 * Make-lang.in (c/c-array-notation.o): Remove.
2964 * c-array-notation.c: Delete.
2965 * c-decl.c: Remove cilkplus condition.
2966 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2967 c_parser_cilk_verify_simd, c_parser_array_notation,
2968 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2969 c_parser_cilk_simd_fn_vector_attrs,
2970 c_finish_cilk_simd_fn_tokens): Delete.
2971 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2972 (c_parser_direct_declarator_inner): Ditto.
2973 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2974 (c_parser_attributes, c_parser_compound_statement,
2975 c_parser_statement_after_labels, c_parser_if_statement,
2976 c_parser_switch_statement, c_parser_while_statement,
2977 c_parser_do_statement, c_parser_for_statement,
2978 c_parser_unary_expression, c_parser_postfix_expression,
2979 c_parser_postfix_expression_after_primary,
2980 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2981 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2982 support.
2983 * c-typeck.c (build_array_ref, build_function_call_vec,
2984 convert_arguments,
2985 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2986 c_finish_loop, build_binary_op): Remove cilkplus support.
2987
9e851845
JJ
29882017-11-28 Jakub Jelinek <jakub@redhat.com>
2989
2990 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2991 of build3.
2992
ab20d992 29932017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2994
2995 * Make-lang.in (c.install-plugin): Install backend import library.
2996
41521dee
JJ
29972017-11-23 Jakub Jelinek <jakub@redhat.com>
2998
2999 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3000 pragma_stmt context.
3001
ac9effed
EB
30022017-11-23 Mike Stump <mikestump@comcast.net>
3003 Eric Botcazou <ebotcazou@adacore.com>
3004
3005 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3006 ANNOTATE_EXPR.
3007 (c_parser_do_statement): Likewise.
3008 (c_parser_for_statement): Likewise.
3009
ce95abc4
DM
30102017-11-22 David Malcolm <dmalcolm@redhat.com>
3011
3012 PR c++/62170
3013 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3014 bool to bool *. Within '%T' handling, if showing an "aka", use
3015 "quoted" param to add appropriate quoting.
3016
974aedcc
MP
30172017-11-22 Marek Polacek <polacek@redhat.com>
3018
3019 PR c++/60336
3020 PR middle-end/67239
3021 PR target/68355
3022 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3023
d4300cc6
DM
30242017-11-21 David Malcolm <dmalcolm@redhat.com>
3025
3026 PR c/83056
3027 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3028 earlier failed lookups.
3029
1af4ebf5
MG
30302017-11-21 Marc Glisse <marc.glisse@inria.fr>
3031
3032 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3033 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3034
26edace6
DM
30352017-11-20 David Malcolm <dmalcolm@redhat.com>
3036
3037 PR c/81404
3038 * c-decl.c: Include "c-family/known-headers.h".
3039 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3040 to known-headers.cc.
3041 (class suggest_missing_header): Move to known-header.h.
3042 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3043 than get_c_name_hint.
3044
b1212255
DM
30452017-11-20 David Malcolm <dmalcolm@redhat.com>
3046
3047 * c-decl.c (get_c_name_hint): New function.
3048 (class suggest_missing_header): New class.
3049 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3050 suggest missing headers to the user.
3051
6c7a259b
DM
30522017-11-20 David Malcolm <dmalcolm@redhat.com>
3053
3054 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3055 Include "c-family/name-hint.h"
3056 (implicit_decl_warning): Convert "hint" from
3057 const char * to name_hint. Pass location to
3058 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3059 warning was not printed.
3060 (undeclared_variable): Likewise for "guessed_id".
3061 (lookup_name_fuzzy): Convert return type from const char *
3062 to name_hint. Add location_t param.
3063 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3064 Include "c-family/name-hint.h"
3065 (c_parser_declaration_or_fndef): Convert "hint" from
3066 const char * to name_hint. Pass location to lookup_name_fuzzy.
3067 (c_parser_parameter_declaration): Likewise.
3068
f9c59f7e
JJ
30692017-11-19 Jakub Jelinek <jakub@redhat.com>
3070
3071 PR c/66618
3072 PR c/69960
3073 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3074 where needed.
3075 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3076 handle_omp_array_sections): Likewise.
3077 (digest_init): Don't call decl_constant_value_for_optimization.
3078 * c-tree.h (decl_constant_value_for_optimization): Removed.
3079 * c-fold.c (c_fold_array_ref): New function.
3080 (c_fully_fold_internal): Add LVAL argument, propagate it through
3081 recursive calls. For VAR_P call decl_constant_value and
3082 unshare if not LVAL and either optimizing or IN_INIT. Remove
3083 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3084 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3085 (c_fully_fold): Add LVAL argument, pass it through to
3086 c_fully_fold_internal.
3087 (decl_constant_value_for_optimization): Removed.
3088
3ca0dc60
JM
30892017-11-15 Joseph Myers <joseph@codesourcery.com>
3090
3091 PR c/81156
3092 * c-parser.c (check_tgmath_function): New function.
3093 (enum tgmath_parm_kind): New enum.
3094 (c_parser_postfix_expression): Handle __builtin_tgmath.
3095
64a5912c
DM
30962017-10-31 David Malcolm <dmalcolm@redhat.com>
3097
3098 * c-decl.c (implicit_decl_warning): Update for renaming of
3099 pedwarn_at_rich_loc and warning_at_rich_loc.
3100 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3101 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3102 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3103 (c_parser_struct_or_union_specifier): Likewise for renaming of
3104 pedwarn_at_rich_loc.
3105 (c_parser_parameter_declaration): Likewise for renaming of
3106 error_at_rich_loc.
3107 * c-typeck.c (build_component_ref): Likewise.
3108 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3109 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3110 (set_init_label): Likewise for renaming of error_at_rich_loc.
3111
c1136864
RB
31122017-10-30 Richard Biener <rguenther@suse.de>
3113
3114 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3115 stmts.
3116
ee5fd23a
MM
31172017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3118
3119 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3120 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3121
1a59ccf2
DM
31222017-10-25 David Malcolm <dmalcolm@redhat.com>
3123
3124 PR c/7356
3125 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3126 semicolons.
3127
bc1a75dd
JJ
31282017-10-25 Jakub Jelinek <jakub@redhat.com>
3129
3130 PR libstdc++/81706
3131 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3132 newdecl to corresponding __builtin_ if any.
3133
ff1ff960
PC
31342017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3135
3136 PR c++/82466
3137 * c-decl.c (diagnose_mismatched_decls): Use
3138 OPT_Wbuiltin_declaration_mismatch.
3139
62e1c678
DM
31402017-10-12 David Malcolm <dmalcolm@redhat.com>
3141
3142 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3143 use it to guard calls to maybe_suggest_missing_token_insertion.
3144 (c_parser_parms_list_declarator): Override default value of new
3145 "type_is_unique" param to c_parser_require.
3146 (c_parser_asm_statement): Likewise.
3147 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3148 defaulting to true.
3149
a92f6726
NS
31502017-10-11 Nathan Sidwell <nathan@acm.org>
3151
3152 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3153
8e6cdc90
RS
31542017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3155
3156 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3157 operating on trees as wide_ints.
3158 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3159 (c_tree_equal): Likewise.
3160
8139a48e
DM
31612017-10-04 David Malcolm <dmalcolm@redhat.com>
3162
3163 * c-decl.c (push_parm_decl): Store c_parm's location into the
3164 PARAM_DECL.
3165 (build_c_parm): Add "loc" param and store it within the c_parm.
3166 * c-parser.c (struct c_parser): Add "last_token_location" field.
3167 (c_parser_consume_token): Store location of the token into the
3168 new field.
3169 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3170 when handling a FUNCTION_DECL, if it doesn't already have them.
3171 (c_parser_parameter_declaration): Generate a location for the
3172 parameter, and pass it to the call to build_c_parm.
3173 * c-tree.h (struct c_parm): Add field "loc".
3174 (build_c_parm): Add location_t param.
3175 * c-typeck.c (get_fndecl_argument_location): New function.
3176 (inform_for_arg): New function.
3177 (convert_for_assignment): Use inform_for_arg when dealing with
3178 ic_argpass.
3179
2a389958
JJ
31802017-09-29 Jakub Jelinek <jakub@redhat.com>
3181
7d386d45
JJ
3182 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3183 width is non-NULL.
3184 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3185 don't SET_DECL_C_BIT_FIELD here.
3186
2a389958
JJ
3187 PR c/82340
3188 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3189 instead of trying to set just TREE_READONLY manually.
3190
ebc6a85e
TV
31912017-09-16 Tom de Vries <tom@codesourcery.com>
3192
3193 PR c/81875
3194 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3195 cond itself.
3196
bb75facd
JM
31972017-09-15 Joseph Myers <joseph@codesourcery.com>
3198
3199 PR c/82071
3200 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3201 for C11.
3202 (build_conditional_expr): For C11, generate result with excess
3203 precision when one argument is an integer and the other is of a
3204 type using excess precision.
3205
1d933576
BE
32062017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3207
3208 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3209
267bbb6f
MP
32102017-09-13 Marek Polacek <polacek@redhat.com>
3211
3212 PR c/82167
3213 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3214 than expr.original_type.
3215
6836632e
NS
32162017-09-12 Nathan Sidwell <nathan@acm.org>
3217
3218 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3219 resort_sorted_fields): Moved from c-family/c-common.c.
3220 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3221
e035be33
JM
32222017-09-01 Joseph Myers <joseph@codesourcery.com>
3223
3224 PR c/82071
3225 * c-typeck.c (build_atomic_assign): Handle argument with excess
3226 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3227 argument passed to build_binary_op and convert_for_assignment but
3228 not for call to c_fully_fold.
3229 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3230 Ensure build_binary_op is called with argument with original
3231 semantic type. Avoid calling c_fully_fold with an
3232 EXCESS_PRECISION_EXPR from build_binary_op.
3233
d2e05fcb
JJ
32342017-09-01 Jakub Jelinek <jakub@redhat.com>
3235
3236 PR c/81887
3237 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3238
b397965c
RS
32392017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3240 Alan Hayward <alan.hayward@arm.com>
3241 David Sherwood <david.sherwood@arm.com>
3242
3243 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3244 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3245 m1 and m2 to the signed equivalent of a fixed-point
3246 SCALAR_TYPE_MODE.
3247
14e18d71
DM
32482017-08-24 David Malcolm <dmalcolm@redhat.com>
3249
3250 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3251 than CAN_HAVE_LOCATION_P when determining whether to use the
3252 location_t value within "value".
3253
7f204c0f
DM
32542017-08-21 David Malcolm <dmalcolm@redhat.com>
3255
3256 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3257 rather than peeking the location of the first token.
3258 * c-tree.h (c_expr::get_location): New method.
3259
2f687306
DM
32602017-08-21 David Malcolm <dmalcolm@redhat.com>
3261
3262 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3263 to check_function_arguments.
3264
3e7b80d7
MP
32652017-08-18 Marek Polacek <polacek@redhat.com>
3266
3267 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3268 commentary.
3269
00aa1fa2
L
32702017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3271
3272 PR c/53037
3273 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3274 (check_bitfield_type_and_width): Don't allow bit-field with
3275 warn_if_not_aligned type.
3276
da67acb9
MS
32772017-08-14 Martin Sebor <msebor@redhat.com>
3278
3279 PR c/81117
3280 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3281
bb85aa74
MP
32822017-08-11 Marek Polacek <polacek@redhat.com>
3283
3284 PR c/81795
3285 * c-decl.c (pushtag): Only print inform if the warning was printed.
3286 (grokdeclarator): Likewise.
3287
32129a17
DM
32882017-08-10 David Malcolm <dmalcolm@redhat.com>
3289
3290 * c-parser.c (c_parser_error): Rename to...
3291 (c_parser_error_richloc): ...this, making static, and adding
3292 "richloc" parameter, passing it to the c_parse_error call,
3293 rather than calling c_parser_set_source_position_from_token.
3294 (c_parser_error): Reintroduce, reimplementing in terms of the
3295 above, converting return type from void to bool.
3296 (class token_pair): New class.
3297 (struct matching_paren_traits): New struct.
3298 (matching_parens): New typedef.
3299 (struct matching_brace_traits): New struct.
3300 (matching_braces): New typedef.
3301 (get_matching_symbol): New function.
3302 (c_parser_require): Add param MATCHING_LOCATION, using it to
3303 highlight matching "opening" tokens for missing "closing" tokens.
3304 (c_parser_skip_until_found): Likewise.
3305 (c_parser_static_assert_declaration_no_semi): Convert explicit
3306 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3307 class matching_parens, so that the pertinent open parenthesis is
3308 highlighted when there are problems locating the close
3309 parenthesis.
3310 (c_parser_struct_or_union_specifier): Likewise.
3311 (c_parser_typeof_specifier): Likewise.
3312 (c_parser_alignas_specifier): Likewise.
3313 (c_parser_simple_asm_expr): Likewise.
3314 (c_parser_braced_init): Likewise, for matching_braces.
3315 (c_parser_paren_condition): Likewise, for matching_parens.
3316 (c_parser_switch_statement): Likewise.
3317 (c_parser_for_statement): Likewise.
3318 (c_parser_asm_statement): Likewise.
3319 (c_parser_asm_operands): Likewise.
3320 (c_parser_cast_expression): Likewise.
3321 (c_parser_sizeof_expression): Likewise.
3322 (c_parser_alignof_expression): Likewise.
3323 (c_parser_generic_selection): Likewise.
3324 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3325 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3326 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3327 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3328 c_parser_skip_until_found call.
3329 (c_parser_objc_class_definition): Use class matching_parens as
3330 above.
3331 (c_parser_objc_method_decl): Likewise.
3332 (c_parser_objc_try_catch_finally_statement): Likewise.
3333 (c_parser_objc_synchronized_statement): Likewise.
3334 (c_parser_objc_at_property_declaration): Likewise.
3335 (c_parser_oacc_wait_list): Likewise.
3336 (c_parser_omp_var_list_parens): Likewise.
3337 (c_parser_omp_clause_collapse): Likewise.
3338 (c_parser_omp_clause_default): Likewise.
3339 (c_parser_omp_clause_if): Likewise.
3340 (c_parser_omp_clause_num_threads): Likewise.
3341 (c_parser_omp_clause_num_tasks): Likewise.
3342 (c_parser_omp_clause_grainsize): Likewise.
3343 (c_parser_omp_clause_priority): Likewise.
3344 (c_parser_omp_clause_hint): Likewise.
3345 (c_parser_omp_clause_defaultmap): Likewise.
3346 (c_parser_oacc_single_int_clause): Likewise.
3347 (c_parser_omp_clause_ordered): Likewise.
3348 (c_parser_omp_clause_reduction): Likewise.
3349 (c_parser_omp_clause_schedule): Likewise.
3350 (c_parser_omp_clause_num_teams): Likewise.
3351 (c_parser_omp_clause_thread_limit): Likewise.
3352 (c_parser_omp_clause_aligned): Likewise.
3353 (c_parser_omp_clause_linear): Likewise.
3354 (c_parser_omp_clause_safelen): Likewise.
3355 (c_parser_omp_clause_simdlen): Likewise.
3356 (c_parser_omp_clause_depend): Likewise.
3357 (c_parser_omp_clause_map): Likewise.
3358 (c_parser_omp_clause_device): Likewise.
3359 (c_parser_omp_clause_dist_schedule): Likewise.
3360 (c_parser_omp_clause_proc_bind): Likewise.
3361 (c_parser_omp_clause_uniform): Likewise.
3362 (c_parser_omp_for_loop): Likewise.
3363 (c_parser_cilk_clause_vectorlength): Likewise.
3364 (c_parser_cilk_clause_linear): Likewise.
3365 (c_parser_transaction_expression): Likewise.
3366 * c-parser.h (c_parser_require): Add param matching_location with
3367 default UNKNOWN_LOCATION.
3368 (c_parser_error): Convert return type from void to bool.
3369 (c_parser_skip_until_found): Add param matching_location with
3370 default UNKNOWN_LOCATION.
3371
30af3a2b
MP
33722017-08-09 Marek Polacek <polacek@redhat.com>
3373
3374 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3375 * c-tree.h (build_external_ref): Update declaration.
3376 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3377 (build_external_ref): Change the type of a parameter to bool.
3378 (parser_build_binary_op): Use true/false instead of 1/0.
3379 (pointer_diff): Likewise.
3380 (build_modify_expr): Likewise.
3381 (set_designator): Change the type of a parameter to bool.
3382 (set_init_index): Use true/false instead of 1/0.
3383 (set_init_label): Likewise.
3384 (output_init_element): Change the type of a parameter to bool.
3385 (output_pending_init_elements): Use true/false instead of 1/0.
3386 (process_init_element): Likewise.
3387 (build_binary_op): Change the type of a parameter to bool.
3388
296c53ac
MP
33892017-08-09 Marek Polacek <polacek@redhat.com>
3390
3391 PR c/81233
3392 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3393 Call emit_diagnostic_valist instead of pedwarn.
3394 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3395 Print the relevant types in diagnostics.
3396
a32c8316
MP
33972017-08-09 Marek Polacek <polacek@redhat.com>
3398
3399 PR c/81417
3400 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3401 build_conditional_expr.
a32c8316
MP
3402 * c-parser.c (c_parser_conditional_expression): Create locations for
3403 EXP1 and EXP2 from their source ranges. Pass the locations down to
3404 build_conditional_expr.
3405 * c-tree.h (build_conditional_expr): Update declaration.
3406 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3407 For -Wsign-compare, also print the types.
3408
314e6352
ML
34092017-08-08 Martin Liska <mliska@suse.cz>
3410
3411 * c-convert.c: Include header files.
3412 * c-typeck.c: Likewise.
3413
577eec56
ML
34142017-08-07 Martin Liska <mliska@suse.cz>
3415
3416 * c-parser.c (c_parser_attributes): Canonicalize name of an
3417 attribute.
3418
f7b6353a
MP
34192017-08-02 Marek Polacek <polacek@redhat.com>
3420
3421 PR c/81289
3422 * c-parser.c (c_parser_unary_expression): Use set_error.
3423
8a6eab34
MP
3424 PR c/81448
3425 PR c/81306
3426 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3427 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3428
ab20d992 34292017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3430 Martin Liska <mliska@suse.cz>
3431
3432 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3433 statement.
7fef86d3 3434
f34ebeb2
ML
34352017-07-31 Martin Liska <mliska@suse.cz>
3436
3437 PR sanitize/81530
3438 * c-convert.c (convert): Guard condition with flag_sanitize_p
3439 also with current_function_decl non-null equality.
3440 * c-decl.c (grokdeclarator): Likewise.
3441 * c-typeck.c (build_binary_op): Likewise.
3442
8595f67b
MP
34432017-07-25 Marek Polacek <polacek@redhat.com>
3444
3445 * c-decl.c (grokfield): Remove local variable.
3446
d49718d6
MP
34472017-07-25 Marek Polacek <polacek@redhat.com>
3448
3449 PR c/81364
3450 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3451 macro expansion if the body is in { }.
3452 (c_parser_while_statement): Likewise.
3453 (c_parser_for_statement): Likewise.
3454
ff22eb12
NS
34552017-07-18 Nathan Sidwell <nathan@acm.org>
3456
3457 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3458
eea77d1f
DM
34592017-07-14 David Malcolm <dmalcolm@redhat.com>
3460
3461 * c-decl.c (implicitly_declare): When suggesting a missing
3462 #include, provide a fix-it hint.
3463
b6f43128
DM
34642017-07-06 David Malcolm <dmalcolm@redhat.com>
3465
3466 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3467 and call that instead.
3468 * c-tree.h (selftest::run_c_tests): New decl.
3469
3e2becc4
MP
34702017-06-26 Marek Polacek <polacek@redhat.com>
3471
3472 PR c/80116
3473 * c-parser.c (c_parser_if_body): Set the location of the
3474 body of the conditional after parsing all the labels. Call
3475 warn_for_multistatement_macros.
3476 (c_parser_else_body): Likewise.
3477 (c_parser_switch_statement): Likewise.
3478 (c_parser_while_statement): Likewise.
3479 (c_parser_for_statement): Likewise.
3480 (c_parser_statement): Add a default argument. Save the location
3481 after labels have been parsed.
3482 (c_parser_c99_block_statement): Likewise.
3483
343ae898
RB
34842017-06-19 Richard Biener <rguenther@suse.de>
3485
3486 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3487 negated _Literals to parse _Literal (int) -1.
3488
45b2222a
ML
34892017-06-13 Martin Liska <mliska@suse.cz>
3490
3491 PR sanitize/78204
3492 * c-convert.c (convert): Use sanitize_flags_p.
3493 * c-decl.c (grokdeclarator): Likewise.
3494 * c-typeck.c (convert_for_assignment): Likewise.
3495 (c_finish_return): Likewise.
3496 (build_binary_op): Likewise.
3497
8ab7005b
JJ
34982017-06-08 Jakub Jelinek <jakub@redhat.com>
3499
3500 PR c/81006
3501 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3502 to sizetype before size_binop.
3503
363dc72c
JJ
35042017-06-07 Jakub Jelinek <jakub@redhat.com>
3505
3506 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3507 of TDI_generic.
3508
dc949728
MP
35092017-06-06 Marek Polacek <polacek@redhat.com>
3510
3511 PR c/79983
3512 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3513 ref.
3514 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3515
40ffd95f
BE
35162017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3517
3518 * c-parser.c (c_parser_binary_expression): Implement the
3519 -Wsizeof_pointer_div warning.
3520 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3521 from a parenthesized expression.
3522 (c_parser_expr_list): Use c_last_sizeof_loc.
3523 * c-tree.h (c_last_sizeof_loc): New external.
3524 * c-typeck.c (c_last_sizeof_loc): New variable.
3525 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3526
9fc5e7a4
MM
35272017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3528
3529 PR testsuite/80580
3530 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3531
f012c8ef
DM
35322017-05-30 David Malcolm <dmalcolm@redhat.com>
3533
3534 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3535 parameters.
3536
3cd211af
MS
35372017-05-24 Martin Sebor <msebor@redhat.com>
3538
3539 PR c/80731
3540 * c-fold.c (c_fully_fold_internal): Adjust.
3541 * c-typeck.c (parser_build_unary_op): Adjust.
3542
fd71a9a2
TS
35432017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3544
3545 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3546 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3547 "VECTOR_LENGTH".
3548
92fa0f9e
MP
35492017-05-23 Marek Polacek <polacek@redhat.com>
3550
3551 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3552 quotes.
3553
d11c168a
JJ
35542017-05-22 Jakub Jelinek <jakub@redhat.com>
3555
3556 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3557 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3558 it returned invariant. Call tree_invariant_p unconditionally
3559 afterwards to decide whether to return expr or op0.
3560
58aca9d9
NS
35612017-05-22 Nathan Sidwell <nathan@acm.org>
3562
3563 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3564
7fd549d2
TS
35652017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3566
3567 * c-parser.c (c_parser_omp_clause_default): Handle
3568 "OMP_CLAUSE_DEFAULT_PRESENT".
3569
6ecd2339
BE
35702017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3571
3572 * config-lang.in (gtfiles): Add c-family/c-format.c.
3573
8a57ecff
NS
35742017-05-18 Nathan Sidwell <nathan@acm.org>
3575
3576 * c-decl.c (pushdecl_top_level): Delete unused function.
3577
6574d78e
MP
35782017-05-18 Marek Polacek <polacek@redhat.com>
3579
3580 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3581 (check_earlier_gotos): Likewise.
3582 (define_label): Likewise.
3583 (pending_xref_error): Likewise.
3584 (smallest_type_quals_location): Likewise.
3585 (grokdeclarator): Likewise.
3586 (grokparms): Likewise.
3587 (identifier_global_value): Likewise.
3588 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3589 (find_init_member): Likewise.
3590
e3455240
MP
35912017-05-18 Marek Polacek <polacek@redhat.com>
3592
3593 * c-decl.c (start_decl): Use false/true instead of 0/1.
3594 (grokdeclarator): Likewise.
3595 (finish_struct): Likewise.
3596 (start_function): Change the return type to bool. Use false/true
3597 instead of 0/1.
3598 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3599 * c-tree.h (start_function): Update.
3600 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3601 (set_designator): Change the return type to bool. Use false/true
3602 instead of 0/1.
3603
3fa8871b
MP
36042017-05-17 Marek Polacek <polacek@redhat.com>
3605
3606 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3607 * c-typeck.c: Likewise.
3608
142473df
MP
36092017-05-17 Marek Polacek <polacek@redhat.com>
3610
3611 PR sanitizer/80659
3612 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3613 DECL_IGNORED_P even for non-static compound literals.
3614
1a817418
ML
36152017-05-17 Martin Liska <mliska@suse.cz>
3616
3617 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3618 use it instead of int type.
3619
b2fa0a8b
MP
36202017-05-17 Marek Polacek <polacek@redhat.com>
3621
3622 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3623 call c_fully_fold.
3624 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3625 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3626 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3627 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3628 save_expr.
3629 (c_parser_conditional_expression): Likewise.
3630 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3631 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3632 (process_init_element): Likewise.
3633 (build_binary_op): Likewise.
3634 (handle_omp_array_sections_1): Likewise.
3635
1e47f02b
TS
36362017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3637
3638 * c-parser.c (c_parser_omp_clause_num_gangs)
3639 (c_parser_omp_clause_num_workers)
3640 (c_parser_omp_clause_vector_length): Merge functions into...
3641 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3642 all users.
3643
c24e924f
NS
36442017-05-11 Nathan Sidwell <nathan@acm.org>
3645
3646 * gimple-parser.c: Don't #include tree-dump.h.
3647
c587104e
MM
36482017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3649
3650 PR testsuite/80580
3651 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3652
67ac9a9d
MM
36532017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3654
3655 PR testsuite/80580
3656 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3657 incorrect __MEM syntax.
3658
ac4eb40f
MM
36592017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3660
3661 PR testsuite/80580
3662 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3663 type of unary '*'.
3664
641da50a
NS
36652017-05-09 Nathan Sidwell <nathan@acm.org>
3666
3667 * c-tree.h (pushdecl): Declare.
3668
56d35585
DM
36692017-05-05 David Malcolm <dmalcolm@redhat.com>
3670
3671 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3672 with diagnostic_report_diagnostic.
3673 * c-errors.c (pedwarn_c99): Likewise.
3674 (pedwarn_c90): Likewise.
3675
815d9cc6
XR
36762017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3677
92a285c1 3678 PR c++/80038
815d9cc6
XR
3679 * c-gimplify.c (c_gimplify_expr): Remove calls to
3680 cilk_gimplifY_call_params_in_spawned_fn.
3681
1c4ea66f
DM
36822017-04-25 David Malcolm <dmalcolm@redhat.com>
3683
3684 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3685 hint for removing extra semicolon.
3686
666f7903
JJ
36872017-04-21 Jakub Jelinek <jakub@redhat.com>
3688
3689 PR c/80468
3690 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3691 enabled, set specs->type to integer_type_node.
3692
5764ee3c
JW
36932017-04-03 Jonathan Wakely <jwakely@redhat.com>
3694
3695 * c-array-notation.c: Fix typo in comment.
3696
10fa8dfb
MP
36972017-03-29 Marek Polacek <polacek@redhat.com>
3698
3699 PR c/79730
3700 * c-decl.c (finish_decl): Check VAR_P.
3701
a9e4a1a5
JJ
37022017-03-27 Jakub Jelinek <jakub@redhat.com>
3703
3704 PR middle-end/80162
3705 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3706 * c-typeck.c (c_mark_addressable): Likewise. Look through
3707 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3708 to ARRAY_TYPE.
3709 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3710
ee3ff394
MP
37112017-03-23 Marek Polacek <polacek@redhat.com>
3712
3713 * c-tree.h: Remove a C_RID_YYCODE reference.
3714
4d1b8e70
JJ
37152017-03-21 Jakub Jelinek <jakub@redhat.com>
3716
3717 PR c/80097
3718 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3719 optional COMPOUND_EXPR with ubsan instrumentation.
3720
31dc71a8
MP
37212017-03-17 Marek Polacek <polacek@redhat.com>
3722
3723 * c-parser.c: Add C11 references.
3724
d579c385
MP
37252017-03-15 Marek Polacek <polacek@redhat.com>
3726
3727 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3728
85059a38
MP
37292017-03-11 Marek Polacek <polacek@redhat.com>
3730
3731 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3732
2f6f187a
DM
37332017-03-10 David Malcolm <dmalcolm@redhat.com>
3734
3735 PR translation/79848
3736 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3737 "%qs".
3738 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3739
36618428
MP
37402017-03-09 Marek Polacek <polacek@redhat.com>
3741
3742 PR sanitizer/79757
3743 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3744 parameter declarations with initializers.
3745
01e5af5a
JJ
37462017-03-09 Jakub Jelinek <jakub@redhat.com>
3747
3748 PR c/79969
3749 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3750 TYPE_STUB_DECL.
3751
a71dbc63
JJ
37522017-03-07 Jakub Jelinek <jakub@redhat.com>
3753
3754 PR c/79834
3755 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3756 for "may only be used in compound statements" diagnostics, change it
3757 such that the same translatable string is used for all pragmas. For
3758 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3759 diagnostics.
3760 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3761 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3762 "may only be used in compound statements" diagnostics, such that the
3763 same translatable string is used for all pragmas.
3764
1ff4bae6
MP
37652017-03-04 Marek Polacek <polacek@redhat.com>
3766
3767 PR c/79847
3768 * c-decl.c (implicit_decl_warning): Add missing space.
3769
7f5a7d78
MP
37702017-03-03 Marek Polacek <polacek@redhat.com>
3771
3772 PR c/79758
3773 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3774 current_function_prototype_arg_types is error_mark_node. Fix
3775 formatting. Use TREE_VALUE instead of TREE_TYPE.
3776
883c8f06
JJ
37772017-03-03 Jakub Jelinek <jakub@redhat.com>
3778
79c9b7a8
JJ
3779 PR c/79837
3780 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3781 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3782 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3783 diagnostics.
3784
883c8f06
JJ
3785 PR c/79836
3786 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3787 instead of %<_Generic>.
3788 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3789 (c_parser_omp_target_exit_data): Use %<release%> instead of
3790 %<release>.
3791
324ff1a0
JJ
37922017-02-28 Jakub Jelinek <jakub@redhat.com>
3793
3794 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3795 instead of just cond ? "..." : "...".
3796 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3797 for "enter"/"exit" keyword.
3798 (c_finish_oacc_routine): Don't use %s to supply portions of the
3799 message.
3800
4227c9ad
JJ
38012017-02-24 Jakub Jelinek <jakub@redhat.com>
3802
3803 PR c++/79588
3804 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3805 handle -Wrestrict here.
3806 * c-typeck.c (build_function_call_vec): Adjust
3807 check_function_arguments caller.
3808
5d972e66
RB
38092017-02-23 Richard Biener <rguenther@suse.de>
3810
3811 PR c/79684
3812 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3813 to initialize c_exprs to return.
3814 (c_parser_gimple_binary_expression): Likewise.
3815 (c_parser_gimple_unary_expression): Likewise.
3816 (c_parser_gimple_postfix_expression): Likewise.
3817
61ac5ebe
MP
38182017-02-22 Marek Polacek <polacek@redhat.com>
3819
3820 PR c/79662
3821 * c-typeck.c (convert_arguments): Handle error_mark_node.
3822
41d1b0b1
PK
38232017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3824
3825 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3826 value of c_parser_parse_ssa_name against error_mark_node and emit
3827 error if ssa name is anonymous and written as default definition.
3828
eab1f169
PK
38292017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3830
3831 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3832 FMA_EXPR.
3833
bcac0b4d
JJ
38342017-02-16 Jakub Jelinek <jakub@redhat.com>
3835
3836 PR c++/79512
3837 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3838 ignore #pragma omp target even when not followed by identifier.
3839
1be33173
PK
38402017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3841
3842 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3843 (c_parser_gimple_unary_expression): Likewise.
3844
aa326bfb
JJ
38452017-02-13 Jakub Jelinek <jakub@redhat.com>
3846
3847 * c-parser.c (c_parser_oacc_declare): Add missing space in
3848 diagnostics.
3849
8a398bc5
PK
38502017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3851
3852 PR c/79478
3853 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3854 set_c_expr_source_range when parsing ssa-name.
3855
3dcde5ef 38562017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3857 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3858
3859 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3860 building IL when arguments are error_mark_node.
3861 (c_parser_gimple_unary_expression): Likewise.
3862 (c_parser_gimple_if_stmt): Likewise.
3863 (c_parser_gimple_switch_stmt): Likewise.
3864 (c_parser_gimple_return_stmt): Likewise.
3865 (c_parser_parse_ssa_name): When name lookup fails do not build
3866 an SSA name. Use undeclared rather than not declared in error
3867 reporting.
3868
192b048b
MP
38692017-02-09 Marek Polacek <polacek@redhat.com>
3870
3871 PR c/79428
3872 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3873 instead of c_parser_skip_until_found.
3874
56f71478
JJ
38752017-02-09 Jakub Jelinek <jakub@redhat.com>
3876
3877 PR c/79431
3878 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3879 symtab_node::get on automatic variables.
3880
02889d23
CLT
38812016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3882 Chung-Lin Tang <cltang@codesourcery.com>
3883
3884 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3885 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3886 semantic checking.
3887 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3888
7af4b20d
RB
38892017-02-07 Richard Biener <rguenther@suse.de>
3890
3891 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3892 (c_parser_gimple_postfix_expression_after_primary):
3893 Do not use c_build_function_call_vec to avoid folding and promotion.
3894 Simplify.
3895
e5e391d6
MO
38962017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3897
3898 PR lto/79061
3899 * c-decl.c (pop_scope): Pass main_input_filename to
3900 build_translation_unit_decl.
3901
c2e84327
DM
39022017-01-24 David Malcolm <dmalcolm@redhat.com>
3903
3904 * c-parser.c: Include "read-rtl-function.h" and
3905 "run-rtl-passes.h".
3906 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3907 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3908 production. Update for renaming of field "gimple_pass" to
3909 "gimple_or_rtl_pass". If __RTL was seen, call
3910 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3911 to an auto_timevar, to cope with early exit.
3912 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3913 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3914 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3915 Handle RID_RTL.
3916 (c_parser_parse_rtl_body): New function.
3917 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3918 (struct c_declspecs): Rename field "gimple_pass" to
3919 "gimple_or_rtl_pass". Add field "rtl_p".
3920 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3921 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3922 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3923 (c_parser_gimple_or_rtl_pass_list): ...this.
3924
2ebd93e1
MP
39252017-01-20 Marek Polacek <polacek@redhat.com>
3926
3927 PR c/64279
3928 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3929
b1c95bb5
RB
39302017-01-13 Richard Biener <rguenther@suse.de>
3931
3932 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3933 nops.
3934
25329913
RB
39352017-01-13 Richard Biener <rguenther@suse.de>
3936
3937 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3938 _Literal ( type-name ) number.
3939
6bb4ea5c
RB
39402017-01-12 Richard Biener <rguenther@suse.de>
3941
3942 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3943 __MEM.
3944
6b5b4e9c
JJ
39452017-01-11 Jakub Jelinek <jakub@redhat.com>
3946
3947 PR c++/72813
3948 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3949 PCH file.
3950
e3252775
RB
39512017-01-11 Richard Biener <rguenther@suse.de>
3952
3953 PR bootstrap/79052
3954 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3955 returns on parse errors.
3956
a9342885
MP
39572017-01-04 Marek Polacek <polacek@redhat.com>
3958
3959 PR c++/64767
3960 * c-parser.c (c_parser_postfix_expression): Mark zero character
3961 constants by setting original_type in c_expr.
3962 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3963 with a zero character constant.
3964 (char_type_p): New function.
3965
5dd9a9d0
DM
39662017-01-04 David Malcolm <dmalcolm@redhat.com>
3967
3968 * c-parser.c (c_parser_declaration_or_fndef): Create a
3969 rich_location at init_loc and parse it to start_init.
3970 (last_init_list_comma): New global.
3971 (c_parser_braced_init): Update last_init_list_comma when parsing
3972 commas. Pass it to pop_init_level. Pass location of closing
3973 brace to pop_init_level.
3974 (c_parser_postfix_expression_after_paren_type): Create a
3975 rich_location at type_loc and parse it to start_init.
3976 (c_parser_omp_declare_reduction): Likewise for loc.
3977 * c-tree.h (start_init): Add rich_location * param.
3978 (pop_init_level): Add location_t param.
3979 * c-typeck.c (struct initializer_stack): Add field
3980 "missing_brace_richloc".
3981 (start_init): Add richloc param, use it to initialize
3982 the stack node's missing_brace_richloc.
3983 (last_init_list_comma): New decl.
3984 (finish_implicit_inits): Pass last_init_list_comma to
3985 pop_init_level.
3986 (push_init_level): When finding missing open braces, add fix-it
3987 hints to the richloc.
3988 (pop_init_level): Add "insert_before" param and pass it
3989 when calling pop_init_level. Add fixits about missing
3990 close braces to any richloc. Use the richloc for the
3991 -Wmissing-braces warning.
3992 (set_designator): Pass last_init_list_comma to pop_init_level.
3993 (process_init_element): Likewise.
3994
cbe34bb5
JJ
39952017-01-01 Jakub Jelinek <jakub@redhat.com>
3996
3997 Update copyright years.
3998
d17680f3
JJ
39992016-12-21 Jakub Jelinek <jakub@redhat.com>
4000
0dba7960
JJ
4001 PR bootstrap/78817
4002 * c-typeck.c (build_function_call_vec): If check_function_arguments
4003 returns true, set TREE_NO_WARNING on CALL_EXPR.
4004
d17680f3
JJ
4005 PR c/77767
4006 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4007 to *expr instead of overwriting it.
4008
aa90531e
RB
40092016-12-20 Richard Biener <rguenther@suse.de>
4010
4011 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4012 error recovery.
4013 (c_parser_gimple_statement): Only build assigns for non-error
4014 stmts.
4015 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4016
629b3d75
MJ
40172016-12-14 Martin Jambor <mjambor@suse.cz>
4018
4019 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4020 omp-low.h.
4021 (c_finish_oacc_routine): Adjusted call to
4022 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4023 to use their new names.
4024 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4025 use its new name.
4026 (c_parser_oacc_update): Likewise.
4027 (c_parser_omp_simd): Likewise.
4028 (c_parser_omp_target_update): Likewise.
4029 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4030 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4031 name.
4032 (c_finish_omp_cancellation_point): Likewise.
4033 * gimple-parser.c: Do not include omp-low.h
4034
c5af52eb
CP
40352016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4036 James Norris <jnorris@codesourcery.com>
4037
4038 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4039 EXIT_DATA,WAIT} are not used in compound statements.
4040 (c_parser_oacc_enter_exit_data): Update diagnostics.
4041
48330c93
BE
40422016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4043
4044 PR c++/71973
4045 * c-decl.c (diagnose_mismatched_decls): Use
4046 OPT_Wbuiltin_declaration_mismatch here too.
4047
899ca90e 40482016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
4049 Alan Hayward <alan.hayward@arm.com>
4050 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
4051
4052 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4053 (make_label, finish_struct): Likewise.
4054
1ee62b92 40552016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 4056 Richard Biener <rguenther@suse.de>
22b15758 4057
8e745a17
JJ
4058 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4059 * config-lang.in (gtfiles): Add c/c-parser.h.
4060 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4061 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4062 * c-parser.c (enum c_id_kind, struct c_token,
4063 c_parser_next_token_is, c_parser_next_token_is_not,
4064 c_parser_next_token_is_keyword,
4065 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4066 Split out to ...
4067 * c-parser.h: ... new header.
4068 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 4069 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
4070 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4071 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4072 c_parser_error, c_parser_require, c_parser_skip_until_found,
4073 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4074 c_parser_type_name): Export.
4075 (c_parser_tokens_buf): New function.
4076 (c_parser_error): Likewise.
4077 (c_parser_set_error): Likewise.
4078 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
4079 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4080 via c_parser_parse_gimple_body.
8e745a17
JJ
4081 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4082 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4083 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4084 c_parser_error, c_parser_require, c_parser_skip_until_found,
4085 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4086 c_parser_type_name): Declare.
1ee62b92
PG
4087 (struct c_parser): Declare forward.
4088 (c_parser_tokens_buf): Declare.
8e745a17
JJ
4089 (c_parser_error): Likewise.
4090 (c_parser_set_error): Likewise.
4091 * gimple-parser.c: New file.
4092 * gimple-parser.h: Likewise.
1ee62b92 4093
22b15758
UB
40942016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4095
4096 PR c/35503
4097 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4098 warn_for_restrict.
4099
84ff4775
LCW
41002016-09-11 Le-Chun Wu <lcwu@google.com>
4101 Mark Wielaard <mjw@redhat.com>
4102
4103 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4104 to the given -Wshadow= variant.
4105
4d0cdd0c
TP
41062016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4107
4108 * c-typeck.c: Include memmodel.h.
4109
1202f33e
JJ
41102016-10-13 Jakub Jelinek <jakub@redhat.com>
4111
4112 PR target/77957
4113 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4114 instead of lhd_return_null_tree_v.
4115
8a14afd0
BS
41162016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4117
4118 PR c++/69733
4119 * c-decl.c (smallest_type_quals_location): New static function.
4120 (grokdeclarator): Try to find the correct location for an ignored
4121 qualifier.
4122
81fea426
MP
41232016-09-26 Marek Polacek <polacek@redhat.com>
4124
4125 PR c/7652
4126 * c-decl.c (pop_scope): Add gcc_fallthrough.
4127
41282016-09-26 Marek Polacek <polacek@redhat.com>
4129
4130 PR c/7652
4131 * c-parser.c (struct c_token): Add flags field.
4132 (c_lex_one_token): Pass it to c_lex_with_flags.
4133 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4134 into IFN_FALLTHROUGH.
4135 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4136 attribute fallthrough after a case label or default label.
4137 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4138
9a2300e9
MP
41392016-09-24 Marek Polacek <polacek@redhat.com>
4140
4141 PR c/77490
4142 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4143 have boolean value. Warn about ++/-- on booleans.
4144
7de76362
JJ
41452016-09-23 Jakub Jelinek <jakub@redhat.com>
4146
4147 * c-parser.c (incomplete_record_decls): Remove unnecessary
4148 = vNULL initialization of file scope vec.
4149
5b73d2ab
MP
41502016-09-16 Marek Polacek <polacek@redhat.com>
4151
4152 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4153
e51fbec3
MP
41542016-09-14 Marek Polacek <polacek@redhat.com>
4155
4156 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4157 (fix_array_notation_expr): Likewise.
4158 * c-decl.c (finish_decl): Likewise.
4159 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4160 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4161 (function_to_pointer_conversion): Use false instead of 0.
4162 (convert_lvalue_to_rvalue): Likewise.
4163 (parser_build_unary_op): Likewise.
4164 (build_atomic_assign): Likewise.
4165 (build_unary_op): Change nonconvert parameter type to bool, use
4166 true/false instead of 1/0.
4167 (build_binary_op): Use true instead of 1.
4168
254830ba
DM
41692016-09-13 David Malcolm <dmalcolm@redhat.com>
4170
4171 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4172 of add_fixit_insert to add_fixit_insert_before.
4173
4c13ba17
MP
41742016-09-13 Marek Polacek <polacek@redhat.com>
4175
4176 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4177 it.
4178
54dcdb88
BE
41792016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4180
4181 PR c++/77496
4182 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4183 COMPOUND_EXPR to warn_for_omitted_condop.
4184
e5106e27
DM
41852016-09-07 David Malcolm <dmalcolm@redhat.com>
4186
4187 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4188 c_get_substring_location for this new langhook.
4189
9dc5773f
JJ
41902016-09-02 Jakub Jelinek <jakub@redhat.com>
4191
4192 PR c/65467
4193 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4194 flag_openmp.
4195 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4196 instead of mark_exp_read on low_bound/length expression.
4197 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4198 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4199 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4200 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4201 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4202 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4203 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4204 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4205 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4206 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4207 instead of mark_expr_read.
4208 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4209 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4210 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4211 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4212 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4213 array section bases outside of depend clause, for depend clause
4214 use convert_lvalue_to_rvalue on the base.
4215 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4216 linear, aligned, map, to and from clauses.
4217 (c_omp_clause_copy_ctor): New function.
4218
295844f6
MP
42192016-09-01 Marek Polacek <polacek@redhat.com>
4220
4221 PR c/7652
4222 * c-typeck.c (composite_type): Add FALLTHRU comment.
4223
089af25c
DM
42242016-08-31 David Malcolm <dmalcolm@redhat.com>
4225
4226 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4227 to the insertion fixits for "struct", "union", and "enum".
4228
f9087798
DM
42292016-08-30 David Malcolm <dmalcolm@redhat.com>
4230
4231 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4232 rather than add_fixit_misspelled_id.
4233 (undeclared_variable): Likewise.
4234 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4235 now-redundant "here" params from add_fixit_insert method calls.
4236 (c_parser_parameter_declaration): Likewise.
4237 * c-typeck.c (build_component_ref): Remove now-redundant range
4238 param from add_fixit_replace method calls.
4239
ebef225f
MP
42402016-08-25 Marek Polacek <polacek@redhat.com>
4241
4242 * c-typeck.c (parser_build_binary_op): Pass LHS to
4243 warn_logical_not_parentheses.
4244
fe377a48
MP
42452016-08-25 Marek Polacek <polacek@redhat.com>
4246
4247 PR c/77323
4248 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4249 or _FloatN or _FloatNx is not supported.
4250 (finish_declspecs): Set type to integer_type_node when _FloatN or
4251 _FloatNx is not supported.
4252
c65699ef
JM
42532016-08-19 Joseph Myers <joseph@codesourcery.com>
4254
4255 PR c/32187
4256 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4257 (struct c_declspecs): Add field floatn_nx_idx.
4258 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4259 and _FloatNx type specifiers.
4260 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4261 (c_parser_declspecs, c_parser_attribute_any_word)
4262 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4263 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4264 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4265 narrower than double.
4266
2f1364c2
JJ
42672016-08-12 Jakub Jelinek <jakub@redhat.com>
4268 Martin Liska <mliska@suse.cz>
4269
4270 PR c/67410
4271 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4272 % to determine val element to change. Assert that
4273 wchar_bytes * charwidth fits into val array.
4274
191816a3
MP
42752016-08-12 Marek Polacek <polacek@redhat.com>
4276
4277 PR c/7652
4278 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4279 (c_parser_postfix_expression): Likewise.
4280 * c-typeck.c (build_unary_op): Adjust fall through comment.
4281 (c_mark_addressable): Likewise.
4282
b95a64bb
JJ
42832016-08-11 Jakub Jelinek <jakub@redhat.com>
4284
4285 PR c/72816
4286 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4287 array member through typedef, for orig_qual_indirect == 0 clear
4288 orig_qual_type.
4289
895aa8e1
DM
42902016-08-08 David Malcolm <dmalcolm@redhat.com>
4291
4292 PR c/64955
4293 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4294 this up to selftest::run_c_tests.
4295 (selftest::run_c_tests): New function.
4296
0b212d8c
TS
42972016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4298
ae9281fc
TS
4299 * c-parser.c (struct oacc_routine_data): Add error_seen and
4300 fndecl_seen members.
4301 (c_finish_oacc_routine): Use these.
4302 (c_parser_declaration_or_fndef): Adjust.
4303 (c_parser_oacc_routine): Likewise. Support more C language
4304 constructs, and improve diagnostics. Move pragma context
4305 checking...
4306 (c_parser_pragma): ... here.
4307
0b212d8c
TS
4308 * c-parser.c (struct oacc_routine_data): New.
4309 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4310 Simplify code.
4311 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4312 declare target" attribute.
4313
76e2c821
JB
43142016-08-01 Jan Beulich <jbeulich@suse.com>
4315
4316 * c-fold.c (c_fully_fold_internal): Also emit shift count
4317 warnings for vector types.
4318 * c-typeck.c (build_binary_op): Likewise.
4319
f618a472
MP
43202016-07-29 Marek Polacek <polacek@redhat.com>
4321
4322 PR c/71742
4323 * c-decl.c (finish_struct): Rephrase an error message.
4324
efd0786f
MP
4325 PR c/71853
4326 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4327 to error node for invalid code.
4328
e00dceaf
MP
4329 PR c/71573
4330 * c-decl.c (implicitly_declare): Return decl early not only for
4331 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4332
673a107a
JJ
43332016-07-29 Jakub Jelinek <jakub@redhat.com>
4334
4335 PR c/71969
4336 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4337 on GNU extern inline functions.
4338
a5b5c8b6
MP
43392016-07-29 Marek Polacek <polacek@redhat.com>
4340
4341 PR c/71583
4342 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4343 check expr.value.
4344
e3fe09c1
UB
43452016-07-22 Uros Bizjak <ubizjak@gmail.com>
4346
4347 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4348
7c8f7eaa
DM
43492016-07-20 David Malcolm <dmalcolm@redhat.com>
4350
4351 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4352 spellcheck-tree.h
4353 (best_macro_match): Likewise, converting from a typedef to a
4354 subclass.
4355 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4356 (lookup_name_fuzzy): Update for change of best_macro_match to a
4357 subclass with a ctor that calls cpp_forall_identifiers.
4358
de6a69ee
DM
43592016-07-20 David Malcolm <dmalcolm@redhat.com>
4360
4361 * c-decl.c (implicit_decl_warning): Update for conversion of
4362 return type of lookup_name_fuzzy to const char *.
4363 (undeclared_variable): Likewise.
4364 (lookup_name_fuzzy): Convert return type from tree to
4365 const char *.
4366 * c-parser.c (c_parser_declaration_or_fndef): Update for
4367 conversion of return type of lookup_name_fuzzy to const char *.
4368 (c_parser_parameter_declaration): Likewise.
4369
b1c9c068
CP
43702016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4371
4372 * c-parser.c (c_parser_oacc_declare): Don't scan for
4373 GOMP_MAP_POINTER.
4374 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4375 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4376 zero-length subarrays.
4377
ddbbcb19
JJ
43782016-07-15 Jakub Jelinek <jakub@redhat.com>
4379
4380 PR c/71858
4381 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4382 instead of FUZZY_LOOKUP_NAME.
4383 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4384 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4385
dd36b877
JJ
43862016-07-14 Jakub Jelinek <jakub@redhat.com>
4387
4388 PR c/71858
4389 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4390
8c681247
TS
43912016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4392
4393 * c-parser.c (c_parser_generic_selection): Make type of variable
4394 auto_vec.
4395 (c_parser_omp_declare_simd): Likewise.
4396
bf4fa671
TS
43972016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4398
4399 * c-decl.c (struct c_struct_parse_info): Change member types
4400 from vec to auto_vec.
4401 (start_struct): Adjust.
4402 (finish_struct): Likewise.
4403
557e8c49
JJ
44042016-07-02 Jakub Jelinek <jakub@redhat.com>
4405
4406 PR c/71719
4407 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4408
54d19c3b
TS
44092016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4410
4411 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4412 Move pragma context checking into...
4413 (c_parser_omp_cancellation_point): ... here, and improve
4414 diagnostic messages.
4415 * c-typeck.c (c_finish_omp_cancel)
4416 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4417
152ef731
JJ
44182016-06-29 Jakub Jelinek <jakub@redhat.com>
4419
4420 PR c/71685
4421 * c-typeck.c (c_build_qualified_type): Don't clear
4422 C_TYPE_INCOMPLETE_VARS for the main variant.
4423
44242016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4425
4426 PR c/71552
4427 * c-typeck.c (output_init_element): Diagnose incompatible types
4428 before non-constant initializers.
4429
e9ac1f86
JJ
44302016-06-28 Jakub Jelinek <jakub@redhat.com>
4431
4432 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4433
277d7ee0
AK
44342016-06-23 Andi Kleen <ak@linux.intel.com>
4435
4436 * Make-lang.in: Add support for autofdo.
4437
1a4f11c8
DM
44382016-06-22 David Malcolm <dmalcolm@redhat.com>
4439
4440 PR c/70339
4441 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4442 (implicit_decl_warning): When issuing warnings for implicit
4443 declarations, attempt to provide a suggestion via
4444 lookup_name_fuzzy.
4445 (undeclared_variable): Likewise when issuing errors.
4446 (lookup_name_in_scope): Likewise.
4447 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4448 (best_macro_match): New typedef.
4449 (find_closest_macro_cpp_cb): New function.
4450 (lookup_name_fuzzy): New function.
4451 * c-parser.c: Include gcc-rich-location.h.
4452 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4453 (c_keyword_starts_typename): ...this new function.
4454 (c_parser_declaration_or_fndef): When issuing errors about
4455 missing "struct" etc, add a fixit. For other kinds of errors,
4456 attempt to provide a suggestion via lookup_name_fuzzy.
4457 (c_parser_parms_declarator): When looking ahead to detect typos in
4458 type names, also reject CPP_KEYWORD.
4459 (c_parser_parameter_declaration): When issuing errors about
4460 unknown type names, attempt to provide a suggestion via
4461 lookup_name_fuzzy.
4462 * c-tree.h (c_keyword_starts_typename): New prototype.
4463
5a578671
JM
44642016-06-20 Joseph Myers <joseph@codesourcery.com>
4465
4466 PR c/71601
4467 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4468 c_common_type returns error_mark_node.
4469
3f8257db 44702016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4471
4472 PR c/69507
4473 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4474 __alignof__ (expression).
4475
6a3f203c
DM
44762016-06-14 David Malcolm <dmalcolm@redhat.com>
4477
4478 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4479
264757fb
DM
44802016-06-14 David Malcolm <dmalcolm@redhat.com>
4481
4482 * c-typeck.c (build_component_ref): Simplify fixit code by
4483 using gcc_rich_location::add_fixit_misspelled_id.
4484 (set_init_label): Likewise.
4485
f7e4f2e3
DM
44862016-06-13 David Malcolm <dmalcolm@redhat.com>
4487
4488 * c-parser.c (c_parser_initelt): Provide location of name for new
4489 location_t param of set_init_label.
4490 * c-tree.h (set_init_label): Add location_t param.
4491 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4492 param and use it when issuing error messages about unrecognized
4493 field names. Attempt to provide a fixit hint if appropriate,
4494 otherwise update the error message to provide the type name.
4495
4b1ffdb1
TS
44962016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4497
4498 PR c/71381
4499 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4500 Loosen checking.
4501
44a845ca
MS
45022016-06-08 Martin Sebor <msebor@redhat.com>
4503 Jakub Jelinek <jakub@redhat.com>
4504
4505 PR c++/70507
4506 PR c/68120
4507 * c-typeck.c (convert_arguments): Don't promote last argument
4508 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4509
92a5f2ba
MP
45102016-06-08 Marek Polacek <polacek@redhat.com>
4511
4512 PR c/71418
4513 * c-decl.c (grokdeclarator): Check TYPE_P.
4514
08203f73
MP
4515 PR c/71426
4516 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4517 code.
4518
6ffd47b7
DM
45192016-06-07 David Malcolm <dmalcolm@redhat.com>
4520
4521 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4522 and structure element reference, capture the location of the
4523 element name token and pass it to build_component_ref.
4524 (c_parser_postfix_expression_after_primary): Likewise for
4525 structure element dereference.
4526 (c_parser_omp_variable_list): Likewise for
4527 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4528 * c-tree.h (build_component_ref): Add location_t param.
4529 * c-typeck.c (build_component_ref): Add location_t param
4530 COMPONENT_LOC. Use it, if available, when issuing hints about
4531 mispelled member names to provide a fixit replacement hint.
4532
1f40cff3
MP
45332016-06-06 Marek Polacek <polacek@redhat.com>
4534
4535 PR c/71362
4536 * c-parser.c (c_parser_direct_declarator): Set location.
4537
5545a907
MP
45382016-06-06 Marek Polacek <polacek@redhat.com>
4539
4540 * c-typeck.c (comptypes_internal): Handle comparisons of
4541 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4542 TYPE_REF_CAN_ALIAS_ALL.
4543
b605f663
CLT
45442016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4545
4546 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4547 arguments as addressable when async clause exists.
4548
00631022
JJ
45492016-05-30 Jakub Jelinek <jakub@redhat.com>
4550
4551 PR c++/71349
4552 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4553 when combined with target construct.
4554
7211a097
JJ
45552016-05-26 Jakub Jelinek <jakub@redhat.com>
4556
4557 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4558 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4559
95efe6b6
MP
45602016-05-25 Marek Polacek <polacek@redhat.com>
4561
4562 PR c/71265
4563 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4564
a23faf7a
MP
4565 PR c/71266
4566 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4567
e46c7770
CP
45682016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4569
4570 * c-parser.c (c_parser_oacc_declare): Add support for
4571 GOMP_MAP_FIRSTPRIVATE_POINTER.
4572 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4573 argument with enum c_omp_region_type ort.
4574 (handle_omp_array_sections): Likewise. Update call to
4575 handle_omp_array_sections_1.
4576 (c_finish_omp_clauses): Add specific errors and warning messages for
4577 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4578 call to handle_omp_array_sections.
4579
a04e69c0
TS
45802016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4581
4582 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4583
f17a223d
RB
45842016-05-24 Richard Biener <rguenther@suse.de>
4585
4586 PR middle-end/70434
4587 PR c/69504
4588 * c-typeck.c (build_array_ref): Do not complain about indexing
4589 non-lvalue vectors. Adjust for function name change.
4590
79063edd
MS
45912016-05-20 Martin Sebor <msebor@redhat.com>
4592
4593 PR c/71115
4594 * c-typeck.c (error_init): Use
4595 expansion_point_location_if_in_system_header.
4596 (warning_init): Same.
4597
8a40fef3
DM
45982016-05-19 David Malcolm <dmalcolm@redhat.com>
4599
4600 PR c/71171
4601 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4602 in error-handling.
4603 (c_parser_postfix_expression): Likewise.
4604 * c-tree.h (c_expr::set_error): New method.
4605 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4606 that result's range is initialized.
4607
e9892350
JG
46082016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4609
4610 * c-typeck.c (parser_build_unary_op): Fix formatting.
4611
8fad45f5
MW
46122016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4613
4614 * c-decl.c (grokdeclarator): Remove errmsg and use of
4615 targetm.invalid_return_type.
4616 (grokparms): Remove errmsg and use of
4617 targetm.invalid_parameter_type.
4618
aa4b467b
JM
46192016-05-13 Joseph Myers <joseph@codesourcery.com>
4620
4621 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4622 function return type.
4623
4f2e1536
MP
46242016-05-12 Marek Polacek <polacek@redhat.com>
4625
4626 PR c/70756
4627 * c-decl.c (build_compound_literal): Pass LOC down to
4628 c_incomplete_type_error.
4629 * c-tree.h (require_complete_type): Adjust declaration.
4630 (c_incomplete_type_error): Likewise.
4631 * c-typeck.c (require_complete_type): Add location parameter, pass it
4632 down to c_incomplete_type_error.
4633 (c_incomplete_type_error): Add location parameter, pass it down to
4634 error_at.
4635 (build_component_ref): Pass location down to c_incomplete_type_error.
4636 (default_conversion): Pass location down to require_complete_type.
4637 (build_array_ref): Likewise.
4638 (build_function_call_vec): Likewise.
4639 (convert_arguments): Likewise.
4640 (build_unary_op): Likewise.
4641 (build_c_cast): Likewise.
4642 (build_modify_expr): Likewise.
4643 (convert_for_assignment): Likewise.
4644 (c_finish_omp_clauses): Likewise.
4645
d6e83a8d
MM
46462016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4647
4648 PR c/43651
4649 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4650 is enabled.
4651 * c-errors.c (pedwarn_c90): Return true if warned.
4652 * c-tree.h (pedwarn_c90): Change return type to bool.
4653 (enum c_declspec_word): Add new enumerator cdw_atomic.
4654
5c3a10fb
MP
46552016-05-11 Marek Polacek <polacek@redhat.com>
4656
4657 PR c++/71024
4658 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4659 diagnose_mismatched_attributes and call it.
4660
cf68d92c
MP
46612016-05-10 Marek Polacek <polacek@redhat.com>
4662
4663 PR c/70255
4664 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4665 on a declaration following the definition.
4666
351f85c5
JJ
46672016-05-05 Jakub Jelinek <jakub@redhat.com>
4668
4669 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4670 parse it through to c_parser_c99_block_statement.
4671 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4672 caller.
4673
deef7113
MP
46742016-05-04 Marek Polacek <polacek@redhat.com>
4675
4676 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4677 OPT_Wdangling_else.
4678
de55efd5
MP
46792016-05-04 Marek Polacek <polacek@redhat.com>
4680
4681 PR c/48778
4682 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4683 for macro expansions.
4684
79ce98bc
MP
46852016-05-03 Marek Polacek <polacek@redhat.com>
4686
4687 PR c/70859
4688 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4689 check_builtin_function_arguments.
4690
fb2647aa
RB
46912016-05-03 Richard Biener <rguenther@suse.de>
4692
4693 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4694 the checksum from the previous stage.
4695
77886428
CP
46962016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4697
4698 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4699 c_finish_omp_clauses.
4700 (c_parser_omp_all_clauses): Likewise.
4701 (c_parser_oacc_cache): Likewise.
4702 (c_parser_oacc_loop): Likewise.
4703 (omp_split_clauses): Likewise.
4704 (c_parser_omp_declare_target): Likewise.
4705 (c_parser_cilk_all_clauses): Likewise.
4706 (c_parser_cilk_for): Likewise.
4707 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4708 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4709
7176a4a0
MP
47102016-05-02 Marek Polacek <polacek@redhat.com>
4711
4712 PR c/70851
4713 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4714 incomplete type.
4715
e7ff0319
CP
47162016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4717
4718 PR middle-end/70626
4719 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4720 OACC_LOOP_CLAUSE_MASK.
4721 (c_parser_oacc_kernels_parallel): Update call to
4722 c_oacc_split_loop_clauses.
4723
9f405ce1
AM
47242016-04-28 Andrew MacLeod <amacleod@redhat.com>
4725
4726 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4727 argument to build_modify_expr in two cases.
4728
c1e1f433
BS
47292016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4730
4731 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4732 warn_for_memset instead of warning directly here.
4733
2448a956
MP
47342016-04-26 Marek Polacek <polacek@redhat.com>
4735
4736 PR c/67784
4737 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4738 out of ...
4739 (c_parser_for_statement): ... here.
4740 (c_parser_if_statement): Use it.
4741 (c_parser_switch_statement): Use it.
4742 (c_parser_while_statement): Use it.
4743
b02a5e26
MP
4744 PR c/70791
4745 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4746
477d4906
IV
47472016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4748
4749 PR c++/69363
4750 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4751 instead of c_finish_cilk_clauses.
4752 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4753 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4754 floating-point variables in the linear clause for Cilk Plus.
4755
fe37c7af
MM
47562016-04-18 Michael Matz <matz@suse.de>
4757
4758 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4759 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4760
949505a9
MP
47612016-04-15 Marek Polacek <polacek@redhat.com>
4762
4763 PR c/70671
4764 * c-typeck.c (build_unary_op): Pass location down to error and
4765 warning call.
4766
dda1bf61
JJ
47672016-04-15 Jakub Jelinek <jakub@redhat.com>
4768
4769 PR c/70436
4770 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4771 where needed.
4772 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4773 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4774 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4775 Adjust c_parser_pragma callers.
4776 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4777 caller.
4778 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4779 c_parser_statement.
4780 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4781 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4782 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4783 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4784 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4785 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4786 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4787 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4788 down where needed.
4789 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4790 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4791 calls.
4792
99cd9857
MP
47932016-04-13 Marek Polacek <polacek@redhat.com>
4794
4795 PR c/70436
4796 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4797 adjust callers.
4798 (c_parser_statement): Likewise.
4799 (c_parser_c99_block_statement): Likewise.
4800 (c_parser_while_statement): Likewise.
4801 (c_parser_for_statement): Likewise.
4802 (c_parser_if_body): Don't set IF_P here.
4803 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4804 about dangling else here.
4805 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4806 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4807 warn about dangling else here.
4808
f13355da
MP
48092016-04-04 Marek Polacek <polacek@redhat.com>
4810
4811 PR c/70307
4812 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4813
5fde6a45
MP
48142016-03-31 Marek Polacek <polacek@redhat.com>
4815
4816 PR c/70297
4817 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4818
4bbf545b
DM
48192016-03-18 David Malcolm <dmalcolm@redhat.com>
4820
4821 PR c/70281
4822 * c-parser.c (c_parser_postfix_expression): Set the source range
4823 for uses of "__builtin_types_compatible_p".
4824
fcc2b74f
JJ
48252016-03-17 Jakub Jelinek <jakub@redhat.com>
4826
4827 PR c/70280
4828 * c-typeck.c (composite_type): Don't count void_list_node
4829 into len, if the list is terminated by void_list_node, start
4830 with void_list_node instead of NULL for newargs. Stop
4831 at void_list_node.
4832
ab4c578f
MP
48332016-03-16 Marek Polacek <polacek@redhat.com>
4834
4835 PR c/70093
4836 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4837 nested functions returning VM types.
4838
96b3c82d
CP
48392016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4840
4841 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4842 when calling c_finish_omp_clauses.
4843
29b9828f
BS
48442016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4845
4846 PR c/69824
4847 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4848 for later.
4849
7ff6ca38
MP
48502016-03-04 Marek Polacek <polacek@redhat.com>
4851
4852 PR c/69798
4853 * c-parser.c (c_parser_postfix_expression): Call
4854 c_parser_cast_expression rather than c_parser_postfix_expression.
4855
686e2237
JJ
48562016-03-01 Jakub Jelinek <jakub@redhat.com>
4857
4858 PR c/69796
4859 PR c/69974
4860 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4861 of incomplete decls to error_mark_node.
4862
0b05329b
MP
48632016-02-24 Marek Polacek <polacek@redhat.com>
4864
4865 PR c/69819
4866 * c-decl.c (finish_decl): Don't update the copy of the type of a
4867 different decl type.
4868
067fbd8b
JJ
48692016-02-23 Jakub Jelinek <jakub@redhat.com>
4870
4871 PR objc/69844
4872 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4873 in id_kind reclassification.
4874
bf14eba2
JJ
48752016-02-16 Jakub Jelinek <jakub@redhat.com>
4876
4877 PR c/69835
4878 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4879
ba539195
JN
48802016-02-16 James Norris <jnorris@codesourcery.com>
4881
4882 PR c/64748
4883 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4884
16595a1f
BS
48852016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4886
f48dfe98
BS
4887 * c-decl.c (build_null_declspecs): Zero the entire struct.
4888
16595a1f
BS
4889 PR c/69522
4890 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4891 callers changed. If nested_p is true, use it to call
4892 finish_implicit_inits.
4893 * c-tree.h (finish_implicit_inits): Declare.
4894 * c-typeck.c (finish_implicit_inits): New function. Move code
4895 from ...
4896 (push_init_level): ... here.
4897 (set_designator, process_init_element): Call finish_implicit_inits.
4898
66756373
JJ
48992016-02-11 Jakub Jelinek <jakub@redhat.com>
4900
4901 PR c/69768
4902 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4903 arguments for -Waddress warning.
4904
1066e9b5
JJ
49052016-02-04 Jakub Jelinek <jakub@redhat.com>
4906
4907 PR c/69669
4908 * c-decl.c (finish_enum): When honoring mode attribute,
4909 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4910
3a5d2ba4
JJ
49112016-01-29 Jakub Jelinek <jakub@redhat.com>
4912
4913 PR debug/69518
4914 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4915 all type variants, not just TYPE_MAIN_VARIANT.
4916
cbdd8ae0
JJ
49172016-01-27 Jakub Jelinek <jakub@redhat.com>
4918
4919 PR debug/66869
4920 * c-decl.c (c_write_global_declarations_1): Warn with
4921 warn_unused_function if static prototype without definition
4922 is not C_DECL_USED.
4923
fa74a4bc
MP
49242016-01-27 Marek Polacek <polacek@redhat.com>
4925
4926 PR c/68062
4927 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4928 to unsigned, if needed. Add -Wsign-compare warning.
4929
13f92e8d
JJ
49302016-01-26 Jakub Jelinek <jakub@redhat.com>
4931
4932 PR tree-optimization/69483
4933 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4934
cd8e73dc 49352016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4936
4937 PR c/24293
4938 * c-tree.h (incomplete_record_decls): Declare.
4939 * c-parser.c (incomplete_record_decls): Define.
4940 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4941 report error if any decl has zero size.
4942 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4943 or enum type to incomplete_record_decls.
4944
e6d6ec9e
TV
49452016-01-14 Tom de Vries <tom@codesourcery.com>
4946
4947 PR tree-optimization/68773
4948 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4949 set force_output.
4950
00083992
MP
49512016-01-14 Marek Polacek <polacek@redhat.com>
4952
4953 PR c/69262
4954 * c-decl.c (grokdeclarator): Provide more information for invalid
4955 array declarations.
4956
7443cf13
DM
49572016-01-06 David Malcolm <dmalcolm@redhat.com>
4958
4959 * c-parser.c (c_parser_unary_expression): For dereferences, build
4960 a combined location before calling build_indirect_ref, so that
4961 error reports cover the full range, manually updating the c_expr
4962 src_range.
4963
6b131d5b
MP
49642016-01-06 Marek Polacek <polacek@redhat.com>
4965
4966 PR sanitizer/69099
4967 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4968 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4969 NULL.
4970
818ab71a
JJ
49712016-01-04 Jakub Jelinek <jakub@redhat.com>
4972
4973 Update copyright years.
4974
2fe0a208
MP
49752016-01-04 Marek Polacek <polacek@redhat.com>
4976
4977 PR c/68908
4978 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4979 optimization to use __atomic_fetch_* built-in if possible.
4980
c7b48c8a
TS
49812015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4982
4983 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4984 into...
4985 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4986 all users.
4987
fda5652f
MP
49882015-12-22 Marek Polacek <polacek@redhat.com>
4989
4990 PR c/69002
4991 * c-typeck.c (build_component_ref): Warn when acessing elements of
4992 atomic structures or unions.
4993
745e411d
DM
49942015-12-21 David Malcolm <dmalcolm@redhat.com>
4995
4996 * c-typeck.c: Include "gcc-rich-location.h".
4997 (build_binary_op): In the two places that call binary_op_error,
4998 create a gcc_rich_location and populate it with the location of
4999 the binary op and its two operands.
5000
94c40e19
DM
50012015-12-16 David Malcolm <dmalcolm@redhat.com>
5002
5003 * c-parser.c (c_parser_statement_after_labels): When calling
5004 c_finish_return, Use the return expression's location if it has
5005 one, falling back to the location of the first token within it.
5006 * c-typeck.c (c_finish_return): When issuing warnings about
5007 the incorrect presence/absence of a return value, issue a note
5008 showing the declaration of the function.
5009
de67c4c3
DM
50102015-12-16 David Malcolm <dmalcolm@redhat.com>
5011
5012 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5013 to 4.
5014 (c_parser_peek_nth_token): New function.
5015 (c_parser_peek_conflict_marker): New function.
5016 (c_parser_error): Detect conflict markers and report them as such.
5017
a10704e1
DM
50182015-12-16 David Malcolm <dmalcolm@redhat.com>
5019
5020 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5021 to preserve range information for the primary expression
5022 in the call to c_parser_postfix_expression_after_primary.
5023
8062bca6
DM
50242015-12-16 David Malcolm <dmalcolm@redhat.com>
5025
5026 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5027 expression location, falling back on the first token location,
5028 rather than always using the latter.
5029
d06f8b75
MP
50302015-12-16 Marek Polacek <polacek@redhat.com>
5031
5032 PR c/64637
5033 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5034 available.
5035
2994fb91
MP
50362015-12-15 Marek Polacek <polacek@redhat.com>
5037
5038 PR c/68907
5039 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5040 artificial decl.
5041
a1b93f8d
DM
50422015-12-08 David Malcolm <dmalcolm@redhat.com>
5043
5044 * c-parser.c (c_parser_alignof_expression): Capture location of
5045 closing parenthesis (if any), or of end of unary expression, and
5046 use it to build a src_range for the expression.
5047
46c6e1e2
DM
50482015-12-08 David Malcolm <dmalcolm@redhat.com>
5049
5050 PR c/68757
5051 * c-parser.c (c_parser_get_builtin_args): Add
5052 "out_close_paren_loc" param, and write back to it.
5053 (c_parser_postfix_expression): Capture the closing
5054 parenthesis location for RID_CHOOSE_EXPR,
5055 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5056 RID_BUILTIN_SHUFFLE and use it to set the source range
5057 for such expressions; within RID_BUILTIN_COMPLEX set
5058 the underlying location.
5059
66189108
MP
50602015-12-07 Marek Polacek <polacek@redhat.com>
5061
5062 PR c/68668
5063 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5064 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5065
f187980b
EB
50662015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5067
5068 * c-tree.h (c_build_va_arg): Adjust prototype.
5069 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5070 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5071 parameter, adjust throughout and issue an error if EXPR is a component
5072 with reverse storage order.
5073
4250754e
JM
50742015-12-02 Jason Merrill <jason@redhat.com>
5075
5076 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5077 (c_fully_fold_internal, decl_constant_value_for_optimization):
5078 Move from c-common.c.
5079 * c-tree.h: Declare decl_constant_value_for_optimization.
5080 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5081
e9e32ee6
JM
50822015-12-02 Joseph Myers <joseph@codesourcery.com>
5083
5084 PR c/68162
5085 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5086 following link from declarator to next declarator. Track original
5087 qualified type and pass it to c_build_qualified_type.
5088 * c-typeck.c (c_build_qualified_type): Add arguments
5089 orig_qual_type and orig_qual_indirect.
5090
ff7a55bf
TS
50912015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5092
5093 * c-parser.c (c_parser_omp_clause_name)
5094 (c_parser_oacc_all_clauses): Alphabetical sorting.
5095
657e4e47
JJ
50962015-12-02 Jakub Jelinek <jakub@redhat.com>
5097
5098 PR c/68533
5099 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5100 for diagnostics.
5101
37d5ad46
JB
51022015-12-01 Julian Brown <julian@codesourcery.com>
5103 Cesar Philippidis <cesar@codesourcery.com>
5104 James Norris <James_Norris@mentor.com>
5105
5106 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5107 (c_parser_oacc_clause_use_device): New function.
5108 (c_parser_oacc_all_clauses): Add use_device support.
5109 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5110 (c_parser_oacc_host_data): New function.
5111 (c_parser_omp_construct): Add host_data support.
5112 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5113 * c-typeck.c (c_finish_oacc_host_data): New function.
5114 (c_finish_omp_clauses): Add use_device support.
5115
a4850ce9
JH
51162015-11-29 Jan Hubicka <hubicka@ucw.cz>
5117
5118 PR c/67106
5119 * c-decl.c: Set TYPE_PACKED in variants.
5120
b58d3df2
ML
51212015-11-27 Martin Liska <mliska@suse.cz>
5122
5123 PR c++/68312
5124 * c-array-notation.c (fix_builtin_array_notation_fn):
5125 Use release_vec_vec instead of vec::release.
5126 (build_array_notation_expr): Likewise.
5127 (fix_conditional_array_notations_1): Likewise.
5128 (fix_array_notation_expr): Likewise.
5129 (fix_array_notation_call_expr): Likewise.
5130
aec17bfe
JJ
51312015-11-27 Jakub Jelinek <jakub@redhat.com>
5132
5133 PR c/63326
5134 * c-parser.c (c_parser_compound_statement_nostart): If
5135 last_label is true, use pragma_stmt instead of pragma_compound
5136 as second c_parser_pragma argument.
5137 (c_parser_omp_ordered, c_parser_omp_target_update,
5138 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5139 false as second argument to c_parser_skip_to_pragma_eol after
5140 diagnosing standalone directives used in pragma_stmt context.
5141
688c4de0
IV
51422015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5143
5144 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5145 with "if (ENABLE_OFFLOADING)".
5146
cbd03aee
DM
51472015-11-23 David Malcolm <dmalcolm@redhat.com>
5148
5149 PR objc/68438
5150 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5151 for various Objective-C constructs: Class.name syntax,
5152 @selector(), @protocol(), @encode(), and [] message syntax.
5153
a87a86e1
DM
51542015-11-20 David Malcolm <dmalcolm@redhat.com>
5155
5156 PR 62314
5157 * c-typeck.c (should_suggest_deref_p): New function.
5158 (build_component_ref): Special-case POINTER_TYPE when
5159 generating a "not a structure of union" error message, and
5160 suggest a "->" rather than a ".", providing a fix-it hint.
5161
8ece8dfb
DM
51622015-11-19 David Malcolm <dmalcolm@redhat.com>
5163
5164 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5165 candidate into a new function, find_closest_identifier.
5166
433068cc
MP
51672015-11-19 Marek Polacek <polacek@redhat.com>
5168
5169 PR c/68412
5170 * c-typeck.c (parser_build_binary_op): Properly handle
5171 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5172
bef08b71
DM
51732015-11-17 David Malcolm <dmalcolm@redhat.com>
5174
5175 * c-parser.c (set_c_expr_source_range): Bulletproof both
5176 overloaded implementations against NULL expr->value.
5177 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5178 values.
5179 (c_parser_unary_expression): Likewise when handling addresses of
5180 labels.
5181 (c_parser_postfix_expression): Likewise for statement expressions,
5182 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5183 __builtin_va_arg, and for __builtin_offset_of.
5184 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5185 src_range using the range of the braced initializer.
5186 (c_parser_transaction_expression): Set src_range for "ret" to a
5187 sane pair of values.
5188
fff77217
KY
51892015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5190
5191 * c-parser.c (c_finish_omp_declare_simd): Look for
5192 "simd" attribute as well. Update error message.
5193
1d899da2
TS
51942015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5195
5196 * c-parser.c (c_parser_omp_declare_target): Adjust.
5197
e4606348
JJ
51982015-11-14 Jakub Jelinek <jakub@redhat.com>
5199
5200 * c-typeck.c (c_finish_omp_clauses): Don't mark
5201 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5202
3e636daf
MP
52032015-11-14 Marek Polacek <polacek@redhat.com>
5204
5205 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5206 * c-typeck.c: Likewise.
5207
ebedc9a3
DM
52082015-11-13 David Malcolm <dmalcolm@redhat.com>
5209
5210 * c-decl.c (warn_defaults_to): Pass line_table to
5211 rich_location ctor.
5212 * c-errors.c (pedwarn_c99): Likewise.
5213 (pedwarn_c90): Likewise.
5214 * c-parser.c (set_c_expr_source_range): New functions.
5215 (c_token::get_range): New method.
5216 (c_token::get_finish): New method.
5217 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5218 based on the range from the start of the LHS to the end of the
5219 RHS.
5220 (c_parser_conditional_expression): Likewise, based on the range
5221 from the start of the cond.value to the end of exp2.value.
5222 (c_parser_binary_expression): Call set_c_expr_source_range on
5223 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5224 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5225 based on the cast_loc through to the end of the expr.
5226 (c_parser_unary_expression): Likewise, based on the
5227 op_loc through to the end of op.
5228 (c_parser_sizeof_expression) Likewise, based on the start of the
5229 sizeof token through to either the closing paren or the end of
5230 expr.
5231 (c_parser_postfix_expression): Likewise, using the token range,
5232 or from the open paren through to the close paren for
5233 parenthesized expressions.
5234 (c_parser_postfix_expression_after_primary): Likewise, for
5235 various kinds of expression.
5236 * c-tree.h (struct c_expr): Add field "src_range".
5237 (c_expr::get_start): New method.
5238 (c_expr::get_finish): New method.
5239 (set_c_expr_source_range): New decls.
5240 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5241 on ret for prefix unary ops.
5242 (parser_build_binary_op): Likewise, running from the start of
5243 arg1.value through to the end of arg2.value.
5244
ec8b536f
MP
52452015-11-13 Marek Polacek <polacek@redhat.com>
5246
5247 PR c/68320
5248 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5249
277fe616
DM
52502015-11-13 David Malcolm <dmalcolm@redhat.com>
5251
5252 * c-typeck.c: Include spellcheck.h.
5253 (lookup_field_fuzzy_find_candidates): New function.
5254 (lookup_field_fuzzy): New function.
5255 (build_component_ref): If the field was not found, try using
5256 lookup_field_fuzzy and potentially offer a suggestion.
5257
6e232ba4
JN
52582015-11-12 James Norris <jnorris@codesourcery.com>
5259 Joseph Myers <joseph@codesourcery.com>
5260
5261 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5262 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5263 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5264 and PRAGMA_OMP_CLAUSE_LINK.
5265 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5266 and PRAGMA_OACC_CLAUSE_LINK.
5267 (OACC_DECLARE_CLAUSE_MASK): New definition.
5268 (c_parser_oacc_declare): New function.
5269
9be4f715
MP
52702015-11-12 Marek Polacek <polacek@redhat.com>
5271
5272 PR c/67784
5273 * c-parser.c (c_parser_for_statement): Reclassify the token in
5274 a correct scope.
5275
e78bede6
MP
52762015-11-11 Marek Polacek <polacek@redhat.com>
5277
5278 PR c/68107
5279 PR c++/68266
5280 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5281 checking the size of an array.
5282
69f293c9
AM
52832015-11-11 Andrew MacLeod <amacleod@redhat.com>
5284
5285 * c-array-notation.c: Remove unused header files.
5286 * c-aux-info.c: Likewise.
5287 * c-convert.c: Likewise.
5288 * c-decl.c: Likewise.
5289 * c-errors.c: Likewise.
5290 * c-lang.c: Likewise.
5291 * c-objc-common.c: Likewise.
5292 * c-parser.c: Likewise.
5293 * c-typeck.c: Likewise.
5294 * gccspec.c: Likewise.
5295
3a40d81d
NS
52962015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5297 Cesar Philippidis <cesar@codesourcery.com>
5298 James Norris <jnorris@codesourcery.com>
5299 Julian Brown <julian@codesourcery.com>
5300 Nathan Sidwell <nathan@codesourcery.com>
5301
3a40d81d
NS
5302 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5303 routine arg.
5304 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5305 (c_parser_pragma): Parse 'acc routine'.
5306 (OACC_ROUTINE_CLAUSE_MARK): Define.
5307 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5308
fc402eec
AA
53092015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5310
5311 PR debug/67192
5312 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5313 location of the backward-goto to the start of the loop body.
5314
f6b0b3db
AA
53152015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5316
5317 PR debug/67192
5318 * c-parser.c (c_parser_while_statement): Finish the loop before
5319 parsing ahead for misleading indentation.
5320 (c_parser_for_statement): Likewise.
5321
ee45a32d
EB
53222015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5323
5324 * c-decl.c (finish_struct): If the structure has reverse storage
5325 order, rewrite the type of array fields with scalar component. Call
5326 maybe_apply_pragma_scalar_storage_order on entry.
5327 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5328 errors on bit-fields and reverse SSO here and not...
5329 (c_mark_addressable): ...here.
5330 (output_init_element): Adjust call to initializer_constant_valid_p.
5331 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5332
8a645150
DM
53332015-11-06 David Malcolm <dmalcolm@redhat.com>
5334
5335 * c-decl.c (warn_defaults_to): Update for change in signature
5336 of diagnostic_set_info.
5337 * c-errors.c (pedwarn_c99): Likewise.
5338 (pedwarn_c90): Likewise.
5339 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5340 for textinfo::set_location.
5341
7a5e4956
CP
53422015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5343 Thomas Schwinge <thomas@codesourcery.com>
5344 James Norris <jnorris@codesourcery.com>
5345
5346 * c-parser.c (c_parser_omp_clause_name): Add support for
5347 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5348 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5349 default(none) in OpenACC.
5350 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5351 arguments.
5352 (c_parser_oacc_clause_tile): New function.
5353 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5354 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5355 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5356 TILE}.
5357 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5358 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5359 FIRSTPRIVATE}.
5360 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5361 (c_parser_oacc_update): Update the error message for missing clauses.
5362 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5363 and OMP_CLAUSE_INDEPENDENT.
5364
bfcfbfa0
MP
53652015-11-05 Marek Polacek <polacek@redhat.com>
5366
5367 PR c/68090
5368 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5369 deal with pre-evaluation on invalid types.
5370
e01d41e5
JJ
53712015-11-05 Jakub Jelinek <jakub@redhat.com>
5372 Ilya Verbin <ilya.verbin@intel.com>
5373
5374 * c-parser.c: Include context.h and gimple-expr.h.
5375 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5376 monotonic together with nonmonotonic.
5377 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5378 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5379 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5380 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5381 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5382 expressions on combined target teams before the target.
5383 (c_parser_omp_declare_target): If decl has "omp declare target" or
5384 "omp declare target link" attribute, and cgraph or varpool node already
5385 exists, then set corresponding flags. Call c_finish_omp_clauses
5386 in the parenthesized extended-list syntax case.
5387 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5388 declare target.
5389 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5390 on OMP_CLAUSE_REDUCTION array sections.
5391 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5392 into the constant offset, or for variable low-bound using
5393 POINTER_PLUS_EXPR. For structure element based array sections use
5394 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5395 (c_finish_omp_clauses): Drop generic_field_head, structure
5396 elements are now always mapped even as array section bases,
5397 diagnose same var in data sharing and mapping clauses. Diagnose if
5398 linear step on declare simd is neither a constant nor a uniform
5399 parameter. Look through POINTER_PLUS_EXPR for array section
5400 reductions. Diagnose the same var or function appearing multiple
5401 times on the same directive. Fix up wording for the to clause if t
5402 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5403 modifier on kinds other than dynamic or guided or nonmonotonic
5404 modifier together with ordered clause.
5405
4bf9e5a8
TS
54062015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5407 Chung-Lin Tang <cltang@codesourcery.com>
5408
5409 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5410
2adfab87
AM
54112015-10-29 Andrew MacLeod <amacleod@redhat.com>
5412
5413 * c-array-notation.c: Reorder #include's and remove duplicates.
5414 * c-aux-info.c: Likewise.
5415 * c-convert.c: Likewise.
5416 * c-decl.c: Likewise.
5417 * c-errors.c: Likewise.
5418 * c-lang.c: Likewise.
5419 * c-objc-common.c: Likewise.
5420 * c-parser.c: Likewise.
5421 * c-typeck.c: Likewise.
5422
e922069e
JW
54232015-10-26 Jim Wilson <jim.wilson@linaro.org>
5424
5425 PR debug/66068
5426 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5427 after calling build_qualified_type.
5428
765dd391
CP
54292015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5430 Thomas Schwinge <thomas@codesourcery.com>
5431 James Norris <jnorris@codesourcery.com>
5432 Joseph Myers <joseph@codesourcery.com>
5433 Julian Brown <julian@codesourcery.com>
5434 Bernd Schmidt <bschmidt@redhat.com>
5435
5436 * c-parser.c (c_parser_oacc_shape_clause): New.
5437 (c_parser_oacc_simple_clause): New.
5438 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5439 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5440
88bae6f4
TS
54412015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5442 James Norris <jnorris@codesourcery.com>
5443 Cesar Philippidis <cesar@codesourcery.com>
5444
5445 PR c/64765
5446 PR c/64880
5447 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5448 parameters, and handle these. Adjust all users.
5449 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5450 into...
5451 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5452 all users.
5453 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5454 declare functions.
5455 (c_finish_omp_construct): Declare function.
5456 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5457 Merge functions into...
5458 (c_finish_omp_construct): ... this new function.
5459
a8fc2579
RB
54602015-10-22 Richard Biener <rguenther@suse.de>
5461
5462 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5463 before folding a MINUS_EXPR.
5464
e9122ef6
MP
54652015-10-21 Marek Polacek <polacek@redhat.com>
5466
5467 PR c/68024
5468 * c-decl.c (start_function): Warn about vararg functions without
5469 a prototype.
5470
9f47c7e5
IE
54712015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5472
5473 * c-typeck.c (build_conditional_expr): Use boolean vector
5474 type for vector comparison.
5475 (build_vec_cmp): New.
5476 (build_binary_op): Use build_vec_cmp for comparison.
5477
fa60eeb9
MP
54782015-10-20 Marek Polacek <polacek@redhat.com>
5479
5480 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5481
2c7020eb
MP
54822015-10-20 Marek Polacek <polacek@redhat.com>
5483
5484 PR c/67964
5485 * c-parser.c (c_parser_attributes): Break out of the loop if the
5486 token after an attribute isn't a comma.
5487
d9a6bd32
JJ
54882015-10-13 Jakub Jelinek <jakub@redhat.com>
5489 Aldy Hernandez <aldyh@redhat.com>
5490
5491 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5492 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5493 (c_parser_omp_variable_list): Handle structure elements for
5494 map, to and from clauses. Handle array sections in reduction
5495 clause. Formatting fixes.
5496 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5497 if clause modifiers.
5498 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5499 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5500 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5501 c_parser_omp_clause_is_device_ptr): New functions.
5502 (c_parser_omp_clause_ordered): Parse optional parameter.
5503 (c_parser_omp_clause_reduction): Handle array reductions.
5504 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5505 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5506 functions.
5507 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5508 (c_parser_omp_clause_depend_sink): New function.
5509 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5510 (c_parser_omp_clause_map): Parse release/delete map kinds and
5511 optional always modifier.
5512 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5513 and c_finish_omp_clauses callers.
5514 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5515 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5516 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5517 (OMP_CRITICAL_CLAUSE_MASK): Define.
5518 (c_parser_omp_critical): Parse critical clauses.
5519 (c_parser_omp_for_loop): Handle doacross loops, adjust
5520 c_finish_omp_for and c_finish_omp_clauses callers.
5521 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5522 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5523 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5524 (c_parser_omp_for): Disallow ordered clause when combined with
5525 distribute. Disallow linear clause when combined with distribute
5526 and not combined with simd.
5527 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5528 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5529 parse clauses and if depend clause is found, don't parse a body.
5530 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5531 Allow target parallel without for after it.
5532 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5533 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5534 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5535 invalid kinds.
5536 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5537 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5538 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5539 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5540 functions.
5541 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5542 defaultmap and is_device_ptr clauses.
5543 (c_parser_omp_target): Parse target parallel and target simd. Set
5544 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5545 and target exit data. Diagnose invalid map kinds.
5546 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5547 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5548 construct.
5549 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5550 &omp_priv.
5551 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5552 (c_parser_omp_taskloop): New function.
5553 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5554 handle PRAGMA_OMP_TASKLOOP.
5555 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5556 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5557 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5558 Add IS_OMP argument, handle structure element bases, diagnose
5559 bitfields, pass IS_OMP recursively, diagnose known zero length
5560 array sections in depend clauses, handle array sections in reduction
5561 clause, diagnose negative length even for pointers.
5562 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5563 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5564 array sections in reduction clause, set
5565 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5566 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5567 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5568 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5569
21ba0cea
MP
55702015-10-06 Marek Polacek <polacek@redhat.com>
5571
5572 * c-parser.c (c_parser_statement_after_labels): Use
5573 protected_set_expr_location.
5574 (c_parser_omp_clause_num_gangs): Likewise.
5575 (c_parser_omp_clause_num_threads): Likewise.
5576 (c_parser_omp_clause_num_workers): Likewise.
5577 (c_parser_omp_clause_vector_length): Likewise.
5578 (c_parser_omp_clause_num_teams): Likewise.
5579 (c_parser_omp_clause_thread_limit): Likewise.
5580 * c-typeck.c (build_c_cast): Likewise.
5581 (c_cast_expr): Likewise.
5582
624d31fe
RS
55832015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5584
5585 * c-typeck.c (c_tree_equal): Use real_equal instead of
5586 REAL_VALUES_EQUAL.
5587
b8fd7909
JM
55882015-10-04 Jason Merrill <jason@redhat.com>
5589
5590 * c-parser.c (c_lex_one_token): Handle @synchronized.
5591 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5592 can change whether the function is transaction_safe.
5593
1c7485af
MP
55942015-10-02 Marek Polacek <polacek@redhat.com>
5595
5596 PR c/67730
5597 * c-typeck.c (convert_for_assignment): Use the expansion point
5598 location throughout.
5599
3e3b8d63
MP
56002015-10-02 Marek Polacek <polacek@redhat.com>
5601
5602 PR c/64249
5603 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5604 and pass it down to c_parser_if_statement.
5605 (c_parser_else_body): Add CHAIN parameter and pass it down to
5606 c_parser_statement_after_labels.
5607 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5608 duplicated if-else-if conditions.
5609
aabef2de
MP
56102015-10-01 Marek Polacek <polacek@redhat.com>
5611
5612 * c-typeck.c (convert_for_assignment): Improve commentary.
5613
de8ddd5f
MP
56142015-09-30 Marek Polacek <polacek@redhat.com>
5615
5616 PR c/67730
5617 * c-typeck.c (c_finish_return): Use the expansion point location for
5618 certain "return with value" warnings.
5619
c4914de6
MLI
56202015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5621
5622 * c-parser.c (pragma_lex): Add loc argument.
5623
0e36f5c7
MP
56242015-09-15 Marek Polacek <polacek@redhat.com>
5625
5626 PR c/67580
5627 * c-decl.c (tag_exists_p): New function.
5628 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5629 struct/union/enum keywords are missing.
5630 * c-tree.h (tag_exists_p): Declare.
5631
2f3bb934
MP
56322015-09-15 Marek Polacek <polacek@redhat.com>
5633
5634 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5635 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5636 Return NULL_TREE instead of 0.
5637 (lookup_name): Return NULL_TREE instead of 0.
5638 (lookup_name_in_scope): Likewise.
5639 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5640 (parser_xref_tag): Use false instead of 0.
5641 (start_struct): Use true instead of 1.
5642 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5643
aa256c4a
MP
56442015-09-14 Marek Polacek <polacek@redhat.com>
5645
5646 * c-typeck.c (set_nonincremental_init_from_string): Use
5647 HOST_WIDE_INT_M1U when shifting a negative value.
5648
dbb68221
MW
56492015-09-09 Mark Wielaard <mjw@redhat.com>
5650
5651 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5652 parm against NULL.
5653
a8a098ac
JJ
56542015-09-10 Jakub Jelinek <jakub@redhat.com>
5655
5656 PR c/67502
5657 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5658 into OMP_FOR_PRE_BODY rather than before the loop.
5659
f4b189d5
JJ
56602015-09-09 Jakub Jelinek <jakub@redhat.com>
5661
0bb99c11
JJ
5662 PR c/67501
5663 * c-parser.c (c_parser_oacc_all_clauses,
5664 c_parser_omp_all_clauses): Remove invalid clause from
5665 list of clauses even if parser->error is set.
5666
fce5e5e3
JJ
5667 PR c/67500
5668 * c-parser.c (c_parser_omp_clause_aligned,
5669 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5670 test for errors.
5671 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5672 error_mark_node.
5673
f4b189d5
JJ
5674 PR c/67495
5675 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5676 instead of c_parser_unary_expression. If the result is !lvalue_p,
5677 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5678
b2aaf235
MP
56792015-09-04 Marek Polacek <polacek@redhat.com>
5680
5681 PR sanitizer/67279
5682 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5683
1807ffc1
MS
56842015-09-03 Martin Sebor <msebor@redhat.com>
5685
5686 PR c/66516
8b652e65
JJ
5687 * c-typeck.c (convert_arguments, parser_build_unary_op,
5688 build_conditional_expr, c_cast_expr, convert_for_assignment,
5689 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5690 reject_gcc_builtin.
5691 (c_decl_implicit): Define.
5692
d04ff417
MP
56932015-09-02 Marek Polacek <polacek@redhat.com>
5694
5695 PR c/67432
5696 * c-parser.c (c_parser_enum_specifier): Give a better error for
5697 an empty enum.
5698
a79683d5
TS
56992015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5700
5701 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5702
191a6b94
MP
57032015-08-12 Marek Polacek <polacek@redhat.com>
5704
5705 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5706 LOC to it.
5707
420a9d9b
MP
57082015-08-03 Marek Polacek <polacek@redhat.com>
5709
5710 PR c/67088
5711 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5712 Use it.
5713 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5714
992118a1
PP
57152015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5716
5717 * c-parser.c (c_parser_if_body): Take token_indent_info
5718 argument. Call warn_for_misleading_indentation even when the
5719 body is a semicolon. Extract token_indent_infos corresponding
5720 to the guard, body and next tokens. Adjust call to
5721 warn_for_misleading_indentation accordingly.
5722 (c_parser_else_body): Likewise.
5723 (c_parser_if_statement): Likewise.
5724 (c_parser_while_statement): Likewise.
5725 (c_parser_for_statement): Likewise.
5726
46308474
LFSM
57272015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5728 Manuel López-Ibáñez <manu@gcc.gnu.org>
5729
5730 * c-decl.c (get_parm_info): Remove static var. Update warning
5731 message.
5732
05b28fd6
MP
57332015-07-27 Marek Polacek <polacek@redhat.com>
5734
5735 PR c++/66555
5736 PR c/54979
5737 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5738
451b5e48
MP
57392015-07-20 Marek Polacek <polacek@redhat.com>
5740
5741 PR c++/55095
5742 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5743 (build_binary_op): Warn about left shift overflows.
5744
1916bcb5
AM
57452015-07-09 Andrew MacLeod <amacleod@redhat.com>
5746
5747 * c-array-notation.c: Adjust includes for flags.h changes.
5748 * c-objc-common.c: Likewise.
5749
c7131fb2
AM
57502015-07-07 Andrew MacLeod <amacleod@redhat.com>
5751
5752 * c-array-notation.c: Adjust includes.
5753 * c-aux-info.c: Likewise.
5754 * c-convert.c: Likewise.
5755 * c-decl.c: Likewise.
5756 * c-errors.c: Likewise.
5757 * c-lang.c: Likewise.
5758 * c-objc-common.c: Likewise.
5759 * c-parser.c: Likewise.
5760 * c-typeck.c: Likewise.
5761
da2e71c9
MLI
57622015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5763
5764 PR fortran/66605
5765 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5766
b155cfd9
MP
57672015-06-29 Marek Polacek <polacek@redhat.com>
5768
5769 PR c/66322
5770 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5771 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5772 about -Wswitch-bool here.
5773 (do_case): Update c_add_case_label call.
5774 (c_finish_case): Update c_do_switch_warnings call.
5775
31521951
MP
57762015-06-27 Marek Polacek <polacek@redhat.com>
5777
5778 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5779
22d03525
MP
57802015-06-26 Marek Polacek <polacek@redhat.com>
5781
5782 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5783 INDIRECT_REF_P.
5784 * c-typeck.c (array_to_pointer_conversion): Likewise.
5785 (build_unary_op): Likewise.
5786 (c_finish_return): Likewise.
5787
f0889939
AM
57882015-06-25 Andrew MacLeod <amacleod@redhat.com>
5789
5790 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5791 * c-parser.c: Likewise.
5792
8d67ee55
RS
57932015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5794
5795 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5796 instead of pointer_hash.
5797 (detect_field_duplicates): Likewise.
5798
0ae9bd27
MP
57992015-06-25 Marek Polacek <polacek@redhat.com>
5800
5801 * c-array-notation.c: Use VAR_P throughout.
5802 * c-decl.c: Likewise.
5803 * c-objc-common.c: Likewise.
5804 * c-parser.c: Likewise.
5805 * c-typeck.c: Likewise.
5806
62f9079a
MP
58072015-06-25 Marek Polacek <polacek@redhat.com>
5808
5809 * c-decl.c: Use is_global_var throughout.
5810 * c-parser.c: Likewise.
5811 * c-typeck.c: Likewise.
5812
abb226c9
AM
58132015-06-17 Andrew MacLeod <amacleod@redhat.com>
5814
5815 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5816 * c-aux-info.c: Likewise.
5817 * c-convert.c: Likewise.
5818 * c-decl.c: Likewise.
5819 * c-errors.c: Likewise.
5820 * c-lang.c: Likewise.
5821 * c-objc-common.c: Likewise.
5822 * c-parser.c: Likewise.
5823 * c-typeck.c: Likewise.
5824
8cbababc
JH
58252015-06-11 Jan Hubicka <hubicka@ucw.cz>
5826
5827 PR middle-end/66325
5828 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5829 variants.
5830
a0349665
PMR
58312015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5832
5833 * c-decl.c (pop_scope): Register the main translation unit
5834 through the new debug hook.
5835
13fdf2e2
AM
58362015-06-08 Andrew MacLeod <amacleod@redhat.com>
5837
5838 * c-array-notation.c : Adjust include files.
5839 * c-aux-info.c : Likewise.
5840 * c-convert.c : Likewise.
5841 * c-decl.c : Likewise.
5842 * c-errors.c : Likewise.
5843 * c-lang.c : Likewise.
5844 * c-lang.h : Likewise.
5845 * c-objc-common.c : Likewise.
5846 * c-parser.c : Likewise.
5847 * c-typeck.c : Likewise.
5848
d7438551
AH
58492015-06-05 Aldy Hernandez <aldyh@redhat.com>
5850
5851 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5852 immediately clobber it.
5853 (c_write_global_declarations_1): Remove call to
5854 check_global_declaration_1.
5855 (c_write_global_declarations_2): Remove.
5856 (c_write_final_cleanups): Rename from c_write_global_declarations.
5857 Remove call to finalize_compilation_unit.
5858 Remove calls to debugging hooks.
5859 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5860 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5861 * c-tree.h: Remove c_write_global_declarations.
5862
ecb9f223
AM
58632015-06-04 Andrew MacLeod <amacleod@redhat.com>
5864
5865 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5866 * c-aux-info.c: Likewise.
5867 * c-convert.c: Likewise.
5868 * c-decl.c: Likewise.
5869 * c-errors.c: Likewise.
5870 * c-lang.c: Likewise.
5871 * c-objc-common.c: Likewise.
5872 * c-parser.c: Likewise.
5873 * c-typeck.c: Likewise.
5874
9482b620
MP
58752015-06-04 Marek Polacek <polacek@redhat.com>
5876
5877 PR c/66341
5878 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5879 it is a lvalue.
5880
bc51ace3
PK
58812015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5882
5883 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5884 Warn for empty struct.
5885 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5886
ea5b45b6
AT
58872015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5888
5889 * c-decl.c (start_function): Call plugin before parsing.
5890 (finish_function): Call plugin after parsing.
5891
c2d47482
PK
58922015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5893
5894 PR c/49551
5895 * c-decl.c (merge_decls): Merge DECL_COMMON.
5896
a95492ab
JW
58972015-05-22 Jim Wilson <jim.wilson@linaro.org>
5898
5899 * Make-lang.in (check_gcc_pallelize): Define.
5900
fd5c817a
MP
59012015-05-22 Marek Polacek <polacek@redhat.com>
5902
5903 PR c/47043
5904 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5905 attributes.
5906
c7b70a3c
MP
59072015-05-21 Marek Polacek <polacek@redhat.com>
5908
5909 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5910 DECL_BUILT_IN.
5911
21b634ae
MP
59122015-05-20 Marek Polacek <polacek@redhat.com>
5913
5914 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5915 * c-typeck.c: Likewise.
5916
296a8c2f
MP
59172015-05-19 Marek Polacek <polacek@redhat.com>
5918
5919 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5920
41b37d5e
JJ
59212015-05-19 Jakub Jelinek <jakub@redhat.com>
5922
5923 PR middle-end/66199
5924 * c-parser.c (c_parser_omp_for_loop): Don't add
5925 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5926 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5927 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5928 constructs.
5929
fab27f52
MM
59302015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5931
5932 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5933 swaps.
fab27f52 5934
40de31cf
MLI
59352015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5936
5937 PR fortran/44054
5938 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5939 accessor function.
5940
3aa3c9fc
MP
59412015-05-14 Marek Polacek <polacek@redhat.com>
5942
5943 PR c/66066
5944 PR c/66127
5945 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5946 rather than with 0.
5947
c3388e62
DM
59482015-05-12 David Malcolm <dmalcolm@redhat.com>
5949
5950 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5951 to add a call to warn_for_misleading_indentation.
5952 (c_parser_else_body): Likewise, adding param "else_loc".
5953 (c_parser_if_statement): Check for misleading indentation.
5954 (c_parser_while_statement): Likewise.
5955 (c_parser_for_statement): Likewise.
5956
755e528f
MP
59572015-05-08 Marek Polacek <polacek@redhat.com>
5958
5959 PR c/64918
5960 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5961 (output_init_element): Likewise.
5962
0173bd2a
MP
59632015-05-07 Marek Polacek <polacek@redhat.com>
5964
5965 PR c/65179
5966 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5967 value.
5968
9babc352
MP
59692015-04-30 Marek Polacek <polacek@redhat.com>
5970
5971 * c-typeck.c (set_init_label): Call error_at instead of error and
5972 pass LOC to it.
5973
ac9f18db
MP
5974 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5975 the type of a decl.
5976
ec3fba51
MP
5977 * c-typeck.c (c_build_va_arg): Clarify the error message.
5978
b811915d
TS
59792015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5980
5981 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5982 OMP_STANDALONE_CLAUSES.
5983
f3075008
MP
59842015-04-28 Marek Polacek <polacek@redhat.com>
5985
5986 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5987
4e81b788
MP
59882015-04-28 Marek Polacek <polacek@redhat.com>
5989
5990 PR c/65901
5991 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5992
6c1db78e
MP
59932015-04-25 Marek Polacek <polacek@redhat.com>
5994
5995 PR c/52085
5996 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5997 attribute.
5998
5c4abbb8
MP
59992015-04-23 Marek Polacek <polacek@redhat.com>
6000
6001 PR c/65345
6002 * c-decl.c (set_labels_context_r): New function.
6003 (store_parm_decls): Call it via walk_tree_without_duplicates.
6004 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6005 instead of create_tmp_var. Build TARGET_EXPR instead of
6006 COMPOUND_EXPR.
6007 (build_atomic_assign): Use create_tmp_var_raw instead of
6008 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6009
06aca1d5
IV
60102015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6011
6012 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6013 (c_parser_omp_target_update): Add missed %> to error_at ().
6014
8fba1830
BRF
60152015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6016
6017 PR target/55143
6018 * c-decl.c (c_default_pointer_mode): Remove definition.
6019 * c-tree.h (c_default_pointer_mode): Remove declaration.
6020
62021f64
TB
60212015-03-27 Tobias Burnus <burnus@net-b.de>
6022
6023 PR c/65586
6024 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6025 error out.
6026 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6027 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6028 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6029
9b65e171
JJ
60302015-03-19 Jakub Jelinek <jakub@redhat.com>
6031
6032 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6033 attribute for DECL_EXTERNAL VAR_DECLs.
6034
17958621
JJ
60352015-03-11 Jakub Jelinek <jakub@redhat.com>
6036
6037 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6038 argument.
6039
7ccb1a11
JJ
60402015-03-10 Jakub Jelinek <jakub@redhat.com>
6041
6042 PR c/65120
6043 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6044 before preparing arguments to warn_logical_not_parentheses.
6045
01177669
JJ
60462015-03-09 Jakub Jelinek <jakub@redhat.com>
6047
6048 PR c/65120
6049 * c-typeck.c (parser_build_binary_op): Don't warn for
6050 !!x == y or !b == y where b is _Bool.
6051
802ac282
MP
60522015-03-09 Marek Polacek <polacek@redhat.com>
6053
6054 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6055 * c-decl.c (grokdeclarator): Likewise.
6056 * c-typeck.c (build_binary_op): Likewise.
6057
e5165b60
MP
60582015-02-27 Marek Polacek <polacek@redhat.com>
6059
6060 PR c/65228
6061 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6062
065d214c
MP
60632015-02-14 Marek Polacek <polacek@redhat.com>
6064
6065 PR c/64768
6066 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6067 declared through a typedef name.
6068
e5d9235b
MP
60692015-02-13 Marek Polacek <polacek@redhat.com>
6070
6071 PR c/65050
6072 * c-decl.c (grokdeclarator): Print also the type when giving
6073 the error message about array's incomplete element type.
6074
fa01ffcc
JJ
60752015-02-11 Jakub Jelinek <jakub@redhat.com>
6076
6077 PR c/64824
6078 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6079 check in the POP macro.
6080
c3e38a03
MP
60812015-02-09 Marek Polacek <polacek@redhat.com>
6082
6083 PR c/64856
6084 * c-typeck.c (process_init_element): Don't always wrap
6085 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6086 initializing a range of elements.
6087
4886ec8e
JJ
60882015-02-04 Jakub Jelinek <jakub@redhat.com>
6089
6090 PR c/64824
6091 PR c/64868
6092 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6093
c3e38a03 60942015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
6095
6096 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6097 processing enum declaration.
6098
7b33f0c8
MP
60992015-01-29 Marek Polacek <polacek@redhat.com>
6100
6101 PR c/64709
6102 * c-typeck.c (pop_init_level): If constructor_elements has
6103 exactly one element with integer_zerop value, set constructor_zeroinit
6104 to 1. Remove braces around warning_init call.
6105
dea63e49
JJ
61062015-01-27 Jakub Jelinek <jakub@redhat.com>
6107
6108 PR c/64766
6109 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6110 of FUNCTION_DECLs with error_mark_node.
6111
d38f7dce
JJ
61122015-01-26 Jakub Jelinek <jakub@redhat.com>
6113
6114 PR c/64778
6115 * c-typeck.c (convert_arguments): Return -1 if there are
6116 error_args, even if we've diagnosed too many arguments.
6117
cbf5d0e7
RB
61182015-01-21 Richard Biener <rguenther@suse.de>
6119
6120 PR middle-end/64313
6121 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6122 for builtins the user declared correctly.
6123
41dbbb37
TS
61242015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6125 Bernd Schmidt <bernds@codesourcery.com>
6126 Cesar Philippidis <cesar@codesourcery.com>
6127 James Norris <jnorris@codesourcery.com>
6128 Jakub Jelinek <jakub@redhat.com>
6129 Ilmir Usmanov <i.usmanov@samsung.com>
6130
6131 * c-parser.c: Include "gomp-constants.h".
6132 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6133 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6134 Use OMP_CLAUSE_SET_MAP_KIND.
6135 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6136 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6137 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6138 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6139 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6140 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6141 "copyout", "create", "delete", "deviceptr", "gang", "host",
6142 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6143 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6144 "present_or_create", "pcreate", "seq", "self", "vector",
6145 "vector_length", "wait", "worker".
6146 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6147 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6148 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6149 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6150 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6151 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6152 (c_parser_oacc_data_clause_deviceptr)
6153 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6154 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6155 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6156 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6157 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6158 (c_parser_oacc_parallel, c_parser_oacc_update)
6159 (c_parser_oacc_wait): New functions.
6160 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6161 (c_finish_oacc_data): New prototypes.
6162 * c-typeck.c: Include "gomp-constants.h".
6163 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6164 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6165 OMP_CLAUSE_SET_MAP_KIND.
6166 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6167 (c_finish_oacc_data): New functions.
6168 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6169 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6170 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6171 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6172 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6173 GOMP_MAP_FORCE_DEVICEPTR.
6174
adfac8df
JJ
61752015-01-09 Michael Collison <michael.collison@linaro.org>
6176
6177 * c-array-notation.c: Include hash-set.h, machmode.h,
6178 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6179 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6180 * c-aux-info.c: Ditto.
6181 * c-convert.c: Ditto.
6182 * c-decl.c: Ditto.
6183 * c-errors.c: Ditto.
6184 * c-lang.c: Dittoxs.
6185 * c-objc-common.c: Ditto.
6186 * c-parser.c: Ditto.
6187 * c-typeck.c: Include hash-set.h, machmode.h,
6188 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6189 fold-const.h, wide-int.h, inchash.h, real.h and
6190 fixed-value.h due to flattening of tree.h.
6191
2cc901dc
MP
61922015-01-07 Marek Polacek <polacek@redhat.com>
6193
6194 PR c/64417
6195 * c-typeck.c (process_init_element): Disallow initialization of
6196 a flexible array member with a string constant if the structure
6197 is in an array.
6198
5624e564
JJ
61992015-01-05 Jakub Jelinek <jakub@redhat.com>
6200
e5341100
JJ
6201 PR sanitizer/64344
6202 * c-typeck.c (convert_for_assignment, c_finish_return): For
6203 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6204 types also set in_late_binary_op around convert call.
6205 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6206 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6207 result on expr as last argument to ubsan_instrument_float_cast,
6208 if in_late_binary_op, don't use c_save_expr but save_expr.
6209
5624e564
JJ
6210 Update copyright years.
6211
5bd012f8
MP
62122015-01-05 Marek Polacek <polacek@redhat.com>
6213
6214 PR c/64423
6215 * c-typeck.c (build_array_ref): Pass loc down to
6216 warn_array_subscript_with_type_char.
6217
3f8257db 62182014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6219
6220 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6221 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6222 element type.
8e745a17 6223 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6224 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6225 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6226 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6227 to PEDWARN_FOR_QUALIFIERS.
768952be 6228
8f94a8c4
JJ
62292014-12-17 Jakub Jelinek <jakub@redhat.com>
6230
6231 PR sanitizer/64289
6232 * c-convert.c: Include ubsan.h.
6233 (convert): For real -> integral casts and
6234 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6235 instead instrument the float cast directly.
6236
b731b390
JJ
62372014-11-29 Jakub Jelinek <jakub@redhat.com>
6238
6239 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6240 c_finish_stmt_expr): Remove NULL last argument from
6241 create_tmp_var_raw and create_tmp_var calls.
6242 * c-array-notation.c (fix_builtin_array_notation_fn,
6243 build_array_notation_expr, fix_conditional_array_notations_1,
6244 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6245
541e35a6
MP
62462014-11-28 Marek Polacek <polacek@redhat.com>
6247
6248 PR c/63862
6249 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6250 convert the right operand to integer type.
6251
b286be94
MP
62522014-11-25 Marek Polacek <polacek@redhat.com>
6253
6254 PR c/63877
6255 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6256 for inline functions.
6257
aa7da51a
JJ
62582014-11-21 Jakub Jelinek <jakub@redhat.com>
6259
6260 PR target/63764
6261 * c-typeck.c (build_array_ref): Adjust
6262 convert_vector_to_pointer_for_subscript caller. If it returns true,
6263 call non_lvalue_loc on the result.
6264
d876207f
RB
62652014-11-11 Richard Biener <rguenther@suse.de>
6266
6267 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6268 to true.
6269
e5e44252
AK
62702014-11-10 Andi Kleen <ak@linux.intel.com>
6271
6272 PR c/60804
6273 * c-parser.c (c_parser_statement_after_labels): Call
6274 check_no_cilk.
6275 (c_parser_if_statement): Dito.
6276 (c_parser_switch_statement): Dito.
6277 (c_parser_while_statement): Dito.
6278 (c_parser_do_statement): Dito.
6279 (c_parser_for_statement): Dito.
6280 * c-typeck.c (c_finish_loop): Dito.
6281
13c21655
PC
62822014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6283
6284 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6285 OPT_Wshift_count_overflow in the warnings.
6286
2d51fcef
MP
62872014-10-30 Marek Polacek <polacek@redhat.com>
6288
6289 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6290 print the stripped version as well, if they're not the same.
6291
ef4bddc2
RS
62922014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6293
6294 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6295 machine_mode.
6296
c582198b
AM
62972014-10-28 Andrew MacLeod <amacleod@redhat.com>
6298
6299 * c-decl.c: Adjust include files.
6300 * c-parser.c: Ditto.
6301
ddc8de03
PM
63022014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6303 Tom Tromey <tromey@redhat.com>
6304
6305 * c-tree.h (enum c_oracle_request): New.
6306 (c_binding_oracle_function): New typedef.
6307 (c_binding_oracle, c_pushtag, c_bind): Declare.
6308 * c-decl.c (c_binding_oracle): New global.
6309 (I_SYMBOL_CHECKED): New macro.
6310 (i_symbol_binding): New function.
6311 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6312 (I_TAG_CHECKED): New macro.
6313 (i_tag_binding): New function.
6314 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6315 (I_LABEL_CHECKED): New macro.
6316 (i_label_binding): New function.
6317 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6318 (c_print_identifier): Save and restore c_binding_oracle.
6319 (c_pushtag, c_bind): New functions.
6320
60393bbc
AM
63212014-10-27 Andrew MacLeod <amacleod@redhat.com>
6322
6323 * c-typeck.c: Adjust include files.
6324
d723bb7c
MLI
63252014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6326
6327 PR c++/53061
6328 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6329 initialization here...
6330 (c_initialize_diagnostics): ... but here. Set defaults after
6331 building pretty-printer.
6332
1bc5a451
MP
63332014-10-23 Marek Polacek <polacek@redhat.com>
6334
6335 PR c/63626
6336 * c-decl.c (pop_scope): Don't print warning in external_scope.
6337
4435bb92
MP
63382014-10-19 Marek Polacek <polacek@redhat.com>
6339
6340 PR c/63567
6341 * c-typeck.c (output_init_element): Allow initializing objects with
6342 static storage duration with compound literals even in C99 and add
6343 pedwarn for it.
6344
7278465e
MP
63452014-10-17 Marek Polacek <polacek@redhat.com>
6346
6347 PR c/63567
6348 * c-typeck.c (digest_init): Allow initializing objects with static
6349 storage duration with compound literals even in C99 and add pedwarn
6350 for it.
6351
d9b7be2e
MP
63522014-10-17 Marek Polacek <polacek@redhat.com>
6353
6354 PR c/63543
6355 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6356 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6357 error multiple times. Print the type.
6358
f406ae1f
MP
63592014-10-17 Marek Polacek <polacek@redhat.com>
6360
6361 PR c/63549
6362 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6363 type.
6364
92574c7c
MP
63652014-10-17 Marek Polacek <polacek@redhat.com>
6366
6367 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6368 (start_function): Use OPT_Wimplicit_int instead of 0.
6369 (store_parm_decls_oldstyle): Likewise.
6370
1bc4a978
MT
63712014-10-17 Alan Modra <amodra@gmail.com>
6372
6373 PR middle-end/61848
6374 * c-decl.c (merge_decls): Don't merge section name or tls model
6375 to newdecl symtab node, instead merge to olddecl. Override
6376 existing olddecl section name. Set tls_model for all thread-local
6377 vars, not just OMP thread-private ones. Remove incorrect comment.
6378
83685514
AM
63792014-10-16 Andrew MacLeod <amacleod@redhat.com>
6380
6381 * c-decl.c: Adjust include files.
6382
78a7c317
DD
63832014-10-14 DJ Delorie <dj@redhat.com>
6384
6385 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6386 (c_token_starts_typename): Check all __intN, not just __int128.
6387 (c_token_starts_declspecs): Likewise.
6388 (c_parser_declspecs): Likewise.
6389 (c_parser_attribute_any_word): Likewise.
6390 (c_parser_objc_selector): Likewise.
6391 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6392 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6393 is specified.
6394 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6395 __int128.
6396 (finish_declspecs): Likewise.
6397
74d98c1e
AB
63982014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6399
8e745a17 6400 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6401 the duplicate code.
8e745a17 6402 (c_parser_statement): Call the new function.
74d98c1e 6403
84937de2
MP
64042014-10-09 Marek Polacek <polacek@redhat.com>
6405
6406 PR c/63480
6407 * c-typeck.c (pop_init_level): Don't warn about initializing
6408 with { }.
6409
0382aaa0
MP
64102014-10-07 Marek Polacek <polacek@redhat.com>
6411
6412 PR c/59717
6413 * c-decl.c (header_for_builtin_fn): New function.
6414 (implicitly_declare): Suggest which header to include.
6415
7a0ca710
MP
64162014-10-07 Marek Polacek <polacek@redhat.com>
6417
6418 * c-convert.c (convert): Use error_operand_p.
6419 * c-typeck.c (require_complete_type): Likewise.
6420 (really_atomic_lvalue): Likewise.
6421 (digest_init): Likewise.
6422 (handle_omp_array_sections_1): Likewise.
6423
6bc8a126
MP
64242014-10-03 Marek Polacek <polacek@redhat.com>
6425
6426 PR c/63453
6427 * c-decl.c (pop_scope): Don't warn about "inline function declared
6428 but never defined" for functions marked with gnu_inline attribute.
6429
d90c0a59
JJ
64302014-09-25 Jakub Jelinek <jakub@redhat.com>
6431
6432 PR c++/63249
6433 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6434 on low_bound and length.
6435
083e891e
MP
64362014-09-24 Marek Polacek <polacek@redhat.com>
6437
6438 PR c/61405
6439 PR c/53874
6440 * c-parser.c: Don't define CPP_KEYWORD.
6441 (c_parser_switch_statement): Pass original type to c_finish_case.
6442 * c-tree.h (c_finish_case): Update declaration.
6443 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6444 conditionally to c_do_switch_warnings.
6445
8d95fe25
MP
64462014-09-03 Marek Polacek <polacek@redhat.com>
6447
6448 PR c/62024
6449 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6450 conversions.
6451
9a771876
JJ
64522014-09-02 Jakub Jelinek <jakub@redhat.com>
6453 Balaji V. Iyer <balaji.v.iyer@intel.com>
6454 Igor Zamyatin <igor.zamyatin@intel.com>
6455
6456 * c-parser.c (c_parser_cilk_for): New function.
6457 (c_parser_cilk_grainsize): Likewise.
6458 (c_get_temp_regvar): Likewise.
6459 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6460 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6461 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6462 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6463 case.
6464
b7679d96
CG
64652014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6466
6467 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6468 with using HOST_WIDE_INT without truncation to 'int'
6469
59ea0364
MP
64702014-08-22 Marek Polacek <polacek@redhat.com>
6471
6472 PR c++/62199
6473 * c-typeck.c (parser_build_binary_op): Adjust call to
6474 warn_logical_not_parentheses.
6475
671a475e
IZ
64762014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6477
6478 PR other/62008
6479 * c-parser.c (c_parser_array_notation): Check for correct
6480 type of an array added.
6481
04159acf
MP
64822014-08-19 Marek Polacek <polacek@redhat.com>
6483
6484 PR c++/62153
6485 * c-typeck.c (build_binary_op): If either operand of a comparison
6486 is a boolean expression, call maybe_warn_bool_compare.
6487
c77935ee
PP
64882014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6489
6490 PR c/45584
6491 * c-typeck.c (build_c_cast): Do a conversion even when the
6492 TYPE_MAIN_VARIANTs are the same.
6493
35aff4fb
MP
64942014-08-19 Marek Polacek <polacek@redhat.com>
6495
6496 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6497 pedwarn_c99 instead of pedwarn.
6498 (grokfield): Likewise.
6499 (warn_defaults_to): New function.
6500 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6501 Unconditionally call pedwarn_c99 instead of pedwarn.
6502 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6503 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6504 check flag_isoc11 before.
6505 * c-errors.c (pedwarn_c99): Change the return type to bool.
6506 Handle -Wc99-c11-compat.
6507 * c-parser.c (disable_extension_diagnostics): Handle
6508 warn_c99_c11_compat.
6509 (restore_extension_diagnostics): Likewise.
6510 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6511 instead of pedwarn, don't check flag_isoc11 before.
6512 (c_parser_declspecs): Likewise.
6513 (c_parser_alignas_specifier): Likewise.
6514 (c_parser_alignof_expression): Likewise.
6515 (c_parser_generic_selection): Likewise.
6516 * c-tree.h (pedwarn_c99): Update declaration.
6517 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6518 of pedwarn_c99.
6519
177cce46
MP
65202014-08-19 Marek Polacek <polacek@redhat.com>
6521
6522 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6523 to pedwarn_c90.
6524 * c-errors.c: Include "opts.h".
6525 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6526 * c-parser.c (disable_extension_diagnostics): Handle negative value
6527 of warn_c90_c99_compat, too.
6528 (restore_extension_diagnostics): Likewise.
6529 (c_parser_compound_statement_nostart): Pass
6530 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6531
6dc99c33
MP
65322014-08-12 Marek Polacek <polacek@redhat.com>
6533
6534 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6535 Add pedwarn.
6536 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6537 Likewise.
6538 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6539
3f8257db 65402014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6541
6542 PR c/51849
6543 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6544 Call pedwarn_c90 instead of pedwarn.
6545 (check_bitfield_type_and_width): Likewise.
6546 (declspecs_add_qual): Likewise.
6547 (declspecs_add_type): Likewise.
6548 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6549 Adjust to only call pedwarn_c90.
6550 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6551 pedwarn_c90 instead of pedwarn.
6552 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6553 * c-parser.c (disable_extension_diagnostics): Handle
6554 warn_c90_c99_compat.
6555 (restore_extension_diagnostics): Likewise.
6556 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6557 pedwarn_c90 instead of pedwarn.
6558 (c_parser_initelt): Likewise.
6559 (c_parser_postfix_expression): Likewise.
6560 (c_parser_postfix_expression_after_paren_type): Likewise.
6561 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6562 * c-tree.h: Fix formatting.
6563 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6564 pedwarn_c90 instead of pedwarn.
6565
9f25a338
TS
65662014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6567
6568 * c-typeck.c: Remove include of pointer-set.h.
6569
044331a8
MP
65702014-08-07 Marek Polacek <polacek@redhat.com>
6571
6572 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6573
b787e7a2
TS
65742014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6575
6576 * c-typeck.c: Use hash_map instead of pointer_map.
6577
6e2830c3
TS
65782014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6579
6580 * c-decl.c: Use hash_set instead of pointer_set.
6581
a7ee52fb
IZ
65822014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6583
6584 PR middle-end/61455
6585 * c-array-notation.c (expand_array_notations): Handling
6586 of DECL_EXPR added.
6587
b4dfdc11
MG
65882014-07-31 Marc Glisse <marc.glisse@inria.fr>
6589
6590 PR c++/60517
6591 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6592 a local variable.
6593
976d5a22
TT
65942014-07-30 Tom Tromey <tromey@redhat.com>
6595
6596 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6597 field.
6598 (really_start_incremental_init, push_init_level): Initialize
6599 designator_depth.
6600 (pop_init_level): Set global designator_depth.
6601 (process_init_element): Check for designated_init attribute.
6602
30281de2
MP
66032014-07-20 Marek Polacek <polacek@redhat.com>
6604
6605 PR c/61852
6606 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6607 (implicitly_declare): Pass location to implicit_decl_warning.
6608
b108f48f
JJ
66092014-07-14 Jakub Jelinek <jakub@redhat.com>
6610
6611 PR middle-end/61294
6612 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6613 If non-NULL, call c_parser_check_literal_zero.
6614 (c_parser_check_literal_zero): New function.
6615 (c_parser_postfix_expression_after_primary): Adjust
6616 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6617
773ec47f
MP
66182014-07-06 Marek Polacek <polacek@redhat.com>
6619
6620 PR c/6940
6621 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6622 * c-tree.h (C_ARRAY_PARAMETER): Define.
6623 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6624 function parameter.
6625
22e1cf1c 66262014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6627 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6628
6629 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6630 releasing symbol.
6631
52ec0ea3
MP
66322014-07-01 Marek Polacek <polacek@redhat.com>
6633
6634 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6635 instead of 0 to WARN_FOR_ASSIGNMENT.
6636
d5c3d343
MP
66372014-07-01 Marek Polacek <polacek@redhat.com>
6638
6639 PR c/58286
6640 * c-typeck.c (convert_for_assignment): Pass
6641 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6642
6a7253a4
MP
66432014-06-30 Marek Polacek <polacek@redhat.com>
6644
6645 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6646 has no_sanitize_undefined attribute.
6647
5e88a8f4
IZ
66482014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6649
6650 PR middle-end/57541
6651 * c-array-notation.c (fix_builtin_array_notation_fn):
6652 Check for 0 arguments in builtin call. Check that bultin argument is
6653 correct.
6654 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6655 index.
6656
9698b078
SH
66572014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6658
6659 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6660 qualifiers in __auto_type for atomic types.
6661 (c_parser_typeof_specifier): Discard all type qualifiers in
6662 __typeof__ for atomic types.
6663
6e07c515
MP
66642014-06-25 Marek Polacek <polacek@redhat.com>
6665
6666 PR c/61162
6667 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6668 the return expression to c_finish_return.
6669
da6f124d
JJ
66702014-06-25 Jakub Jelinek <jakub@redhat.com>
6671
6672 * c-typeck.c (c_finish_omp_clauses): Make sure
6673 OMP_CLAUSE_LINEAR_STEP has correct type.
6674
c203e8a7
TS
66752014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6676
6677 * c-decl.c: Adjust.
6678
56ad0e38
JJ
66792014-06-24 Jakub Jelinek <jakub@redhat.com>
6680
6681 * c-parser.c (c_parser_omp_for_loop): For
6682 #pragma omp parallel for simd move lastprivate clause from parallel
6683 to for rather than simd.
6684
47c2554f
MP
66852014-06-23 Marek Polacek <polacek@redhat.com>
6686
6687 * c-typeck.c (parser_build_binary_op): Don't call
6688 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6689
56363ffd
JH
66902014-06-15 Jan Hubicka <hubicka@ucw.cz>
6691
6692 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6693 * c-decl.c (merge_decls): Likewise.
6694
d7ff7ae5
MP
66952014-06-09 Marek Polacek <polacek@redhat.com>
6696
6697 PR c/36446
6698 * c-typeck.c (error_init): Call inform instead of error_at.
6699 (pedwarn_init): Call inform instead of pedwarn.
6700 (warning_init): Call inform instead of warning_at.
6701
24d047a3
JH
67022014-06-07 Jan Hubicka <hubicka@ucw.cz>
6703
6704 * c-decl.c (merge_decls): Use set_decl_section_name.
6705 (duplicate_decls): Remove node if it exists.
6706
9bac5cbb
G
67072014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6708
6709 PR c/53119
6710 * c-typeck.c (push_init_level, process_init_element,
6711 pop_init_level): Correct check for zero initialization, move
6712 missing brace warning to respect zero initialization.
6713
8ffcdea8
MP
67142014-06-05 Marek Polacek <polacek@redhat.com>
6715
6716 PR c/56724
6717 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6718
742938c9
MP
67192014-06-05 Marek Polacek <polacek@redhat.com>
6720
6721 PR c/49706
6722 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6723 on the left hand side operand of a comparison.
742938c9 6724
6447c55d
MP
67252014-06-05 Marek Polacek <polacek@redhat.com>
6726
6727 PR c/48062
6728 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6729 Print note only if the warning was printed.
6730
9dc7743c
IZ
67312014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6732
6733 PR c/58942
6734 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6735 with a pointer.
6736
fedfecef
MP
67372014-06-03 Marek Polacek <polacek@redhat.com>
6738
6739 PR c/60439
6740 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6741 c_start_case.
6742 * c-tree.h (c_start_case): Update.
6743 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6744 switch condition has boolean value.
6745
9b2b7279
AM
67462014-06-02 Andrew MacLeod <amacleod@redhat.com>
6747
6748 * c-decl.c: Include builtins.h.
6749 * c-parser.c: Likewise.
6750
5c1bc275
MP
67512014-05-27 Marek Polacek <polacek@redhat.com>
6752
6753 PR c/56724
6754 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6755 error and warning calls to error_at and warning_at. Pass location of
6756 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6757 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6758 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6759
97563bc8
IZ
67602014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6761
6762 PR c/61191
6763 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6764 function parameters.
6765
aede2c10
JH
67662014-05-23 Jan Hubicka <hubicka@ucw.cz>
6767
6768 * c-decl.c (merge_decls): Preserve symtab node pointers.
6769 (duplicate_decls): Free new decl.
6770
edbba2ce
TS
67712014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6772
f3316c6d
TS
6773 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6774 initialization.
6775
edbba2ce
TS
6776 * c-parser.c (c_parser_omp_target): Return bool values.
6777
68c81f24
TS
67782014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6779
6780 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6781 num_teams_loc variable to num_thread_limit_loc.
6782
632f2871
RS
67832014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6784
6785 * c-array-notation.c (expand_array_notations): Use void_node
6786 instead of void_zero_node.
6787
766090c2
TS
67882014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6789
6790 * c-decl.c (finish_struct): Adjust.
6791 (finish_enum): Likewise.
6792 (bind): Adjust.
6793 (record_inline_static): Likewise.
6794 (push_scope): Likewise.
6795 (make_label): Likewise.
6796 (lookup_label_for_goto): Likewise.
6797 (finish_struct): Likewise.
6798 (finish_enum): Likewise.
6799 (store_parm_decls): Likewise.
6800 (c_push_function_context): Likewise.
6801 * c-lang.h: Remove usage of variable_size gty attribute.
6802 * c-parser.c (c_parse_init): Adjust.
6803 (c_parse_file): Likewise.
6804
2b107f6b
MP
68052014-05-13 Marek Polacek <polacek@redhat.com>
6806
6807 PR c/61162
6808 * c-typeck.c (convert_for_assignment): Pass location to
6809 WARN_FOR_ASSIGNMENT instead of input_location.
6810
d033409e
MP
68112014-05-10 Marek Polacek <polacek@redhat.com>
6812
6813 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6814 maybe_warn_string_init.
6815 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6816 maybe_warn_string_init.
6817 * c-tree.h (maybe_warn_string_init): Update declaration.
6818 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6819 Call pedwarn_init with loc instead of with input_location.
6820 (digest_init): Pass init_loc to maybe_warn_string_init.
6821 (pop_init_level): Call pedwarn_init with loc instead of with
6822 input_location.
6823 (set_init_index): Likewise.
6824 (process_init_element): Likewise.
6825
ea58ef42
MP
68262014-05-09 Marek Polacek <polacek@redhat.com>
6827
6828 PR c/61096
6829 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6830 (c_parser_initelt): Pass location to set_init_label. Pass array index
6831 location to set_init_index.
6832 * c-tree.h (push_init_level): Update declaration.
6833 (pop_init_level): Likewise.
6834 (set_init_index): Likewise.
6835 (set_init_label): Likewise.
6836 * c-typeck.c (error_init): Add location parameter. Call error_at
6837 instead of error.
6838 (digest_init): Pass init_loc to error_init.
6839 (really_start_incremental_init):
6840 (push_init_level): Add location parameter. Pass loc to pop_init_level
6841 and error_init.
6842 (pop_init_level): Likewise.
6843 (set_designator): Add location parameter. Pass loc to pop_init_level,
6844 push_init_level, and error_init.
6845 (set_init_index): Add location parameter. Pass loc to error_init and
6846 set_designator.
6847 (set_init_label): Likewise.
6848 (output_init_element): Pass loc to error_init.
6849 (process_init_element): Pass loc to error_init, pop_init_level,
6850 pedwarn_init, and push_init_level.
6851
661a0813
MP
68522014-05-09 Marek Polacek <polacek@redhat.com>
6853
6854 PR c/50459
6855 * c-parser.c (c_parser_attributes): Parse the arguments as an
6856 expression-list if the attribute takes identifier.
6857
2793eeab
MP
68582014-05-08 Marek Polacek <polacek@redhat.com>
6859
6860 PR c/61053
6861 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6862 TYPE_ALIGN_UNIT.
6863
f827930a
MP
68642014-05-08 Marek Polacek <polacek@redhat.com>
6865
6866 PR c/61077
6867 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6868 of main.
6869
1d60af08
KZ
68702014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6871 Mike Stump <mikestump@comcast.net>
6872 Richard Sandiford <rdsandiford@googlemail.com>
6873
6874 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6875 (finish_enum): Use wide-int interfaces.
6876 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6877 * c-typeck.c (build_c_cast): Likewise.
6878 (set_nonincremental_init_from_string): Likewise.
6879 (c_tree_equal): Likewise.
6880
a0e24419
MP
68812014-05-02 Marek Polacek <polacek@redhat.com>
6882
6883 PR c/25801
6884 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6885 Return size_one_node when the type is not complete.
6886 (pointer_diff): Remove comment.
6887 (build_unary_op): Improve error messages.
6888
19fc9faa
MP
68892014-05-02 Marek Polacek <polacek@redhat.com>
6890
6891 * c-typeck.c (c_finish_return): Separate warning_at calls.
6892
63bc4e87
MP
68932014-05-02 Marek Polacek <polacek@redhat.com>
6894
6895 * c-tree.h (error_init): Remove declaration.
6896 (pedwarn_init): Likewise.
6897 * c-typeck.c (error_init): Make static and move above.
6898 (pedwarn_init): Likewise.
6899 (warning_init): Move above.
6900 (maybe_warn_string_init): Likewise.
6901
4bd2511b
JL
69022014-05-01 Jeff Law <law@redhat.com>
6903
6904 Revert:
6905
6906 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6907 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6908 avoid goto.
6909
6a358dcb
MP
69102014-05-02 Marek Polacek <polacek@redhat.com>
6911
6912 PR c/60784
6913 * c-typeck.c (push_init_level): Set constructor_designated to
6914 p->designated for structures.
6915
ae5ebda4
MP
69162014-05-01 Marek Polacek <polacek@redhat.com>
6917
6918 PR c/60915
6919 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6920 function-definition has an attribute after the declarator.
6921
96b40f8d
MP
69222014-05-01 Marek Polacek <polacek@redhat.com>
6923
6924 PR c/60257
6925 * c-typeck.c (warning_init): Add location_t parameter. Call
6926 warning_at instead of warning.
6927 (push_init_level): Pass input_location to warning_init.
6928 (add_pending_init): Add location_t parameter. Pass loc to
6929 warning_init.
6930 (set_nonincremental_init): Pass input_location to add_pending_init.
6931 (set_nonincremental_init_from_string): Likewise.
6932 (output_init_element): Pass loc to warning_init and to
6933 add_pending_init.
6934
32e00768
MP
69352014-05-01 Marek Polacek <polacek@redhat.com>
6936
6937 PR c/43395
6938 * c-typeck.c (c_finish_return): Distinguish between label and variable
6939 when warning about returning local address.
6940
c9379ce2
MP
69412014-05-01 Marek Polacek <polacek@redhat.com>
6942
6943 PR c/29467
6944 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6945 in C89 mode.
6946
d00887e8
MP
69472014-05-01 Marek Polacek <polacek@redhat.com>
6948
6949 PR c/43245
6950 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6951 instead of 0 to WARN_FOR_QUALIFIERS.
6952
5436fa2e
MP
69532014-05-01 Marek Polacek <polacek@redhat.com>
6954
6955 PR c/56989
6956 * c-typeck.c (default_conversion): Use better location for
6957 error call.
6958
f8ed5150
MP
69592014-04-30 Marek Polacek <polacek@redhat.com>
6960
6961 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6962 also when SANITIZE_FLOAT_DIVIDE is on.
6963
8337d1db
MP
69642014-04-30 Marek Polacek <polacek@redhat.com>
6965
6966 PR c/60139
6967 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6968 and pedwarn_init. Use loc insted of input_location.
6969
c4bdc42f
MP
69702014-04-30 Marek Polacek <polacek@redhat.com>
6971
6972 PR c/60351
6973 * c-typeck.c (build_binary_op): Use location when warning about
6974 shift count.
6975
45484dcf
MP
69762014-04-25 Marek Polacek <polacek@redhat.com>
6977
6978 PR c/18079
6979 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6980 always_inline/noinline and hot/cold attributes.
6981
34cf811f
MP
69822014-04-25 Marek Polacek <polacek@redhat.com>
6983
6984 PR c/60114
6985 * c-parser.c (c_parser_initelt): Pass input_location to
6986 process_init_element.
6987 (c_parser_initval): Pass loc to process_init_element.
6988 * c-tree.h (process_init_element): Adjust declaration.
6989 * c-typeck.c (push_init_level): Pass input_location to
6990 process_init_element.
6991 (pop_init_level): Likewise.
6992 (set_designator): Likewise.
6993 (output_init_element): Add location_t parameter. Pass loc to
6994 digest_init.
6995 (output_pending_init_elements): Pass input_location to
6996 output_init_element.
6997 (process_init_element): Add location_t parameter. Pass loc to
6998 output_init_element.
6999
42056eac
JJ
70002014-04-24 Jakub Jelinek <jakub@redhat.com>
7001
7002 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7003 atomic-clause, allow comma in between atomic-clause and
7004 seq_cst.
7005
e162a134
JJ
70062014-04-22 Jakub Jelinek <jakub@redhat.com>
7007
7008 PR c/59073
7009 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7010 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7011
2f6babac
IZ
70122014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7013
7014 PR middle-end/60469
7015 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7016 create_tmp_var instead build_decl for creating temps.
7017 (build_array_notation_expr): Likewise.
7018 (fix_conditional_array_notations_1): Likewise.
7019 (fix_array_notation_expr): Likewise.
7020 (fix_array_notation_call_expr): Likewise.
7021
8edbfaa6
JJ
70222014-03-28 Jakub Jelinek <jakub@redhat.com>
7023
7024 PR c++/60689
7025 * c-tree.h (c_build_function_call_vec): New prototype.
7026 * c-typeck.c (build_function_call_vec): Don't call
7027 resolve_overloaded_builtin here.
7028 (c_build_function_call_vec): New wrapper function around
7029 build_function_call_vec. Call resolve_overloaded_builtin here.
7030 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7031 Call c_build_function_call_vec instead of build_function_call_vec.
7032 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7033 * c-decl.c (finish_decl): Likewise.
7034
7485aeea
MLI
70352014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7036
7037 PR c/55383
7038 * c-typeck.c: Use correct format string in cast-qual warning
7039
b17a8b07
TS
70402014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7041
7042 * c-decl.c (c_decl_attributes): Use
7043 lang_hooks.types.omp_mappable_type.
7044 * c-typeck.c (c_finish_omp_clauses): Likewise.
7045
3af9c5e9
MP
70462014-03-06 Marek Polacek <polacek@redhat.com>
7047
7048 PR c/60197
7049 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7050 of checking tree code.
7051
1c9f5f33
PK
70522014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7053
7054 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7055 (c_parser_parameter_declaration): Likewise.
7056
cc28fc7f
MP
70572014-02-19 Marek Polacek <polacek@redhat.com>
7058
7059 PR c/60195
7060 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7061 Call mark_exp_read on exp.value.
7062 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7063 TREE_ADDRESSABLE on old instead of val.
7064 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7065
b581c05c
PK
70662014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7067
7068 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7069 C_EXPR_APPEND by vec_safe_push.
7070 * c-tree.h (C_EXPR_APPEND): Remove.
7071
81e5eca8
MP
70722014-01-31 Marek Polacek <polacek@redhat.com>
7073
7074 PR c/59963
7075 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7076 build_function_call_vec.
7077 (build_function_call): Likewise.
7078 (build_atomic_assign): Likewise.
7079 (build_function_call_vec): Add arg_loc parameter. Use it.
7080 (convert_arguments): Likewise.
7081 (convert_for_assignment): Rename rhs_loc to expr_loc.
7082 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7083 (c_parser_objc_keywordexpr): Likewise.
7084 (c_parser_postfix_expression_after_primary): Call
7085 build_function_call_vec with expr_loc rather than op_loc.
7086 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7087 build_function_call_vec.
7088 (c_parser_expr_list): Add locations parameter. Fill it with locations
7089 of function arguments.
7090 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7091
68fca595
MP
70922014-01-30 Marek Polacek <polacek@redhat.com>
7093
7094 PR c/59940
7095 * c-typeck.c (build_function_call_vec): Use loc parameter.
7096 (convert_arguments): Add location parameter. Use it.
7097 (ep_convert_and_check): Likewise.
7098 (build_atomic_assign): Adjust convert_for_assignment call.
7099 (build_modify_expr): Likewise.
7100 (digest_init): Likewise.
7101 (c_finish_return): Likewise.
7102 (build_conditional_expr): Adjust ep_convert_and_check calls.
7103 (convert_for_assignment): Add rhs_loc parameter. Use it.
7104 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7105 calls.
7106
fa337f3a
RB
71072014-01-30 Richard Biener <rguenther@suse.de>
7108
7109 PR c/59905
7110 * c-typeck.c (build_function_call_vec): Do not replace calls
7111 to a function via an incompatible type with a runtime abort.
7112
b72271b9
BI
71132014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7114
7115 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7116 flag_enable_cilkplus with flag_cilkplus.
7117 (c_parser_direct_declarator_inner): Likewise.
7118 (c_parser_attribute_any_word): Likewise.
7119 (c_parser_attributes): Likewise.
7120 (c_parser_compound_statement): Likewise.
7121 (c_parser_statement_after_labels): Likewise.
7122 (c_parser_if_statement): Likewise.
7123 (c_parser_switch_statement): Likewise.
7124 (c_parser_do_statement): Likewise.
7125 (c_parser_for_statement): Likewise.
7126 (c_parser_unary_expression): Likewise.
7127 (c_parser_postfix_expression): Likewise.
7128 (c_parser_postfix_expression_after_primary): Likewise.
7129 (c_parser_postfix_expression_after_primary): Likewise.
7130 (c_parser_omp_clause_name): Likewise.
7131 (c_finish_omp_declare_simd): Likewise.
7132 (c_parser_cilk_verify_simd): Likewise.
7133 * c-typeck.c (build_array_ref): Likewise.
7134 (build_function_call_vec): Likewise.
7135 (convert_arguments): Likewise.
7136 (build_compound_expr): Likewise.
7137 (c_finish_return): Likewise.
7138 (c_finish_if_stmt): Likewise.
7139 (c_finish_loop): Likewise.
7140 (build_binary_op): Likewise.
7141
393e8e8b
MP
71422014-01-23 Marek Polacek <polacek@redhat.com>
7143
7144 PR c/59846
7145 * c-typeck.c (parser_build_binary_op): Use location instead of
7146 input_location.
7147 (build_binary_op): Pass location to shorten_compare.
7148
f04dda30
MP
71492014-01-23 Marek Polacek <polacek@redhat.com>
7150
7151 PR c/58346
7152 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7153 an empty aggregate.
7154
789eadcd
MP
71552014-01-23 Marek Polacek <polacek@redhat.com>
7156
7157 PR c/59871
7158 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7159 of a comma expression.
7160 (emit_side_effect_warnings): Likewise.
7161
40f14e9f
BI
71622014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7163
7164 PR c/59825
7165 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7166 function to use walk_tree and moved a lot of its functionality to
7167 expand_array_notations.
7168 (expand_array_notations): New function.
7169
74558dd9
BI
71702014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7171
7172 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7173 attribute an attribute without value.
7174
652fea39
JJ
71752014-01-23 Jakub Jelinek <jakub@redhat.com>
7176
7177 PR middle-end/58809
7178 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7179 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7180
f34f1c87
MP
71812014-01-22 Marek Polacek <polacek@redhat.com>
7182
7183 PR c/59891
7184 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7185 of remove_c_maybe_const_expr on op1 and op2.
7186
241f845a
JJ
71872014-01-15 Jakub Jelinek <jakub@redhat.com>
7188
7189 PR c/58943
7190 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7191 effects, preevaluate rhs using SAVE_EXPR first.
7192
9a74f20c
BI
71932014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7194
7195 PR c++/59631
7196 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7197 statements with if-elseif statements.
7198
96066ce1
MP
71992014-01-06 Marek Polacek <polacek@redhat.com>
7200
7201 PR c/57773
7202 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7203 defined bit-field types only in ISO C.
7204
23a5b65a
RS
72052014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7206
7207 Update copyright years
7208
f9030485
RS
72092014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7210
7211 * c-array-notation.c: Use the standard form for the copyright notice.
7212
41958c28
BI
72132013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7214
7215 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7216 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7217 field in parser is not empty. If not-empty, call the function
7218 c_parser_finish_omp_declare_simd.
7219 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7220 between SIMD-enabled functions and #pragma simd. Added new parameter.
7221 (c_parser_cilk_all_clauses): Modified the usage of the function
7222 c_parser_cilk_clause_vectorlength as mentioned above.
7223 (c_parser_cilk_simd_fn_vector_attrs): New function.
7224 (c_finish_cilk_simd_fn_tokens): Likewise.
7225 (is_cilkplus_vector_p): Likewise.
7226 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7227 "nomask," and "mask" strings in clause name.
7228 (c_parser_omp_all_clauses): Added 3 new case statements:
7229 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7230 PRAGMA_CILK_CLAUSE_NOMASK.
7231 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7232 check for vector attribute and if so call the function
7233 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7234 called the function c_finish_cilk_simd_fn_tokens.
7235 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7236 parser field is non-empty. If so, parse them as you would parse
7237 the omp declare simd pragma.
7238 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7239 Added a check when step is a parameter and flag it as error.
7240 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7241 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7242 pragma_omp_clause.
7243
cef0fd0e
TS
72442013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7245
7246 * c-parser.c (c_parser_omp_parallel): Fix description.
7247
12893402
BI
72482013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7249
7250 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7251 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7252 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7253 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7254
296674db
JM
72552013-12-04 Joseph Myers <joseph@codesourcery.com>
7256
7257 PR c/52023
7258 * c-parser.c (c_parser_alignas_specifier): Use
7259 c_sizeof_or_alignof_type instead of c_alignof.
7260 (c_parser_alignof_expression): Likewise, with min_alignof
7261 parameter depending on alignof spelling used.
7262
edd28054
MP
72632013-12-04 Marek Polacek <polacek@redhat.com>
7264
7265 PR c/54113
7266 * c-decl.c (start_function): Don't warn for missing prototype for
7267 inline functions.
7268
da0fc454
MP
72692013-12-03 Marek Polacek <polacek@redhat.com>
7270
7271 PR c/59351
7272 * c-decl.c (build_compound_literal): Allow compound literals with
7273 empty initial value.
7274
4c2ecab0
JM
72752013-12-02 Joseph Myers <joseph@codesourcery.com>
7276
7277 PR c/58235
7278 * c-typeck.c (build_modify_expr): Diagnose assignment to
7279 expression with array type.
7280
340baef7
JM
72812013-11-29 Joseph Myers <joseph@codesourcery.com>
7282
7283 PR c/42262
7284 * c-typeck.c (process_init_element): Do not treat a string as
7285 initializing a whole array when used with a designator for an
7286 individual element.
7287
6763b9f7
JM
72882013-11-29 Joseph Myers <joseph@codesourcery.com>
7289
7290 PR c/57574
7291 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7292 an inline function following a static declaration.
7293
e7bd1de1
JJ
72942013-11-28 Jakub Jelinek <jakub@redhat.com>
7295
7296 PR c/59310
7297 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7298 to p_name before calling c_parser_omp_teams instead of after.
7299 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7300 argument. Remove unused p_name variable.
7301
0136f8f0
AH
73022013-11-27 Aldy Hernandez <aldyh@redhat.com>
7303 Jakub Jelinek <jakub@redhat.com>
7304
7305 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7306 external_scope is NULL.
7307
241b71bb
TV
73082013-11-27 Tom de Vries <tom@codesourcery.com>
7309 Marc Glisse <marc.glisse@inria.fr>
7310
7311 PR c++/59032
7312 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7313
2fb9a547
AM
73142013-11-22 Andrew MacLeod <amacleod@redhat.com>
7315
7316 * c-typeck.c: Add required include files from gimple.h.
7317
8400e75e
DM
73182013-11-22 David Malcolm <dmalcolm@redhat.com>
7319
7320 * c-decl.c (define_label, shadow_tag_warned)
7321 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7322 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7323 (declspecs_add_type): Remove use of in_system_header macro.
7324 * c-parser.c (c_parser_unary_expression): Likewise.
7325 * c-typeck.c (store_init_value, process_init_element)
7326 (c_start_case): Likewise.
7327
7328 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7329 macro.
7330
7331 * c-parser.c (c_parser_set_source_position_from_token): Remove
7332 reference to in_system_header from comment.
7333
386b1f1f
RS
73342013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7335
7336 * c-decl.c (grokdeclarator): Update comment to refer to
7337 tree_to_[su]hwi rather than tree_low_cst.
7338
ae7e9ddd
RS
73392013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7340
7341 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7342 tree_to_uhwi throughout.
7343
9439e9a1
RS
73442013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7345
7346 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7347 throughout.
7348
9541ffee
RS
73492013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7350
7351 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7352 throughout.
7353
c02065fc
AH
73542013-11-15 Aldy Hernandez <aldyh@redhat.com>
7355
7356 * c-parser.c (c_parser_cilk_simd): New.
7357 (c_parser_cilk_verify_simd): New.
7358 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7359 (c_parser_omp_for_loop): Add case for NE_EXPR.
7360 Set c_break_label for CILK_SIMD.
7361 (c_parser_cilk_clause_vectorlength): New.
7362 (c_parser_cilk_clause_linear): New.
7363 (c_parser_cilk_clause_name): New.
7364 (c_parser_cilk_all_clauses): New.
7365 * c-typeck.c (build_unary_op): Pass location argument to
7366 readonly_error.
7367 (build_modify_expr): Same.
7368 (build_asm_expr): Same.
7369 (c_finish_bc_stmt): Error on break/continue in loops.
7370
18f429e2
AM
73712013-11-14 Andrew MacLeod <amacleod@redhat.com>
7372
7373 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7374
d8a2d370
DN
73752013-11-14 Diego Novillo <dnovillo@google.com>
7376
7377 * c-decl.c: Include print-tree.h.
7378 Include stor-layout.h.
7379 Include varasm.h.
7380 Include attribs.h.
7381 Include stringpool.h.
7382 * c-lang.c: Include fold-const.h.
7383 * c-parser.c: Include stringpool.h.
7384 Include attribs.h.
7385 Include stor-layout.h.
7386 Include varasm.h.
7387 Include trans-mem.h.
7388 * c-typeck.c: Include stor-layout.h.
7389 Include trans-mem.h.
7390 Include varasm.h.
7391 Include stmt.h.
7392
38b7bc7f
JM
73932013-11-13 Joseph Myers <joseph@codesourcery.com>
7394
7395 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7396 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7397 __auto_type.
7398 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7399 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7400 RID_AUTO_TYPE.
7401 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7402 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7403 (c_parser_declarator, c_parser_direct_declarator_inner)
7404 (c_parser_parameter_declaration, c_parser_type_name): All callers
7405 changed.
7406 (c_parser_declaration_or_fndef): Handle declarations with type
7407 determined from the initializer.
7408
45b0be94
AM
74092013-11-12 Andrew MacLeod <amacleod@redhat.com>
7410
18f429e2 7411 * c-typeck.c: Include gimplify.h.
45b0be94 7412
582d9b50
JM
74132013-11-12 Joseph Myers <joseph@codesourcery.com>
7414
7415 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7416 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7417 comment.
7418 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7419 or _Thread_local as appropriate in diagnostics.
7420 (build_null_declspecs): Initialize ret->thread_gnu_p.
7421 (declspecs_add_scspec): Handle either __thread or _Thread_local
7422 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7423 pedantic. Do not disallow _Thread_local extern and _Thread_local
7424 static.
7425
267bac10
JM
74262013-11-07 Joseph Myers <joseph@codesourcery.com>
7427 Andrew MacLeod <amacleod@redhat.com>
7428
7429 * c-aux-info.c (gen_type): Handle atomic qualifier.
7430 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7431 qualifiers when compating types.
7432 (shadow_tag_warned): Handle atomic_p in declspecs.
7433 (quals_from_declspecs): Likewise.
7434 (start_decl): Use c_type_promotes_to when promoting argument
7435 types.
7436 (grokdeclarator): Handle _Atomic.
7437 (get_parm_info): Diagnose any qualifier on "void" as only
7438 parameter.
7439 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7440 comparing types. Use c_type_promotes_to when promoting argument
7441 types.
7442 (finish_function): Use c_type_promotes_to when promoting argument
7443 types.
7444 (build_null_declspecs): Handle atomic_p in declspecs.
7445 (declspecs_add_qual): Handle RID_ATOMIC.
7446 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7447 (c_token_starts_declspecs): Handle RID_ATOMIC.
7448 (c_parser_declspecs): Handle atomic type specifiers and
7449 qualifiers.
7450 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7451 from types of expressions with atomic type.
7452 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7453 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7454 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7455 (c_parser_statement_after_labels, c_parser_switch_statement)
7456 (c_parser_for_statement, c_parser_expr_no_commas)
7457 (c_parser_conditional_expression, c_parser_binary_expression)
7458 (c_parser_cast_expression, c_parser_unary_expression)
7459 (c_parser_postfix_expression)
7460 (c_parser_postfix_expression_after_primary, c_parser_expression):
7461 Use convert_lvalue_to_rvalue.
7462 (c_parser_expression_conv, c_parser_expr_list): Document
7463 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7464 (c_parser_objc_synchronized_statement): Use
7465 convert_lvalue_to_rvalue.
7466 (c_parser_objc_selector): Handle RID_ATOMIC.
7467 (c_parser_objc_receiver, c_parser_array_notation): Use
7468 convert_lvalue_to_rvalue.
7469 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7470 _Atomic (type-name).
7471 (struct c_declspecs): Add atomic_p field.
7472 (convert_lvalue_to_rvalue): Declare.
7473 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7474 corresponding atomic types.
7475 (qualify_type): Don't add _Atomic qualifiers from second argument.
7476 (comp_target_types): Do not allow _Atomic mismatches.
7477 (type_lists_compatible_p): Do not remove atomic qualifiers when
7478 comparing types.
7479 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7480 (build_atomic_assign): New functions.
7481 (build_unary_op): Use build_atomic_assign for atomic increment and
7482 decrement.
7483 (build_conditional_expr): Do not treat _Atomic void as a qualified
7484 version of void.
7485 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7486 (find_anonymous_field_with_type, convert_to_anonymous_field)
7487 (convert_for_assignment): Do not remove atomic qualifiers when
7488 comparing types.
7489 (digest_init): Do not accept initialization of arrays of atomic
7490 elements by string constants.
7491 (build_asm_expr): Use convert_lvalue_to_rvalue.
7492 (build_binary_op): Do not treat _Atomic void as a qualified
7493 version of void.
7494
0c249d4b
DD
74952013-11-06 DJ Delorie <dj@redhat.com>
7496
7497 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7498 both explicit and builtin, print the location of the explicit one.
7499
6d7f7e0a
TB
75002013-11-05 Tobias Burnus <burnus@net-b.de>
7501
7502 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7503 c_parser_omp_distribute, c_parser_omp_teams,
7504 c_parser_omp_target, c_parser_omp_declare): Handle
7505 -fopenmp-simd.
7506
b906f4ca
MP
75072013-11-03 Marek Polacek <polacek@redhat.com>
7508
7509 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7510
ee1d5a02
JJ
75112013-11-01 Jakub Jelinek <jakub@redhat.com>
7512
7513 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7514 check_dup_generic at the end, unless remove is true.
7515 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7516 remove = true;.
7517 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7518
5a9785fb
JJ
75192013-10-31 Jakub Jelinek <jakub@redhat.com>
7520
7521 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7522 with decl that is not pointer nor array.
7523
939b37da
BI
75242013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7525
7526 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7527 a spawning function is found.
7528 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7529 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7530 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7531 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7532 case.
7533 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7534 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7535 expr.
7536 (c_finish_return): Added a check to reject _Cilk_spawn in return
7537 expression.
7538 (build_cilk_spawn): New function.
7539 (build_cilk_sync): Likewise.
7540 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7541
d4af74d4
TB
75422013-10-27 Tobias Burnus <burnus@net-b.de>
7543
7544 PR other/33426
7545 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7546 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7547 (c_parser_statement_after_labels): Update calls.
7548
d73749df 75492013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7550
7551 PR other/33426
7552 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7553 Handle PRAGMA_IVDEP.
7554 (c_parser_statement_after_labels): Update call.
7555
f28aa681
MP
75562013-10-24 Marek Polacek <polacek@redhat.com>
7557
7558 * c-parser.c (c_parser_struct_declaration): Add a comment.
7559 (c_parser_declarator): Don't allow _Alignas here.
7560
0645c1a2
AM
75612013-10-17 Andrew MacLeod <amacleod@redhat.com>
7562
7563 * c-parser.c: Include omp-low.h.
7564 * c-typeck.c: Likewise.
7565
568a31f2
MP
75662013-10-17 Marek Polacek <polacek@redhat.com>
7567
7568 PR c/58267
7569 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7570 Document syntax of the array-declarator.
7571 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7572 are not permitted.
7573 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7574 (c_parser_struct_declaration): Likewise.
7575 (c_parser_declarator): Likewise.
7576 (c_parser_direct_declarator_inner): Likewise.
7577 (c_parser_parameter_declaration): Likewise.
7578 (c_parser_type_name): Likewise.
7579
acf0174b
JJ
75802013-10-11 Jakub Jelinek <jakub@redhat.com>
7581
7582 * c-lang.h (current_omp_declare_target_attribute): New extern
7583 decl.
7584 * c-parser.c: Include c-lang.h.
7585 (struct c_parser): Change tokens to c_token *.
7586 Add tokens_buf field. Change tokens_avail type to unsigned int.
7587 (c_parser_consume_token): If parser->tokens isn't
7588 &parser->tokens_buf[0], increment parser->tokens.
7589 (c_parser_consume_pragma): Likewise.
7590 (enum pragma_context): Add pragma_struct and pragma_param.
7591 (c_parser_external_declaration): Adjust
7592 c_parser_declaration_or_fndef caller.
7593 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7594 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7595 Adjust recursive call.
7596 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7597 of pragma_external.
7598 (c_parser_parameter_declaration): Use pragma_param instead of
7599 pragma_external.
7600 (c_parser_compound_statement_nostart, c_parser_label,
7601 c_parser_for_statement): Adjust
7602 c_parser_declaration_or_fndef callers.
7603 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7604 it through to c_parser_conditional_expression.
7605 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7606 pass it through to c_parser_binary_expression. Adjust recursive
7607 call.
7608 (c_parser_binary_expression): Remove prec argument, add
7609 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7610 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7611 binop matches it, use build2 instead of parser_build_binary_op.
7612 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7613 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7614 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7615 Handle pragma_struct and pragma_param the same as pragma_external.
7616 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7617 (c_parser_omp_variable_list): Parse array sections for
7618 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7619 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7620 (c_parser_omp_clause_reduction): Handle user defined reductions.
7621 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7622 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7623 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7624 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7625 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7626 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7627 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7628 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7629 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7630 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7631 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7632 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7633 (c_parser_omp_for_loop): Add CODE argument, pass it through
7634 to c_finish_omp_for. Change last argument to cclauses,
7635 and adjust uses to grab parallel clauses from the array of all
7636 the split clauses. Adjust c_parser_binary_expression,
7637 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7638 (omp_split_clauses): New function.
7639 (c_parser_omp_simd): New function.
7640 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7641 Allow the function to be called also when parsing combined constructs,
7642 and call c_parser_omp_simd when parsing for simd.
7643 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7644 #pragma omp section, require exactly one structured-block instead of
7645 sequence of statements.
7646 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7647 Allow the function to be called also when parsing combined constructs.
7648 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7649 Allow the function to be called also when parsing combined
7650 constructs.
7651 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7652 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7653 c_parser_omp_teams, c_parser_omp_target_data,
7654 c_parser_omp_target_update, c_parser_omp_target,
7655 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7656 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7657 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7658 (c_parser_omp_construct): Add p_name and mask vars. Handle
7659 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7660 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7661 and c_parser_omp_sections callers.
7662 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7663 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7664 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7665 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7666 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7667 OMP_CLAUSE_DEPEND.
7668 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7669 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7670 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7671 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7672 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7673 * c-typeck.c: Include tree-inline.h.
7674 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7675 handle_omp_array_sections_1, handle_omp_array_sections,
7676 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7677 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7678 user defined reductions.
7679 (c_tree_equal): New function.
7680 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7681 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7682 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7683 c_check_omp_declare_reduction_r): New prototypes.
7684 * c-decl.c (current_omp_declare_target_attribute): New variable.
7685 (c_decl_attributes): New function.
7686 (start_decl, start_function): Use it instead of decl_attributes.
7687 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7688 c_omp_reduction_decl, c_omp_reduction_lookup,
7689 c_check_omp_declare_reduction_r): New functions.
7690
0a6c2227
TT
76912013-09-25 Tom Tromey <tromey@redhat.com>
7692
7693 * Make-lang.in (c/gccspec.o): Remove.
7694 (CFLAGS-c/gccspec.o): New variable.
7695 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7696 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7697 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7698
f3bc55f0
TT
76992013-09-25 Tom Tromey <tromey@redhat.com>
7700
7701 * Make-lang.in (c/gccspec.o): Don't use subshell.
7702
a24d975c
MP
77032013-09-18 Marek Polacek <polacek@redhat.com>
7704
7705 PR sanitize/58443
7706 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7707 Remove unnecessary check.
7708
ce6923c5
MP
77092013-09-18 Marek Polacek <polacek@redhat.com>
7710
7711 PR sanitizer/58411
7712 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7713 no_sanitize_undefined attribute.
7714
a1e51df9
KT
77152013-09-13 Kai Tietz <ktietz@redhat.com>
7716
7717 PR target/57848
7718 * c-decl.c (c_builtin_function_ext_scope): Remove
7719 wrong assumption that it is never called on prexisting
7720 symbol.
7721
0af94e6f
JR
77222013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7723
7724 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7725
20059c8b
GDR
77262013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7727
7728 * c-objc-common.c (c_tree_printer): Tidy.
7729
de5a5fa1
MP
77302013-08-30 Marek Polacek <polacek@redhat.com>
7731
7732 * c-typeck.c (build_binary_op): Add division by zero and shift
7733 instrumentation.
7734
2531a1d9 77352013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7736 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7737
6e2bcc98 7738 PR c/35649
2531a1d9
JR
7739 * c-typeck.c (c_common_type): Prefer double_type_node over
7740 other REAL_TYPE types with the same precision.
7741 (convert_arguments): Likewise.
7742
025311c4
GDR
77432013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7744
7745 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7746 (c_initialize_diagnostics): Call a destructor for the early printer.
7747
da6ca2b5
GDR
77482013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7749
7750 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7751 printer initialization.
7752
318cda85 77532013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7754
318cda85
BI
7755 PR c/57490
7756 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7757 check for truth values.
7758 (expand_array_notation_exprs): Added truth values case. Removed an
7759 unwanted else. Added for-loop to walk through subtrees in default
7760 case.
7761
b066401f
GDR
77622013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7763
7764 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7765
fb48aadc
JM
77662013-07-23 Joseph Myers <joseph@codesourcery.com>
7767
7768 * c-parser.c (struct c_generic_association): Fix typo.
7769
433cc7b0
TT
77702013-07-23 Tom Tromey <tromey@redhat.com>
7771 Joseph Myers <joseph@codesourcery.com>
7772
7773 * c-parser.c (struct c_generic_association): New.
7774 (c_generic_association_d): New typedef.
7775 (c_parser_generic_selection): New function.
7776 (c_parser_postfix_expression): Handle RID_GENERIC.
7777
26d40c3d
JM
77782013-07-13 Jason Merrill <jason@redhat.com>
7779
7780 PR c++/57793
7781 * c-decl.c (finish_struct): Check for too-large class.
7782
ecdbd01a 77832013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7784
7785 PR c/57821
7786 * c-typeck.c (set_init_index): When folding, check for index overflow.
7787
1141ed3f
BI
77882013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7789
7790 * c-parser.c (c_parser_array_notation): Removed rejection of array
7791 notations in an array of function pointers.
7792
713b46fa
BI
77932013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7794
7795 * c-array-notation.c (make_triplet_val_inv): New function.
7796 (create_cmp_incr): Likewise.
7797 (create_array_refs): Likewise.
7798 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7799 Also modularized common parts between functions and called the function.
7800 (build_array_notation_expr): Likewise.
7801 (fix_conditional_array_notations_1): Likewise.
7802 (fix_array_notation_expr): Likewise.
7803 (fix_array_notation_call_expr): Likewise.
7804
92f20202
MP
78052013-06-18 Marek Polacek <polacek@redhat.com>
7806
7807 PR c/57630
7808 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7809
73a23b06
BI
78102013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7811
7812 * c-array-notation.c (build_array_notation_expr): Reject array notation
7813 mismatch between LHS and RHS even inside a call_expr. Also, removed
7814 a couple while statements that were dead code.
7815
00b8517d
BI
78162013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7817
7818 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7819 excessive precision expressions in function parameters. Also removed
7820 couple unwanted while statements.
7821
1509bdda
BI
78222013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7823
7824 * c-array-notation.c (expand_array_notation_exprs): Added
7825 ARRAY_NOTATION_REF case.
ab20d992 7826
d60f1706
BI
78272013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7828
7829 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7830 function to c-family/array-notation-common.c.
7831 (is_cilkplus_reduce_builtin): Likewise.
7832 (find_rank): Likewise.
7833 (extract_array_notation_exprs): Likewise.
7834 (replace_array_notations): Likewise.
7835 (find_inv_trees): Likewise.
7836 (replace_inv_trees): Likewise.
7837 (contains_array_notation_expr): Likewise.
7838 (find_correct_array_notation_type): Likewise.
7839 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7840 (struct inv_list): Moved this to c-family/array-notation-common.c.
7841 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7842
6d6efbb3
BI
78432013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7844
7845 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7846 reduction functions outside the for-loop. Added a check if the fundecl
7847 is non-NULL. Finally, removed an unwanted if-statement, and made the
7848 body unconditional.
7849
25c22937
BI
78502013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7851
7852 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7853 condition of the if-statement matches the rank of else-block and then-
7854 block when array notations are used.
7855 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7856 expression after the entire function body is parsed.
7857 (c_parser_expr_no_commas): Delayed creating array notation expressions
7858 to the end of function parsing.
7859 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7860 whole if-statement instead of just the condition.
ab20d992 7861 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7862
edd25645
BI
78632013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7864
7865 PR c/57474
7866 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7867 array to NULL_TREE if they are unused. Also added a check for the
7868 field to be NULL before its fields are used in future.
ab20d992 7869
065ce7f1
RO
78702013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7871
7872 PR bootstrap/57450
7873 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7874 (build_array_notation_expr): Likewise.
7875
36536d79
BI
78762013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7877
7878 * c-typeck.c (build_array_ref): Added a check to see if array's
7879 index is greater than one. If true, then emit an error.
7880 (build_function_call_vec): Exclude error reporting and checking
7881 for builtin array-notation functions.
7882 (convert_arguments): Likewise.
7883 (c_finish_return): Added a check for array notations as a return
7884 expression. If true, then emit an error.
7885 (c_finish_loop): Added a check for array notations in a loop
7886 condition. If true then emit an error.
7887 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7888 (build_binary_op): Added a check for array notation expr inside
7889 op1 and op0. If present, we call another function to find correct
7890 type.
7891 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7892 * c-parser.c (c_parser_compound_statement): Check if array
7893 notation code is used in tree, if so, then transform them into
7894 appropriate C code.
7895 (c_parser_expr_no_commas): Check if array notation is used in LHS
7896 or RHS, if so, then build array notation expression instead of
7897 regular modify.
7898 (c_parser_postfix_expression_after_primary): Added a check for
7899 colon(s) after square braces, if so then handle it like an array
7900 notation. Also, break up array notations in unary op if found.
7901 (c_parser_direct_declarator_inner): Added a check for array
7902 notation.
7903 (c_parser_compound_statement): Added a check for array notation in
7904 a stmt. If one is present, then expand array notation expr.
7905 (c_parser_if_statement): Likewise.
7906 (c_parser_switch_statement): Added a check for array notations in
7907 a switch statement's condition. If true, then output an error.
7908 (c_parser_while_statement): Similarly, but for a while.
7909 (c_parser_do_statement): Similarly, but for a do-while.
7910 (c_parser_for_statement): Similarly, but for a for-loop.
7911 (c_parser_unary_expression): Check if array notation is used in a
7912 pre-increment or pre-decrement expression. If true, then expand
7913 them.
7914 (c_parser_array_notation): New function.
7915 * c-array-notation.c: New file.
7916 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7917
cd192ccc
MS
79182013-05-23 Mike Stump <mikestump@comcast.net>
7919
7920 * c-typeck.c (convert_for_assignment): Handle references to memory
7921 spaces better.
7922
427b248d
JM
79232013-05-16 Jason Merrill <jason@redhat.com>
7924
7925 * Make-lang.in (cc1$(exeext)): Use link mutex.
7926
44d90fe1
PC
79272013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7928
7929 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7930 to simply use OPT_Wpointer_arith.
7931 (build_unary_op): Likewise.
7932
4e7d7b3d
JJ
79332013-04-03 Jakub Jelinek <jakub@redhat.com>
7934
7935 PR c/19449
7936 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7937 argument. If set, or it temporarily for parsing of the first
7938 argument into force_folding_builtin_constant_p.
7939 (c_parser_postfix_expression): Adjust callers.
7940
839b422f
RB
79412013-03-21 Richard Biener <rguenther@suse.de>
7942
7943 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7944 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7945
2ee028f1
MP
79462013-02-12 Marek Polacek <polacek@redhat.com>
7947
7948 PR c/44938
7949 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7950 origtypes to NULL.
7951
8824edff
JJ
79522013-01-24 Jakub Jelinek <jakub@redhat.com>
7953
7954 PR c/56078
7955 * c-typeck.c (set_nonincremental_init_from_string): If
7956 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7957 returned false.
7958 (process_init_element): Likewise.
7959
eadd3d0d
JJ
79602012-12-20 Jakub Jelinek <jakub@redhat.com>
7961
7962 PR c++/55619
7963 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7964 argument, don't call default_function_array_conversion
7965 nor c_fully_fold here.
7966 (c_parser_asm_statement): Adjust callers.
7967 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7968 and outputs here, and call default_function_array_conversion
7969 on inputs that don't need to be addressable.
7970
f8a93a2e
JJ
79712012-12-18 Jakub Jelinek <jakub@redhat.com>
7972
7973 PR c/39464
7974 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7975 warning require that both c_common_unsigned_type as well as
7976 c_common_signed_type is the same for both mvl and mvr types.
7977
9771b263
DN
79782012-11-16 Diego Novillo <dnovillo@google.com>
7979
7980 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7981
7982 * c-common.c: Use new vec API in vec.h.
7983 * c-common.h: Likewise.
7984 * c-gimplify.c: Likewise.
7985 * c-pragma.c: Likewise.
7986 * c-pretty-print.c: Likewise.
7987 * c-pretty-print.h: Likewise.
7988 * c-semantics.c: Likewise.
7989 * c-decl.c: Likewise.
7990 * c-parser.c: Likewise.
7991 * c-tree.h: Likewise.
7992 * c-typeck.c: Likewise.
7993
880661a4
JW
79942012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7995
7996 PR c++/54930
7997 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7998
077d1abe
MLI
79992012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8000
8001 PR c/53066
8002 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8003 shadows a function, unless the variable is a function or a
8004 pointer-to-function.
8005
3a785c97
JJ
80062012-10-12 Jakub Jelinek <jakub@redhat.com>
8007
8008 PR c/54381
8009 * c-parser.c (struct c_tree_loc_pair): Removed.
8010 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8011 add location_t * and tree * arguments, fill in array of 3
8012 sizeof_arg trees and corresponding locs.
8013 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8014 c_parser_expr_list callers.
8015 (c_parser_postfix_expression_after_primary): Likewise. Pass
8016 array of 3 sizeof_arg trees and locs (corresponding to first
8017 3 arguments) to sizeof_pointer_memaccess_warning.
8018
703c8606
LC
80192012-10-09 Lawrence Crowl <crowl@google.com>
8020
8021 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8022 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8023 hash table.
8024
5d9de0d0
PC
80252012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8026
8027 PR c++/54194
8028 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8029 call.
8030
a212e43f
MG
80312012-10-09 Marc Glisse <marc.glisse@inria.fr>
8032
8033 PR c++/54427
8034 * c-typeck.c: Include c-common.h.
8035 (enum stv_conv): Moved to c-common.h.
8036 (scalar_to_vector): Moved to c-common.c.
8037 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8038 * Make-lang.in: c-typeck.c depends on c-common.h.
8039
3b78de56
AC
80402012-10-04 Arnaud Charlet <charlet@adacore.com>
8041
8042 * c-decl.c (c_write_global_declarations): Fix handling of
8043 -fdump-ada-spec*.
8044
78c60e3d
SS
80452012-09-30 Sharad Singhai <singhai@google.com>
8046
8047 * c-decl.c (c_write_global_declarations): Use a different method
8048 to determine if the dump has ben initialized.
8049
9f33203d
JM
80502012-09-14 Joseph Myers <joseph@codesourcery.com>
8051
8052 PR c/54552
8053 * c-typeck.c (c_cast_expr): When casting to a type requiring
8054 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8055 c_fully_fold first.
8056
a27d595d
JM
80572012-09-14 Joseph Myers <joseph@codesourcery.com>
8058
8059 PR c/54103
8060 * c-typeck.c (build_unary_op): Pass original argument of
8061 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8062 any C_MAYBE_CONST_EXPR, if it has integer operands.
8063 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8064 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8065 to c_objc_common_truthvalue_conversion, then remove any
8066 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8067 c_objc_common_truthvalue_conversion not
8068 c_common_truthvalue_conversion.
8069 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8070 call note_integer_operands for arguments with integer operands
8071 that are not integer constants.
8072
9feb29df
JJ
80732012-09-13 Jakub Jelinek <jakub@redhat.com>
8074
8075 PR c/54559
8076 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8077 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8078
d409320c
JJ
80792012-08-31 Jakub Jelinek <jakub@redhat.com>
8080
8081 PR c/54428
8082 * c-convert.c (convert): Don't call fold_convert_loc if
8083 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8084 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8085 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8086
6265d07c
JJ
80872012-08-24 Jakub Jelinek <jakub@redhat.com>
8088
8089 PR c/54355
8090 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8091 for nested and empty_ok arguments in the call to
8092 c_parser_declaration_or_fndef.
8093
1a4049e7
JJ
80942012-08-17 Jakub Jelinek <jakub@redhat.com>
8095
8096 * c-tree.h (c_last_sizeof_arg): Declare.
8097 * c-parser.c (struct c_tree_loc_pair): New type.
8098 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8099 non-NULL.
8100 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8101 (c_parser_postfix_expression_after_primary): Likewise. Call
8102 sizeof_pointer_memaccess_warning if needed.
8103 (sizeof_ptr_memacc_comptypes): New function.
8104 * c-typeck.c (c_last_sizeof_arg): New global variable.
8105 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8106
0229aee9
UB
81072012-07-24 Uros Bizjak <ubizjak@gmail.com>
8108
8109 * c-lang.h (lang_decl): Add variable_size GTY option.
8110
7ee2468b
SB
81112012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8112
8113 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8114 * Make-lang.in: Fix dependencies.
8115
d4a10d0a
SB
81162012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8117
8118 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8119 and add language Makefile hooks.
8120 * config-lang.in: New file.
8121 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8122 add the required "normal" config-lang.in rules.
8123 * c-lang.h: Moved from gcc/ to here.
8124 * c-tree.h: Likewise.
8125 * c-objc-common.c: Likewise.
8126 * c-objc-common.h: Likewise.
8127 * c-typeck.c: Likewise.
8128 * c-convert.c: Likewise.
8129 * c-lang.c: Likewise.
8130 * c-aux-info.c: Likewise.
8131 * c-errors.c: Likewise.
8132 * gccspec.c: Likewise.
8133 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8134 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8135\f
c48514be 8136Copyright (C) 2012-2021 Free Software Foundation, Inc.
d4a10d0a
SB
8137
8138Copying and distribution of this file, with or without modification,
8139are permitted in any medium without royalty provided the copyright
8140notice and this notice are preserved.