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