]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
e11c6046
GA
12021-09-01 Iain Sandoe <iain@sandoe.co.uk>
2
3 * c-decl.c (enum deprecated_states): Add unavailable state.
4 (merge_decls): Copy unavailability.
5 (quals_from_declspecs): Handle unavailable case.
6 (start_decl): Amend the logic handling suppression of nested
7 deprecation states to include unavailability.
8 (smallest_type_quals_location): Amend comment.
9 (grokdeclarator): Handle the unavailable deprecation state.
10 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
11 * c-tree.h (struct c_declspecs): Add unavailable_p.
12 * c-typeck.c (build_component_ref): Handle unavailability.
13 (build_external_ref): Likewise.
14
152021-09-01 Roger Sayle <roger@nextmovesoftware.com>
16 Joseph Myers <joseph@codesourcery.com>
17
18 PR c/79412
19 * c-decl.c (duplicate_decls): On significant mismatches, mark the
20 types of both (non-function) decls as error_mark_node, so that the
21 middle-end can see the code is malformed.
22 (free_attr_access_data): Don't process if the type has been set to
23 error_mark_node.
24
6d51ee43
GA
252021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
26
27 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
28 and 'ancestor' in 'target device' clauses.
29
38b19c5b
GA
302021-08-23 Jakub Jelinek <jakub@redhat.com>
31
32 * c-parser.c (c_parser_omp_clause_num_tasks,
33 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
34
5b2876f9
GA
352021-08-22 Martin Uecker <muecker@gwdg.de>
36
37 PR c/98397
38 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
39 for pointers to arrays with qualifiers.
40 (build_conditional_expr): For C23 don't lose qualifiers for pointers
41 to arrays when the other pointer is a void pointer. Update warnings.
42 (convert_for_assignment): Update warnings for C2X when converting from
43 void* with qualifiers to a pointer to array with the same qualifiers.
44
7c9e1645
GA
452021-08-20 Jakub Jelinek <jakub@redhat.com>
46
47 * c-parser.c (c_parser_omp_error): New function.
48 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
49
502021-08-20 Jakub Jelinek <jakub@redhat.com>
51
52 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
53 comma at the end of list.
54 (c_parser_omp_requires): Likewise.
55
b57fba5e
GA
562021-08-19 Jakub Jelinek <jakub@redhat.com>
57
58 * c-parser.c (c_parser_omp_requires): Don't call
59 c_parser_peek_2nd_token and optionally consume token if current
60 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
61
6e529985
GA
622021-08-18 Jakub Jelinek <jakub@redhat.com>
63
64 * c-parser.c (c_parser_omp_nothing): New function.
65 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
66
672021-08-18 Jakub Jelinek <jakub@redhat.com>
68
69 * c-parser.c (c_parser_statement_after_labels): Add restart label
70 near the start of the function. If c_parser_pragma returns false,
71 goto restart.
72 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
73 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
74 return what c_parser_omp_declare returned. Return true instead of
75 false after emitting errors that the directive is not allowed in
76 pragma_stmt context.
77 (c_parser_omp_ordered): Return true instead of
78 false after emitting errors that the directive is not allowed in
79 pragma_stmt context.
80 (c_parser_omp_target_update): Likewise.
81 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
82 Change return type from tree to bool, return false if the
83 directive should be ignored in pragma_stmt contexts.
84 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
85 return their result directly.
86 (c_parser_omp_cancellation_point): Change return type from void to
87 bool, return false if the directive should be ignored in pragma_stmt
88 contexts.
89 (c_parser_omp_declare): Likewise.
90
2d14d64b
GA
912021-08-17 Jakub Jelinek <jakub@redhat.com>
92
93 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
94 (c_parser_omp_scope): New function.
95 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
96
72be20e2
GA
972021-08-12 Jakub Jelinek <jakub@redhat.com>
98
99 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
100 (c_parser_omp_clause_filter): New function.
101 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
102 (OMP_MASKED_CLAUSE_MASK): Define.
103 (c_parser_omp_masked): New function.
104 (c_parser_omp_parallel): Handle parallel masked.
105 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
106 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
107
1082021-08-12 Martin Uecker <muecker@gwdg.de>
109
110 PR c/101838
111 PR c/29970
112 * c-typeck.c (c_expr_sizeof_type): Evaluate
113 size expressions for structs of variable size.
114
1152021-08-12 Tobias Burnus <tobias@codesourcery.com>
116
117 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
118 'primary' as alias for 'master'.
119
3ae564ea
GA
1202021-08-10 Martin Uecker <muecker@gwdg.de>
121
122 PR c/29970
123 * c-typeck.c (c_expr_sizeof_expr): Evaluate
124 size expressions for structs of variable size.
125
f92f4778
GA
1262021-08-06 Tamar Christina <tamar.christina@arm.com>
127
128 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
129 * c-tree.h (c_simulate_enum_decl): Likewise.
130
1312021-08-06 Martin Sebor <msebor@redhat.com>
132
133 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
134 vec arguments to by-reference.
135 (c_finish_omp_declare_simd): Same.
136 (c_parser_compound_statement_nostart): Same.
137 (c_parser_for_statement): Same.
138 (c_parser_objc_methodprotolist): Same.
139 (c_parser_oacc_routine): Same.
140 (c_parser_omp_for_loop): Same.
141 (c_parser_omp_declare_simd): Same.
142
419c6c68
GA
1432021-07-21 Thomas Schwinge <thomas@codesourcery.com>
144 Joseph Myers <joseph@codesourcery.com>
145 Cesar Philippidis <cesar@codesourcery.com>
146
147 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
148 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
149 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
150 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
151
92d45509
GA
1522021-07-20 Martin Sebor <msebor@redhat.com>
153
154 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
155 by-const-reference.
156 * c-typeck.c (c_build_function_call_vec): Same.
157
d97d71a1
GA
1582021-07-15 Martin Sebor <msebor@redhat.com>
159
160 PR c/101289
161 PR c/97548
162 * c-decl.c (get_parm_array_spec): Strip nops.
163
6fba0eea
GA
1642021-07-06 Martin Sebor <msebor@redhat.com>
165
166 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
167
7a60a6e8
GA
1682021-07-02 Jakub Jelinek <jakub@redhat.com>
169
170 PR c/101297
171 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
172 appears before a CPP_NAME.
173
90708f87
GA
1742021-06-25 Martin Sebor <msebor@redhat.com>
175
176 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
177 warning_suppressed_p, suppress_warning, and copy_no_warning.
178 (diagnose_mismatched_decls): Same.
179 (duplicate_decls): Same.
180 (grokdeclarator): Same.
181 (finish_function): Same.
182 (c_write_global_declarations_1): Same.
183 * c-fold.c (c_fully_fold_internal): Same.
184 * c-parser.c (c_parser_expr_no_commas): Same.
185 (c_parser_postfix_expression): Same.
186 * c-typeck.c (array_to_pointer_conversion): Same.
187 (function_to_pointer_conversion): Same.
188 (default_function_array_conversion): Same.
189 (convert_lvalue_to_rvalue): Same.
190 (default_conversion): Same.
191 (build_indirect_ref): Same.
192 (build_function_call_vec): Same.
193 (build_atomic_assign): Same.
194 (build_unary_op): Same.
195 (c_finish_return): Same.
196 (emit_side_effect_warnings): Same.
197 (c_finish_stmt_expr): Same.
198 (c_omp_clause_copy_ctor): Same.
199
9aa8327e
GA
2002021-06-24 Jakub Jelinek <jakub@redhat.com>
201
202 PR c/101176
203 * c-parser.c (c_parser_has_attribute_expression): Set source range for
204 the result.
205
2062021-06-24 Jakub Jelinek <jakub@redhat.com>
207
208 PR c/101171
209 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
210 error_mark_node.
211
2122021-06-24 Jakub Jelinek <jakub@redhat.com>
213
214 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
215 C_ORT_OMP for clauses on target construct.
216 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
217 (c_parser_omp_target): For non-combined target add
218 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
219 C_ORT_OMP_TARGET to c_finish_omp_clauses.
220 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
221 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
222 never present on C_ORT_*DECLARE_SIMD.
223 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
224 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
225 corresponding map clauses.
226
2f080224
GA
2272021-06-21 Jakub Jelinek <jakub@redhat.com>
228
229 PR inline-asm/100785
230 * c-typeck.c (c_mark_addressable): Diagnose trying to make
231 bit-fields addressable.
232
ede6c356
GA
2332021-06-15 Robin Dapp <rdapp@linux.ibm.com>
234
235 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
236 similar.
237
8dc48181
GA
2382021-06-14 Tobias Burnus <tobias@codesourcery.com>
239
240 PR c/100913
241 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
242 var in the error case.
243
438aac59
GA
2442021-06-07 Eric Botcazou <ebotcazou@adacore.com>
245
246 PR c/100920
247 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
248 spot built-in functions.
249
7d6987e9
GA
2502021-06-06 Jakub Jelinek <jakub@redhat.com>
251
252 PR c/100902
253 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
254 even when target is combined with other constructs.
255
2562021-06-06 Eric Botcazou <ebotcazou@adacore.com>
257
258 PR c/100920
259 * c-decl.c (finish_struct): Fix thinko in previous change.
260 * c-typeck.c (convert_for_assignment): Do not warn on pointer
261 assignment and initialization for storage order purposes if the
262 RHS is a call to a DECL_IS_MALLOC function.
263
600f90cb
GA
2642021-06-04 Martin Sebor <msebor@redhat.com>
265
266 PR c/100783
267 * c-objc-common.c (print_type): Handle erroneous types.
268
440c8a0a
GA
2692021-06-03 Jakub Jelinek <jakub@redhat.com>
270
271 PR c++/100859
272 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
273 after depend only cases.
274
ee682192
GA
2752021-05-31 Richard Biener <rguenther@suse.de>
276
277 PR c++/88601
278 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
279 * c-parser.c (c_parser_postfix_expression): Likewise.
280
48166757
GA
2812021-05-28 Richard Biener <rguenther@suse.de>
282
283 PR c/100803
284 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
285 invalid if conditions.
286
2872021-05-28 Jakub Jelinek <jakub@redhat.com>
288
289 PR middle-end/99928
290 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
291 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
292 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
293 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
294 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
295 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
296 if present in map_head, map_field_head or map_firstprivate_head
297 bitmaps.
298
2992021-05-28 Tobias Burnus <tobias@codesourcery.com>
300
301 * c-parser.c (c_parser_omp_clause_affinity): New.
302 (c_parser_omp_clause_name, c_parser_omp_variable_list,
303 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
304 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
305 c_finish_omp_clauses): Likewise.
306
01c59ef2
GA
3072021-05-26 Eric Botcazou <ebotcazou@adacore.com>
308
309 PR c/100653
310 * c-decl.c (finish_struct): Warn for a union containing an aggregate
311 field with a differing scalar storage order.
312
2832d51b
GA
3132021-05-21 Jakub Jelinek <jakub@redhat.com>
314
315 PR middle-end/99928
316 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
317 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
318 if a decl is mentioned both in map clause and in such firstprivate
319 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
320
65f32e5d
GA
3212021-05-19 Jakub Jelinek <jakub@redhat.com>
322
323 PR middle-end/99928
324 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
325 master when combined with taskloop.
326 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
327 parallel master when not combined with taskloop.
328
a8daf9a1
GA
3292021-05-18 Richard Biener <rguenther@suse.de>
330
331 PR c/100522
332 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
333 Diagnose calls to non-functions.
334 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
335
a7ffc1ef
GA
3362021-05-17 Richard Biener <rguenther@suse.de>
337
338 PR c/100625
339 * gimple-parser.c (c_parser_gimple_label): Avoid building
340 a GIMPLE label with NULL label decl.
341
f9af11c7
GA
3422021-05-13 Martin Sebor <msebor@redhat.com>
343
344 PR c/100550
345 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
346
0ff3a0f2
GA
3472021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
348
349 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
350 'close'.
351
aa891c56
GA
3522021-05-10 Martin Liska <mliska@suse.cz>
353
354 * c-aux-info.c (affix_data_type): Use startswith
355 function instead of strncmp.
356 * c-typeck.c (build_function_call_vec): Likewise.
357 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
358
62d87a32
GA
3592021-05-07 Eric Botcazou <ebotcazou@adacore.com>
360
361 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
362 on the address of a pointer field in a record with reverse SSO.
363
99e8df7a
GA
3642021-05-04 Tobias Burnus <tobias@codesourcery.com>
365
366 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
367 for || and && reductions.
368
3c8e539d
GA
3692021-04-29 Joseph Myers <joseph@codesourcery.com>
370
371 * c-typeck.c (function_types_compatible_p): For C2X, treat
372 unprototyped function as compatible with non-variadic prototyped
373 function even if some argument types are changed by the default
374 argument promotions.
375
ee351f7f
GA
3762021-04-15 Martin Sebor <msebor@redhat.com>
377
378 PR c/99420
379 PR c/99972
380 * c-decl.c (pushdecl): Always propagate type attribute.
381
3822021-04-15 Richard Sandiford <richard.sandiford@arm.com>
383
384 PR c/98852
385 * c-typeck.c (c_common_type): Do not drop attributes that
386 affect type identity.
387
1d54b138
GA
3882021-04-10 Jakub Jelinek <jakub@redhat.com>
389
390 PR c/99990
391 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
392 error_mark_node.
393
4493b1c1
GA
3942021-03-25 Jakub Jelinek <jakub@redhat.com>
395
396 PR c++/99565
397 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
398 to operand_equal_p.
399
5f256a70
GA
4002021-03-19 Jakub Jelinek <jakub@redhat.com>
401
402 PR c/99588
403 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
404 with modifycode NOP_EXPR produces and mark the _Atomic var as read
405 if found.
406 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
407 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
408 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
409
3c5b6d24
GA
4102021-03-15 Tobias Burnus <tobias@codesourcery.com>
411
412 PR c++/99509
413 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
414 ensure that the varpool node is marked as offloadable.
415
ceae9533
GA
4162021-03-05 Tobias Burnus <tobias@codesourcery.com>
417
418 PR c/99137
419 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
420
4028d01a
GA
4212021-02-24 Martin Sebor <msebor@redhat.com>
422
423 PR middle-end/97172
424 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
425
bf81237e
GA
4262021-02-18 Jakub Jelinek <jakub@redhat.com>
427
428 PR c/99136
429 * c-typeck.c (c_finish_return): Don't wrap retval into
430 EXCESS_PRECISION_EXPR in functions that return void.
431
0c5cdb31
GA
4322021-02-11 Marek Polacek <polacek@redhat.com>
433
434 * c-parser.c (c_parser_if_statement): Use vec_free.
435
a19dd5e6
GA
4362021-02-04 Martin Sebor <msebor@redhat.com>
437
438 PR c/97882
439 * c-decl.c (locate_old_decl): Add type to diagnostic output.
440 (diagnose_mismatched_decls): Same.
441 (start_function): Introduce temporaries for better readability.
442 * c-typeck.c (comptypes_internal): Only consider complete enum
443 types in comparisons with integers.
444
f7884fb1
GA
4452021-02-01 Martin Sebor <msebor@redhat.com>
446
447 PR middle-end/97172
448 * c-decl.c (free_attr_access_data): New function.
449 (c_parse_final_cleanups): Call free_attr_access_data.
450
59cf67d1
GA
4512021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
452
453 * c-parser.c (c_parser_omp_clause_detach): New.
454 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
455 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
456 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
457 clause. Prevent use of detach with mergeable and overriding the
458 data sharing mode of the event handle.
459
2f7f0d32
GA
4602021-01-15 Jakub Jelinek <jakub@redhat.com>
461
462 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
463 unqualified element type and then call c_build_qualified_type on the
464 ARRAY_TYPE.
465
7d187e4f
GA
4662021-01-07 Richard Biener <rguenther@suse.de>
467
468 * gimple-parser.c (c_parser_gimple_compound_statement): Only
469 reallocate loop array if it is too small.
470
eefe499f
GA
4712020-12-16 Martin Uecker <muecker@gwdg.de>
472
473 PR c/98047
474 * c-typeck.c (build_modify_expr): Drop qualifiers.
475
4762020-12-16 Martin Uecker <muecker@gwdg.de>
477
478 PR c/98260
479 * c-parser.c (c_parser_expression): Look into
480 nop expression when marking expressions as read.
481
d52945ce
GA
4822020-12-14 Martin Liska <mliska@suse.cz>
483
484 PR sanitizer/98204
485 * c-typeck.c (pointer_diff): Do not emit a top-level
486 sanitization.
487 (build_binary_op): Likewise.
488
ca2bd949
GA
4892020-12-09 Tobias Burnus <tobias@codesourcery.com>
490
491 * c-parser.c (c_parser_omp_allocate): New.
492 (c_parser_omp_construct): Call it.
493
4942020-12-09 Richard Biener <rguenther@suse.de>
495
496 PR c/98200
497 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
498 early on error.
499
bc8a7013
GA
5002020-12-07 Martin Uecker <muecker@gwdg.de>
501
502 PR c/97981
503 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
504 that drops qualifiers to the end of the function.
505
d48df6f2
GA
5062020-11-26 Martin Uecker <muecker@gwdg.de>
507
508 PR c/65455
509 PR c/92935
510 * c-parser.c (c_parser_declaration_or_fndef): Remove
511 redundant code to drop qualifiers of _Atomic types for __auto_type.
512 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
513 types for __typeof__.
514
1e2c9a27
GA
5152020-11-24 Jakub Jelinek <jakub@redhat.com>
516
517 PR c/97958
518 * c-parser.c (c_parser_binary_expression): For omp atomic binary
519 expressions, use make_node instead of build2 to avoid checking build2
520 performs.
521
8e6198d0
GA
5222020-11-23 Joseph Myers <joseph@codesourcery.com>
523
524 PR c/95630
525 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
526 for comparisons of complete and incomplete pointers.
527
7a97e2fc
GA
5282020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
529
530 * c-aux-info.c (gen_type): Support opaque types.
531
82e5048e
GA
5322020-11-20 Martin Sebor <msebor@redhat.com>
533
534 PR middle-end/97879
535 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
536
5372020-11-20 Jakub Jelinek <jakub@redhat.com>
538
539 PR other/97911
540 * Make-lang.in (c.serial): Change from goal to a variable.
541 (.PHONY): Drop c.serial.
542
5432020-11-20 Martin Uecker <muecker@gwdg.de>
544
545 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
546
d62586ee
GA
5472020-11-19 Jakub Jelinek <jakub@redhat.com>
548
549 PR c/97860
550 * c-decl.c (get_parm_array_spec): Bail out of nelts is
551 error_operand_p.
552
25bb75f8
GA
5532020-11-18 Jakub Jelinek <jakub@redhat.com>
554
555 * Make-lang.in (c.serial): New goal.
556 (.PHONY): Add c.serial c.prev.
557 (cc1$(exeext)): Call LINK_PROGRESS.
558
77f67db2
GA
5592020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
560
561 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
562 goto too.
563 * c-typeck.c (build_asm_expr): Remove an assert checking output
564 absence for asm goto.
565
5662020-11-13 Jakub Jelinek <jakub@redhat.com>
567
568 * c-typeck.c (c_finish_omp_clauses): Don't clear
569 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
570
5712020-11-13 Iain Sandoe <iain@sandoe.co.uk>
572
573 PR objc/77404
574 * c-parser.c (c_parser_objc_class_definition): Pass the
575 location of the class name to the interface declaration.
576
bb622641
GA
5772020-11-10 Strager Neds <strager.nds@gmail.com>
578
579 * c-decl.c (merge_decls): Use new overload of
580 set_decl_section_name.
581
5822020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
583
584 * c-parser.c (c_parser_omp_target_data): Add use of
585 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
586 handled map clause kind.
587 (c_parser_omp_target_enter_data): Likewise.
588 (c_parser_omp_target_exit_data): Likewise.
589 (c_parser_omp_target): Likewise.
590 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
591 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
592 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
593 same struct field access to co-exist on OpenMP construct.
594
2da7ee05
GA
5952020-11-07 Martin Uecker <muecker@gwdg.de>
596
597 * c-parser.c (c_parser_label): Implement mixing of labels and code.
598 (c_parser_all_labels): Likewise.
599
44cab2d8
GA
6002020-11-06 Iain Sandoe <iain@sandoe.co.uk>
601
602 * c-parser.c (c_parser_objc_at_property_declaration):
603 Improve parsing fidelity. Associate better location info
604 with @property attributes. Clean up the interface to
605 objc_add_property_declaration ().
606
6072020-11-06 Nathan Sidwell <nathan@acm.org>
608
609 * c-decl.c (diagnose_mismatched_decls): Rename
610 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
611 (warn_if_shadowing, implicitly_declare, names_builtin_p)
612 (collect_source_refs): Likewise.
613 * c-typeck.c (inform_declaration, inform_for_arg)
614 (convert_for_assignment): Likewise.
615
6162020-11-06 Tobias Burnus <tobias@codesourcery.com>
617
618 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
619 OpenACC matching.
620 (c_parser_omp_construct): Update call.
621
35c125cb
GA
6222020-11-04 Jakub Jelinek <jakub@redhat.com>
623
624 PR c++/97670
625 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
626 find underlying decl to clear in the aligned_head bitmap.
627
6282020-11-04 Joseph Myers <joseph@codesourcery.com>
629
630 * c-decl.c (handle_nodiscard_attribute): New.
631 (std_attribute_table): Add nodiscard.
632 * c-parser.c (c_parser_std_attribute): Expect argument to
633 nodiscard attribute to be a string. Do not special-case ignoring
634 nodiscard.
635 * c-typeck.c (maybe_warn_nodiscard): New.
636 (build_compound_expr, emit_side_effect_warnings): Call
637 maybe_warn_nodiscard.
638 (c_process_expr_stmt, c_finish_stmt_expr): Also call
639 emit_side_effect_warnings if warn_unused_result.
640
4f0606fe
GA
6412020-10-29 Asher Gordon <AsDaGo@posteo.net>
642
643 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
644 with XDELETE.
645 (finish_init): Likewise.
646 (pop_init_level): Likewise.
647
e93aae4a
GA
6482020-10-28 Joseph Myers <joseph@codesourcery.com>
649
650 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
651 error_at for omitted parameter name.
652
6532020-10-28 Jakub Jelinek <jakub@redhat.com>
654
655 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
656 (c_parser_omp_clause_allocate): New function.
657 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
658 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
659 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
660 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
661 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
662 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
663 PRAGMA_OMP_CLAUSE_ALLOCATE.
664 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
665
89bb01e7
GA
6662020-10-27 Joseph Myers <joseph@codesourcery.com>
667
668 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
669 standard attributes.
670
efe71fcc
GA
6712020-10-23 Marek Polacek <polacek@redhat.com>
672
673 PR c++/91741
674 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
675 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
676 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
677 * c-tree.h (char_type_p): Declare.
678 * c-typeck.c (char_type_p): No longer static.
679
6802020-10-23 Martin Sebor <msebor@redhat.com>
681
682 PR middle-end/97552
683 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
684
2fe5b7d1
GA
6852020-09-19 Martin Sebor <msebor@redhat.com>
686
687 PR c/50584
688 * c-decl.c (lookup_last_decl): Define new function.
689 (c_decl_attributes): Call it.
690 (start_decl): Add argument and use it.
691 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
692 (get_parm_array_spec): Define new function.
693 (push_parm_decl): Call get_parm_array_spec.
694 (start_function): Call warn_parm_array_mismatch. Build attribute
695 access and add it to current function.
696 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
697 in forms of array parameters.
698 * c-tree.h (start_decl): Add argument.
699
7002020-09-19 Sandra Loosemore <sandra@codesourcery.com>
701
702 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
703 with...
704 (in_statement): New.
705 (start_function): Adjust for above change.
706 (c_push_function_context, c_pop_function_context): Likewise.
707 * c-lang.h (struct language_function): Likewise.
708 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
709 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
710 New.
711 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
712 (c_parser_switch_statement): Adjust break/switch context handling
713 and calls to renamed functions.
714 (c_parser_while_statement): Adjust break/switch context handling and
715 build a WHILE_STMT.
716 (c_parser_do_statement): Ditto, with DO_STMT respectively.
717 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
718 (c_parser_omp_for_loop): Adjust break/switch context handling.
719 * c-tree.h (c_break_label, c_cont_label): Delete.
720 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
721 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
722 (in_statement, switch_statement_break_seen_p): Declare.
723 (c_start_case, c_finish_case): Renamed to...
724 (c_start_switch, c_finish_switch).
725 (c_finish_bc_stmt): Adjust arguments.
726 * c-typeck.c (build_function_call_vec): Don't try to print
727 statements with %qE format.
728 (struct c_switch): Rename switch_expr field to switch_stmt.
729 Add break_stmt_seen_p field.
730 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
731 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
732 (do_case): Update for changes to struct c_switch.
733 (c_finish_case): Rename to c_finish_switch. Update for changes to
734 struct c_switch and change of representation from SWITCH_EXPR to
735 SWITCH_STMT.
736 (c_finish_loop): Delete.
737 (c_finish_bc_stmt): Update to reflect changes to break/continue
738 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
739 of a GOTO_EXPR except for objc foreach loops.
740
e1a4a8a0
GA
7412020-09-01 Jakub Jelinek <jakub@redhat.com>
742
743 PR c++/96867
744 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
745 only on PARM_DECLs.
746
8f7ea26a
GA
7472020-08-28 Martin Sebor <msebor@redhat.com>
748
749 PR c/96596
750 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
751 argument type.
752
8b394f01
GA
7532020-08-27 Martin Liska <mliska@suse.cz>
754
755 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
756 growth function to true.
757
db0f6efe
GA
7582020-08-25 Tobias Burnus <tobias@codesourcery.com>
759
760 PR c/96678
761 * c-typeck.c (handle_omp_array_sections_1): Talk about
762 array function parameter in the error message.
763
5c265693
GA
7642020-08-18 Jakub Jelinek <jakub@redhat.com>
765
766 PR c/96571
767 * c-parser.c (c_parser_generic_selection): Change match_found from bool
768 to int, holding index of the match. Call mark_exp_read on the selector
769 expression and on expressions other than the selected one.
770
4967ca2f
GA
7712020-08-01 Richard Sandiford <richard.sandiford@arm.com>
772
773 PR c/96377
774 * c-typeck.c (process_init_element): Split test for whether to
775 recurse into a record, union or array into...
776 (initialize_elementwise_p): ...this new function. Don't recurse
777 into a vector type if the initialization value is also a vector.
778
48cc2e46
GA
7792020-07-31 Richard Biener <rguenther@suse.de>
780
781 PR debug/96383
782 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
783 Define to c_common_finalize_early_debug.
784
3ea9abca
GA
7852020-07-22 Tobias Burnus <tobias@codesourcery.com>
786
787 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
788 (c_parser_omp_critical): Permit hint(0) clause without named critical.
789 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
790
30430061
GA
7912020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
792
793 PR target/95237
794 * c-decl.c (finish_decl): Call target hook
795 lower_local_decl_alignment to lower local decl alignment.
796
3f8ca9cb
GA
7972020-07-09 Julian Brown <julian@codesourcery.com>
798 Thomas Schwinge <thomas@codesourcery.com>
799
800 PR middle-end/95270
801 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
802 for standalone attach/detach clauses.
803
a82c4c4c 8042020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
805
806 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
807 set, warn for conversion between pointers that point to incompatible
808 scalar storage orders.
809
f60ee68d
GA
8102020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
811
812 * c-parser.c (c_parser_statement_after_labels): Pass correct
813 parameters to c_parser_do_statement.
814
56638b9b
GA
8152020-06-16 Jakub Jelinek <jakub@redhat.com>
816
817 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
818 c_in_omp_for.
819 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
820 premature c_fully_fold. Defer explicit c_fully_fold calls to after
821 c_finish_omp_for.
822 * c-tree.h (c_in_omp_for): Declare.
823 * c-typeck.c (c_in_omp_for): Define.
824 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
825 (digest_init): Likewise.
826 (build_binary_op): Likewise.
827
8282020-06-16 Jakub Jelinek <jakub@redhat.com>
829
830 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
831 from kind by comma rather than colon.
832
1a59f3db
GA
8332020-06-05 Mark Wielaard <mark@klomp.org>
834
835 * c-decl.c (implicit_decl_warning): When warned and olddecl is
836 an undeclared builtin, then add a fixit header hint, if found.
837 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
838 warning_at about implicit builtin declaration type mismatch.
839
9a5b7438
GA
8402020-06-03 Mark Wielaard <mark@klomp.org>
841
842 * c-parser.c (struct c_parser): Add seen_string_literal
843 bitfield.
844 (c_parser_consume_token): Reset seen_string_literal.
845 (c_parser_error_richloc): Add name_hint if seen_string_literal
846 and next token is a CPP_NAME and we have a missing header
847 suggestion for the name.
848 (c_parser_string_literal): Set seen_string_literal.
849
8502020-06-03 Mark Wielaard <mark@klomp.org>
851
852 * c-parser.c (c_parser_postfix_expression_after_primary): Add
853 scope with matching_parens after CPP_OPEN_PAREN.
854
8552020-06-03 Tobias Burnus <tobias@codesourcery.com>
856
857 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
858
53ffb43a
GA
8592020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
860
861 * Make-lang.in: Remove extra slash.
862
8f66f175
ML
8632020-05-19 Martin Liska <mliska@suse.cz>
864
865 * c-parser.c: Fix typo.
866
49ddde69
JJ
8672020-05-14 Jakub Jelinek <jakub@redhat.com>
868
869 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
870
eb72dc66
RB
8712020-05-07 Richard Biener <rguenther@suse.de>
872
873 PR middle-end/94703
874 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
875 DECL_GIMPLE_REG_P.
876
bf915591
JJ
8772020-04-30 Jakub Jelinek <jakub@redhat.com>
878
879 PR c/94842
880 * c-decl.c (set_labels_context_r): In addition to context-less
881 LABEL_DECLs adjust also LABEL_DECLs with context equal to
882 parent function if any.
883 (store_parm_decls): Adjust comment.
884
e1113ffb
JJ
8852020-04-19 Jakub Jelinek <jakub@redhat.com>
886
887 PR objc/94637
888 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
889 two CPP_COLON tokens.
890
2e389749
JJ
8912020-04-17 Jakub Jelinek <jakub@redhat.com>
892
893 PR other/94629
894 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
895 to data.clauses.
896
2dc9294c
JJ
8972020-04-15 Jakub Jelinek <jakub@redhat.com>
898
899 PR c/94593
900 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
901 requires directive when not at file scope.
902
13e41d8b
TB
9032020-04-08 Tobias Burnus <tobias@codesourcery.com>
904
905 PR middle-end/94120
906 * c-decl.c (c_check_in_current_scope): New function.
907 * c-tree.h (c_check_in_current_scope): Declare it.
908 * c-parser.c (c_parser_oacc_declare): Add check that variables
909 are declared in the same scope as the directive. Fix handling
910 of namespace vars.
911
4df50a05
JJ
9122020-04-07 Jakub Jelinek <jakub@redhat.com>
913
914 PR c++/94512
915 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
916 if c_parser_omp_master succeeded.
917
5db9e893
JJ
9182020-03-23 Jakub Jelinek <jakub@redhat.com>
919
920 PR gcov-profile/94029
921 PR c/94239
922 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
923 the function_start_locus location. Don't do that afterwards for the
924 __GIMPLE body parsing.
925
9def91e9
JJ
9262020-03-19 Jakub Jelinek <jakub@redhat.com>
927
928 PR gcov-profile/94029
929 * c-tree.h (finish_function): Add location_t argument defaulted to
930 input_location.
931 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
932 set it to the locus of closing } if non-NULL.
933 (c_parser_compound_statement_nostart): Return locus of closing }.
934 (c_parser_parse_rtl_body): Likewise.
935 (c_parser_declaration_or_fndef): Propagate locus of closing } to
936 finish_function.
937 * c-decl.c (finish_function): Add end_loc argument, use it instead of
938 input_location to set function_end_locus.
939
046c5890
JJ
9402020-03-17 Jakub Jelinek <jakub@redhat.com>
941
942 PR c/94172
943 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
944 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
945 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
946 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
947 ENUMERAL_TYPEs.
948 (finish_incomplete_vars): New function, moved from finish_struct. Use
949 relayout_decl instead of layout_decl.
950 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
951 being TYPE_VFIELD. Use finish_incomplete_vars.
952 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
953 finish_incomplete_vars.
954 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
955 also on ENUMERAL_TYPEs.
956
c015ff8c
JJ
9572020-03-16 Jakub Jelinek <jakub@redhat.com>
958
959 PR c/94179
960 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
961
f2e9fe5f
MS
9622020-03-13 Martin Sebor <msebor@redhat.com>
963
964 PR c/94040
965 * c-decl.c (builtin_structptr_type_count): New constant.
966 (match_builtin_function_types): Reject decls that are incompatible
967 in types pointed to by pointers.
968 (diagnose_mismatched_decls): Adjust comments.
969
c9d70946
JM
9702020-03-05 Joseph Myers <joseph@codesourcery.com>
971
972 PR c/93577
973 * c-typeck.c (pop_init_level): Do not diagnose initializers as
974 empty when initialized type is error_mark_node.
975 (set_designator, process_init_element): Ignore initializers for
976 elements of a variable-size type or of error_mark_node.
977
726e292d
MS
9782020-03-01 Martin Sebor <msebor@redhat.com>
979
980 PR middle-end/93926
981 * c-decl.c (types_close_enough_to_match): New function.
982 (match_builtin_function_types):
983 (diagnose_mismatched_decls): Add missing inform call to a warning.
984
a499c2f8
MS
9852020-03-01 Martin Sebor <msebor@redhat.com>
986
987 PR c/93812
988 * c-typeck.c (build_functype_attribute_variant): New function.
989 (composite_type): Call it.
990
9c3da8cc
JJ
9912020-02-25 Jakub Jelinek <jakub@redhat.com>
992
993 PR other/93912
994 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
995 Rename last argument from probablity to probability.
996
bacdd5e9
JJ
9972020-02-13 Jakub Jelinek <jakub@redhat.com>
998
999 PR c/93576
1000 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1001 *expr if it has side effects.
1002
f9eb0973
JL
10032020-01-30 Jeff Law <law@redhat.com>
1004
1005 PR c/88660
1006 * c-parser.c (c_parser_switch_statement): Make sure to request
1007 marking the switch expr as used.
1008
ac68e287
JM
10092020-01-22 Joseph Myers <joseph@codesourcery.com>
1010
1011 PR c/93348
1012 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1013 argument with integer operands.
1014
852f0ae8
KK
10152020-01-16 Kerem Kat <keremkat@gmail.com>
1016
1017 PR c/92833
1018 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1019 to support 4 available tokens.
1020
e2346a33
JM
10212020-01-15 Joseph Myers <joseph@codesourcery.com>
1022
1023 PR c/93072
1024 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1025 determine whether to set DECL_CONTEXT.
1026
3d77686d
JM
10272020-01-13 Joseph Myers <joseph@codesourcery.com>
1028
1029 PR c/93241
1030 * c-typeck.c (build_c_cast): Check for expressions with integer
1031 operands that can occur in an unevaluated part of an integer
1032 constant expression and call note_integer_operands as needed.
1033
f74c4b2c
RB
10342019-01-08 Richard Biener <rguenther@suse.de>
1035
1036 PR middle-end/93199
1037 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1038 permanently.
1039
8d9254fc
JJ
10402020-01-01 Jakub Jelinek <jakub@redhat.com>
1041
1042 Update copyright years.
1043
39292e25
EB
10442019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1045
1046 * c-decl.c (collect_source_ref_cb): Delete.
1047 (for_each_global_decl): Rename into...
1048 (collect_source_refs): ...this. Call collect_source_ref directly.
1049 (c_parse_final_cleanups): Always call collect_source_ref on the main
1050 input filename.
1051
519d7496
JB
10522019-12-19 Julian Brown <julian@codesourcery.com>
1053 Cesar Philippidis <cesar@codesourcery.com>
1054
1055 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1056 detach clauses.
1057 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1058 Allow deref (->) in variable lists if true.
1059 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1060 Pass to c_parser_omp_variable_list.
1061 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1062 call to c_parser_omp_variable_list.
1063 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1064 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1065 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1066 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1067 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1068 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1069 and detach. Support deref.
1070 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1071 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1072 (c_oacc_check_attachments): New function.
1073 (c_finish_omp_clauses): Check attach/detach arguments for being
1074 pointers using above. Support deref.
1075
a6163563
JB
10762019-12-19 Julian Brown <julian@codesourcery.com>
1077 Maciej W. Rozycki <macro@codesourcery.com>
1078 Tobias Burnus <tobias@codesourcery.com>
1079 Thomas Schwinge <thomas@codesourcery.com>
1080
1081 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1082 (c_parser_oacc_data_clause): Likewise.
1083 (c_parser_oacc_all_clauses): Likewise.
1084 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1085 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1086 PRAGMA_OACC_CLAUSE_NO_CREATE.
1087 * c-typeck.c (handle_omp_array_sections): Support
1088 GOMP_MAP_NO_ALLOC.
1089
d68f5d45
DM
10902019-12-09 David Malcolm <dmalcolm@redhat.com>
1091
1092 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1093 Replace label_text ctor calls.
1094
4691bf46
JM
10952019-12-04 Joseph Myers <joseph@codesourcery.com>
1096
1097 PR c/36941
1098 PR c/88827
1099 * c-typeck.c (convert_lvalue_to_rvalue): Call
1100 require_complete_type for arguments not of void types.
1101 (build_indirect_ref): Do not diagnose dereferencing pointers to
1102 incomplete types.
1103 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1104
85d11957
JM
11052019-12-03 Joseph Myers <joseph@codesourcery.com>
1106
1107 PR c/88704
1108 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1109 old-style parameter definitions.
1110
4569f8b3
SL
11112019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1112
1113 PR target/92499
1114
1115 * c-decl.c (flexible_array_type_p): Move to common code.
1116
65ef05d0
RS
11172019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1118
1119 * c-decl.c (start_decl): Allow initialization of variables whose
1120 size is a POLY_INT_CST.
1121 (finish_decl): Use verify_type_context to check whether the target
1122 allows variables with a particular type to have static or thread-local
1123 storage duration. Don't raise a second error if such variables do
1124 not have a constant size.
1125 (grokdeclarator): Use verify_type_context to check whether the
1126 target allows fields or array elements to have a particular type.
1127 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1128 the target allows pointer difference for the types involved.
1129 (build_unary_op): Likewise for pointer increment and decrement.
1130
34b43828
JM
11312019-11-29 Joseph Myers <joseph@codesourcery.com>
1132
1133 * c-parser.c (struct c_parser): Add members raw_tokens and
1134 raw_tokens_used.
1135 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1136 using previously-lexed raw tokens.
1137 (c_parser_peek_nth_token_raw)
1138 (c_parser_check_balanced_raw_token_sequence): New functions.
1139 (c_parser_nth_token_starts_std_attributes): Use
1140 c_parser_check_balanced_raw_token_sequence for Objective-C.
1141
5b8d9367
JM
11422019-11-25 Joseph Myers <joseph@codesourcery.com>
1143
1144 PR c/91985
1145 * c-decl.c (finish_declspecs): Use int instead of decimal
1146 floating-point types if decimal floating-point not supported.
1147
1723e1be
JM
11482019-11-25 Joseph Myers <joseph@codesourcery.com>
1149
1150 * c-tree.h (struct c_declarator): Use a structure for id member.
1151 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1152 declarators at the start, not when handling individual declarators
1153 later. Use u.id.id instead of u.id.
1154 (grokfield): Use u.id.id instead of u.id.
1155 (build_id_declarator): Set u.id.id and u.id.attrs.
1156 (finish_declspecs): Handle postfix attributes in case of typedef
1157 name or typeof used.
1158 * c-parser.c (c_parser_direct_declarator)
1159 (c_parser_direct_declarator_inner): Place declarator for
1160 attributes inside that for function or array, not outside. Set
1161 u.id.attrs for identifiers.
1162 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1163 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1164 instead of u.id.
1165
bdaf8be1
JJ
11662019-11-22 Jakub Jelinek <jakub@redhat.com>
1167
1168 PR c/90677
1169 * c-decl.c (identifier_global_tag): Define.
1170
3e00ba47
RB
11712019-11-20 Richard Biener <rguenther@suse.de>
1172
1173 PR c/92088
1174 * c-decl.c (grokdeclarator): Prevent inlining of nested
1175 function with VLA arguments.
1176
8c5b727a
JM
11772019-11-20 Joseph Myers <joseph@codesourcery.com>
1178
1179 * c-decl.c (c_warn_type_attributes): New function.
1180 (groktypename, grokdeclarator, finish_declspecs): Call
1181 c_warn_type_attributes before applying attributes to types.
1182 * c-tree.h (c_warn_type_attributes): Declare.
1183
192961ff
JM
11842019-11-19 Joseph Myers <joseph@codesourcery.com>
1185
1186 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1187 standard attributes.
1188 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1189 pedwarn for unknown standard attributes and return error_mark_node
1190 for them.
1191
20a38017
MM
11922019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1193
1194 * c-parser.c (c_parser_parse_rtl_body): Always call
1195 run_rtl_passes, even if startwith pass is not provided.
1196
d5fbe5e0
JM
11972019-11-15 Joseph Myers <joseph@codesourcery.com>
1198
1199 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1200 duplicate standard attributes.
1201
97cc1187
JM
12022019-11-15 Joseph Myers <joseph@codesourcery.com>
1203
1204 * c-decl.c (std_attribute_table): Add maybe_unused.
1205
f8aea5e3
JM
12062019-11-15 Joseph Myers <joseph@codesourcery.com>
1207
1208 * c-decl.c (std_attribute_table): Add fallthrough.
1209 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1210 attribute at top level.
1211
2cc94aa8
JM
12122019-11-15 Joseph Myers <joseph@codesourcery.com>
1213
1214 * c-decl.c (std_attribute_table): New.
1215 (c_init_decl_processing): Register attributes from
1216 std_attribute_table.
1217 * c-parser.c (c_parser_attribute_arguments): Add arguments
1218 require_string and allow_empty_args. All callers changed.
1219 (c_parser_std_attribute): Set require_string argument for
1220 "deprecated" attribute.
1221
7c5890cc
JM
12222019-11-14 Joseph Myers <joseph@codesourcery.com>
1223
1224 * c-parser.c (c_parser_postfix_expression)
1225 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1226 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1227
e8738f4e
RS
12282019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1229
1230 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1231 of build_same_sized_truth_vector_type.
1232 (build_vec_cmp): Likewise.
1233
b2417b59
JJ
12342019-11-14 Jakub Jelinek <jakub@redhat.com>
1235
bedb7f04
JJ
1236 * c-parser.c (c_parser_omp_context_selector): Don't require score
1237 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1238 negative score.
1239
b2417b59
JJ
1240 * c-parser.c (c_parser_omp_context_selector): Rename
1241 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1242 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1243 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1244 and string literals.
1245
4e03c3a7
JM
12462019-11-14 Joseph Myers <joseph@codesourcery.com>
1247
1248 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1249 ctsk_tagfirstref_attrs.
1250 (struct c_declspecs): Update description of attrs. Add
1251 postfix_attrs and non_std_attrs_seen_p. Increase size of
1252 typespec_kind bit-field.
1253 (c_warn_unused_attributes): New declaration.
1254 (parser_xref_tag): Update prototype.
1255 * c-decl.c (c_warn_unused_attributes): New function.
1256 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1257 ctsk_tagref_attrs. Handle attribute declarations.
1258 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1259 (grokdeclarator): Handle standard attributes.
1260 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1261 attributes to incomplete type reference.
1262 (xref_tag): Update call to parser_xref_tag.
1263 (declspecs_add_addrspace, declspecs_add_type)
1264 (declspecs_add_scspec, declspecs_add_attrs): Set
1265 non_std_attrs_seen_p.
1266 (finish_declspecs): Apply postfix standard attributes to type.
1267 * c-parser.c (c_token_starts_declspecs)
1268 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1269 (c_parser_next_tokens_start_declaration): Update comments.
1270 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1271 parser->tokens[2] to parser->tokens[1].
1272 (c_parser_nth_token_starts_std_attributes)
1273 (c_parser_std_attribute_specifier_sequence): New functions.
1274 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1275 attrs. All callers changed. Handle standard attributes.
1276 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1277 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1278 All callers changed.
1279 (c_parser_declspecs): Add arguments start_std_attr_ok and
1280 end_std_attr_ok. All callers changed. Handle standard
1281 attributes.
1282 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1283 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1284 (c_parser_compound_statement_nostart, c_parser_all_labels)
1285 (c_parser_label, c_parser_statement, c_parser_for_statement):
1286 Handle standard attributes.
1287 * c-parser.h (c_parser_declspecs): Update prototype.
1288 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1289 c_parser_declspecs.
1290
0c29cac4
ML
12912019-11-12 Martin Liska <mliska@suse.cz>
1292
1293 * gimple-parser.c: Do not include params.h.
1294
028d4092
ML
12952019-11-12 Martin Liska <mliska@suse.cz>
1296
1297 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1298 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1299 macro.
1300
62aee289
MR
13012019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1302 Frederik Harwath <frederik@codesourcery.com>
1303
1304 gcc/c/
1305 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1306 (c_parser_oacc_kernels_parallel): Rename function to...
1307 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1308 (c_parser_omp_construct): Update accordingly.
1309
1310
7cec9588
JJ
13112019-11-11 Jakub Jelinek <jakub@redhat.com>
1312
1313 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1314 without corresponding end declare target.
1315
f486280c
RS
13162019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1317
1318 * c-convert.c (convert): Only handle vector conversions if one of
1319 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1320 allows it.
1321 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1322 vectors satisfy gnu_vector_type_p.
1323 (build_unary_op): Only allow unary operators to be applied to
1324 vectors if they satisfy gnu_vector_type_p.
1325 (digest_init): Only allow by-element initialization of vectors
1326 if they satisfy gnu_vector_type_p.
1327 (really_start_incremental_init): Likewise.
1328 (push_init_level): Likewise.
1329 (pop_init_level): Likewise.
1330 (process_init_element): Likewise.
1331 (build_binary_op): Only allow binary operators to be applied to
1332 vectors if they satisfy gnu_vector_type_p.
1333
017c6491
JM
13342019-11-08 Joseph Myers <joseph@codesourcery.com>
1335
1336 * c-decl.c (grokparms): Convert () in a function definition to
1337 (void) for C2x.
1338 (store_parm_decls_oldstyle): Pedwarn for C2x.
1339 (store_parm_decls): Update comment about () not generating a
1340 prototype.
1341
c01bd174
JM
13422019-11-07 Joseph Myers <joseph@codesourcery.com>
1343
1344 * c-parser.c (c_parser_attribute_arguments): New function.
1345 Factored out of c_parser_gnu_attribute.
1346 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1347 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1348 (c_parser_std_attribute_specifier): New functions.
1349 (c_parser_transaction_attributes): Use
1350 c_parser_std_attribute_specifier.
1351
471c5330
JM
13522019-11-07 Joseph Myers <joseph@codesourcery.com>
1353
1354 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1355 lex_joined_string and translate_strings_p.
1356 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1357 c_lex_with_flags.
1358 (c_parser_string_literal): New function.
1359 (c_parser_static_assert_declaration_no_semi): Use
1360 c_parser_string_literal. Do not set lex_untranslated_string.
1361 (c_parser_asm_string_literal): Use c_parser_string_literal.
1362 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1363 (c_parser_gnu_attributes): Set and restore translate_strings_p
1364 instead of lex_untranslated_string.
1365 (c_parser_asm_statement): Do not set lex_untranslated_string.
1366 (c_parser_asm_operands): Likewise.
1367 (c_parser_has_attribute_expression): Set and restore
1368 translate_strings_p instead of lex_untranslated_string.
1369 (c_parser_postfix_expression): Use c_parser_string_literal.
1370 (pragma_lex): Likewise.
1371 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1372 (c_parse_file): Set translate_strings_p.
1373 * gimple-parser.c (c_parser_gimple_postfix_expression)
1374 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1375 * c-parser.c (c_parser_string_literal): Declare function.
1376
d0c464d2
JJ
13772019-11-02 Jakub Jelinek <jakub@redhat.com>
1378
1379 * c-parser.c (c_finish_omp_declare_variant): Use
1380 omp_get_context_selector instead of c_omp_get_context_selector.
1381
ac2cfa6c
RS
13822019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1383
1384 * c-tree.h (c_simulate_enum_decl): Declare.
1385 * c-decl.c (c_simulate_enum_decl): New function.
1386 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1387
74078538
RS
13882019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1389
1390 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1391 * c-decl.c (c_simulate_builtin_function_decl): New function.
1392 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1393 to the above.
1394
ad1539d5
MS
13952019-10-28 Martin Sebor <msebor@redhat.com>
1396
1397 PR c/66970
1398 * c-decl.c (names_builtin_p): Define a new function.
1399
cb73e4e7
RB
14002019-10-28 Richard Biener <rguenther@suse.de>
1401
1402 PR c/92249
1403 * gimple-parser.c (c_parser_parse_gimple_body): Make
1404 current_bb the entry block initially to easier recover
1405 from errors.
1406 (c_parser_gimple_compound_statement): Adjust.
1407
135df52c
JJ
14082019-10-24 Jakub Jelinek <jakub@redhat.com>
1409
1410 * c-parser.c (c_finish_omp_declare_variant): Use
1411 omp_context_selector_matches instead of
1412 c_omp_context_selector_matches.
1413 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1414 attribute in between declare target and end declare target
1415 pragmas.
1416
783bfe5e
JM
14172019-10-15 Joseph Myers <joseph@codesourcery.com>
1418
1419 * c-parser.c (c_parser_attribute_any_word): Rename to
1420 c_parser_gnu_attribute_any_word. All callers changed.
1421 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1422 callers changed.
1423 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1424 callers changed.
1425 (c_parser_declaration_or_fndef, c_parser_declspecs)
1426 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1427 (c_parser_struct_declaration, c_parser_declarator)
1428 (c_parser_gnu_attribute, c_parser_compound_statement)
1429 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1430 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1431 attribute-related syntax productions.
1432
56898e43
RS
14332019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1434
1435 * c-objc-common.c (useful_aka_type_p): Replace with...
1436 (get_aka_type): ...this new function. Given the original type,
1437 decide which aka type to print (if any). Only look through typedefs
1438 if user_facing_original_type_p.
1439 (print_type): Update accordingly.
1440
b9424661
JJ
14412019-10-14 Jakub Jelinek <jakub@redhat.com>
1442
1443 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1444 into int NESTED, if it is 2, diagnose missing commas in between
1445 clauses.
1446 (c_parser_omp_context_selector): Pass 2 as last argument to
1447 c_parser_omp_all_clauses.
1448
20de9568
JJ
14492019-10-12 Jakub Jelinek <jakub@redhat.com>
1450
1451 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1452 For simd properties, put them directly into TREE_VALUE.
1453 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1454 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1455 add "omp declare variant base" attribute rather than
1456 "omp declare variant".
1457
fe2bc27c
JM
14582019-10-11 Joseph Myers <joseph@codesourcery.com>
1459
1460 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1461
94e7f906
JJ
14622019-10-10 Jakub Jelinek <jakub@redhat.com>
1463
1464 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1465 true, terminate processing on closing paren and don't skip to end of
1466 pragma line.
1467 (c_parser_omp_declare_simd): Handle also declare variant.
1468 (omp_construct_selectors, omp_device_selectors,
1469 omp_implementation_selectors, omp_user_selectors): New variables.
1470 (c_parser_omp_context_selector,
1471 c_parser_omp_context_selector_specification,
1472 c_finish_omp_declare_variant): New functions.
1473 (c_finish_omp_declare_simd): Handle both declare simd and
1474 declare variant.
1475 (c_parser_omp_declare): Handle declare variant.
1476
93313b94
JM
14772019-10-02 Joseph Myers <joseph@codesourcery.com>
1478
1479 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1480 CPP_COLON tokens.
1481
55879815
RS
14822019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1483
1484 * c-objc-common.c (useful_aka_type_p): New function.
1485 (print_type): Use it to decide whether an aka type is worth printing.
1486
59bc434a
JJ
14872019-09-27 Jakub Jelinek <jakub@redhat.com>
1488
1489 PR c++/88203
1490 * c-parser.c (c_parser_predefined_identifier): New function.
1491 (c_parser_postfix_expression): Use it.
1492 (c_parser_omp_variable_list): Parse predefined identifiers.
1493 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1494 in shared and firstprivate clauses, even when they are predetermined
1495 shared.
1496
c6447c20
RS
14972019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1498
1499 * c-typeck.c (build_function_call_vec): Take the original function
1500 decl as an optional final parameter. Pass all built-in calls to
1501 check_builtin_function_arguments.
1502
522da4c2
EB
15032019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1504
1505 PR c/91815
1506 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1507 of identifiers in the external scope only for variables and functions.
1508
68e2c199
PK
15092019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1510
1511 PR c/78736
1512 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1513
22f8849d
IS
15142019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1515
1516 PR pch/61250
1517 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1518 after determining that the first token is not
1519 PRAGMA_GCC_PCH_PREPROCESS.
1520
db376f45
EB
15212019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1522
1523 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1524 FUNCTION_DECL to the right value in the presence of nested declarators.
1525
4d732405
RS
15262019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1527
1528 PR middle-end/91421
1529 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1530
cb1180d5
RS
15312019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1532
1533 PR middle-end/91421
1534 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1535 of a built_in_function.
1536 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1537
77eb117f
JJ
15382019-08-10 Jakub Jelinek <jakub@redhat.com>
1539
1540 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1541 (c_parser_omp_clause_device_type): New function.
1542 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1543 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1544 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1545 diagnostics for declare target with clauses nested in clause-less
1546 declare target declaration-definition-seq.
1547 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1548
2c3b8bad
JJ
15492019-08-09 Jakub Jelinek <jakub@redhat.com>
1550
bb522e2e
JJ
1551 * c-parser.c (check_no_duplicate_clause): Simplify using
1552 omp_find_clause.
1553 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1554 directive name modifiers.
1555 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1556
2c3b8bad
JJ
1557 PR c/91401
1558 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1559 check_no_duplicate_clause call. Comment it out, instead emit a
1560 warning for duplicate dist_schedule clauses.
1561
99769e7f
RS
15622019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1563
1564 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1565
8860d270
JJ
15662019-08-08 Jakub Jelinek <jakub@redhat.com>
1567
1568 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1569 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1570 instead of generic_head to track duplicates.
1571
398e3feb
JJ
15722019-08-07 Jakub Jelinek <jakub@redhat.com>
1573
1574 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1575 (c_parser_omp_clause_use_device_addr): New function.
1576 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1577 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1578 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1579 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1580 map or use_device_* clauses.
1581 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1582 in OpenMP, require pointer type rather than pointer or array type.
1583 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1584
a28351e7
JJ
15852019-07-31 Jakub Jelinek <jakub@redhat.com>
1586
1587 PR c/91192
1588 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1589 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1590 case.
1591
6343b6bf
ML
15922019-07-25 Martin Liska <mliska@suse.cz>
1593 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1594
1595 PR c++/23383
1596 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1597
cb50701e
ML
15982019-07-25 Martin Liska <mliska@suse.cz>
1599
1600 * c-decl.c (merge_decls): Use new macros
1601 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1602
62e3e66f
RB
16032019-07-23 Richard Biener <rguenther@suse.de>
1604
1605 PR tree-optimization/83518
1606 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1607 a CFG also rebuild cgraph edges.
1608
554a530f
JJ
16092019-07-20 Jakub Jelinek <jakub@redhat.com>
1610
1611 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1612 (c_parser_omp_clause_bind): New function.
1613 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1614 (OMP_LOOP_CLAUSE_MASK): Define.
1615 (c_parser_omp_loop): New function.
1616 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1617 loop combined with parallel or teams.
1618 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1619 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1620
d119bf79
RS
16212019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1622
1623 PR c/53633
1624 * c-decl.c (finish_function): Check targetm.warn_func_return
1625 before issuing a -Wreturn-type warning.
1626
ab20d992 16272019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1628
1629 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1630 (c_parser_compound_statement): Call it.
1631
1fdd6f04
JJ
16322019-07-12 Jakub Jelinek <jakub@redhat.com>
1633
1634 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1635 (c_parser_omp_clause_order): New function.
1636 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1637 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1638 PRAGMA_OMP_CLAUSE_ORDER.
1639 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1640
8389386c
RB
16412019-07-10 Richard Biener <rguenther@suse.de>
1642
1643 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1644 _Literal (int *) &x for address literals.
1645
99b1c316
MS
16462019-07-09 Martin Sebor <msebor@redhat.com>
1647
1648 PR c++/61339
1649 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1650 to class.
1651 (field_decl_cmp): Same.
1652 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1653 * c-tree.h: Same.
1654 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1655
6c1dae73
MS
16562019-07-09 Martin Sebor <msebor@redhat.com>
1657
1658 PR c++/61339
1659 * c-decl.c: Change class-key from class to struct and vice versa
1660 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1661 * gimple-parser.c: Same.
1662
69b5279e
RB
16632019-07-01 Richard Biener <rguenther@suse.de>
1664
1665 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1666 _Literal (char *) &"foo" for address literals pointing to
1667 STRING_CSTs.
1668
ab20d992
JJ
16692019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1670
1671 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1672 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1673 C incompatibility if alternate "__intN__" form is used.
1674
1e3d475e
MS
16752019-06-24 Martin Sebor <msebor@redhat.com>
1676
1677 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1678
bf38f7e9
JJ
16792019-06-10 Jakub Jelinek <jakub@redhat.com>
1680
1681 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1682 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1683 (c_parser_omp_scan_loop_body): New function.
1684 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1685 inscan reduction clauses.
1686 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1687 non-inscan reductions on the same construct, or inscan reductions with
1688 ordered or schedule clauses, or inscan array reductions.
1689
65985d78
MS
16902019-06-05 Martin Sebor <msebor@redhat.com>
1691
1692 PR c/90737
1693 * c-typeck.c (c_finish_return): Only consider functions returning
1694 pointers as candidates for -Wreturn-local-addr.
1695
0ecf545c
MS
16962019-06-05 Martin Sebor <msebor@redhat.com>
1697
1698 * c-decl.c (start_decl): Adjust quoting and hyphenation
1699 in diagnostics.
1700 (finish_decl): Same.
1701 (finish_enum): Same.
1702 (start_function): Same.
1703 (declspecs_add_type): Same.
1704 * c-parser.c (warn_for_abs): Same.
1705 * c-typeck.c (build_binary_op): Same.
1706
e03436e7
TS
17072019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1708
b48f44bf
TS
1709 PR c/89433
1710 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1711 marked with an OpenACC 'routine' directive.
1712
5bf04509
TS
1713 PR c/89433
1714 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1715 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1716
e03436e7
TS
1717 PR c/89433
1718 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1719 clauses from "omp declare target" attribute.
1720
a9c697b8
MS
17212019-05-16 Martin Sebor <msebor@redhat.com>
1722
ab20d992
JJ
1723 * c-decl.c (start_decl): Quote keywords, operators, and
1724 types in diagnostics.
1725 (finish_decl): Same.
1726 * c-parser.c (c_parser_asm_statement): Same.
1727 (c_parser_conditional_expression): Same.
1728 (c_parser_transaction_cancel): Same.
1729 * c-typeck.c (c_common_type): Same.
1730 (build_conditional_expr): Same.
1731 (digest_init): Same.
1732 (process_init_element): Same.
1733 (build_binary_op): Same.
a9c697b8 1734
c4499192
RB
17352019-05-17 Richard Biener <rguenther@suse.de>
1736
1737 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1738 (c_parser_gimple_unary_expression): Likewise.
1739 (c_parser_gimple_parentized_ternary_expression): New function.
1740
adfe6e4b
RB
17412019-05-16 Richard Biener <rguenther@suse.de>
1742
1743 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1744 (c_parser_gimple_unary_expression): Likewise.
1745
186dabf2
RB
17462019-05-15 Richard Biener <rguenther@suse.de>
1747
1748 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1749 __BIT_FIELD_REF.
1750
1158c5b4
RB
17512019-05-14 Richard Biener <rguenther@suse.de>
1752
1753 * gimple-parser.c (c_parser_gimple_statement): Remove
1754 questionable auto-promotion to VIEW_CONVERT_EXPR.
1755 (c_parser_gimple_typespec): Split out from __MEM parsing.
1756 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
1757 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
1758 as __VIEW_CONVERT with -gimple.
1759
fd4485aa
ML
17602019-05-09 Martin Liska <mliska@suse.cz>
1761
1762 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
1763 __MAX.
1764 (c_parser_gimple_unary_expression): Parse also binary expression
1765 __MIN and __MAX.
1766 (c_parser_gimple_parentized_binary_expression): New function.
1767
d276406a
ML
17682019-05-09 Martin Liska <mliska@suse.cz>
1769
1770 * gimple-parser.c (struct gimple_parser): Add probability.
1771 for gimple_parser_edge.
1772 (gimple_parser::push_edge): Add new argument probability.
1773 (c_parser_gimple_parse_bb_spec): Parse also probability
1774 if present.
1775 (c_parser_parse_gimple_body): Set edge probability.
1776 (c_parser_gimple_compound_statement): Consume token
1777 before calling c_parser_gimple_goto_stmt.
1778 Parse BB counts.
1779 (c_parser_gimple_statement): Pass new argument.
1780 (c_parser_gimple_goto_stmt): Likewise.
1781 (c_parser_gimple_if_stmt): Likewise.
1782 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
1783 * c-parser.c (c_parser_declaration_or_fndef): Pass
1784 hot_bb_threshold argument.
1785 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
1786 field.
1787 (c_parser_gimple_parse_bb_spec_edge_probability): New.
1788
f179b64e
JJ
17892019-04-26 Jakub Jelinek <jakub@redhat.com>
1790
1791 PR debug/90197
1792 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
1793 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
1794 (c_parser_do_statement): Likewise.
1795 (c_parser_for_statement): Likewise. Formatting fixes.
1796 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
1797 emit DEBUG_BEGIN_STMTs if needed.
1798
e7178413
JJ
17992019-04-19 Jakub Jelinek <jakub@redhat.com>
1800
c280b7ee
JJ
1801 PR c/89888
1802 * c-typeck.c (struct c_switch): Remove outside_range_p member.
1803 (c_start_case): Don't clear it.
1804 (do_case): Adjust c_add_case_label caller.
1805 (c_finish_case): Adjust c_do_switch_warnings caller.
1806
e7178413
JJ
1807 PR c++/90108
1808 * c-decl.c (merge_decls): If remove is main variant and
1809 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
1810 variant that has newdecl as TYPE_NAME if any.
1811
60a2c645
JJ
18122019-04-12 Jakub Jelinek <jakub@redhat.com>
1813
1814 PR c/89933
1815 * c-decl.c (merge_decls): When newdecl's type is its main variant,
1816 don't try to remove it from the variant list, but instead assert
1817 it has no variants.
1818
2a82beaa
RB
18192019-04-01 Richard Biener <rguenther@suse.de>
1820
1821 PR c/71598
1822 * c-tree.h (c_get_alias_set): Declare.
1823 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
1824 * c-objc-common.c (c_get_alias_set): Treat enumeral types
1825 as the underlying integer type.
1826
bec1da64
MS
18272019-03-19 Martin Sebor <msebor@redhat.com>
1828
1829 PR tree-optimization/89688
1830 * c-decl.c (finish_decl): Call braced_lists_to_string for more
1831 kinds of initializers.
1832
855cd9b1
JJ
18332019-03-19 Jakub Jelinek <jakub@redhat.com>
1834
1835 PR c/89734
1836 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
1837 return type even if quals_used is 0. Formatting fixes.
1838
baa09dc5
RB
18392019-03-14 Richard Biener <rguenther@suse.de>
1840
1841 * c-tree.h (enum c_declspec_il): New.
1842 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
1843 enum bitfield.
1844 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
1845 Pass start pass and declspec_il to c_parser_parse_gimple_body.
1846 (c_parser_declspecs): Adjust.
1847 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
1848 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
1849 and bitmap.h.
1850 (struct gimple_parser): New.
1851 (gimple_parser::push_edge): New method.
1852 (c_parser_gimple_parse_bb_spec): New helper.
1853 (c_parser_parse_gimple_body): Get start pass and IL specification.
1854 Initialize SSA and CFG.
1855 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
1856 Build a gimple_parser parsing state and pass it along.
1857 (c_parser_gimple_statement): Change intermittend __PHI internal
1858 function argument for the edge.
1859 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
1860 (c_parser_gimple_goto_stmt): Record edges to build.
1861 (c_parser_gimple_if_stmt): Likewise.
1862 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
1863 (c_parser_gimple_or_rtl_pass_list): Likewise.
1864
a3f9f006
ML
18652019-03-11 Martin Liska <mliska@suse.cz>
1866
1867 * c-decl.c (check_for_loop_decls): Wrap an option name
1868 in a string format message and fix GNU coding style.
1869 * c-parser.c (c_parser_declspecs): Likewise.
1870
1db01ff9
JJ
18712019-03-08 Jakub Jelinek <jakub@redhat.com>
1872
1873 PR tree-optimization/89550
1874 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
1875 returned true.
1876 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
1877 or warning returned true.
1878
66dcb747
JJ
18792019-02-28 Jakub Jelinek <jakub@redhat.com>
1880
1881 PR c/89525
1882 * c-typeck.c (convert_arguments): Call inform_declaration only if
1883 the previous warning_at call returned true.
1884
2263c9f2
TS
18852019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1886
1887 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1888 parameter. Adjust all users.
1889 (c_parser_oacc_simple_clause): Replace parser with loc formal
1890 parameter. Adjust all users.
1891
ab20d992 18922019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1893
1894 PR c/87924
1895 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1896 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1897
5f88ba10
JJ
18982019-02-15 Jakub Jelinek <jakub@redhat.com>
1899
1900 PR c/89340
1901 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1902 before c_decl_attributes rather than after it.
1903
cfc30fd1
JJ
19042019-02-06 Jakub Jelinek <jakub@redhat.com>
1905
1906 PR c/89211
1907 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1908 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1909 instead of 3 nested ifs.
1910
fbe83e6b
JM
19112019-02-06 Joseph Myers <joseph@codesourcery.com>
1912
1913 PR c/88584
1914 * c-decl.c (finish_decl): Do not complete array types for arrays
1915 with external linkage not at file scope.
1916
f461f938
RB
19172019-02-05 Richard Biener <rguenther@suse.de>
1918
1919 PR c/88606
1920 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1921 all type variants when not supported.
1922
fe509359
JJ
19232019-01-30 Jakub Jelinek <jakub@redhat.com>
1924
1925 PR c/89061
1926 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1927 * c-decl.c (decl_jump_unsafe): Return false for
1928 C_DECL_COMPOUND_LITERAL_P decls.
1929 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1930
6a335b96
JJ
19312019-01-29 Jakub Jelinek <jakub@redhat.com>
1932
f4b7e754
JJ
1933 PR c/89045
1934 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1935 scope.
1936
6a335b96
JJ
1937 PR c/86125
1938 * c-decl.c (last_fileptr_type): Remove.
1939 (last_structptr_types): New variable.
1940 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1941 {old,new}rettype instead of the types themselves. Assert
1942 last_structptr_types array has the same number of elements
1943 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1944 argument oldtype and newtype. Instead of handling
1945 just fileptr_type_node specially, handle all builtin_structptr_types
1946 pointer nodes. Formatting fix.
1947
d8b5a1a0
MS
19482019-01-24 Martin Sebor <msebor@redhat.com>
1949
1950 PR c/86125
1951 PR c/88886
1952 PR middle-end/86308
1953 * c-decl.c (match_builtin_function_types): Add arguments.
1954 (diagnose_mismatched_decls): Diagnose mismatched declarations
1955 of built-ins more strictly.
1956
e21c4491
JJ
19572019-01-24 Jakub Jelinek <jakub@redhat.com>
1958
1959 PR c++/88976
1960 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1961 on #pragma omp cancel with different modifiers.
1962
420183d9
L
19632019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1964
1965 PR c/51628
1966 PR c/88664
1967 * c-typeck.c (convert_for_assignment): Upate the
1968 warn_for_address_or_pointer_of_packed_member call.
1969
17ad43dd
TH
19702019-01-16 Tom Honermann <tom@honermann.net>
1971 Jason Merrill <jason@redhat.com>
1972
1973 * c-typeck.c (digest_init): Revised the error message produced for
1974 ill-formed cases of array initialization with a string literal.
1975 (error_init): Make variadic.
1976
5f07d78a
JJ
19772019-01-12 Jakub Jelinek <jakub@redhat.com>
1978
1979 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1980
c4581bbf
JJ
19812019-01-07 Jakub Jelinek <jakub@redhat.com>
1982
1983 PR c/88701
1984 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1985 if current_function_decl is non-NULL.
1986
65c5b1eb
JM
19872019-01-07 Joseph Myers <joseph@codesourcery.com>
1988
1989 PR c/88720
1990 PR c/88726
1991 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1992 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1993 functions declared but never defined only for external scope, not
1994 for other scopes.
1995
d8fcab68
JJ
19962019-01-07 Jakub Jelinek <jakub@redhat.com>
1997
1998 PR c++/85052
1999 * c-parser.c (c_parser_postfix_expression): Parse
2000 __builtin_convertvector.
2001
a5544970
JJ
20022019-01-01 Jakub Jelinek <jakub@redhat.com>
2003
2004 Update copyright years.
2005
da77eace
L
20062018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2007
2008 PR c/51628
2009 * c-typeck.c (convert_for_assignment): Call
2010 warn_for_address_or_pointer_of_packed_member.
2011
1edf8866
SB
20122018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2013
2014 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2015 a more specific error message (instead of just falling through).
2016
db4fd626
SB
20172018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2018
2019 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2020 asm qualifier is first seen; use that to give nicer "duplicate asm
2021 qualifier" messages. Delete 'quals" variable, instead pass the
2022 "is_volatile_ flag to build_asm_stmt directly.
2023 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2024 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2025
9c9cfcbb
SB
20262018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2027
2028 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2029 "done" boolean variable.
2030
a14feb3c
DM
20312018-12-19 David Malcolm <dmalcolm@redhat.com>
2032
2033 PR c++/87504
2034 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2035 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2036 (build_binary_op): Use struct op_location_t and
2037 class binary_op_rich_location.
2038
6d939173
JJ
20392018-12-11 Jakub Jelinek <jakub@redhat.com>
2040
2041 PR sanitizer/88426
2042 * c-convert.c (convert): Call c_fully_fold before calling
2043 ubsan_instrument_float_cast.
2044
b7055028
SB
20452018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2046
2047 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2048 setting "quals".
2049
5b76e75f
SB
20502018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2051
2052 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2053 after asm. Pass a flag for it to build_asm_expr.
2054 * c-tree.h (build_asm_expr): Update declaration.
2055 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2056 set ASM_INLINE_P.
2057
30bd42b9
SB
20582018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2059
2060 PR inline-asm/55681
2061 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2062 combination of volatile and goto, in any order, without repetitions.
2063
9df6c0e4
JB
20642018-12-04 James Norris <jnorris@codesourcery.com>
2065 Cesar Philippidis <cesar@codesourcery.com>
2066 Julian Brown <julian@codesourcery.com>
2067
2068 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2069 code.
2070
f44697b7
RB
20712018-11-30 Richard Biener <rguenther@suse.de>
2072
2073 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2074 _Literal (type) { ... } as empty aggregate or vector constructor.
2075
550dfbdc
MS
20762018-11-29 Martin Sebor <msebor@redhat.com>
2077
2078 PR c/88091
2079 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2080 (convert_arguments): Add comments. Pass additional argument to
2081 the function above.
2082
673670da
MS
20832018-11-29 Martin Sebor <msebor@redhat.com>
2084
2085 PR c/88172
2086 PR testsuite/88208
2087 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2088
db1d09b0
MS
20892018-11-23 Martin Sebor <msebor@redhat.com>
2090
2091 PR testsuite/88098
2092 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2093 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2094
98f08eb8
MS
20952018-11-20 Martin Sebor <msebor@redhat.com>
2096
2097 * c-parser.c (c_parser_has_attribute_expression): New function.
2098 (c_parser_attribute): New function.
2099 (c_parser_attributes): Move code into c_parser_attribute.
2100 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2101
cd5da983
MS
21022018-11-15 Martin Sebor <msebor@redhat.com>
2103
2104 PR c/83656
2105 * c-decl.c (header_for_builtin_fn): Declare.
2106 (diagnose_mismatched_decls): Diagnose declarations of built-in
2107 functions without a prototype.
2108 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2109 (convert_argument): Same.
2110 (convert_arguments): Factor code out into convert_argument.
2111 Detect mismatches between built-in formal arguments in calls
2112 to built-in without prototype.
2113 (build_conditional_expr): Same.
2114 (type_or_builtin_type): New function.
2115 (convert_for_assignment): Add argument. Conditionally issue
2116 warnings instead of errors for mismatches.
2117
620e594b
DM
21182018-11-13 David Malcolm <dmalcolm@redhat.com>
2119
2120 * c-decl.c: Replace "source_location" with "location_t".
2121 * c-tree.h: Likewise.
2122 * c-typeck.c: Likewise.
2123 * gimple-parser.c: Likewise.
2124
3179ebae
JJ
21252018-11-09 Jakub Jelinek <jakub@redhat.com>
2126
81a227c6
JJ
2127 * c-parser.c (c_parser_omp_clause_final): Use
2128 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2129 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2130 parsing instead of c_parser_paren_condition.
2131 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2132 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2133 c_fully_fold instead of c_parser_condition.
2134 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2135 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2136 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2137 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2138 c_parser_expr_no_commas instead of c_parser_expression.
2139
98c91c56
JJ
2140 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2141 reduction clause with inscan modifier.
2142
3179ebae
JJ
2143 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2144 clauses other than atomic_default_mem_order.
2145
28567c40
JJ
21462018-11-08 Jakub Jelinek <jakub@redhat.com>
2147
2148 * c-parser.c: Include memmode.h.
2149 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2150 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2151 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2152 task_reduction clauses.
2153 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2154 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2155 section, or lvalue assignment expression.
2156 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2157 (c_parser_omp_clause_lastprivate): Parse optional
2158 conditional: modifier.
2159 (c_parser_omp_clause_hint): Require constant integer expression rather
2160 than just integer expression.
2161 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2162 clause.
2163 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2164 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2165 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2166 functions.
2167 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2168 iterators. Parse mutexinoutset and depobj kinds.
2169 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2170 callers.
2171 (c_parser_omp_all_clauses): Likewise. Handle
2172 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2173 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2174 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2175 default memory order from requires directive if any. Adjust
2176 c_finish_omp_atomic caller.
2177 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2178 (c_parser_omp_flush): Parse flush with memory-order-clause.
2179 (c_parser_omp_for_loop): Allow NE_EXPR even in
2180 OpenMP loops, adjust c_finish_omp_for caller.
2181 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2182 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2183 Allow to be called while parsing combined parallel master.
2184 Parse combined master taskloop{, simd}.
2185 (c_parser_omp_parallel): Parse combined
2186 parallel master{, taskloop{, simd}} constructs.
2187 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2188 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2189 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2190 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2191 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2192 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2193 around teams body. Use SET_EXPR_LOCATION.
2194 (c_parser_omp_target_data): Allow target data
2195 with only use_device_ptr clauses.
2196 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2197 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2198 (c_parser_omp_requires): New function.
2199 (c_finish_taskloop_clauses): New function.
2200 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2201 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2202 declaration. Disallow in_reduction clause when combined with parallel
2203 master.
2204 (c_parser_omp_construct): Adjust c_parser_omp_master and
2205 c_parser_omp_taskgroup callers.
2206 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2207 other than cancel.
2208 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2209 like OMP_CLAUSE_REDUCTION.
2210 (handle_omp_array_sections): Likewise. Call save_expr on array
2211 reductions before calling build_index_type. Handle depend clauses
2212 with iterators.
2213 (struct c_find_omp_var_s): New type.
2214 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2215 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2216 with static, runtime or auto schedule kinds. Call save_expr for whole
2217 array reduction sizes. Diagnose reductions with zero sized elements
2218 or variable length structures. Diagnose nogroup clause used with
2219 reduction clause(s). Handle depend clause with
2220 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2221 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2222 some different type for other kinds. Use build_unary_op with
2223 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2224 Handle depend clauses with iterators. Remove no longer needed special
2225 case that predetermined const qualified vars may be specified in
2226 firstprivate clause. Complain if const qualified vars are mentioned
2227 in data-sharing clauses other than firstprivate or shared. Use
2228 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2229 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2230 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2231 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2232
7e2de6df
DM
22332018-10-29 David Malcolm <dmalcolm@redhat.com>
2234
2235 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2236 logic for change to name_hint::operator bool.
2237 (undeclared_variable): Likewise.
2238 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2239 (c_parser_parameter_declaration): Likewise.
2240
9f936c86
JM
22412018-10-17 Joseph Myers <joseph@codesourcery.com>
2242
2243 * c-errors.c (pedwarn_c11): New function.
2244 * c-parser.c (disable_extension_diagnostics): Save
2245 warn_c11_c2x_compat and set it to 0.
2246 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2247 (c_parser_static_assert_declaration_no_semi): Handle
2248 _Static_assert without string constant.
2249 * c-tree.h (pedwarn_c11): New prototype.
2250
033eb567
DM
22512018-10-17 David Malcolm <dmalcolm@redhat.com>
2252
2253 * Make-lang.in (selftest-c): New.
2254 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2255 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2256 from gcc/Makefile.in.
2257
0edf3afe
RB
22582018-10-02 Richard Biener <rguenther@suse.de>
2259
2260 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2261
8313a764
JM
22622018-09-26 Joseph Myers <joseph@codesourcery.com>
2263
2264 PR c/87390
2265 * c-typeck.c (build_binary_op): Use excess precision for
2266 comparisons of integers and floating-point for C11 and later.
2267
ce6f0888
MJ
22682018-09-26 Martin Jambor <mjambor@suse.cz>
2269
2270 PR c/87347
2271 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2272 comment.
ce6f0888 2273
9c4a4b3c
DM
22742018-09-17 David Malcolm <dmalcolm@redhat.com>
2275
2276 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2277 Update for new param.
2278 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2279 Likewise.
2280
80c6d1f4
MJ
22812018-09-17 Martin Jambor <mjambor@suse.cz>
2282
2283 PR c/63886
2284 * c-parser.c: (warn_for_abs): New function.
2285 (c_parser_postfix_expression_after_primary): Call it.
2286
4a426e36
BE
22872018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2288
2289 * c-typeck.c (digest_init): Shorten overlength strings.
2290
6d900107
BE
22912018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2292
2293 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2294
b5764229
BE
22952018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2296
2297 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2298 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2299
22eea6b2
AM
23002018-08-30 Alexander Monakov <amonakov@ispras.ru>
2301
2302 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2303 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2304
85204e23
DM
23052018-08-27 David Malcolm <dmalcolm@redhat.com>
2306
2307 PR 87091
2308 * c-decl.c (implicitly_declare): Update call to
2309 maybe_add_include_fixit to suggest overriding the location, as it
2310 is for a note.
2311 * c-objc-common.c (c_tree_printer): Update for conversion of
2312 show_caret_p to a tri-state.
2313
3d78e008
ML
23142018-08-27 Martin Liska <mliska@suse.cz>
2315
2316 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2317 fndecl_built_in_p and remove check for FUNCTION_DECL if
2318 possible.
3d78e008
ML
2319 (diagnose_mismatched_decls): Likewise.
2320 (merge_decls): Likewise.
2321 (warn_if_shadowing): Likewise.
2322 (pushdecl): Likewise.
2323 (implicitly_declare): Likewise.
2324 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2325 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2326 * c-typeck.c (build_function_call_vec): Likewise.
2327 (convert_arguments): Likewise.
2328
097f82ec
DM
23292018-08-20 David Malcolm <dmalcolm@redhat.com>
2330
2331 PR other/84889
2332 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2333 (diagnose_mismatched_decls): Likewise, in various places.
2334 (warn_if_shadowing): Likewise.
2335 (implicit_decl_warning): Likewise.
2336 (implicitly_declare): Likewise.
2337 (undeclared_variable): Likewise.
2338 (declare_label): Likewise.
2339 (grokdeclarator): Likewise.
2340 (start_function): Likewise.
2341 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2342 (c_parser_parameter_declaration): Likewise.
2343 (c_parser_binary_expression): Likewise.
2344 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2345 (parser_build_binary_op): Likewise.
2346 (build_unary_op): Likewise.
2347 (error_init): Likewise.
2348 (pedwarn_init): Likewise.
2349 (warning_init): Likewise.
2350 (convert_for_assignment): Likewise.
2351
96e6ae57
DM
23522018-08-15 David Malcolm <dmalcolm@redhat.com>
2353
2354 * c-objc-common.c: Include "gcc-rich-location.h".
2355 (c_tree_printer): Move implemenation of '%T' to...
2356 (print_type): ...this new function.
2357 (range_label_for_type_mismatch::get_text): New function.
2358 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2359 range for the various ic_argpass cases.
2360 (class maybe_range_label_for_tree_type_mismatch): New class.
2361 (build_binary_op): Use it when calling binary_op_error.
2362
0cd020ae 23632018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2364
0cd020ae
PK
2365 * c-decl.c (start_decl): Do not warn if variables is named as main
2366 and is a local variable.
2367
72733314
IS
23682018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2369
2370 PR c/19315
2371 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2372 objects of unknown size.
2373
23aa9f7c
MS
23742018-08-13 Martin Sebor <msebor@redhat.com>
2375
2376 PR tree-optimization/71625
2377 * c-parser.c (c_parser_declaration_or_fndef): Call
2378 braced_list_to_string.
2379
e5e7e50d
BH
23802018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2381
2382 PR c/86690
2383 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2384 errors.
2385
8a45b051
MS
23862018-08-01 Martin Sebor <msebor@redhat.com>
2387
2388 PR tree-optimization/86650
2389 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2390 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2391
5922dcb5
JJ
23922018-08-01 Jakub Jelinek <jakub@redhat.com>
2393
2394 PR c/85704
2395 * c-typeck.c (init_field_decl_cmp): New function.
2396 (output_pending_init_elements): Use it for field comparisons
2397 instead of pure bit_position comparisons.
2398
9b452033
JJ
23992018-07-12 Jakub Jelinek <jakub@redhat.com>
2400
2401 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2402 type here, instead add "omp declare target implicit" attribute.
2403 (finish_decl): Diagnose vars without mappable type here.
2404
ab20d992
JJ
24052018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2406 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2407 Cesar Philippidis <cesar@codesourcery.com>
2408
2409 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2410 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2411 to their non-present_or_* counterparts. Make 'self' an alias to
2412 PRAGMA_OACC_CLAUSE_HOST.
2413 (c_parser_oacc_data_clause): Update GOMP mappings for
2414 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2415 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2416 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2417 Remove support for present_or_* clauses.
2418 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2419 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2420 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2421 (OACC_DATA_CLAUSE_MASK): Likewise.
2422 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2423 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2424 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2425 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2426 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2427
e197e64e
KV
24282018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2429
2430 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2431 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2432 (c_parser_gimple_unary_expression): Likewise.
2433
487f2f61
JJ
24342018-06-15 Jakub Jelinek <jakub@redhat.com>
2435
2436 PR c/86093
2437 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2438 before doing POINTER_DIFF_EXPR.
2439
e4d44a37
MP
24402018-06-07 Marek Polacek <polacek@redhat.com>
2441
2442 PR c/85318
2443 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2444 for loop initial declarations.
2445
b67b9225
DP
24462018-05-30 David Pagan <dave.pagan@oracle.com>
2447
2448 PR c/55976
2449 * c-decl.c (grokdeclarator): Update check for return type warnings.
2450 (start_function): Likewise.
2451 (finish_function): Likewise.
2452 * c-typeck.c (c_finish_return): Update check for return type warnings.
2453 Pass OPT_Wreturn_type to pedwarn when appropriate.
2454
c566cc9f
RS
24552018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2456
2457 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2458 __FMA_EXPR handlng.
2459
e4f81565
RS
24602018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2461
2462 * gimple-parser.c: Include internal-fn.h.
2463 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2464 (c_parser_gimple_call_internal): New function.
2465 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2466 Fix typos in comment.
2467
79e7b1fe
JJ
24682018-05-10 Jakub Jelinek <jakub@redhat.com>
2469
2470 PR c++/85662
2471 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2472 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2473 fold_convert_loc.
2474 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2475 fold_offsetof_1, pass argtype as TYPE to it and drop the
2476 fold_convert_loc.
2477
f7584c81
DP
24782018-05-02 David Pagan <dave.pagan@oracle.com>
2479
2480 PR c/30552
2481 * c-decl.c (old_style_parameter_scope): New function.
2482 * c-parser.c (c_parser_postfix_expression): Check for statement
2483 expressions in old-style function parameter list declarations.
2484 * c-parser.h (old_style_parameter_scope): New extern declaration.
2485
b33a0cb3
JJ
24862018-04-25 Jakub Jelinek <jakub@redhat.com>
2487
2488 PR sanitizer/84307
2489 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2490 it is not TREE_STATIC.
2491 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2492 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2493 its COMPOUND_LITERAL_EXPR_DECL.
2494
c5c5822a
JM
24952018-03-21 Joseph Myers <joseph@codesourcery.com>
2496
2497 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2498 where all functions return the same _FloatN or _FloatNx type,
2499 treat integer types as _Float64 instead of double.
2500
aa1c9429
JJ
25012018-03-21 Jakub Jelinek <jakub@redhat.com>
2502
2503 PR c/84999
2504 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2505 building vector comparison, diagnose it and return error_mark_node.
2506
9bb45a95
JJ
25072018-03-15 Jakub Jelinek <jakub@redhat.com>
2508
2509 PR c/84853
2510 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2511 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2512 INTEGER_TYPE element type.
2513
ada6bad9
DP
25142018-03-13 David Pagan <dave.pagan@oracle.com>
2515
2516 PR c/46921
2517 * c-typeck.c (output_init_element): Ensure field initializer
2518 expression is always evaluated if there are side effects.
2519
849bbdb9
JJ
25202018-03-06 Jakub Jelinek <jakub@redhat.com>
2521
2522 PR c/84721
2523 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2524 !building_stmt_list_p ().
2525
d74641bd
RS
25262018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2527
2528 PR c/84305
2529 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2530 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2531 and include the BIND_EXPR in the list of things that need to be
2532 pre-evaluated.
2533
0444aa9c
NS
25342018-02-09 Nathan Sidwell <nathan@acm.org>
2535
2536 PR c/84293
2537 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2538 to strict_aliasing_warning.
2539
7c30b12a
PC
25402018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2541
2542 * c-typeck.c (really_start_incremental_init, push_init_level,
2543 set_nonincremental_init, output_init_element, process_init_element):
2544 Use DECL_UNNAMED_BIT_FIELD.
2545
2be4dfcb
MP
25462018-01-31 Marek Polacek <polacek@redhat.com>
2547
2548 PR c/81779
2549 * c-parser.c (c_parser_compound_statement_nostart): Call
2550 expansion_point_location_if_in_system_header.
2551
bb9869d5
DM
25522018-01-17 David Malcolm <dmalcolm@redhat.com>
2553
2554 PR c++/83814
2555 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2556 the C part.
2557
b4923738
JJ
25582018-01-13 Jakub Jelinek <jakub@redhat.com>
2559
2560 PR c/83801
2561 * c-tree.h (decl_constant_value_1): Add a bool argument.
2562 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2563 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2564 (decl_constant_value): Adjust caller.
2565 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2566 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2567 decl_constant_value returns initializer that has BLKmode or
2568 array type.
2569 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2570
928686b1
RS
25712018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2572 Alan Hayward <alan.hayward@arm.com>
2573 David Sherwood <david.sherwood@arm.com>
2574
2575 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2576 TYPE_VECTOR_SUBPARTS.
2577
85ec4feb
JJ
25782018-01-03 Jakub Jelinek <jakub@redhat.com>
2579
2580 Update copyright years.
2581
913884f7
JJ
25822018-01-01 Jakub Jelinek <jakub@redhat.com>
2583
2584 PR c/83595
2585 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2586 c_parser_conditional_expression, c_parser_cast_expression,
2587 c_parser_sizeof_expression, c_parser_alignof_expression,
2588 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2589 c_parser_transaction_expression): Use set_error () method instead
2590 of setting value member to error_mark_node.
2591
c6cfa2bf
MM
25922017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2593
2594 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2595 and _Float<N>X built-in functions.
2596
11d29d63
JJ
25972017-12-22 Jakub Jelinek <jakub@redhat.com>
2598
14ec014e
JJ
2599 PR debug/83550
2600 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2601 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2602 incomplete vars rather than after it.
2603
11d29d63
JJ
2604 PR debug/83547
2605 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2606 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2607 and consider empty ones if there are no other stmts. For
2608 -Wunused-value walk all statements before the one only followed by
2609 DEBUG_BEGIN_STMTs.
2610
170a8bd6 26112017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2612 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2613
2614 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2615 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2616 (c_parser_do_statement): Likewise.
2617 (c_parser_for_statement): Likewise.
2618 (c_parser_statement_after_labels): Adjust calls to above.
2619 (c_parse_pragma_ivdep): New static function.
2620 (c_parser_pragma_unroll): Likewise.
2621 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2622 <PRAGMA_UNROLL>: New case.
2623
01512446
JJ
26242017-12-19 Jakub Jelinek <jakub@redhat.com>
2625
2626 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2627 perform_integral_promotions, digest_init): Replace Yoda conditions
2628 with typical order conditions.
2629 * c-decl.c (check_bitfield_type_and_width): Likewise.
2630
c65e18d3
BE
26312017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2632
2633 * c-typeck.c (c_safe_arg_type_equiv_p,
2634 c_safe_function_type_cast_p): New function.
2635 (build_c_cast): Implement -Wcast-function-type.
2636
b7280579
RB
26372017-12-14 Richard Biener <rguenther@suse.de>
2638
2639 PR c/83415
2640 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2641 like REALPART_EXPR for the behavior of whether its operand
2642 is an lvalue.
2643
49e6a6c0
MP
26442017-12-12 Marek Polacek <polacek@redhat.com>
2645
2646 PR c/82679
2647 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2648
ab20d992 26492017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2650
2651 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2652 * c-parser.c (add_debug_begin_stmt): New.
2653 (c_parser_declaration_or_fndef): Call it.
2654 (c_parser_compound_statement_nostart): Likewise.
2655 (c_parser_statement_after_labels): Likewise.
2656 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2657
4b2b493f
JM
26582017-12-07 Joseph Myers <joseph@codesourcery.com>
2659
2660 * c-decl.c (build_compound_literal): Add parameter alignas_align
2661 and set alignment of decl if nonzero.
2662 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2663 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2664 qualifier.
2665 (c_parser_struct_declaration): Update syntax comment.
2666 (c_parser_type_name): Add alignas_ok argument and pass it to
2667 c_parser_declspecs.
2668 (c_parser_cast_expression): Pass true to c_parser_type_name and
2669 give error if a cast used an _Alignas specifier.
2670 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2671 give error if sizeof (type-name) used an _Alignas specifier.
2672 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2673 give error if _Alignof (type-name) used an _Alignas specifier.
2674 (c_parser_postfix_expression_after_paren_type): Check specified
2675 alignment for a compound literal and pass it to
2676 build_compound_literal.
2677 * c-parser.h (c_parser_type_name): Update prototype.
2678 * c-tree.h (build_compound_literal): Update prototype.
2679
5d9ae53d
MS
26802017-12-07 Martin Sebor <msebor@redhat.com>
2681
2682 PR c/81544
2683 * c-decl.c (c_decl_attributes): Look up existing declaration and
2684 pass it to decl_attributes.
2685
c79144f8
DM
26862017-12-06 David Malcolm <dmalcolm@redhat.com>
2687
2688 PR c/83236
2689 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2690 reserved for use by the implementation.
2691
613bc14f
DM
26922017-12-06 David Malcolm <dmalcolm@redhat.com>
2693
2694 * c-decl.c: Include "c-family/c-spellcheck.h".
2695
05abad4c
ML
26962017-12-05 Martin Liska <mliska@suse.cz>
2697 Jakub Jelinek <jakub@redhat.com>
2698
2699 * c-typeck.c (pointer_diff): Add new argument and instrument
2700 pointer subtraction.
2701 (build_binary_op): Similar for pointer comparison.
2702
cc6534d4
JJ
27032017-12-01 Jakub Jelinek <jakub@redhat.com>
2704
65791f42
JJ
2705 PR c/79153
2706 * c-parser.c: Include tree-iterator.h.
2707 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2708 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2709 on it.
2710
cc6534d4
JJ
2711 PR c/83222
2712 * c-tree.h (decl_constant_value_1): Declare.
2713 * c-typeck.c (decl_constant_value_1): New function.
2714 (decl_constant_value): Use it.
2715 * c-fold.c (c_fully_fold_internal): If in_init, use
2716 decl_constant_value_1 instead of decl_constant_value.
2717
5de73c05
JJ
27182017-11-30 Jakub Jelinek <jakub@redhat.com>
2719
2720 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2721
058f0b9e
JJ
27222017-11-28 Jakub Jelinek <jakub@redhat.com>
2723
2724 PR sanitizer/81275
2725 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2726 c_switch_covers_all_cases_p returns true.
2727
5e9d6aa4 27282017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2729 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2730
2731 * Make-lang.in (c/c-array-notation.o): Remove.
2732 * c-array-notation.c: Delete.
2733 * c-decl.c: Remove cilkplus condition.
2734 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2735 c_parser_cilk_verify_simd, c_parser_array_notation,
2736 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2737 c_parser_cilk_simd_fn_vector_attrs,
2738 c_finish_cilk_simd_fn_tokens): Delete.
2739 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2740 (c_parser_direct_declarator_inner): Ditto.
2741 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2742 (c_parser_attributes, c_parser_compound_statement,
2743 c_parser_statement_after_labels, c_parser_if_statement,
2744 c_parser_switch_statement, c_parser_while_statement,
2745 c_parser_do_statement, c_parser_for_statement,
2746 c_parser_unary_expression, c_parser_postfix_expression,
2747 c_parser_postfix_expression_after_primary,
2748 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
2749 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
2750 support.
2751 * c-typeck.c (build_array_ref, build_function_call_vec,
2752 convert_arguments,
2753 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
2754 c_finish_loop, build_binary_op): Remove cilkplus support.
2755
9e851845
JJ
27562017-11-28 Jakub Jelinek <jakub@redhat.com>
2757
2758 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
2759 of build3.
2760
ab20d992 27612017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
2762
2763 * Make-lang.in (c.install-plugin): Install backend import library.
2764
41521dee
JJ
27652017-11-23 Jakub Jelinek <jakub@redhat.com>
2766
2767 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
2768 pragma_stmt context.
2769
ac9effed
EB
27702017-11-23 Mike Stump <mikestump@comcast.net>
2771 Eric Botcazou <ebotcazou@adacore.com>
2772
2773 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
2774 ANNOTATE_EXPR.
2775 (c_parser_do_statement): Likewise.
2776 (c_parser_for_statement): Likewise.
2777
ce95abc4
DM
27782017-11-22 David Malcolm <dmalcolm@redhat.com>
2779
2780 PR c++/62170
2781 * c-objc-common.c (c_tree_printer): Convert penultimate param from
2782 bool to bool *. Within '%T' handling, if showing an "aka", use
2783 "quoted" param to add appropriate quoting.
2784
974aedcc
MP
27852017-11-22 Marek Polacek <polacek@redhat.com>
2786
2787 PR c++/60336
2788 PR middle-end/67239
2789 PR target/68355
2790 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
2791
d4300cc6
DM
27922017-11-21 David Malcolm <dmalcolm@redhat.com>
2793
2794 PR c/83056
2795 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
2796 earlier failed lookups.
2797
1af4ebf5
MG
27982017-11-21 Marc Glisse <marc.glisse@inria.fr>
2799
2800 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
2801 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
2802
26edace6
DM
28032017-11-20 David Malcolm <dmalcolm@redhat.com>
2804
2805 PR c/81404
2806 * c-decl.c: Include "c-family/known-headers.h".
2807 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
2808 to known-headers.cc.
2809 (class suggest_missing_header): Move to known-header.h.
2810 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
2811 than get_c_name_hint.
2812
b1212255
DM
28132017-11-20 David Malcolm <dmalcolm@redhat.com>
2814
2815 * c-decl.c (get_c_name_hint): New function.
2816 (class suggest_missing_header): New class.
2817 (lookup_name_fuzzy): Call get_c_name_hint and use it to
2818 suggest missing headers to the user.
2819
6c7a259b
DM
28202017-11-20 David Malcolm <dmalcolm@redhat.com>
2821
2822 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2823 Include "c-family/name-hint.h"
2824 (implicit_decl_warning): Convert "hint" from
2825 const char * to name_hint. Pass location to
2826 lookup_name_fuzzy. Suppress any deferred diagnostic if the
2827 warning was not printed.
2828 (undeclared_variable): Likewise for "guessed_id".
2829 (lookup_name_fuzzy): Convert return type from const char *
2830 to name_hint. Add location_t param.
2831 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
2832 Include "c-family/name-hint.h"
2833 (c_parser_declaration_or_fndef): Convert "hint" from
2834 const char * to name_hint. Pass location to lookup_name_fuzzy.
2835 (c_parser_parameter_declaration): Likewise.
2836
f9c59f7e
JJ
28372017-11-19 Jakub Jelinek <jakub@redhat.com>
2838
2839 PR c/66618
2840 PR c/69960
2841 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
2842 where needed.
2843 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
2844 handle_omp_array_sections): Likewise.
2845 (digest_init): Don't call decl_constant_value_for_optimization.
2846 * c-tree.h (decl_constant_value_for_optimization): Removed.
2847 * c-fold.c (c_fold_array_ref): New function.
2848 (c_fully_fold_internal): Add LVAL argument, propagate it through
2849 recursive calls. For VAR_P call decl_constant_value and
2850 unshare if not LVAL and either optimizing or IN_INIT. Remove
2851 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
2852 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
2853 (c_fully_fold): Add LVAL argument, pass it through to
2854 c_fully_fold_internal.
2855 (decl_constant_value_for_optimization): Removed.
2856
3ca0dc60
JM
28572017-11-15 Joseph Myers <joseph@codesourcery.com>
2858
2859 PR c/81156
2860 * c-parser.c (check_tgmath_function): New function.
2861 (enum tgmath_parm_kind): New enum.
2862 (c_parser_postfix_expression): Handle __builtin_tgmath.
2863
64a5912c
DM
28642017-10-31 David Malcolm <dmalcolm@redhat.com>
2865
2866 * c-decl.c (implicit_decl_warning): Update for renaming of
2867 pedwarn_at_rich_loc and warning_at_rich_loc.
2868 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
2869 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
2870 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2871 (c_parser_struct_or_union_specifier): Likewise for renaming of
2872 pedwarn_at_rich_loc.
2873 (c_parser_parameter_declaration): Likewise for renaming of
2874 error_at_rich_loc.
2875 * c-typeck.c (build_component_ref): Likewise.
2876 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
2877 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
2878 (set_init_label): Likewise for renaming of error_at_rich_loc.
2879
c1136864
RB
28802017-10-30 Richard Biener <rguenther@suse.de>
2881
2882 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
2883 stmts.
2884
ee5fd23a
MM
28852017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2886
2887 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2888 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2889
1a59ccf2
DM
28902017-10-25 David Malcolm <dmalcolm@redhat.com>
2891
2892 PR c/7356
2893 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2894 semicolons.
2895
bc1a75dd
JJ
28962017-10-25 Jakub Jelinek <jakub@redhat.com>
2897
2898 PR libstdc++/81706
2899 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2900 newdecl to corresponding __builtin_ if any.
2901
ff1ff960
PC
29022017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2903
2904 PR c++/82466
2905 * c-decl.c (diagnose_mismatched_decls): Use
2906 OPT_Wbuiltin_declaration_mismatch.
2907
62e1c678
DM
29082017-10-12 David Malcolm <dmalcolm@redhat.com>
2909
2910 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2911 use it to guard calls to maybe_suggest_missing_token_insertion.
2912 (c_parser_parms_list_declarator): Override default value of new
2913 "type_is_unique" param to c_parser_require.
2914 (c_parser_asm_statement): Likewise.
2915 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2916 defaulting to true.
2917
a92f6726
NS
29182017-10-11 Nathan Sidwell <nathan@acm.org>
2919
2920 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2921
8e6cdc90
RS
29222017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2923
2924 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2925 operating on trees as wide_ints.
2926 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2927 (c_tree_equal): Likewise.
2928
8139a48e
DM
29292017-10-04 David Malcolm <dmalcolm@redhat.com>
2930
2931 * c-decl.c (push_parm_decl): Store c_parm's location into the
2932 PARAM_DECL.
2933 (build_c_parm): Add "loc" param and store it within the c_parm.
2934 * c-parser.c (struct c_parser): Add "last_token_location" field.
2935 (c_parser_consume_token): Store location of the token into the
2936 new field.
2937 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2938 when handling a FUNCTION_DECL, if it doesn't already have them.
2939 (c_parser_parameter_declaration): Generate a location for the
2940 parameter, and pass it to the call to build_c_parm.
2941 * c-tree.h (struct c_parm): Add field "loc".
2942 (build_c_parm): Add location_t param.
2943 * c-typeck.c (get_fndecl_argument_location): New function.
2944 (inform_for_arg): New function.
2945 (convert_for_assignment): Use inform_for_arg when dealing with
2946 ic_argpass.
2947
2a389958
JJ
29482017-09-29 Jakub Jelinek <jakub@redhat.com>
2949
7d386d45
JJ
2950 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2951 width is non-NULL.
2952 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2953 don't SET_DECL_C_BIT_FIELD here.
2954
2a389958
JJ
2955 PR c/82340
2956 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2957 instead of trying to set just TREE_READONLY manually.
2958
ebc6a85e
TV
29592017-09-16 Tom de Vries <tom@codesourcery.com>
2960
2961 PR c/81875
2962 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2963 cond itself.
2964
bb75facd
JM
29652017-09-15 Joseph Myers <joseph@codesourcery.com>
2966
2967 PR c/82071
2968 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2969 for C11.
2970 (build_conditional_expr): For C11, generate result with excess
2971 precision when one argument is an integer and the other is of a
2972 type using excess precision.
2973
1d933576
BE
29742017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2975
2976 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2977
267bbb6f
MP
29782017-09-13 Marek Polacek <polacek@redhat.com>
2979
2980 PR c/82167
2981 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2982 than expr.original_type.
2983
6836632e
NS
29842017-09-12 Nathan Sidwell <nathan@acm.org>
2985
2986 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2987 resort_sorted_fields): Moved from c-family/c-common.c.
2988 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2989
e035be33
JM
29902017-09-01 Joseph Myers <joseph@codesourcery.com>
2991
2992 PR c/82071
2993 * c-typeck.c (build_atomic_assign): Handle argument with excess
2994 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2995 argument passed to build_binary_op and convert_for_assignment but
2996 not for call to c_fully_fold.
2997 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2998 Ensure build_binary_op is called with argument with original
2999 semantic type. Avoid calling c_fully_fold with an
3000 EXCESS_PRECISION_EXPR from build_binary_op.
3001
d2e05fcb
JJ
30022017-09-01 Jakub Jelinek <jakub@redhat.com>
3003
3004 PR c/81887
3005 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3006
b397965c
RS
30072017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3008 Alan Hayward <alan.hayward@arm.com>
3009 David Sherwood <david.sherwood@arm.com>
3010
3011 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3012 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3013 m1 and m2 to the signed equivalent of a fixed-point
3014 SCALAR_TYPE_MODE.
3015
14e18d71
DM
30162017-08-24 David Malcolm <dmalcolm@redhat.com>
3017
3018 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3019 than CAN_HAVE_LOCATION_P when determining whether to use the
3020 location_t value within "value".
3021
7f204c0f
DM
30222017-08-21 David Malcolm <dmalcolm@redhat.com>
3023
3024 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3025 rather than peeking the location of the first token.
3026 * c-tree.h (c_expr::get_location): New method.
3027
2f687306
DM
30282017-08-21 David Malcolm <dmalcolm@redhat.com>
3029
3030 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3031 to check_function_arguments.
3032
3e7b80d7
MP
30332017-08-18 Marek Polacek <polacek@redhat.com>
3034
3035 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3036 commentary.
3037
00aa1fa2
L
30382017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3039
3040 PR c/53037
3041 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3042 (check_bitfield_type_and_width): Don't allow bit-field with
3043 warn_if_not_aligned type.
3044
da67acb9
MS
30452017-08-14 Martin Sebor <msebor@redhat.com>
3046
3047 PR c/81117
3048 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3049
bb85aa74
MP
30502017-08-11 Marek Polacek <polacek@redhat.com>
3051
3052 PR c/81795
3053 * c-decl.c (pushtag): Only print inform if the warning was printed.
3054 (grokdeclarator): Likewise.
3055
32129a17
DM
30562017-08-10 David Malcolm <dmalcolm@redhat.com>
3057
3058 * c-parser.c (c_parser_error): Rename to...
3059 (c_parser_error_richloc): ...this, making static, and adding
3060 "richloc" parameter, passing it to the c_parse_error call,
3061 rather than calling c_parser_set_source_position_from_token.
3062 (c_parser_error): Reintroduce, reimplementing in terms of the
3063 above, converting return type from void to bool.
3064 (class token_pair): New class.
3065 (struct matching_paren_traits): New struct.
3066 (matching_parens): New typedef.
3067 (struct matching_brace_traits): New struct.
3068 (matching_braces): New typedef.
3069 (get_matching_symbol): New function.
3070 (c_parser_require): Add param MATCHING_LOCATION, using it to
3071 highlight matching "opening" tokens for missing "closing" tokens.
3072 (c_parser_skip_until_found): Likewise.
3073 (c_parser_static_assert_declaration_no_semi): Convert explicit
3074 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3075 class matching_parens, so that the pertinent open parenthesis is
3076 highlighted when there are problems locating the close
3077 parenthesis.
3078 (c_parser_struct_or_union_specifier): Likewise.
3079 (c_parser_typeof_specifier): Likewise.
3080 (c_parser_alignas_specifier): Likewise.
3081 (c_parser_simple_asm_expr): Likewise.
3082 (c_parser_braced_init): Likewise, for matching_braces.
3083 (c_parser_paren_condition): Likewise, for matching_parens.
3084 (c_parser_switch_statement): Likewise.
3085 (c_parser_for_statement): Likewise.
3086 (c_parser_asm_statement): Likewise.
3087 (c_parser_asm_operands): Likewise.
3088 (c_parser_cast_expression): Likewise.
3089 (c_parser_sizeof_expression): Likewise.
3090 (c_parser_alignof_expression): Likewise.
3091 (c_parser_generic_selection): Likewise.
3092 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3093 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3094 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3095 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3096 c_parser_skip_until_found call.
3097 (c_parser_objc_class_definition): Use class matching_parens as
3098 above.
3099 (c_parser_objc_method_decl): Likewise.
3100 (c_parser_objc_try_catch_finally_statement): Likewise.
3101 (c_parser_objc_synchronized_statement): Likewise.
3102 (c_parser_objc_at_property_declaration): Likewise.
3103 (c_parser_oacc_wait_list): Likewise.
3104 (c_parser_omp_var_list_parens): Likewise.
3105 (c_parser_omp_clause_collapse): Likewise.
3106 (c_parser_omp_clause_default): Likewise.
3107 (c_parser_omp_clause_if): Likewise.
3108 (c_parser_omp_clause_num_threads): Likewise.
3109 (c_parser_omp_clause_num_tasks): Likewise.
3110 (c_parser_omp_clause_grainsize): Likewise.
3111 (c_parser_omp_clause_priority): Likewise.
3112 (c_parser_omp_clause_hint): Likewise.
3113 (c_parser_omp_clause_defaultmap): Likewise.
3114 (c_parser_oacc_single_int_clause): Likewise.
3115 (c_parser_omp_clause_ordered): Likewise.
3116 (c_parser_omp_clause_reduction): Likewise.
3117 (c_parser_omp_clause_schedule): Likewise.
3118 (c_parser_omp_clause_num_teams): Likewise.
3119 (c_parser_omp_clause_thread_limit): Likewise.
3120 (c_parser_omp_clause_aligned): Likewise.
3121 (c_parser_omp_clause_linear): Likewise.
3122 (c_parser_omp_clause_safelen): Likewise.
3123 (c_parser_omp_clause_simdlen): Likewise.
3124 (c_parser_omp_clause_depend): Likewise.
3125 (c_parser_omp_clause_map): Likewise.
3126 (c_parser_omp_clause_device): Likewise.
3127 (c_parser_omp_clause_dist_schedule): Likewise.
3128 (c_parser_omp_clause_proc_bind): Likewise.
3129 (c_parser_omp_clause_uniform): Likewise.
3130 (c_parser_omp_for_loop): Likewise.
3131 (c_parser_cilk_clause_vectorlength): Likewise.
3132 (c_parser_cilk_clause_linear): Likewise.
3133 (c_parser_transaction_expression): Likewise.
3134 * c-parser.h (c_parser_require): Add param matching_location with
3135 default UNKNOWN_LOCATION.
3136 (c_parser_error): Convert return type from void to bool.
3137 (c_parser_skip_until_found): Add param matching_location with
3138 default UNKNOWN_LOCATION.
3139
30af3a2b
MP
31402017-08-09 Marek Polacek <polacek@redhat.com>
3141
3142 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3143 * c-tree.h (build_external_ref): Update declaration.
3144 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3145 (build_external_ref): Change the type of a parameter to bool.
3146 (parser_build_binary_op): Use true/false instead of 1/0.
3147 (pointer_diff): Likewise.
3148 (build_modify_expr): Likewise.
3149 (set_designator): Change the type of a parameter to bool.
3150 (set_init_index): Use true/false instead of 1/0.
3151 (set_init_label): Likewise.
3152 (output_init_element): Change the type of a parameter to bool.
3153 (output_pending_init_elements): Use true/false instead of 1/0.
3154 (process_init_element): Likewise.
3155 (build_binary_op): Change the type of a parameter to bool.
3156
296c53ac
MP
31572017-08-09 Marek Polacek <polacek@redhat.com>
3158
3159 PR c/81233
3160 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3161 Call emit_diagnostic_valist instead of pedwarn.
3162 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3163 Print the relevant types in diagnostics.
3164
a32c8316
MP
31652017-08-09 Marek Polacek <polacek@redhat.com>
3166
3167 PR c/81417
3168 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3169 build_conditional_expr.
a32c8316
MP
3170 * c-parser.c (c_parser_conditional_expression): Create locations for
3171 EXP1 and EXP2 from their source ranges. Pass the locations down to
3172 build_conditional_expr.
3173 * c-tree.h (build_conditional_expr): Update declaration.
3174 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3175 For -Wsign-compare, also print the types.
3176
314e6352
ML
31772017-08-08 Martin Liska <mliska@suse.cz>
3178
3179 * c-convert.c: Include header files.
3180 * c-typeck.c: Likewise.
3181
577eec56
ML
31822017-08-07 Martin Liska <mliska@suse.cz>
3183
3184 * c-parser.c (c_parser_attributes): Canonicalize name of an
3185 attribute.
3186
f7b6353a
MP
31872017-08-02 Marek Polacek <polacek@redhat.com>
3188
3189 PR c/81289
3190 * c-parser.c (c_parser_unary_expression): Use set_error.
3191
8a6eab34
MP
3192 PR c/81448
3193 PR c/81306
3194 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3195 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3196
ab20d992 31972017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3198 Martin Liska <mliska@suse.cz>
3199
3200 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3201 statement.
7fef86d3 3202
f34ebeb2
ML
32032017-07-31 Martin Liska <mliska@suse.cz>
3204
3205 PR sanitize/81530
3206 * c-convert.c (convert): Guard condition with flag_sanitize_p
3207 also with current_function_decl non-null equality.
3208 * c-decl.c (grokdeclarator): Likewise.
3209 * c-typeck.c (build_binary_op): Likewise.
3210
8595f67b
MP
32112017-07-25 Marek Polacek <polacek@redhat.com>
3212
3213 * c-decl.c (grokfield): Remove local variable.
3214
d49718d6
MP
32152017-07-25 Marek Polacek <polacek@redhat.com>
3216
3217 PR c/81364
3218 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3219 macro expansion if the body is in { }.
3220 (c_parser_while_statement): Likewise.
3221 (c_parser_for_statement): Likewise.
3222
ff22eb12
NS
32232017-07-18 Nathan Sidwell <nathan@acm.org>
3224
3225 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3226
eea77d1f
DM
32272017-07-14 David Malcolm <dmalcolm@redhat.com>
3228
3229 * c-decl.c (implicitly_declare): When suggesting a missing
3230 #include, provide a fix-it hint.
3231
b6f43128
DM
32322017-07-06 David Malcolm <dmalcolm@redhat.com>
3233
3234 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3235 and call that instead.
3236 * c-tree.h (selftest::run_c_tests): New decl.
3237
3e2becc4
MP
32382017-06-26 Marek Polacek <polacek@redhat.com>
3239
3240 PR c/80116
3241 * c-parser.c (c_parser_if_body): Set the location of the
3242 body of the conditional after parsing all the labels. Call
3243 warn_for_multistatement_macros.
3244 (c_parser_else_body): Likewise.
3245 (c_parser_switch_statement): Likewise.
3246 (c_parser_while_statement): Likewise.
3247 (c_parser_for_statement): Likewise.
3248 (c_parser_statement): Add a default argument. Save the location
3249 after labels have been parsed.
3250 (c_parser_c99_block_statement): Likewise.
3251
343ae898
RB
32522017-06-19 Richard Biener <rguenther@suse.de>
3253
3254 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3255 negated _Literals to parse _Literal (int) -1.
3256
45b2222a
ML
32572017-06-13 Martin Liska <mliska@suse.cz>
3258
3259 PR sanitize/78204
3260 * c-convert.c (convert): Use sanitize_flags_p.
3261 * c-decl.c (grokdeclarator): Likewise.
3262 * c-typeck.c (convert_for_assignment): Likewise.
3263 (c_finish_return): Likewise.
3264 (build_binary_op): Likewise.
3265
8ab7005b
JJ
32662017-06-08 Jakub Jelinek <jakub@redhat.com>
3267
3268 PR c/81006
3269 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3270 to sizetype before size_binop.
3271
363dc72c
JJ
32722017-06-07 Jakub Jelinek <jakub@redhat.com>
3273
3274 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3275 of TDI_generic.
3276
dc949728
MP
32772017-06-06 Marek Polacek <polacek@redhat.com>
3278
3279 PR c/79983
3280 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3281 ref.
3282 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3283
40ffd95f
BE
32842017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3285
3286 * c-parser.c (c_parser_binary_expression): Implement the
3287 -Wsizeof_pointer_div warning.
3288 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3289 from a parenthesized expression.
3290 (c_parser_expr_list): Use c_last_sizeof_loc.
3291 * c-tree.h (c_last_sizeof_loc): New external.
3292 * c-typeck.c (c_last_sizeof_loc): New variable.
3293 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3294
9fc5e7a4
MM
32952017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3296
3297 PR testsuite/80580
3298 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3299
f012c8ef
DM
33002017-05-30 David Malcolm <dmalcolm@redhat.com>
3301
3302 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3303 parameters.
3304
3cd211af
MS
33052017-05-24 Martin Sebor <msebor@redhat.com>
3306
3307 PR c/80731
3308 * c-fold.c (c_fully_fold_internal): Adjust.
3309 * c-typeck.c (parser_build_unary_op): Adjust.
3310
fd71a9a2
TS
33112017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3312
3313 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3314 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3315 "VECTOR_LENGTH".
3316
92fa0f9e
MP
33172017-05-23 Marek Polacek <polacek@redhat.com>
3318
3319 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3320 quotes.
3321
d11c168a
JJ
33222017-05-22 Jakub Jelinek <jakub@redhat.com>
3323
3324 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3325 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3326 it returned invariant. Call tree_invariant_p unconditionally
3327 afterwards to decide whether to return expr or op0.
3328
58aca9d9
NS
33292017-05-22 Nathan Sidwell <nathan@acm.org>
3330
3331 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3332
7fd549d2
TS
33332017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3334
3335 * c-parser.c (c_parser_omp_clause_default): Handle
3336 "OMP_CLAUSE_DEFAULT_PRESENT".
3337
6ecd2339
BE
33382017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3339
3340 * config-lang.in (gtfiles): Add c-family/c-format.c.
3341
8a57ecff
NS
33422017-05-18 Nathan Sidwell <nathan@acm.org>
3343
3344 * c-decl.c (pushdecl_top_level): Delete unused function.
3345
6574d78e
MP
33462017-05-18 Marek Polacek <polacek@redhat.com>
3347
3348 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3349 (check_earlier_gotos): Likewise.
3350 (define_label): Likewise.
3351 (pending_xref_error): Likewise.
3352 (smallest_type_quals_location): Likewise.
3353 (grokdeclarator): Likewise.
3354 (grokparms): Likewise.
3355 (identifier_global_value): Likewise.
3356 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3357 (find_init_member): Likewise.
3358
e3455240
MP
33592017-05-18 Marek Polacek <polacek@redhat.com>
3360
3361 * c-decl.c (start_decl): Use false/true instead of 0/1.
3362 (grokdeclarator): Likewise.
3363 (finish_struct): Likewise.
3364 (start_function): Change the return type to bool. Use false/true
3365 instead of 0/1.
3366 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3367 * c-tree.h (start_function): Update.
3368 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3369 (set_designator): Change the return type to bool. Use false/true
3370 instead of 0/1.
3371
3fa8871b
MP
33722017-05-17 Marek Polacek <polacek@redhat.com>
3373
3374 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3375 * c-typeck.c: Likewise.
3376
142473df
MP
33772017-05-17 Marek Polacek <polacek@redhat.com>
3378
3379 PR sanitizer/80659
3380 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3381 DECL_IGNORED_P even for non-static compound literals.
3382
1a817418
ML
33832017-05-17 Martin Liska <mliska@suse.cz>
3384
3385 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3386 use it instead of int type.
3387
b2fa0a8b
MP
33882017-05-17 Marek Polacek <polacek@redhat.com>
3389
3390 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3391 call c_fully_fold.
3392 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3393 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3394 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3395 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3396 save_expr.
3397 (c_parser_conditional_expression): Likewise.
3398 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3399 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3400 (process_init_element): Likewise.
3401 (build_binary_op): Likewise.
3402 (handle_omp_array_sections_1): Likewise.
3403
1e47f02b
TS
34042017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3405
3406 * c-parser.c (c_parser_omp_clause_num_gangs)
3407 (c_parser_omp_clause_num_workers)
3408 (c_parser_omp_clause_vector_length): Merge functions into...
3409 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3410 all users.
3411
c24e924f
NS
34122017-05-11 Nathan Sidwell <nathan@acm.org>
3413
3414 * gimple-parser.c: Don't #include tree-dump.h.
3415
c587104e
MM
34162017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3417
3418 PR testsuite/80580
3419 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3420
67ac9a9d
MM
34212017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3422
3423 PR testsuite/80580
3424 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3425 incorrect __MEM syntax.
3426
ac4eb40f
MM
34272017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3428
3429 PR testsuite/80580
3430 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3431 type of unary '*'.
3432
641da50a
NS
34332017-05-09 Nathan Sidwell <nathan@acm.org>
3434
3435 * c-tree.h (pushdecl): Declare.
3436
56d35585
DM
34372017-05-05 David Malcolm <dmalcolm@redhat.com>
3438
3439 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3440 with diagnostic_report_diagnostic.
3441 * c-errors.c (pedwarn_c99): Likewise.
3442 (pedwarn_c90): Likewise.
3443
815d9cc6
XR
34442017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3445
92a285c1 3446 PR c++/80038
815d9cc6
XR
3447 * c-gimplify.c (c_gimplify_expr): Remove calls to
3448 cilk_gimplifY_call_params_in_spawned_fn.
3449
1c4ea66f
DM
34502017-04-25 David Malcolm <dmalcolm@redhat.com>
3451
3452 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3453 hint for removing extra semicolon.
3454
666f7903
JJ
34552017-04-21 Jakub Jelinek <jakub@redhat.com>
3456
3457 PR c/80468
3458 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3459 enabled, set specs->type to integer_type_node.
3460
5764ee3c
JW
34612017-04-03 Jonathan Wakely <jwakely@redhat.com>
3462
3463 * c-array-notation.c: Fix typo in comment.
3464
10fa8dfb
MP
34652017-03-29 Marek Polacek <polacek@redhat.com>
3466
3467 PR c/79730
3468 * c-decl.c (finish_decl): Check VAR_P.
3469
a9e4a1a5
JJ
34702017-03-27 Jakub Jelinek <jakub@redhat.com>
3471
3472 PR middle-end/80162
3473 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3474 * c-typeck.c (c_mark_addressable): Likewise. Look through
3475 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3476 to ARRAY_TYPE.
3477 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3478
ee3ff394
MP
34792017-03-23 Marek Polacek <polacek@redhat.com>
3480
3481 * c-tree.h: Remove a C_RID_YYCODE reference.
3482
4d1b8e70
JJ
34832017-03-21 Jakub Jelinek <jakub@redhat.com>
3484
3485 PR c/80097
3486 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3487 optional COMPOUND_EXPR with ubsan instrumentation.
3488
31dc71a8
MP
34892017-03-17 Marek Polacek <polacek@redhat.com>
3490
3491 * c-parser.c: Add C11 references.
3492
d579c385
MP
34932017-03-15 Marek Polacek <polacek@redhat.com>
3494
3495 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3496
85059a38
MP
34972017-03-11 Marek Polacek <polacek@redhat.com>
3498
3499 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3500
2f6f187a
DM
35012017-03-10 David Malcolm <dmalcolm@redhat.com>
3502
3503 PR translation/79848
3504 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3505 "%qs".
3506 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3507
36618428
MP
35082017-03-09 Marek Polacek <polacek@redhat.com>
3509
3510 PR sanitizer/79757
3511 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3512 parameter declarations with initializers.
3513
01e5af5a
JJ
35142017-03-09 Jakub Jelinek <jakub@redhat.com>
3515
3516 PR c/79969
3517 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3518 TYPE_STUB_DECL.
3519
a71dbc63
JJ
35202017-03-07 Jakub Jelinek <jakub@redhat.com>
3521
3522 PR c/79834
3523 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3524 for "may only be used in compound statements" diagnostics, change it
3525 such that the same translatable string is used for all pragmas. For
3526 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3527 diagnostics.
3528 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3529 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3530 "may only be used in compound statements" diagnostics, such that the
3531 same translatable string is used for all pragmas.
3532
1ff4bae6
MP
35332017-03-04 Marek Polacek <polacek@redhat.com>
3534
3535 PR c/79847
3536 * c-decl.c (implicit_decl_warning): Add missing space.
3537
7f5a7d78
MP
35382017-03-03 Marek Polacek <polacek@redhat.com>
3539
3540 PR c/79758
3541 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3542 current_function_prototype_arg_types is error_mark_node. Fix
3543 formatting. Use TREE_VALUE instead of TREE_TYPE.
3544
883c8f06
JJ
35452017-03-03 Jakub Jelinek <jakub@redhat.com>
3546
79c9b7a8
JJ
3547 PR c/79837
3548 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3549 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3550 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3551 diagnostics.
3552
883c8f06
JJ
3553 PR c/79836
3554 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3555 instead of %<_Generic>.
3556 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3557 (c_parser_omp_target_exit_data): Use %<release%> instead of
3558 %<release>.
3559
324ff1a0
JJ
35602017-02-28 Jakub Jelinek <jakub@redhat.com>
3561
3562 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3563 instead of just cond ? "..." : "...".
3564 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3565 for "enter"/"exit" keyword.
3566 (c_finish_oacc_routine): Don't use %s to supply portions of the
3567 message.
3568
4227c9ad
JJ
35692017-02-24 Jakub Jelinek <jakub@redhat.com>
3570
3571 PR c++/79588
3572 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3573 handle -Wrestrict here.
3574 * c-typeck.c (build_function_call_vec): Adjust
3575 check_function_arguments caller.
3576
5d972e66
RB
35772017-02-23 Richard Biener <rguenther@suse.de>
3578
3579 PR c/79684
3580 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3581 to initialize c_exprs to return.
3582 (c_parser_gimple_binary_expression): Likewise.
3583 (c_parser_gimple_unary_expression): Likewise.
3584 (c_parser_gimple_postfix_expression): Likewise.
3585
61ac5ebe
MP
35862017-02-22 Marek Polacek <polacek@redhat.com>
3587
3588 PR c/79662
3589 * c-typeck.c (convert_arguments): Handle error_mark_node.
3590
41d1b0b1
PK
35912017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3592
3593 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3594 value of c_parser_parse_ssa_name against error_mark_node and emit
3595 error if ssa name is anonymous and written as default definition.
3596
eab1f169
PK
35972017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3598
3599 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3600 FMA_EXPR.
3601
bcac0b4d
JJ
36022017-02-16 Jakub Jelinek <jakub@redhat.com>
3603
3604 PR c++/79512
3605 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3606 ignore #pragma omp target even when not followed by identifier.
3607
1be33173
PK
36082017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3609
3610 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3611 (c_parser_gimple_unary_expression): Likewise.
3612
aa326bfb
JJ
36132017-02-13 Jakub Jelinek <jakub@redhat.com>
3614
3615 * c-parser.c (c_parser_oacc_declare): Add missing space in
3616 diagnostics.
3617
8a398bc5
PK
36182017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3619
3620 PR c/79478
3621 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3622 set_c_expr_source_range when parsing ssa-name.
3623
3dcde5ef 36242017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3625 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3626
3627 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3628 building IL when arguments are error_mark_node.
3629 (c_parser_gimple_unary_expression): Likewise.
3630 (c_parser_gimple_if_stmt): Likewise.
3631 (c_parser_gimple_switch_stmt): Likewise.
3632 (c_parser_gimple_return_stmt): Likewise.
3633 (c_parser_parse_ssa_name): When name lookup fails do not build
3634 an SSA name. Use undeclared rather than not declared in error
3635 reporting.
3636
192b048b
MP
36372017-02-09 Marek Polacek <polacek@redhat.com>
3638
3639 PR c/79428
3640 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3641 instead of c_parser_skip_until_found.
3642
56f71478
JJ
36432017-02-09 Jakub Jelinek <jakub@redhat.com>
3644
3645 PR c/79431
3646 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3647 symtab_node::get on automatic variables.
3648
02889d23
CLT
36492016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3650 Chung-Lin Tang <cltang@codesourcery.com>
3651
3652 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3653 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3654 semantic checking.
3655 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3656
7af4b20d
RB
36572017-02-07 Richard Biener <rguenther@suse.de>
3658
3659 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3660 (c_parser_gimple_postfix_expression_after_primary):
3661 Do not use c_build_function_call_vec to avoid folding and promotion.
3662 Simplify.
3663
e5e391d6
MO
36642017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3665
3666 PR lto/79061
3667 * c-decl.c (pop_scope): Pass main_input_filename to
3668 build_translation_unit_decl.
3669
c2e84327
DM
36702017-01-24 David Malcolm <dmalcolm@redhat.com>
3671
3672 * c-parser.c: Include "read-rtl-function.h" and
3673 "run-rtl-passes.h".
3674 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3675 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3676 production. Update for renaming of field "gimple_pass" to
3677 "gimple_or_rtl_pass". If __RTL was seen, call
3678 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3679 to an auto_timevar, to cope with early exit.
3680 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3681 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3682 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3683 Handle RID_RTL.
3684 (c_parser_parse_rtl_body): New function.
3685 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3686 (struct c_declspecs): Rename field "gimple_pass" to
3687 "gimple_or_rtl_pass". Add field "rtl_p".
3688 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3689 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3690 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3691 (c_parser_gimple_or_rtl_pass_list): ...this.
3692
2ebd93e1
MP
36932017-01-20 Marek Polacek <polacek@redhat.com>
3694
3695 PR c/64279
3696 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3697
b1c95bb5
RB
36982017-01-13 Richard Biener <rguenther@suse.de>
3699
3700 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3701 nops.
3702
25329913
RB
37032017-01-13 Richard Biener <rguenther@suse.de>
3704
3705 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3706 _Literal ( type-name ) number.
3707
6bb4ea5c
RB
37082017-01-12 Richard Biener <rguenther@suse.de>
3709
3710 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3711 __MEM.
3712
6b5b4e9c
JJ
37132017-01-11 Jakub Jelinek <jakub@redhat.com>
3714
3715 PR c++/72813
3716 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3717 PCH file.
3718
e3252775
RB
37192017-01-11 Richard Biener <rguenther@suse.de>
3720
3721 PR bootstrap/79052
3722 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3723 returns on parse errors.
3724
a9342885
MP
37252017-01-04 Marek Polacek <polacek@redhat.com>
3726
3727 PR c++/64767
3728 * c-parser.c (c_parser_postfix_expression): Mark zero character
3729 constants by setting original_type in c_expr.
3730 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3731 with a zero character constant.
3732 (char_type_p): New function.
3733
5dd9a9d0
DM
37342017-01-04 David Malcolm <dmalcolm@redhat.com>
3735
3736 * c-parser.c (c_parser_declaration_or_fndef): Create a
3737 rich_location at init_loc and parse it to start_init.
3738 (last_init_list_comma): New global.
3739 (c_parser_braced_init): Update last_init_list_comma when parsing
3740 commas. Pass it to pop_init_level. Pass location of closing
3741 brace to pop_init_level.
3742 (c_parser_postfix_expression_after_paren_type): Create a
3743 rich_location at type_loc and parse it to start_init.
3744 (c_parser_omp_declare_reduction): Likewise for loc.
3745 * c-tree.h (start_init): Add rich_location * param.
3746 (pop_init_level): Add location_t param.
3747 * c-typeck.c (struct initializer_stack): Add field
3748 "missing_brace_richloc".
3749 (start_init): Add richloc param, use it to initialize
3750 the stack node's missing_brace_richloc.
3751 (last_init_list_comma): New decl.
3752 (finish_implicit_inits): Pass last_init_list_comma to
3753 pop_init_level.
3754 (push_init_level): When finding missing open braces, add fix-it
3755 hints to the richloc.
3756 (pop_init_level): Add "insert_before" param and pass it
3757 when calling pop_init_level. Add fixits about missing
3758 close braces to any richloc. Use the richloc for the
3759 -Wmissing-braces warning.
3760 (set_designator): Pass last_init_list_comma to pop_init_level.
3761 (process_init_element): Likewise.
3762
cbe34bb5
JJ
37632017-01-01 Jakub Jelinek <jakub@redhat.com>
3764
3765 Update copyright years.
3766
d17680f3
JJ
37672016-12-21 Jakub Jelinek <jakub@redhat.com>
3768
0dba7960
JJ
3769 PR bootstrap/78817
3770 * c-typeck.c (build_function_call_vec): If check_function_arguments
3771 returns true, set TREE_NO_WARNING on CALL_EXPR.
3772
d17680f3
JJ
3773 PR c/77767
3774 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
3775 to *expr instead of overwriting it.
3776
aa90531e
RB
37772016-12-20 Richard Biener <rguenther@suse.de>
3778
3779 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
3780 error recovery.
3781 (c_parser_gimple_statement): Only build assigns for non-error
3782 stmts.
3783 (c_parser_gimple_postfix_expression_after): Improve error recovery.
3784
629b3d75
MJ
37852016-12-14 Martin Jambor <mjambor@suse.cz>
3786
3787 * c-parser.c: Include omp-general.h and omp-offload.h instead of
3788 omp-low.h.
3789 (c_finish_oacc_routine): Adjusted call to
3790 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
3791 to use their new names.
3792 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
3793 use its new name.
3794 (c_parser_oacc_update): Likewise.
3795 (c_parser_omp_simd): Likewise.
3796 (c_parser_omp_target_update): Likewise.
3797 * c-typeck.c: Include omp-general.h instead of omp-low.h.
3798 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
3799 name.
3800 (c_finish_omp_cancellation_point): Likewise.
3801 * gimple-parser.c: Do not include omp-low.h
3802
c5af52eb
CP
38032016-12-02 Cesar Philippidis <cesar@codesourcery.com>
3804 James Norris <jnorris@codesourcery.com>
3805
3806 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
3807 EXIT_DATA,WAIT} are not used in compound statements.
3808 (c_parser_oacc_enter_exit_data): Update diagnostics.
3809
48330c93
BE
38102016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3811
3812 PR c++/71973
3813 * c-decl.c (diagnose_mismatched_decls): Use
3814 OPT_Wbuiltin_declaration_mismatch here too.
3815
899ca90e 38162016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
3817 Alan Hayward <alan.hayward@arm.com>
3818 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
3819
3820 * c-decl.c (merge_decls): Use SET_DECL_MODE.
3821 (make_label, finish_struct): Likewise.
3822
1ee62b92 38232016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 3824 Richard Biener <rguenther@suse.de>
22b15758 3825
8e745a17
JJ
3826 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
3827 * config-lang.in (gtfiles): Add c/c-parser.h.
3828 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
3829 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
3830 * c-parser.c (enum c_id_kind, struct c_token,
3831 c_parser_next_token_is, c_parser_next_token_is_not,
3832 c_parser_next_token_is_keyword,
3833 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
3834 Split out to ...
3835 * c-parser.h: ... new header.
3836 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 3837 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
3838 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3839 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3840 c_parser_error, c_parser_require, c_parser_skip_until_found,
3841 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3842 c_parser_type_name): Export.
3843 (c_parser_tokens_buf): New function.
3844 (c_parser_error): Likewise.
3845 (c_parser_set_error): Likewise.
3846 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
3847 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
3848 via c_parser_parse_gimple_body.
8e745a17
JJ
3849 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
3850 c_token_starts_typename, c_parser_next_token_starts_declspecs,
3851 c_parser_next_tokens_start_declaration, c_parser_consume_token,
3852 c_parser_error, c_parser_require, c_parser_skip_until_found,
3853 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
3854 c_parser_type_name): Declare.
1ee62b92
PG
3855 (struct c_parser): Declare forward.
3856 (c_parser_tokens_buf): Declare.
8e745a17
JJ
3857 (c_parser_error): Likewise.
3858 (c_parser_set_error): Likewise.
3859 * gimple-parser.c: New file.
3860 * gimple-parser.h: Likewise.
1ee62b92 3861
22b15758
UB
38622016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3863
3864 PR c/35503
3865 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3866 warn_for_restrict.
3867
84ff4775
LCW
38682016-09-11 Le-Chun Wu <lcwu@google.com>
3869 Mark Wielaard <mjw@redhat.com>
3870
3871 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
3872 to the given -Wshadow= variant.
3873
4d0cdd0c
TP
38742016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3875
3876 * c-typeck.c: Include memmodel.h.
3877
1202f33e
JJ
38782016-10-13 Jakub Jelinek <jakub@redhat.com>
3879
3880 PR target/77957
3881 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
3882 instead of lhd_return_null_tree_v.
3883
8a14afd0
BS
38842016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3885
3886 PR c++/69733
3887 * c-decl.c (smallest_type_quals_location): New static function.
3888 (grokdeclarator): Try to find the correct location for an ignored
3889 qualifier.
3890
81fea426
MP
38912016-09-26 Marek Polacek <polacek@redhat.com>
3892
3893 PR c/7652
3894 * c-decl.c (pop_scope): Add gcc_fallthrough.
3895
38962016-09-26 Marek Polacek <polacek@redhat.com>
3897
3898 PR c/7652
3899 * c-parser.c (struct c_token): Add flags field.
3900 (c_lex_one_token): Pass it to c_lex_with_flags.
3901 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3902 into IFN_FALLTHROUGH.
3903 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3904 attribute fallthrough after a case label or default label.
3905 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3906
9a2300e9
MP
39072016-09-24 Marek Polacek <polacek@redhat.com>
3908
3909 PR c/77490
3910 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3911 have boolean value. Warn about ++/-- on booleans.
3912
7de76362
JJ
39132016-09-23 Jakub Jelinek <jakub@redhat.com>
3914
3915 * c-parser.c (incomplete_record_decls): Remove unnecessary
3916 = vNULL initialization of file scope vec.
3917
5b73d2ab
MP
39182016-09-16 Marek Polacek <polacek@redhat.com>
3919
3920 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3921
e51fbec3
MP
39222016-09-14 Marek Polacek <polacek@redhat.com>
3923
3924 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3925 (fix_array_notation_expr): Likewise.
3926 * c-decl.c (finish_decl): Likewise.
3927 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3928 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3929 (function_to_pointer_conversion): Use false instead of 0.
3930 (convert_lvalue_to_rvalue): Likewise.
3931 (parser_build_unary_op): Likewise.
3932 (build_atomic_assign): Likewise.
3933 (build_unary_op): Change nonconvert parameter type to bool, use
3934 true/false instead of 1/0.
3935 (build_binary_op): Use true instead of 1.
3936
254830ba
DM
39372016-09-13 David Malcolm <dmalcolm@redhat.com>
3938
3939 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3940 of add_fixit_insert to add_fixit_insert_before.
3941
4c13ba17
MP
39422016-09-13 Marek Polacek <polacek@redhat.com>
3943
3944 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3945 it.
3946
54dcdb88
BE
39472016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3948
3949 PR c++/77496
3950 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3951 COMPOUND_EXPR to warn_for_omitted_condop.
3952
e5106e27
DM
39532016-09-07 David Malcolm <dmalcolm@redhat.com>
3954
3955 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3956 c_get_substring_location for this new langhook.
3957
9dc5773f
JJ
39582016-09-02 Jakub Jelinek <jakub@redhat.com>
3959
3960 PR c/65467
3961 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3962 flag_openmp.
3963 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3964 instead of mark_exp_read on low_bound/length expression.
3965 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3966 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3967 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3968 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3969 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3970 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3971 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3972 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3973 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3974 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3975 instead of mark_expr_read.
3976 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3977 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3978 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3979 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3980 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3981 array section bases outside of depend clause, for depend clause
3982 use convert_lvalue_to_rvalue on the base.
3983 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3984 linear, aligned, map, to and from clauses.
3985 (c_omp_clause_copy_ctor): New function.
3986
295844f6
MP
39872016-09-01 Marek Polacek <polacek@redhat.com>
3988
3989 PR c/7652
3990 * c-typeck.c (composite_type): Add FALLTHRU comment.
3991
089af25c
DM
39922016-08-31 David Malcolm <dmalcolm@redhat.com>
3993
3994 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3995 to the insertion fixits for "struct", "union", and "enum".
3996
f9087798
DM
39972016-08-30 David Malcolm <dmalcolm@redhat.com>
3998
3999 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4000 rather than add_fixit_misspelled_id.
4001 (undeclared_variable): Likewise.
4002 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4003 now-redundant "here" params from add_fixit_insert method calls.
4004 (c_parser_parameter_declaration): Likewise.
4005 * c-typeck.c (build_component_ref): Remove now-redundant range
4006 param from add_fixit_replace method calls.
4007
ebef225f
MP
40082016-08-25 Marek Polacek <polacek@redhat.com>
4009
4010 * c-typeck.c (parser_build_binary_op): Pass LHS to
4011 warn_logical_not_parentheses.
4012
fe377a48
MP
40132016-08-25 Marek Polacek <polacek@redhat.com>
4014
4015 PR c/77323
4016 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4017 or _FloatN or _FloatNx is not supported.
4018 (finish_declspecs): Set type to integer_type_node when _FloatN or
4019 _FloatNx is not supported.
4020
c65699ef
JM
40212016-08-19 Joseph Myers <joseph@codesourcery.com>
4022
4023 PR c/32187
4024 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4025 (struct c_declspecs): Add field floatn_nx_idx.
4026 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4027 and _FloatNx type specifiers.
4028 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4029 (c_parser_declspecs, c_parser_attribute_any_word)
4030 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4031 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4032 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4033 narrower than double.
4034
2f1364c2
JJ
40352016-08-12 Jakub Jelinek <jakub@redhat.com>
4036 Martin Liska <mliska@suse.cz>
4037
4038 PR c/67410
4039 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4040 % to determine val element to change. Assert that
4041 wchar_bytes * charwidth fits into val array.
4042
191816a3
MP
40432016-08-12 Marek Polacek <polacek@redhat.com>
4044
4045 PR c/7652
4046 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4047 (c_parser_postfix_expression): Likewise.
4048 * c-typeck.c (build_unary_op): Adjust fall through comment.
4049 (c_mark_addressable): Likewise.
4050
b95a64bb
JJ
40512016-08-11 Jakub Jelinek <jakub@redhat.com>
4052
4053 PR c/72816
4054 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4055 array member through typedef, for orig_qual_indirect == 0 clear
4056 orig_qual_type.
4057
895aa8e1
DM
40582016-08-08 David Malcolm <dmalcolm@redhat.com>
4059
4060 PR c/64955
4061 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4062 this up to selftest::run_c_tests.
4063 (selftest::run_c_tests): New function.
4064
0b212d8c
TS
40652016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4066
ae9281fc
TS
4067 * c-parser.c (struct oacc_routine_data): Add error_seen and
4068 fndecl_seen members.
4069 (c_finish_oacc_routine): Use these.
4070 (c_parser_declaration_or_fndef): Adjust.
4071 (c_parser_oacc_routine): Likewise. Support more C language
4072 constructs, and improve diagnostics. Move pragma context
4073 checking...
4074 (c_parser_pragma): ... here.
4075
0b212d8c
TS
4076 * c-parser.c (struct oacc_routine_data): New.
4077 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4078 Simplify code.
4079 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4080 declare target" attribute.
4081
76e2c821
JB
40822016-08-01 Jan Beulich <jbeulich@suse.com>
4083
4084 * c-fold.c (c_fully_fold_internal): Also emit shift count
4085 warnings for vector types.
4086 * c-typeck.c (build_binary_op): Likewise.
4087
f618a472
MP
40882016-07-29 Marek Polacek <polacek@redhat.com>
4089
4090 PR c/71742
4091 * c-decl.c (finish_struct): Rephrase an error message.
4092
efd0786f
MP
4093 PR c/71853
4094 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4095 to error node for invalid code.
4096
e00dceaf
MP
4097 PR c/71573
4098 * c-decl.c (implicitly_declare): Return decl early not only for
4099 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4100
673a107a
JJ
41012016-07-29 Jakub Jelinek <jakub@redhat.com>
4102
4103 PR c/71969
4104 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4105 on GNU extern inline functions.
4106
a5b5c8b6
MP
41072016-07-29 Marek Polacek <polacek@redhat.com>
4108
4109 PR c/71583
4110 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4111 check expr.value.
4112
e3fe09c1
UB
41132016-07-22 Uros Bizjak <ubizjak@gmail.com>
4114
4115 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4116
7c8f7eaa
DM
41172016-07-20 David Malcolm <dmalcolm@redhat.com>
4118
4119 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4120 spellcheck-tree.h
4121 (best_macro_match): Likewise, converting from a typedef to a
4122 subclass.
4123 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4124 (lookup_name_fuzzy): Update for change of best_macro_match to a
4125 subclass with a ctor that calls cpp_forall_identifiers.
4126
de6a69ee
DM
41272016-07-20 David Malcolm <dmalcolm@redhat.com>
4128
4129 * c-decl.c (implicit_decl_warning): Update for conversion of
4130 return type of lookup_name_fuzzy to const char *.
4131 (undeclared_variable): Likewise.
4132 (lookup_name_fuzzy): Convert return type from tree to
4133 const char *.
4134 * c-parser.c (c_parser_declaration_or_fndef): Update for
4135 conversion of return type of lookup_name_fuzzy to const char *.
4136 (c_parser_parameter_declaration): Likewise.
4137
b1c9c068
CP
41382016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4139
4140 * c-parser.c (c_parser_oacc_declare): Don't scan for
4141 GOMP_MAP_POINTER.
4142 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4143 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4144 zero-length subarrays.
4145
ddbbcb19
JJ
41462016-07-15 Jakub Jelinek <jakub@redhat.com>
4147
4148 PR c/71858
4149 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4150 instead of FUZZY_LOOKUP_NAME.
4151 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4152 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4153
dd36b877
JJ
41542016-07-14 Jakub Jelinek <jakub@redhat.com>
4155
4156 PR c/71858
4157 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4158
8c681247
TS
41592016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4160
4161 * c-parser.c (c_parser_generic_selection): Make type of variable
4162 auto_vec.
4163 (c_parser_omp_declare_simd): Likewise.
4164
bf4fa671
TS
41652016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4166
4167 * c-decl.c (struct c_struct_parse_info): Change member types
4168 from vec to auto_vec.
4169 (start_struct): Adjust.
4170 (finish_struct): Likewise.
4171
557e8c49
JJ
41722016-07-02 Jakub Jelinek <jakub@redhat.com>
4173
4174 PR c/71719
4175 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4176
54d19c3b
TS
41772016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4178
4179 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4180 Move pragma context checking into...
4181 (c_parser_omp_cancellation_point): ... here, and improve
4182 diagnostic messages.
4183 * c-typeck.c (c_finish_omp_cancel)
4184 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4185
152ef731
JJ
41862016-06-29 Jakub Jelinek <jakub@redhat.com>
4187
4188 PR c/71685
4189 * c-typeck.c (c_build_qualified_type): Don't clear
4190 C_TYPE_INCOMPLETE_VARS for the main variant.
4191
41922016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4193
4194 PR c/71552
4195 * c-typeck.c (output_init_element): Diagnose incompatible types
4196 before non-constant initializers.
4197
e9ac1f86
JJ
41982016-06-28 Jakub Jelinek <jakub@redhat.com>
4199
4200 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4201
277d7ee0
AK
42022016-06-23 Andi Kleen <ak@linux.intel.com>
4203
4204 * Make-lang.in: Add support for autofdo.
4205
1a4f11c8
DM
42062016-06-22 David Malcolm <dmalcolm@redhat.com>
4207
4208 PR c/70339
4209 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4210 (implicit_decl_warning): When issuing warnings for implicit
4211 declarations, attempt to provide a suggestion via
4212 lookup_name_fuzzy.
4213 (undeclared_variable): Likewise when issuing errors.
4214 (lookup_name_in_scope): Likewise.
4215 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4216 (best_macro_match): New typedef.
4217 (find_closest_macro_cpp_cb): New function.
4218 (lookup_name_fuzzy): New function.
4219 * c-parser.c: Include gcc-rich-location.h.
4220 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4221 (c_keyword_starts_typename): ...this new function.
4222 (c_parser_declaration_or_fndef): When issuing errors about
4223 missing "struct" etc, add a fixit. For other kinds of errors,
4224 attempt to provide a suggestion via lookup_name_fuzzy.
4225 (c_parser_parms_declarator): When looking ahead to detect typos in
4226 type names, also reject CPP_KEYWORD.
4227 (c_parser_parameter_declaration): When issuing errors about
4228 unknown type names, attempt to provide a suggestion via
4229 lookup_name_fuzzy.
4230 * c-tree.h (c_keyword_starts_typename): New prototype.
4231
5a578671
JM
42322016-06-20 Joseph Myers <joseph@codesourcery.com>
4233
4234 PR c/71601
4235 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4236 c_common_type returns error_mark_node.
4237
3f8257db 42382016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4239
4240 PR c/69507
4241 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4242 __alignof__ (expression).
4243
6a3f203c
DM
42442016-06-14 David Malcolm <dmalcolm@redhat.com>
4245
4246 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4247
264757fb
DM
42482016-06-14 David Malcolm <dmalcolm@redhat.com>
4249
4250 * c-typeck.c (build_component_ref): Simplify fixit code by
4251 using gcc_rich_location::add_fixit_misspelled_id.
4252 (set_init_label): Likewise.
4253
f7e4f2e3
DM
42542016-06-13 David Malcolm <dmalcolm@redhat.com>
4255
4256 * c-parser.c (c_parser_initelt): Provide location of name for new
4257 location_t param of set_init_label.
4258 * c-tree.h (set_init_label): Add location_t param.
4259 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4260 param and use it when issuing error messages about unrecognized
4261 field names. Attempt to provide a fixit hint if appropriate,
4262 otherwise update the error message to provide the type name.
4263
4b1ffdb1
TS
42642016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4265
4266 PR c/71381
4267 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4268 Loosen checking.
4269
44a845ca
MS
42702016-06-08 Martin Sebor <msebor@redhat.com>
4271 Jakub Jelinek <jakub@redhat.com>
4272
4273 PR c++/70507
4274 PR c/68120
4275 * c-typeck.c (convert_arguments): Don't promote last argument
4276 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4277
92a5f2ba
MP
42782016-06-08 Marek Polacek <polacek@redhat.com>
4279
4280 PR c/71418
4281 * c-decl.c (grokdeclarator): Check TYPE_P.
4282
08203f73
MP
4283 PR c/71426
4284 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4285 code.
4286
6ffd47b7
DM
42872016-06-07 David Malcolm <dmalcolm@redhat.com>
4288
4289 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4290 and structure element reference, capture the location of the
4291 element name token and pass it to build_component_ref.
4292 (c_parser_postfix_expression_after_primary): Likewise for
4293 structure element dereference.
4294 (c_parser_omp_variable_list): Likewise for
4295 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4296 * c-tree.h (build_component_ref): Add location_t param.
4297 * c-typeck.c (build_component_ref): Add location_t param
4298 COMPONENT_LOC. Use it, if available, when issuing hints about
4299 mispelled member names to provide a fixit replacement hint.
4300
1f40cff3
MP
43012016-06-06 Marek Polacek <polacek@redhat.com>
4302
4303 PR c/71362
4304 * c-parser.c (c_parser_direct_declarator): Set location.
4305
5545a907
MP
43062016-06-06 Marek Polacek <polacek@redhat.com>
4307
4308 * c-typeck.c (comptypes_internal): Handle comparisons of
4309 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4310 TYPE_REF_CAN_ALIAS_ALL.
4311
b605f663
CLT
43122016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4313
4314 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4315 arguments as addressable when async clause exists.
4316
00631022
JJ
43172016-05-30 Jakub Jelinek <jakub@redhat.com>
4318
4319 PR c++/71349
4320 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4321 when combined with target construct.
4322
7211a097
JJ
43232016-05-26 Jakub Jelinek <jakub@redhat.com>
4324
4325 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4326 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4327
95efe6b6
MP
43282016-05-25 Marek Polacek <polacek@redhat.com>
4329
4330 PR c/71265
4331 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4332
a23faf7a
MP
4333 PR c/71266
4334 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4335
e46c7770
CP
43362016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4337
4338 * c-parser.c (c_parser_oacc_declare): Add support for
4339 GOMP_MAP_FIRSTPRIVATE_POINTER.
4340 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4341 argument with enum c_omp_region_type ort.
4342 (handle_omp_array_sections): Likewise. Update call to
4343 handle_omp_array_sections_1.
4344 (c_finish_omp_clauses): Add specific errors and warning messages for
4345 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4346 call to handle_omp_array_sections.
4347
a04e69c0
TS
43482016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4349
4350 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4351
f17a223d
RB
43522016-05-24 Richard Biener <rguenther@suse.de>
4353
4354 PR middle-end/70434
4355 PR c/69504
4356 * c-typeck.c (build_array_ref): Do not complain about indexing
4357 non-lvalue vectors. Adjust for function name change.
4358
79063edd
MS
43592016-05-20 Martin Sebor <msebor@redhat.com>
4360
4361 PR c/71115
4362 * c-typeck.c (error_init): Use
4363 expansion_point_location_if_in_system_header.
4364 (warning_init): Same.
4365
8a40fef3
DM
43662016-05-19 David Malcolm <dmalcolm@redhat.com>
4367
4368 PR c/71171
4369 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4370 in error-handling.
4371 (c_parser_postfix_expression): Likewise.
4372 * c-tree.h (c_expr::set_error): New method.
4373 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4374 that result's range is initialized.
4375
e9892350
JG
43762016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4377
4378 * c-typeck.c (parser_build_unary_op): Fix formatting.
4379
8fad45f5
MW
43802016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4381
4382 * c-decl.c (grokdeclarator): Remove errmsg and use of
4383 targetm.invalid_return_type.
4384 (grokparms): Remove errmsg and use of
4385 targetm.invalid_parameter_type.
4386
aa4b467b
JM
43872016-05-13 Joseph Myers <joseph@codesourcery.com>
4388
4389 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4390 function return type.
4391
4f2e1536
MP
43922016-05-12 Marek Polacek <polacek@redhat.com>
4393
4394 PR c/70756
4395 * c-decl.c (build_compound_literal): Pass LOC down to
4396 c_incomplete_type_error.
4397 * c-tree.h (require_complete_type): Adjust declaration.
4398 (c_incomplete_type_error): Likewise.
4399 * c-typeck.c (require_complete_type): Add location parameter, pass it
4400 down to c_incomplete_type_error.
4401 (c_incomplete_type_error): Add location parameter, pass it down to
4402 error_at.
4403 (build_component_ref): Pass location down to c_incomplete_type_error.
4404 (default_conversion): Pass location down to require_complete_type.
4405 (build_array_ref): Likewise.
4406 (build_function_call_vec): Likewise.
4407 (convert_arguments): Likewise.
4408 (build_unary_op): Likewise.
4409 (build_c_cast): Likewise.
4410 (build_modify_expr): Likewise.
4411 (convert_for_assignment): Likewise.
4412 (c_finish_omp_clauses): Likewise.
4413
d6e83a8d
MM
44142016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4415
4416 PR c/43651
4417 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4418 is enabled.
4419 * c-errors.c (pedwarn_c90): Return true if warned.
4420 * c-tree.h (pedwarn_c90): Change return type to bool.
4421 (enum c_declspec_word): Add new enumerator cdw_atomic.
4422
5c3a10fb
MP
44232016-05-11 Marek Polacek <polacek@redhat.com>
4424
4425 PR c++/71024
4426 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4427 diagnose_mismatched_attributes and call it.
4428
cf68d92c
MP
44292016-05-10 Marek Polacek <polacek@redhat.com>
4430
4431 PR c/70255
4432 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4433 on a declaration following the definition.
4434
351f85c5
JJ
44352016-05-05 Jakub Jelinek <jakub@redhat.com>
4436
4437 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4438 parse it through to c_parser_c99_block_statement.
4439 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4440 caller.
4441
deef7113
MP
44422016-05-04 Marek Polacek <polacek@redhat.com>
4443
4444 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4445 OPT_Wdangling_else.
4446
de55efd5
MP
44472016-05-04 Marek Polacek <polacek@redhat.com>
4448
4449 PR c/48778
4450 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4451 for macro expansions.
4452
79ce98bc
MP
44532016-05-03 Marek Polacek <polacek@redhat.com>
4454
4455 PR c/70859
4456 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4457 check_builtin_function_arguments.
4458
fb2647aa
RB
44592016-05-03 Richard Biener <rguenther@suse.de>
4460
4461 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4462 the checksum from the previous stage.
4463
77886428
CP
44642016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4465
4466 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4467 c_finish_omp_clauses.
4468 (c_parser_omp_all_clauses): Likewise.
4469 (c_parser_oacc_cache): Likewise.
4470 (c_parser_oacc_loop): Likewise.
4471 (omp_split_clauses): Likewise.
4472 (c_parser_omp_declare_target): Likewise.
4473 (c_parser_cilk_all_clauses): Likewise.
4474 (c_parser_cilk_for): Likewise.
4475 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4476 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4477
7176a4a0
MP
44782016-05-02 Marek Polacek <polacek@redhat.com>
4479
4480 PR c/70851
4481 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4482 incomplete type.
4483
e7ff0319
CP
44842016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4485
4486 PR middle-end/70626
4487 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4488 OACC_LOOP_CLAUSE_MASK.
4489 (c_parser_oacc_kernels_parallel): Update call to
4490 c_oacc_split_loop_clauses.
4491
9f405ce1
AM
44922016-04-28 Andrew MacLeod <amacleod@redhat.com>
4493
4494 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4495 argument to build_modify_expr in two cases.
4496
c1e1f433
BS
44972016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4498
4499 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4500 warn_for_memset instead of warning directly here.
4501
2448a956
MP
45022016-04-26 Marek Polacek <polacek@redhat.com>
4503
4504 PR c/67784
4505 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4506 out of ...
4507 (c_parser_for_statement): ... here.
4508 (c_parser_if_statement): Use it.
4509 (c_parser_switch_statement): Use it.
4510 (c_parser_while_statement): Use it.
4511
b02a5e26
MP
4512 PR c/70791
4513 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4514
477d4906
IV
45152016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4516
4517 PR c++/69363
4518 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4519 instead of c_finish_cilk_clauses.
4520 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4521 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4522 floating-point variables in the linear clause for Cilk Plus.
4523
fe37c7af
MM
45242016-04-18 Michael Matz <matz@suse.de>
4525
4526 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4527 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4528
949505a9
MP
45292016-04-15 Marek Polacek <polacek@redhat.com>
4530
4531 PR c/70671
4532 * c-typeck.c (build_unary_op): Pass location down to error and
4533 warning call.
4534
dda1bf61
JJ
45352016-04-15 Jakub Jelinek <jakub@redhat.com>
4536
4537 PR c/70436
4538 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4539 where needed.
4540 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4541 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4542 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4543 Adjust c_parser_pragma callers.
4544 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4545 caller.
4546 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4547 c_parser_statement.
4548 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4549 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4550 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4551 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4552 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4553 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4554 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4555 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4556 down where needed.
4557 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4558 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4559 calls.
4560
99cd9857
MP
45612016-04-13 Marek Polacek <polacek@redhat.com>
4562
4563 PR c/70436
4564 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4565 adjust callers.
4566 (c_parser_statement): Likewise.
4567 (c_parser_c99_block_statement): Likewise.
4568 (c_parser_while_statement): Likewise.
4569 (c_parser_for_statement): Likewise.
4570 (c_parser_if_body): Don't set IF_P here.
4571 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4572 about dangling else here.
4573 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4574 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4575 warn about dangling else here.
4576
f13355da
MP
45772016-04-04 Marek Polacek <polacek@redhat.com>
4578
4579 PR c/70307
4580 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4581
5fde6a45
MP
45822016-03-31 Marek Polacek <polacek@redhat.com>
4583
4584 PR c/70297
4585 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4586
4bbf545b
DM
45872016-03-18 David Malcolm <dmalcolm@redhat.com>
4588
4589 PR c/70281
4590 * c-parser.c (c_parser_postfix_expression): Set the source range
4591 for uses of "__builtin_types_compatible_p".
4592
fcc2b74f
JJ
45932016-03-17 Jakub Jelinek <jakub@redhat.com>
4594
4595 PR c/70280
4596 * c-typeck.c (composite_type): Don't count void_list_node
4597 into len, if the list is terminated by void_list_node, start
4598 with void_list_node instead of NULL for newargs. Stop
4599 at void_list_node.
4600
ab4c578f
MP
46012016-03-16 Marek Polacek <polacek@redhat.com>
4602
4603 PR c/70093
4604 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4605 nested functions returning VM types.
4606
96b3c82d
CP
46072016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4608
4609 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4610 when calling c_finish_omp_clauses.
4611
29b9828f
BS
46122016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4613
4614 PR c/69824
4615 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4616 for later.
4617
7ff6ca38
MP
46182016-03-04 Marek Polacek <polacek@redhat.com>
4619
4620 PR c/69798
4621 * c-parser.c (c_parser_postfix_expression): Call
4622 c_parser_cast_expression rather than c_parser_postfix_expression.
4623
686e2237
JJ
46242016-03-01 Jakub Jelinek <jakub@redhat.com>
4625
4626 PR c/69796
4627 PR c/69974
4628 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4629 of incomplete decls to error_mark_node.
4630
0b05329b
MP
46312016-02-24 Marek Polacek <polacek@redhat.com>
4632
4633 PR c/69819
4634 * c-decl.c (finish_decl): Don't update the copy of the type of a
4635 different decl type.
4636
067fbd8b
JJ
46372016-02-23 Jakub Jelinek <jakub@redhat.com>
4638
4639 PR objc/69844
4640 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4641 in id_kind reclassification.
4642
bf14eba2
JJ
46432016-02-16 Jakub Jelinek <jakub@redhat.com>
4644
4645 PR c/69835
4646 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4647
ba539195
JN
46482016-02-16 James Norris <jnorris@codesourcery.com>
4649
4650 PR c/64748
4651 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4652
16595a1f
BS
46532016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4654
f48dfe98
BS
4655 * c-decl.c (build_null_declspecs): Zero the entire struct.
4656
16595a1f
BS
4657 PR c/69522
4658 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4659 callers changed. If nested_p is true, use it to call
4660 finish_implicit_inits.
4661 * c-tree.h (finish_implicit_inits): Declare.
4662 * c-typeck.c (finish_implicit_inits): New function. Move code
4663 from ...
4664 (push_init_level): ... here.
4665 (set_designator, process_init_element): Call finish_implicit_inits.
4666
66756373
JJ
46672016-02-11 Jakub Jelinek <jakub@redhat.com>
4668
4669 PR c/69768
4670 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4671 arguments for -Waddress warning.
4672
1066e9b5
JJ
46732016-02-04 Jakub Jelinek <jakub@redhat.com>
4674
4675 PR c/69669
4676 * c-decl.c (finish_enum): When honoring mode attribute,
4677 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4678
3a5d2ba4
JJ
46792016-01-29 Jakub Jelinek <jakub@redhat.com>
4680
4681 PR debug/69518
4682 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4683 all type variants, not just TYPE_MAIN_VARIANT.
4684
cbdd8ae0
JJ
46852016-01-27 Jakub Jelinek <jakub@redhat.com>
4686
4687 PR debug/66869
4688 * c-decl.c (c_write_global_declarations_1): Warn with
4689 warn_unused_function if static prototype without definition
4690 is not C_DECL_USED.
4691
fa74a4bc
MP
46922016-01-27 Marek Polacek <polacek@redhat.com>
4693
4694 PR c/68062
4695 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4696 to unsigned, if needed. Add -Wsign-compare warning.
4697
13f92e8d
JJ
46982016-01-26 Jakub Jelinek <jakub@redhat.com>
4699
4700 PR tree-optimization/69483
4701 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4702
cd8e73dc 47032016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4704
4705 PR c/24293
4706 * c-tree.h (incomplete_record_decls): Declare.
4707 * c-parser.c (incomplete_record_decls): Define.
4708 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4709 report error if any decl has zero size.
4710 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4711 or enum type to incomplete_record_decls.
4712
e6d6ec9e
TV
47132016-01-14 Tom de Vries <tom@codesourcery.com>
4714
4715 PR tree-optimization/68773
4716 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4717 set force_output.
4718
00083992
MP
47192016-01-14 Marek Polacek <polacek@redhat.com>
4720
4721 PR c/69262
4722 * c-decl.c (grokdeclarator): Provide more information for invalid
4723 array declarations.
4724
7443cf13
DM
47252016-01-06 David Malcolm <dmalcolm@redhat.com>
4726
4727 * c-parser.c (c_parser_unary_expression): For dereferences, build
4728 a combined location before calling build_indirect_ref, so that
4729 error reports cover the full range, manually updating the c_expr
4730 src_range.
4731
6b131d5b
MP
47322016-01-06 Marek Polacek <polacek@redhat.com>
4733
4734 PR sanitizer/69099
4735 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4736 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4737 NULL.
4738
818ab71a
JJ
47392016-01-04 Jakub Jelinek <jakub@redhat.com>
4740
4741 Update copyright years.
4742
2fe0a208
MP
47432016-01-04 Marek Polacek <polacek@redhat.com>
4744
4745 PR c/68908
4746 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4747 optimization to use __atomic_fetch_* built-in if possible.
4748
c7b48c8a
TS
47492015-12-23 Thomas Schwinge <thomas@codesourcery.com>
4750
4751 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
4752 into...
4753 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
4754 all users.
4755
fda5652f
MP
47562015-12-22 Marek Polacek <polacek@redhat.com>
4757
4758 PR c/69002
4759 * c-typeck.c (build_component_ref): Warn when acessing elements of
4760 atomic structures or unions.
4761
745e411d
DM
47622015-12-21 David Malcolm <dmalcolm@redhat.com>
4763
4764 * c-typeck.c: Include "gcc-rich-location.h".
4765 (build_binary_op): In the two places that call binary_op_error,
4766 create a gcc_rich_location and populate it with the location of
4767 the binary op and its two operands.
4768
94c40e19
DM
47692015-12-16 David Malcolm <dmalcolm@redhat.com>
4770
4771 * c-parser.c (c_parser_statement_after_labels): When calling
4772 c_finish_return, Use the return expression's location if it has
4773 one, falling back to the location of the first token within it.
4774 * c-typeck.c (c_finish_return): When issuing warnings about
4775 the incorrect presence/absence of a return value, issue a note
4776 showing the declaration of the function.
4777
de67c4c3
DM
47782015-12-16 David Malcolm <dmalcolm@redhat.com>
4779
4780 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
4781 to 4.
4782 (c_parser_peek_nth_token): New function.
4783 (c_parser_peek_conflict_marker): New function.
4784 (c_parser_error): Detect conflict markers and report them as such.
4785
a10704e1
DM
47862015-12-16 David Malcolm <dmalcolm@redhat.com>
4787
4788 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
4789 to preserve range information for the primary expression
4790 in the call to c_parser_postfix_expression_after_primary.
4791
8062bca6
DM
47922015-12-16 David Malcolm <dmalcolm@redhat.com>
4793
4794 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
4795 expression location, falling back on the first token location,
4796 rather than always using the latter.
4797
d06f8b75
MP
47982015-12-16 Marek Polacek <polacek@redhat.com>
4799
4800 PR c/64637
4801 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
4802 available.
4803
2994fb91
MP
48042015-12-15 Marek Polacek <polacek@redhat.com>
4805
4806 PR c/68907
4807 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
4808 artificial decl.
4809
a1b93f8d
DM
48102015-12-08 David Malcolm <dmalcolm@redhat.com>
4811
4812 * c-parser.c (c_parser_alignof_expression): Capture location of
4813 closing parenthesis (if any), or of end of unary expression, and
4814 use it to build a src_range for the expression.
4815
46c6e1e2
DM
48162015-12-08 David Malcolm <dmalcolm@redhat.com>
4817
4818 PR c/68757
4819 * c-parser.c (c_parser_get_builtin_args): Add
4820 "out_close_paren_loc" param, and write back to it.
4821 (c_parser_postfix_expression): Capture the closing
4822 parenthesis location for RID_CHOOSE_EXPR,
4823 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
4824 RID_BUILTIN_SHUFFLE and use it to set the source range
4825 for such expressions; within RID_BUILTIN_COMPLEX set
4826 the underlying location.
4827
66189108
MP
48282015-12-07 Marek Polacek <polacek@redhat.com>
4829
4830 PR c/68668
4831 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
4832 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
4833
f187980b
EB
48342015-12-04 Eric Botcazou <ebotcazou@adacore.com>
4835
4836 * c-tree.h (c_build_va_arg): Adjust prototype.
4837 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
4838 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
4839 parameter, adjust throughout and issue an error if EXPR is a component
4840 with reverse storage order.
4841
4250754e
JM
48422015-12-02 Jason Merrill <jason@redhat.com>
4843
4844 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4845 (c_fully_fold_internal, decl_constant_value_for_optimization):
4846 Move from c-common.c.
4847 * c-tree.h: Declare decl_constant_value_for_optimization.
4848 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
4849
e9e32ee6
JM
48502015-12-02 Joseph Myers <joseph@codesourcery.com>
4851
4852 PR c/68162
4853 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
4854 following link from declarator to next declarator. Track original
4855 qualified type and pass it to c_build_qualified_type.
4856 * c-typeck.c (c_build_qualified_type): Add arguments
4857 orig_qual_type and orig_qual_indirect.
4858
ff7a55bf
TS
48592015-12-02 Thomas Schwinge <thomas@codesourcery.com>
4860
4861 * c-parser.c (c_parser_omp_clause_name)
4862 (c_parser_oacc_all_clauses): Alphabetical sorting.
4863
657e4e47
JJ
48642015-12-02 Jakub Jelinek <jakub@redhat.com>
4865
4866 PR c/68533
4867 * c-decl.c (get_parm_info): Use b->locus instead of input_location
4868 for diagnostics.
4869
37d5ad46
JB
48702015-12-01 Julian Brown <julian@codesourcery.com>
4871 Cesar Philippidis <cesar@codesourcery.com>
4872 James Norris <James_Norris@mentor.com>
4873
4874 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
4875 (c_parser_oacc_clause_use_device): New function.
4876 (c_parser_oacc_all_clauses): Add use_device support.
4877 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
4878 (c_parser_oacc_host_data): New function.
4879 (c_parser_omp_construct): Add host_data support.
4880 * c-tree.h (c_finish_oacc_host_data): Add prototype.
4881 * c-typeck.c (c_finish_oacc_host_data): New function.
4882 (c_finish_omp_clauses): Add use_device support.
4883
a4850ce9
JH
48842015-11-29 Jan Hubicka <hubicka@ucw.cz>
4885
4886 PR c/67106
4887 * c-decl.c: Set TYPE_PACKED in variants.
4888
b58d3df2
ML
48892015-11-27 Martin Liska <mliska@suse.cz>
4890
4891 PR c++/68312
4892 * c-array-notation.c (fix_builtin_array_notation_fn):
4893 Use release_vec_vec instead of vec::release.
4894 (build_array_notation_expr): Likewise.
4895 (fix_conditional_array_notations_1): Likewise.
4896 (fix_array_notation_expr): Likewise.
4897 (fix_array_notation_call_expr): Likewise.
4898
aec17bfe
JJ
48992015-11-27 Jakub Jelinek <jakub@redhat.com>
4900
4901 PR c/63326
4902 * c-parser.c (c_parser_compound_statement_nostart): If
4903 last_label is true, use pragma_stmt instead of pragma_compound
4904 as second c_parser_pragma argument.
4905 (c_parser_omp_ordered, c_parser_omp_target_update,
4906 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4907 false as second argument to c_parser_skip_to_pragma_eol after
4908 diagnosing standalone directives used in pragma_stmt context.
4909
688c4de0
IV
49102015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4911
4912 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4913 with "if (ENABLE_OFFLOADING)".
4914
cbd03aee
DM
49152015-11-23 David Malcolm <dmalcolm@redhat.com>
4916
4917 PR objc/68438
4918 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4919 for various Objective-C constructs: Class.name syntax,
4920 @selector(), @protocol(), @encode(), and [] message syntax.
4921
a87a86e1
DM
49222015-11-20 David Malcolm <dmalcolm@redhat.com>
4923
4924 PR 62314
4925 * c-typeck.c (should_suggest_deref_p): New function.
4926 (build_component_ref): Special-case POINTER_TYPE when
4927 generating a "not a structure of union" error message, and
4928 suggest a "->" rather than a ".", providing a fix-it hint.
4929
8ece8dfb
DM
49302015-11-19 David Malcolm <dmalcolm@redhat.com>
4931
4932 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4933 candidate into a new function, find_closest_identifier.
4934
433068cc
MP
49352015-11-19 Marek Polacek <polacek@redhat.com>
4936
4937 PR c/68412
4938 * c-typeck.c (parser_build_binary_op): Properly handle
4939 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4940
bef08b71
DM
49412015-11-17 David Malcolm <dmalcolm@redhat.com>
4942
4943 * c-parser.c (set_c_expr_source_range): Bulletproof both
4944 overloaded implementations against NULL expr->value.
4945 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4946 values.
4947 (c_parser_unary_expression): Likewise when handling addresses of
4948 labels.
4949 (c_parser_postfix_expression): Likewise for statement expressions,
4950 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4951 __builtin_va_arg, and for __builtin_offset_of.
4952 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4953 src_range using the range of the braced initializer.
4954 (c_parser_transaction_expression): Set src_range for "ret" to a
4955 sane pair of values.
4956
fff77217
KY
49572015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4958
4959 * c-parser.c (c_finish_omp_declare_simd): Look for
4960 "simd" attribute as well. Update error message.
4961
1d899da2
TS
49622015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4963
4964 * c-parser.c (c_parser_omp_declare_target): Adjust.
4965
e4606348
JJ
49662015-11-14 Jakub Jelinek <jakub@redhat.com>
4967
4968 * c-typeck.c (c_finish_omp_clauses): Don't mark
4969 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4970
3e636daf
MP
49712015-11-14 Marek Polacek <polacek@redhat.com>
4972
4973 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4974 * c-typeck.c: Likewise.
4975
ebedc9a3
DM
49762015-11-13 David Malcolm <dmalcolm@redhat.com>
4977
4978 * c-decl.c (warn_defaults_to): Pass line_table to
4979 rich_location ctor.
4980 * c-errors.c (pedwarn_c99): Likewise.
4981 (pedwarn_c90): Likewise.
4982 * c-parser.c (set_c_expr_source_range): New functions.
4983 (c_token::get_range): New method.
4984 (c_token::get_finish): New method.
4985 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4986 based on the range from the start of the LHS to the end of the
4987 RHS.
4988 (c_parser_conditional_expression): Likewise, based on the range
4989 from the start of the cond.value to the end of exp2.value.
4990 (c_parser_binary_expression): Call set_c_expr_source_range on
4991 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4992 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4993 based on the cast_loc through to the end of the expr.
4994 (c_parser_unary_expression): Likewise, based on the
4995 op_loc through to the end of op.
4996 (c_parser_sizeof_expression) Likewise, based on the start of the
4997 sizeof token through to either the closing paren or the end of
4998 expr.
4999 (c_parser_postfix_expression): Likewise, using the token range,
5000 or from the open paren through to the close paren for
5001 parenthesized expressions.
5002 (c_parser_postfix_expression_after_primary): Likewise, for
5003 various kinds of expression.
5004 * c-tree.h (struct c_expr): Add field "src_range".
5005 (c_expr::get_start): New method.
5006 (c_expr::get_finish): New method.
5007 (set_c_expr_source_range): New decls.
5008 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5009 on ret for prefix unary ops.
5010 (parser_build_binary_op): Likewise, running from the start of
5011 arg1.value through to the end of arg2.value.
5012
ec8b536f
MP
50132015-11-13 Marek Polacek <polacek@redhat.com>
5014
5015 PR c/68320
5016 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5017
277fe616
DM
50182015-11-13 David Malcolm <dmalcolm@redhat.com>
5019
5020 * c-typeck.c: Include spellcheck.h.
5021 (lookup_field_fuzzy_find_candidates): New function.
5022 (lookup_field_fuzzy): New function.
5023 (build_component_ref): If the field was not found, try using
5024 lookup_field_fuzzy and potentially offer a suggestion.
5025
6e232ba4
JN
50262015-11-12 James Norris <jnorris@codesourcery.com>
5027 Joseph Myers <joseph@codesourcery.com>
5028
5029 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5030 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5031 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5032 and PRAGMA_OMP_CLAUSE_LINK.
5033 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5034 and PRAGMA_OACC_CLAUSE_LINK.
5035 (OACC_DECLARE_CLAUSE_MASK): New definition.
5036 (c_parser_oacc_declare): New function.
5037
9be4f715
MP
50382015-11-12 Marek Polacek <polacek@redhat.com>
5039
5040 PR c/67784
5041 * c-parser.c (c_parser_for_statement): Reclassify the token in
5042 a correct scope.
5043
e78bede6
MP
50442015-11-11 Marek Polacek <polacek@redhat.com>
5045
5046 PR c/68107
5047 PR c++/68266
5048 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5049 checking the size of an array.
5050
69f293c9
AM
50512015-11-11 Andrew MacLeod <amacleod@redhat.com>
5052
5053 * c-array-notation.c: Remove unused header files.
5054 * c-aux-info.c: Likewise.
5055 * c-convert.c: Likewise.
5056 * c-decl.c: Likewise.
5057 * c-errors.c: Likewise.
5058 * c-lang.c: Likewise.
5059 * c-objc-common.c: Likewise.
5060 * c-parser.c: Likewise.
5061 * c-typeck.c: Likewise.
5062 * gccspec.c: Likewise.
5063
3a40d81d
NS
50642015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5065 Cesar Philippidis <cesar@codesourcery.com>
5066 James Norris <jnorris@codesourcery.com>
5067 Julian Brown <julian@codesourcery.com>
5068 Nathan Sidwell <nathan@codesourcery.com>
5069
3a40d81d
NS
5070 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5071 routine arg.
5072 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5073 (c_parser_pragma): Parse 'acc routine'.
5074 (OACC_ROUTINE_CLAUSE_MARK): Define.
5075 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5076
fc402eec
AA
50772015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5078
5079 PR debug/67192
5080 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5081 location of the backward-goto to the start of the loop body.
5082
f6b0b3db
AA
50832015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5084
5085 PR debug/67192
5086 * c-parser.c (c_parser_while_statement): Finish the loop before
5087 parsing ahead for misleading indentation.
5088 (c_parser_for_statement): Likewise.
5089
ee45a32d
EB
50902015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5091
5092 * c-decl.c (finish_struct): If the structure has reverse storage
5093 order, rewrite the type of array fields with scalar component. Call
5094 maybe_apply_pragma_scalar_storage_order on entry.
5095 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5096 errors on bit-fields and reverse SSO here and not...
5097 (c_mark_addressable): ...here.
5098 (output_init_element): Adjust call to initializer_constant_valid_p.
5099 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5100
8a645150
DM
51012015-11-06 David Malcolm <dmalcolm@redhat.com>
5102
5103 * c-decl.c (warn_defaults_to): Update for change in signature
5104 of diagnostic_set_info.
5105 * c-errors.c (pedwarn_c99): Likewise.
5106 (pedwarn_c90): Likewise.
5107 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5108 for textinfo::set_location.
5109
7a5e4956
CP
51102015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5111 Thomas Schwinge <thomas@codesourcery.com>
5112 James Norris <jnorris@codesourcery.com>
5113
5114 * c-parser.c (c_parser_omp_clause_name): Add support for
5115 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5116 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5117 default(none) in OpenACC.
5118 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5119 arguments.
5120 (c_parser_oacc_clause_tile): New function.
5121 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5122 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5123 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5124 TILE}.
5125 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5126 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5127 FIRSTPRIVATE}.
5128 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5129 (c_parser_oacc_update): Update the error message for missing clauses.
5130 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5131 and OMP_CLAUSE_INDEPENDENT.
5132
bfcfbfa0
MP
51332015-11-05 Marek Polacek <polacek@redhat.com>
5134
5135 PR c/68090
5136 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5137 deal with pre-evaluation on invalid types.
5138
e01d41e5
JJ
51392015-11-05 Jakub Jelinek <jakub@redhat.com>
5140 Ilya Verbin <ilya.verbin@intel.com>
5141
5142 * c-parser.c: Include context.h and gimple-expr.h.
5143 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5144 monotonic together with nonmonotonic.
5145 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5146 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5147 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5148 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5149 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5150 expressions on combined target teams before the target.
5151 (c_parser_omp_declare_target): If decl has "omp declare target" or
5152 "omp declare target link" attribute, and cgraph or varpool node already
5153 exists, then set corresponding flags. Call c_finish_omp_clauses
5154 in the parenthesized extended-list syntax case.
5155 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5156 declare target.
5157 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5158 on OMP_CLAUSE_REDUCTION array sections.
5159 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5160 into the constant offset, or for variable low-bound using
5161 POINTER_PLUS_EXPR. For structure element based array sections use
5162 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5163 (c_finish_omp_clauses): Drop generic_field_head, structure
5164 elements are now always mapped even as array section bases,
5165 diagnose same var in data sharing and mapping clauses. Diagnose if
5166 linear step on declare simd is neither a constant nor a uniform
5167 parameter. Look through POINTER_PLUS_EXPR for array section
5168 reductions. Diagnose the same var or function appearing multiple
5169 times on the same directive. Fix up wording for the to clause if t
5170 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5171 modifier on kinds other than dynamic or guided or nonmonotonic
5172 modifier together with ordered clause.
5173
4bf9e5a8
TS
51742015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5175 Chung-Lin Tang <cltang@codesourcery.com>
5176
5177 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5178
2adfab87
AM
51792015-10-29 Andrew MacLeod <amacleod@redhat.com>
5180
5181 * c-array-notation.c: Reorder #include's and remove duplicates.
5182 * c-aux-info.c: Likewise.
5183 * c-convert.c: Likewise.
5184 * c-decl.c: Likewise.
5185 * c-errors.c: Likewise.
5186 * c-lang.c: Likewise.
5187 * c-objc-common.c: Likewise.
5188 * c-parser.c: Likewise.
5189 * c-typeck.c: Likewise.
5190
e922069e
JW
51912015-10-26 Jim Wilson <jim.wilson@linaro.org>
5192
5193 PR debug/66068
5194 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5195 after calling build_qualified_type.
5196
765dd391
CP
51972015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5198 Thomas Schwinge <thomas@codesourcery.com>
5199 James Norris <jnorris@codesourcery.com>
5200 Joseph Myers <joseph@codesourcery.com>
5201 Julian Brown <julian@codesourcery.com>
5202 Bernd Schmidt <bschmidt@redhat.com>
5203
5204 * c-parser.c (c_parser_oacc_shape_clause): New.
5205 (c_parser_oacc_simple_clause): New.
5206 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5207 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5208
88bae6f4
TS
52092015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5210 James Norris <jnorris@codesourcery.com>
5211 Cesar Philippidis <cesar@codesourcery.com>
5212
5213 PR c/64765
5214 PR c/64880
5215 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5216 parameters, and handle these. Adjust all users.
5217 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5218 into...
5219 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5220 all users.
5221 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5222 declare functions.
5223 (c_finish_omp_construct): Declare function.
5224 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5225 Merge functions into...
5226 (c_finish_omp_construct): ... this new function.
5227
a8fc2579
RB
52282015-10-22 Richard Biener <rguenther@suse.de>
5229
5230 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5231 before folding a MINUS_EXPR.
5232
e9122ef6
MP
52332015-10-21 Marek Polacek <polacek@redhat.com>
5234
5235 PR c/68024
5236 * c-decl.c (start_function): Warn about vararg functions without
5237 a prototype.
5238
9f47c7e5
IE
52392015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5240
5241 * c-typeck.c (build_conditional_expr): Use boolean vector
5242 type for vector comparison.
5243 (build_vec_cmp): New.
5244 (build_binary_op): Use build_vec_cmp for comparison.
5245
fa60eeb9
MP
52462015-10-20 Marek Polacek <polacek@redhat.com>
5247
5248 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5249
2c7020eb
MP
52502015-10-20 Marek Polacek <polacek@redhat.com>
5251
5252 PR c/67964
5253 * c-parser.c (c_parser_attributes): Break out of the loop if the
5254 token after an attribute isn't a comma.
5255
d9a6bd32
JJ
52562015-10-13 Jakub Jelinek <jakub@redhat.com>
5257 Aldy Hernandez <aldyh@redhat.com>
5258
5259 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5260 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5261 (c_parser_omp_variable_list): Handle structure elements for
5262 map, to and from clauses. Handle array sections in reduction
5263 clause. Formatting fixes.
5264 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5265 if clause modifiers.
5266 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5267 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5268 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5269 c_parser_omp_clause_is_device_ptr): New functions.
5270 (c_parser_omp_clause_ordered): Parse optional parameter.
5271 (c_parser_omp_clause_reduction): Handle array reductions.
5272 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5273 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5274 functions.
5275 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5276 (c_parser_omp_clause_depend_sink): New function.
5277 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5278 (c_parser_omp_clause_map): Parse release/delete map kinds and
5279 optional always modifier.
5280 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5281 and c_finish_omp_clauses callers.
5282 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5283 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5284 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5285 (OMP_CRITICAL_CLAUSE_MASK): Define.
5286 (c_parser_omp_critical): Parse critical clauses.
5287 (c_parser_omp_for_loop): Handle doacross loops, adjust
5288 c_finish_omp_for and c_finish_omp_clauses callers.
5289 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5290 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5291 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5292 (c_parser_omp_for): Disallow ordered clause when combined with
5293 distribute. Disallow linear clause when combined with distribute
5294 and not combined with simd.
5295 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5296 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5297 parse clauses and if depend clause is found, don't parse a body.
5298 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5299 Allow target parallel without for after it.
5300 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5301 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5302 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5303 invalid kinds.
5304 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5305 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5306 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5307 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5308 functions.
5309 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5310 defaultmap and is_device_ptr clauses.
5311 (c_parser_omp_target): Parse target parallel and target simd. Set
5312 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5313 and target exit data. Diagnose invalid map kinds.
5314 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5315 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5316 construct.
5317 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5318 &omp_priv.
5319 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5320 (c_parser_omp_taskloop): New function.
5321 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5322 handle PRAGMA_OMP_TASKLOOP.
5323 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5324 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5325 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5326 Add IS_OMP argument, handle structure element bases, diagnose
5327 bitfields, pass IS_OMP recursively, diagnose known zero length
5328 array sections in depend clauses, handle array sections in reduction
5329 clause, diagnose negative length even for pointers.
5330 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5331 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5332 array sections in reduction clause, set
5333 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5334 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5335 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5336 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5337
21ba0cea
MP
53382015-10-06 Marek Polacek <polacek@redhat.com>
5339
5340 * c-parser.c (c_parser_statement_after_labels): Use
5341 protected_set_expr_location.
5342 (c_parser_omp_clause_num_gangs): Likewise.
5343 (c_parser_omp_clause_num_threads): Likewise.
5344 (c_parser_omp_clause_num_workers): Likewise.
5345 (c_parser_omp_clause_vector_length): Likewise.
5346 (c_parser_omp_clause_num_teams): Likewise.
5347 (c_parser_omp_clause_thread_limit): Likewise.
5348 * c-typeck.c (build_c_cast): Likewise.
5349 (c_cast_expr): Likewise.
5350
624d31fe
RS
53512015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5352
5353 * c-typeck.c (c_tree_equal): Use real_equal instead of
5354 REAL_VALUES_EQUAL.
5355
b8fd7909
JM
53562015-10-04 Jason Merrill <jason@redhat.com>
5357
5358 * c-parser.c (c_lex_one_token): Handle @synchronized.
5359 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5360 can change whether the function is transaction_safe.
5361
1c7485af
MP
53622015-10-02 Marek Polacek <polacek@redhat.com>
5363
5364 PR c/67730
5365 * c-typeck.c (convert_for_assignment): Use the expansion point
5366 location throughout.
5367
3e3b8d63
MP
53682015-10-02 Marek Polacek <polacek@redhat.com>
5369
5370 PR c/64249
5371 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5372 and pass it down to c_parser_if_statement.
5373 (c_parser_else_body): Add CHAIN parameter and pass it down to
5374 c_parser_statement_after_labels.
5375 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5376 duplicated if-else-if conditions.
5377
aabef2de
MP
53782015-10-01 Marek Polacek <polacek@redhat.com>
5379
5380 * c-typeck.c (convert_for_assignment): Improve commentary.
5381
de8ddd5f
MP
53822015-09-30 Marek Polacek <polacek@redhat.com>
5383
5384 PR c/67730
5385 * c-typeck.c (c_finish_return): Use the expansion point location for
5386 certain "return with value" warnings.
5387
c4914de6
MLI
53882015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5389
5390 * c-parser.c (pragma_lex): Add loc argument.
5391
0e36f5c7
MP
53922015-09-15 Marek Polacek <polacek@redhat.com>
5393
5394 PR c/67580
5395 * c-decl.c (tag_exists_p): New function.
5396 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5397 struct/union/enum keywords are missing.
5398 * c-tree.h (tag_exists_p): Declare.
5399
2f3bb934
MP
54002015-09-15 Marek Polacek <polacek@redhat.com>
5401
5402 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5403 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5404 Return NULL_TREE instead of 0.
5405 (lookup_name): Return NULL_TREE instead of 0.
5406 (lookup_name_in_scope): Likewise.
5407 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5408 (parser_xref_tag): Use false instead of 0.
5409 (start_struct): Use true instead of 1.
5410 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5411
aa256c4a
MP
54122015-09-14 Marek Polacek <polacek@redhat.com>
5413
5414 * c-typeck.c (set_nonincremental_init_from_string): Use
5415 HOST_WIDE_INT_M1U when shifting a negative value.
5416
dbb68221
MW
54172015-09-09 Mark Wielaard <mjw@redhat.com>
5418
5419 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5420 parm against NULL.
5421
a8a098ac
JJ
54222015-09-10 Jakub Jelinek <jakub@redhat.com>
5423
5424 PR c/67502
5425 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5426 into OMP_FOR_PRE_BODY rather than before the loop.
5427
f4b189d5
JJ
54282015-09-09 Jakub Jelinek <jakub@redhat.com>
5429
0bb99c11
JJ
5430 PR c/67501
5431 * c-parser.c (c_parser_oacc_all_clauses,
5432 c_parser_omp_all_clauses): Remove invalid clause from
5433 list of clauses even if parser->error is set.
5434
fce5e5e3
JJ
5435 PR c/67500
5436 * c-parser.c (c_parser_omp_clause_aligned,
5437 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5438 test for errors.
5439 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5440 error_mark_node.
5441
f4b189d5
JJ
5442 PR c/67495
5443 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5444 instead of c_parser_unary_expression. If the result is !lvalue_p,
5445 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5446
b2aaf235
MP
54472015-09-04 Marek Polacek <polacek@redhat.com>
5448
5449 PR sanitizer/67279
5450 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5451
1807ffc1
MS
54522015-09-03 Martin Sebor <msebor@redhat.com>
5453
5454 PR c/66516
8b652e65
JJ
5455 * c-typeck.c (convert_arguments, parser_build_unary_op,
5456 build_conditional_expr, c_cast_expr, convert_for_assignment,
5457 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5458 reject_gcc_builtin.
5459 (c_decl_implicit): Define.
5460
d04ff417
MP
54612015-09-02 Marek Polacek <polacek@redhat.com>
5462
5463 PR c/67432
5464 * c-parser.c (c_parser_enum_specifier): Give a better error for
5465 an empty enum.
5466
a79683d5
TS
54672015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5468
5469 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5470
191a6b94
MP
54712015-08-12 Marek Polacek <polacek@redhat.com>
5472
5473 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5474 LOC to it.
5475
420a9d9b
MP
54762015-08-03 Marek Polacek <polacek@redhat.com>
5477
5478 PR c/67088
5479 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5480 Use it.
5481 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5482
992118a1
PP
54832015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5484
5485 * c-parser.c (c_parser_if_body): Take token_indent_info
5486 argument. Call warn_for_misleading_indentation even when the
5487 body is a semicolon. Extract token_indent_infos corresponding
5488 to the guard, body and next tokens. Adjust call to
5489 warn_for_misleading_indentation accordingly.
5490 (c_parser_else_body): Likewise.
5491 (c_parser_if_statement): Likewise.
5492 (c_parser_while_statement): Likewise.
5493 (c_parser_for_statement): Likewise.
5494
46308474
LFSM
54952015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5496 Manuel López-Ibáñez <manu@gcc.gnu.org>
5497
5498 * c-decl.c (get_parm_info): Remove static var. Update warning
5499 message.
5500
05b28fd6
MP
55012015-07-27 Marek Polacek <polacek@redhat.com>
5502
5503 PR c++/66555
5504 PR c/54979
5505 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5506
451b5e48
MP
55072015-07-20 Marek Polacek <polacek@redhat.com>
5508
5509 PR c++/55095
5510 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5511 (build_binary_op): Warn about left shift overflows.
5512
1916bcb5
AM
55132015-07-09 Andrew MacLeod <amacleod@redhat.com>
5514
5515 * c-array-notation.c: Adjust includes for flags.h changes.
5516 * c-objc-common.c: Likewise.
5517
c7131fb2
AM
55182015-07-07 Andrew MacLeod <amacleod@redhat.com>
5519
5520 * c-array-notation.c: Adjust includes.
5521 * c-aux-info.c: Likewise.
5522 * c-convert.c: Likewise.
5523 * c-decl.c: Likewise.
5524 * c-errors.c: Likewise.
5525 * c-lang.c: Likewise.
5526 * c-objc-common.c: Likewise.
5527 * c-parser.c: Likewise.
5528 * c-typeck.c: Likewise.
5529
da2e71c9
MLI
55302015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5531
5532 PR fortran/66605
5533 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5534
b155cfd9
MP
55352015-06-29 Marek Polacek <polacek@redhat.com>
5536
5537 PR c/66322
5538 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5539 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5540 about -Wswitch-bool here.
5541 (do_case): Update c_add_case_label call.
5542 (c_finish_case): Update c_do_switch_warnings call.
5543
31521951
MP
55442015-06-27 Marek Polacek <polacek@redhat.com>
5545
5546 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5547
22d03525
MP
55482015-06-26 Marek Polacek <polacek@redhat.com>
5549
5550 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5551 INDIRECT_REF_P.
5552 * c-typeck.c (array_to_pointer_conversion): Likewise.
5553 (build_unary_op): Likewise.
5554 (c_finish_return): Likewise.
5555
f0889939
AM
55562015-06-25 Andrew MacLeod <amacleod@redhat.com>
5557
5558 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5559 * c-parser.c: Likewise.
5560
8d67ee55
RS
55612015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5562
5563 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5564 instead of pointer_hash.
5565 (detect_field_duplicates): Likewise.
5566
0ae9bd27
MP
55672015-06-25 Marek Polacek <polacek@redhat.com>
5568
5569 * c-array-notation.c: Use VAR_P throughout.
5570 * c-decl.c: Likewise.
5571 * c-objc-common.c: Likewise.
5572 * c-parser.c: Likewise.
5573 * c-typeck.c: Likewise.
5574
62f9079a
MP
55752015-06-25 Marek Polacek <polacek@redhat.com>
5576
5577 * c-decl.c: Use is_global_var throughout.
5578 * c-parser.c: Likewise.
5579 * c-typeck.c: Likewise.
5580
abb226c9
AM
55812015-06-17 Andrew MacLeod <amacleod@redhat.com>
5582
5583 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5584 * c-aux-info.c: Likewise.
5585 * c-convert.c: Likewise.
5586 * c-decl.c: Likewise.
5587 * c-errors.c: Likewise.
5588 * c-lang.c: Likewise.
5589 * c-objc-common.c: Likewise.
5590 * c-parser.c: Likewise.
5591 * c-typeck.c: Likewise.
5592
8cbababc
JH
55932015-06-11 Jan Hubicka <hubicka@ucw.cz>
5594
5595 PR middle-end/66325
5596 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5597 variants.
5598
a0349665
PMR
55992015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5600
5601 * c-decl.c (pop_scope): Register the main translation unit
5602 through the new debug hook.
5603
13fdf2e2
AM
56042015-06-08 Andrew MacLeod <amacleod@redhat.com>
5605
5606 * c-array-notation.c : Adjust include files.
5607 * c-aux-info.c : Likewise.
5608 * c-convert.c : Likewise.
5609 * c-decl.c : Likewise.
5610 * c-errors.c : Likewise.
5611 * c-lang.c : Likewise.
5612 * c-lang.h : Likewise.
5613 * c-objc-common.c : Likewise.
5614 * c-parser.c : Likewise.
5615 * c-typeck.c : Likewise.
5616
d7438551
AH
56172015-06-05 Aldy Hernandez <aldyh@redhat.com>
5618
5619 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5620 immediately clobber it.
5621 (c_write_global_declarations_1): Remove call to
5622 check_global_declaration_1.
5623 (c_write_global_declarations_2): Remove.
5624 (c_write_final_cleanups): Rename from c_write_global_declarations.
5625 Remove call to finalize_compilation_unit.
5626 Remove calls to debugging hooks.
5627 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5628 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5629 * c-tree.h: Remove c_write_global_declarations.
5630
ecb9f223
AM
56312015-06-04 Andrew MacLeod <amacleod@redhat.com>
5632
5633 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5634 * c-aux-info.c: Likewise.
5635 * c-convert.c: Likewise.
5636 * c-decl.c: Likewise.
5637 * c-errors.c: Likewise.
5638 * c-lang.c: Likewise.
5639 * c-objc-common.c: Likewise.
5640 * c-parser.c: Likewise.
5641 * c-typeck.c: Likewise.
5642
9482b620
MP
56432015-06-04 Marek Polacek <polacek@redhat.com>
5644
5645 PR c/66341
5646 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5647 it is a lvalue.
5648
bc51ace3
PK
56492015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5650
5651 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5652 Warn for empty struct.
5653 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5654
ea5b45b6
AT
56552015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5656
5657 * c-decl.c (start_function): Call plugin before parsing.
5658 (finish_function): Call plugin after parsing.
5659
c2d47482
PK
56602015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5661
5662 PR c/49551
5663 * c-decl.c (merge_decls): Merge DECL_COMMON.
5664
a95492ab
JW
56652015-05-22 Jim Wilson <jim.wilson@linaro.org>
5666
5667 * Make-lang.in (check_gcc_pallelize): Define.
5668
fd5c817a
MP
56692015-05-22 Marek Polacek <polacek@redhat.com>
5670
5671 PR c/47043
5672 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5673 attributes.
5674
c7b70a3c
MP
56752015-05-21 Marek Polacek <polacek@redhat.com>
5676
5677 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5678 DECL_BUILT_IN.
5679
21b634ae
MP
56802015-05-20 Marek Polacek <polacek@redhat.com>
5681
5682 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5683 * c-typeck.c: Likewise.
5684
296a8c2f
MP
56852015-05-19 Marek Polacek <polacek@redhat.com>
5686
5687 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5688
41b37d5e
JJ
56892015-05-19 Jakub Jelinek <jakub@redhat.com>
5690
5691 PR middle-end/66199
5692 * c-parser.c (c_parser_omp_for_loop): Don't add
5693 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5694 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5695 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5696 constructs.
5697
fab27f52
MM
56982015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5699
5700 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5701 swaps.
fab27f52 5702
40de31cf
MLI
57032015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5704
5705 PR fortran/44054
5706 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5707 accessor function.
5708
3aa3c9fc
MP
57092015-05-14 Marek Polacek <polacek@redhat.com>
5710
5711 PR c/66066
5712 PR c/66127
5713 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5714 rather than with 0.
5715
c3388e62
DM
57162015-05-12 David Malcolm <dmalcolm@redhat.com>
5717
5718 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5719 to add a call to warn_for_misleading_indentation.
5720 (c_parser_else_body): Likewise, adding param "else_loc".
5721 (c_parser_if_statement): Check for misleading indentation.
5722 (c_parser_while_statement): Likewise.
5723 (c_parser_for_statement): Likewise.
5724
755e528f
MP
57252015-05-08 Marek Polacek <polacek@redhat.com>
5726
5727 PR c/64918
5728 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5729 (output_init_element): Likewise.
5730
0173bd2a
MP
57312015-05-07 Marek Polacek <polacek@redhat.com>
5732
5733 PR c/65179
5734 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5735 value.
5736
9babc352
MP
57372015-04-30 Marek Polacek <polacek@redhat.com>
5738
5739 * c-typeck.c (set_init_label): Call error_at instead of error and
5740 pass LOC to it.
5741
ac9f18db
MP
5742 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5743 the type of a decl.
5744
ec3fba51
MP
5745 * c-typeck.c (c_build_va_arg): Clarify the error message.
5746
b811915d
TS
57472015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5748
5749 * c-parser.c (c_parser_oacc_enter_exit_data): Use
5750 OMP_STANDALONE_CLAUSES.
5751
f3075008
MP
57522015-04-28 Marek Polacek <polacek@redhat.com>
5753
5754 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
5755
4e81b788
MP
57562015-04-28 Marek Polacek <polacek@redhat.com>
5757
5758 PR c/65901
5759 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5760
6c1db78e
MP
57612015-04-25 Marek Polacek <polacek@redhat.com>
5762
5763 PR c/52085
5764 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
5765 attribute.
5766
5c4abbb8
MP
57672015-04-23 Marek Polacek <polacek@redhat.com>
5768
5769 PR c/65345
5770 * c-decl.c (set_labels_context_r): New function.
5771 (store_parm_decls): Call it via walk_tree_without_duplicates.
5772 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
5773 instead of create_tmp_var. Build TARGET_EXPR instead of
5774 COMPOUND_EXPR.
5775 (build_atomic_assign): Use create_tmp_var_raw instead of
5776 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
5777
06aca1d5
IV
57782015-04-20 Ilya Verbin <ilya.verbin@intel.com>
5779
5780 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
5781 (c_parser_omp_target_update): Add missed %> to error_at ().
5782
8fba1830
BRF
57832015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5784
5785 PR target/55143
5786 * c-decl.c (c_default_pointer_mode): Remove definition.
5787 * c-tree.h (c_default_pointer_mode): Remove declaration.
5788
62021f64
TB
57892015-03-27 Tobias Burnus <burnus@net-b.de>
5790
5791 PR c/65586
5792 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
5793 error out.
5794 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
5795 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
5796 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
5797
9b65e171
JJ
57982015-03-19 Jakub Jelinek <jakub@redhat.com>
5799
5800 * c-decl.c (c_decl_attributes): Also add "omp declare target"
5801 attribute for DECL_EXTERNAL VAR_DECLs.
5802
17958621
JJ
58032015-03-11 Jakub Jelinek <jakub@redhat.com>
5804
5805 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
5806 argument.
5807
7ccb1a11
JJ
58082015-03-10 Jakub Jelinek <jakub@redhat.com>
5809
5810 PR c/65120
5811 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
5812 before preparing arguments to warn_logical_not_parentheses.
5813
01177669
JJ
58142015-03-09 Jakub Jelinek <jakub@redhat.com>
5815
5816 PR c/65120
5817 * c-typeck.c (parser_build_binary_op): Don't warn for
5818 !!x == y or !b == y where b is _Bool.
5819
802ac282
MP
58202015-03-09 Marek Polacek <polacek@redhat.com>
5821
5822 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
5823 * c-decl.c (grokdeclarator): Likewise.
5824 * c-typeck.c (build_binary_op): Likewise.
5825
e5165b60
MP
58262015-02-27 Marek Polacek <polacek@redhat.com>
5827
5828 PR c/65228
5829 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5830
065d214c
MP
58312015-02-14 Marek Polacek <polacek@redhat.com>
5832
5833 PR c/64768
5834 * c-decl.c (grokdeclarator): Set the range of a flexible array member
5835 declared through a typedef name.
5836
e5d9235b
MP
58372015-02-13 Marek Polacek <polacek@redhat.com>
5838
5839 PR c/65050
5840 * c-decl.c (grokdeclarator): Print also the type when giving
5841 the error message about array's incomplete element type.
5842
fa01ffcc
JJ
58432015-02-11 Jakub Jelinek <jakub@redhat.com>
5844
5845 PR c/64824
5846 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
5847 check in the POP macro.
5848
c3e38a03
MP
58492015-02-09 Marek Polacek <polacek@redhat.com>
5850
5851 PR c/64856
5852 * c-typeck.c (process_init_element): Don't always wrap
5853 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
5854 initializing a range of elements.
5855
4886ec8e
JJ
58562015-02-04 Jakub Jelinek <jakub@redhat.com>
5857
5858 PR c/64824
5859 PR c/64868
5860 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
5861
c3e38a03 58622015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
5863
5864 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
5865 processing enum declaration.
5866
7b33f0c8
MP
58672015-01-29 Marek Polacek <polacek@redhat.com>
5868
5869 PR c/64709
5870 * c-typeck.c (pop_init_level): If constructor_elements has
5871 exactly one element with integer_zerop value, set constructor_zeroinit
5872 to 1. Remove braces around warning_init call.
5873
dea63e49
JJ
58742015-01-27 Jakub Jelinek <jakub@redhat.com>
5875
5876 PR c/64766
5877 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
5878 of FUNCTION_DECLs with error_mark_node.
5879
d38f7dce
JJ
58802015-01-26 Jakub Jelinek <jakub@redhat.com>
5881
5882 PR c/64778
5883 * c-typeck.c (convert_arguments): Return -1 if there are
5884 error_args, even if we've diagnosed too many arguments.
5885
cbf5d0e7
RB
58862015-01-21 Richard Biener <rguenther@suse.de>
5887
5888 PR middle-end/64313
5889 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5890 for builtins the user declared correctly.
5891
41dbbb37
TS
58922015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5893 Bernd Schmidt <bernds@codesourcery.com>
5894 Cesar Philippidis <cesar@codesourcery.com>
5895 James Norris <jnorris@codesourcery.com>
5896 Jakub Jelinek <jakub@redhat.com>
5897 Ilmir Usmanov <i.usmanov@samsung.com>
5898
5899 * c-parser.c: Include "gomp-constants.h".
5900 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5901 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5902 Use OMP_CLAUSE_SET_MAP_KIND.
5903 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5904 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5905 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5906 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5907 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5908 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5909 "copyout", "create", "delete", "deviceptr", "gang", "host",
5910 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5911 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5912 "present_or_create", "pcreate", "seq", "self", "vector",
5913 "vector_length", "wait", "worker".
5914 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5915 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5916 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5917 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5918 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5919 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5920 (c_parser_oacc_data_clause_deviceptr)
5921 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5922 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5923 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5924 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5925 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5926 (c_parser_oacc_parallel, c_parser_oacc_update)
5927 (c_parser_oacc_wait): New functions.
5928 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5929 (c_finish_oacc_data): New prototypes.
5930 * c-typeck.c: Include "gomp-constants.h".
5931 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5932 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5933 OMP_CLAUSE_SET_MAP_KIND.
5934 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5935 (c_finish_oacc_data): New functions.
5936 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5937 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5938 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5939 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5940 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5941 GOMP_MAP_FORCE_DEVICEPTR.
5942
adfac8df
JJ
59432015-01-09 Michael Collison <michael.collison@linaro.org>
5944
5945 * c-array-notation.c: Include hash-set.h, machmode.h,
5946 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5947 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5948 * c-aux-info.c: Ditto.
5949 * c-convert.c: Ditto.
5950 * c-decl.c: Ditto.
5951 * c-errors.c: Ditto.
5952 * c-lang.c: Dittoxs.
5953 * c-objc-common.c: Ditto.
5954 * c-parser.c: Ditto.
5955 * c-typeck.c: Include hash-set.h, machmode.h,
5956 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5957 fold-const.h, wide-int.h, inchash.h, real.h and
5958 fixed-value.h due to flattening of tree.h.
5959
2cc901dc
MP
59602015-01-07 Marek Polacek <polacek@redhat.com>
5961
5962 PR c/64417
5963 * c-typeck.c (process_init_element): Disallow initialization of
5964 a flexible array member with a string constant if the structure
5965 is in an array.
5966
5624e564
JJ
59672015-01-05 Jakub Jelinek <jakub@redhat.com>
5968
e5341100
JJ
5969 PR sanitizer/64344
5970 * c-typeck.c (convert_for_assignment, c_finish_return): For
5971 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5972 types also set in_late_binary_op around convert call.
5973 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5974 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5975 result on expr as last argument to ubsan_instrument_float_cast,
5976 if in_late_binary_op, don't use c_save_expr but save_expr.
5977
5624e564
JJ
5978 Update copyright years.
5979
5bd012f8
MP
59802015-01-05 Marek Polacek <polacek@redhat.com>
5981
5982 PR c/64423
5983 * c-typeck.c (build_array_ref): Pass loc down to
5984 warn_array_subscript_with_type_char.
5985
3f8257db 59862014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5987
5988 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5989 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5990 element type.
8e745a17 5991 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5992 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5993 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5994 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 5995 to PEDWARN_FOR_QUALIFIERS.
768952be 5996
8f94a8c4
JJ
59972014-12-17 Jakub Jelinek <jakub@redhat.com>
5998
5999 PR sanitizer/64289
6000 * c-convert.c: Include ubsan.h.
6001 (convert): For real -> integral casts and
6002 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6003 instead instrument the float cast directly.
6004
b731b390
JJ
60052014-11-29 Jakub Jelinek <jakub@redhat.com>
6006
6007 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6008 c_finish_stmt_expr): Remove NULL last argument from
6009 create_tmp_var_raw and create_tmp_var calls.
6010 * c-array-notation.c (fix_builtin_array_notation_fn,
6011 build_array_notation_expr, fix_conditional_array_notations_1,
6012 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6013
541e35a6
MP
60142014-11-28 Marek Polacek <polacek@redhat.com>
6015
6016 PR c/63862
6017 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6018 convert the right operand to integer type.
6019
b286be94
MP
60202014-11-25 Marek Polacek <polacek@redhat.com>
6021
6022 PR c/63877
6023 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6024 for inline functions.
6025
aa7da51a
JJ
60262014-11-21 Jakub Jelinek <jakub@redhat.com>
6027
6028 PR target/63764
6029 * c-typeck.c (build_array_ref): Adjust
6030 convert_vector_to_pointer_for_subscript caller. If it returns true,
6031 call non_lvalue_loc on the result.
6032
d876207f
RB
60332014-11-11 Richard Biener <rguenther@suse.de>
6034
6035 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6036 to true.
6037
e5e44252
AK
60382014-11-10 Andi Kleen <ak@linux.intel.com>
6039
6040 PR c/60804
6041 * c-parser.c (c_parser_statement_after_labels): Call
6042 check_no_cilk.
6043 (c_parser_if_statement): Dito.
6044 (c_parser_switch_statement): Dito.
6045 (c_parser_while_statement): Dito.
6046 (c_parser_do_statement): Dito.
6047 (c_parser_for_statement): Dito.
6048 * c-typeck.c (c_finish_loop): Dito.
6049
13c21655
PC
60502014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6051
6052 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6053 OPT_Wshift_count_overflow in the warnings.
6054
2d51fcef
MP
60552014-10-30 Marek Polacek <polacek@redhat.com>
6056
6057 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6058 print the stripped version as well, if they're not the same.
6059
ef4bddc2
RS
60602014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6061
6062 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6063 machine_mode.
6064
c582198b
AM
60652014-10-28 Andrew MacLeod <amacleod@redhat.com>
6066
6067 * c-decl.c: Adjust include files.
6068 * c-parser.c: Ditto.
6069
ddc8de03
PM
60702014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6071 Tom Tromey <tromey@redhat.com>
6072
6073 * c-tree.h (enum c_oracle_request): New.
6074 (c_binding_oracle_function): New typedef.
6075 (c_binding_oracle, c_pushtag, c_bind): Declare.
6076 * c-decl.c (c_binding_oracle): New global.
6077 (I_SYMBOL_CHECKED): New macro.
6078 (i_symbol_binding): New function.
6079 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6080 (I_TAG_CHECKED): New macro.
6081 (i_tag_binding): New function.
6082 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6083 (I_LABEL_CHECKED): New macro.
6084 (i_label_binding): New function.
6085 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6086 (c_print_identifier): Save and restore c_binding_oracle.
6087 (c_pushtag, c_bind): New functions.
6088
60393bbc
AM
60892014-10-27 Andrew MacLeod <amacleod@redhat.com>
6090
6091 * c-typeck.c: Adjust include files.
6092
d723bb7c
MLI
60932014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6094
6095 PR c++/53061
6096 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6097 initialization here...
6098 (c_initialize_diagnostics): ... but here. Set defaults after
6099 building pretty-printer.
6100
1bc5a451
MP
61012014-10-23 Marek Polacek <polacek@redhat.com>
6102
6103 PR c/63626
6104 * c-decl.c (pop_scope): Don't print warning in external_scope.
6105
4435bb92
MP
61062014-10-19 Marek Polacek <polacek@redhat.com>
6107
6108 PR c/63567
6109 * c-typeck.c (output_init_element): Allow initializing objects with
6110 static storage duration with compound literals even in C99 and add
6111 pedwarn for it.
6112
7278465e
MP
61132014-10-17 Marek Polacek <polacek@redhat.com>
6114
6115 PR c/63567
6116 * c-typeck.c (digest_init): Allow initializing objects with static
6117 storage duration with compound literals even in C99 and add pedwarn
6118 for it.
6119
d9b7be2e
MP
61202014-10-17 Marek Polacek <polacek@redhat.com>
6121
6122 PR c/63543
6123 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6124 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6125 error multiple times. Print the type.
6126
f406ae1f
MP
61272014-10-17 Marek Polacek <polacek@redhat.com>
6128
6129 PR c/63549
6130 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6131 type.
6132
92574c7c
MP
61332014-10-17 Marek Polacek <polacek@redhat.com>
6134
6135 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6136 (start_function): Use OPT_Wimplicit_int instead of 0.
6137 (store_parm_decls_oldstyle): Likewise.
6138
1bc4a978
MT
61392014-10-17 Alan Modra <amodra@gmail.com>
6140
6141 PR middle-end/61848
6142 * c-decl.c (merge_decls): Don't merge section name or tls model
6143 to newdecl symtab node, instead merge to olddecl. Override
6144 existing olddecl section name. Set tls_model for all thread-local
6145 vars, not just OMP thread-private ones. Remove incorrect comment.
6146
83685514
AM
61472014-10-16 Andrew MacLeod <amacleod@redhat.com>
6148
6149 * c-decl.c: Adjust include files.
6150
78a7c317
DD
61512014-10-14 DJ Delorie <dj@redhat.com>
6152
6153 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6154 (c_token_starts_typename): Check all __intN, not just __int128.
6155 (c_token_starts_declspecs): Likewise.
6156 (c_parser_declspecs): Likewise.
6157 (c_parser_attribute_any_word): Likewise.
6158 (c_parser_objc_selector): Likewise.
6159 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6160 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6161 is specified.
6162 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6163 __int128.
6164 (finish_declspecs): Likewise.
6165
74d98c1e
AB
61662014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6167
8e745a17 6168 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6169 the duplicate code.
8e745a17 6170 (c_parser_statement): Call the new function.
74d98c1e 6171
84937de2
MP
61722014-10-09 Marek Polacek <polacek@redhat.com>
6173
6174 PR c/63480
6175 * c-typeck.c (pop_init_level): Don't warn about initializing
6176 with { }.
6177
0382aaa0
MP
61782014-10-07 Marek Polacek <polacek@redhat.com>
6179
6180 PR c/59717
6181 * c-decl.c (header_for_builtin_fn): New function.
6182 (implicitly_declare): Suggest which header to include.
6183
7a0ca710
MP
61842014-10-07 Marek Polacek <polacek@redhat.com>
6185
6186 * c-convert.c (convert): Use error_operand_p.
6187 * c-typeck.c (require_complete_type): Likewise.
6188 (really_atomic_lvalue): Likewise.
6189 (digest_init): Likewise.
6190 (handle_omp_array_sections_1): Likewise.
6191
6bc8a126
MP
61922014-10-03 Marek Polacek <polacek@redhat.com>
6193
6194 PR c/63453
6195 * c-decl.c (pop_scope): Don't warn about "inline function declared
6196 but never defined" for functions marked with gnu_inline attribute.
6197
d90c0a59
JJ
61982014-09-25 Jakub Jelinek <jakub@redhat.com>
6199
6200 PR c++/63249
6201 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6202 on low_bound and length.
6203
083e891e
MP
62042014-09-24 Marek Polacek <polacek@redhat.com>
6205
6206 PR c/61405
6207 PR c/53874
6208 * c-parser.c: Don't define CPP_KEYWORD.
6209 (c_parser_switch_statement): Pass original type to c_finish_case.
6210 * c-tree.h (c_finish_case): Update declaration.
6211 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6212 conditionally to c_do_switch_warnings.
6213
8d95fe25
MP
62142014-09-03 Marek Polacek <polacek@redhat.com>
6215
6216 PR c/62024
6217 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6218 conversions.
6219
9a771876
JJ
62202014-09-02 Jakub Jelinek <jakub@redhat.com>
6221 Balaji V. Iyer <balaji.v.iyer@intel.com>
6222 Igor Zamyatin <igor.zamyatin@intel.com>
6223
6224 * c-parser.c (c_parser_cilk_for): New function.
6225 (c_parser_cilk_grainsize): Likewise.
6226 (c_get_temp_regvar): Likewise.
6227 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6228 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6229 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6230 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6231 case.
6232
b7679d96
CG
62332014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6234
6235 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6236 with using HOST_WIDE_INT without truncation to 'int'
6237
59ea0364
MP
62382014-08-22 Marek Polacek <polacek@redhat.com>
6239
6240 PR c++/62199
6241 * c-typeck.c (parser_build_binary_op): Adjust call to
6242 warn_logical_not_parentheses.
6243
671a475e
IZ
62442014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6245
6246 PR other/62008
6247 * c-parser.c (c_parser_array_notation): Check for correct
6248 type of an array added.
6249
04159acf
MP
62502014-08-19 Marek Polacek <polacek@redhat.com>
6251
6252 PR c++/62153
6253 * c-typeck.c (build_binary_op): If either operand of a comparison
6254 is a boolean expression, call maybe_warn_bool_compare.
6255
c77935ee
PP
62562014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6257
6258 PR c/45584
6259 * c-typeck.c (build_c_cast): Do a conversion even when the
6260 TYPE_MAIN_VARIANTs are the same.
6261
35aff4fb
MP
62622014-08-19 Marek Polacek <polacek@redhat.com>
6263
6264 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6265 pedwarn_c99 instead of pedwarn.
6266 (grokfield): Likewise.
6267 (warn_defaults_to): New function.
6268 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6269 Unconditionally call pedwarn_c99 instead of pedwarn.
6270 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6271 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6272 check flag_isoc11 before.
6273 * c-errors.c (pedwarn_c99): Change the return type to bool.
6274 Handle -Wc99-c11-compat.
6275 * c-parser.c (disable_extension_diagnostics): Handle
6276 warn_c99_c11_compat.
6277 (restore_extension_diagnostics): Likewise.
6278 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6279 instead of pedwarn, don't check flag_isoc11 before.
6280 (c_parser_declspecs): Likewise.
6281 (c_parser_alignas_specifier): Likewise.
6282 (c_parser_alignof_expression): Likewise.
6283 (c_parser_generic_selection): Likewise.
6284 * c-tree.h (pedwarn_c99): Update declaration.
6285 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6286 of pedwarn_c99.
6287
177cce46
MP
62882014-08-19 Marek Polacek <polacek@redhat.com>
6289
6290 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6291 to pedwarn_c90.
6292 * c-errors.c: Include "opts.h".
6293 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6294 * c-parser.c (disable_extension_diagnostics): Handle negative value
6295 of warn_c90_c99_compat, too.
6296 (restore_extension_diagnostics): Likewise.
6297 (c_parser_compound_statement_nostart): Pass
6298 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6299
6dc99c33
MP
63002014-08-12 Marek Polacek <polacek@redhat.com>
6301
6302 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6303 Add pedwarn.
6304 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6305 Likewise.
6306 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6307
3f8257db 63082014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6309
6310 PR c/51849
6311 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6312 Call pedwarn_c90 instead of pedwarn.
6313 (check_bitfield_type_and_width): Likewise.
6314 (declspecs_add_qual): Likewise.
6315 (declspecs_add_type): Likewise.
6316 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6317 Adjust to only call pedwarn_c90.
6318 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6319 pedwarn_c90 instead of pedwarn.
6320 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6321 * c-parser.c (disable_extension_diagnostics): Handle
6322 warn_c90_c99_compat.
6323 (restore_extension_diagnostics): Likewise.
6324 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6325 pedwarn_c90 instead of pedwarn.
6326 (c_parser_initelt): Likewise.
6327 (c_parser_postfix_expression): Likewise.
6328 (c_parser_postfix_expression_after_paren_type): Likewise.
6329 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6330 * c-tree.h: Fix formatting.
6331 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6332 pedwarn_c90 instead of pedwarn.
6333
9f25a338
TS
63342014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6335
6336 * c-typeck.c: Remove include of pointer-set.h.
6337
044331a8
MP
63382014-08-07 Marek Polacek <polacek@redhat.com>
6339
6340 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6341
b787e7a2
TS
63422014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6343
6344 * c-typeck.c: Use hash_map instead of pointer_map.
6345
6e2830c3
TS
63462014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6347
6348 * c-decl.c: Use hash_set instead of pointer_set.
6349
a7ee52fb
IZ
63502014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6351
6352 PR middle-end/61455
6353 * c-array-notation.c (expand_array_notations): Handling
6354 of DECL_EXPR added.
6355
b4dfdc11
MG
63562014-07-31 Marc Glisse <marc.glisse@inria.fr>
6357
6358 PR c++/60517
6359 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6360 a local variable.
6361
976d5a22
TT
63622014-07-30 Tom Tromey <tromey@redhat.com>
6363
6364 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6365 field.
6366 (really_start_incremental_init, push_init_level): Initialize
6367 designator_depth.
6368 (pop_init_level): Set global designator_depth.
6369 (process_init_element): Check for designated_init attribute.
6370
30281de2
MP
63712014-07-20 Marek Polacek <polacek@redhat.com>
6372
6373 PR c/61852
6374 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6375 (implicitly_declare): Pass location to implicit_decl_warning.
6376
b108f48f
JJ
63772014-07-14 Jakub Jelinek <jakub@redhat.com>
6378
6379 PR middle-end/61294
6380 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6381 If non-NULL, call c_parser_check_literal_zero.
6382 (c_parser_check_literal_zero): New function.
6383 (c_parser_postfix_expression_after_primary): Adjust
6384 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6385
773ec47f
MP
63862014-07-06 Marek Polacek <polacek@redhat.com>
6387
6388 PR c/6940
6389 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6390 * c-tree.h (C_ARRAY_PARAMETER): Define.
6391 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6392 function parameter.
6393
22e1cf1c 63942014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6395 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6396
6397 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6398 releasing symbol.
6399
52ec0ea3
MP
64002014-07-01 Marek Polacek <polacek@redhat.com>
6401
6402 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6403 instead of 0 to WARN_FOR_ASSIGNMENT.
6404
d5c3d343
MP
64052014-07-01 Marek Polacek <polacek@redhat.com>
6406
6407 PR c/58286
6408 * c-typeck.c (convert_for_assignment): Pass
6409 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6410
6a7253a4
MP
64112014-06-30 Marek Polacek <polacek@redhat.com>
6412
6413 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6414 has no_sanitize_undefined attribute.
6415
5e88a8f4
IZ
64162014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6417
6418 PR middle-end/57541
6419 * c-array-notation.c (fix_builtin_array_notation_fn):
6420 Check for 0 arguments in builtin call. Check that bultin argument is
6421 correct.
6422 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6423 index.
6424
9698b078
SH
64252014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6426
6427 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6428 qualifiers in __auto_type for atomic types.
6429 (c_parser_typeof_specifier): Discard all type qualifiers in
6430 __typeof__ for atomic types.
6431
6e07c515
MP
64322014-06-25 Marek Polacek <polacek@redhat.com>
6433
6434 PR c/61162
6435 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6436 the return expression to c_finish_return.
6437
da6f124d
JJ
64382014-06-25 Jakub Jelinek <jakub@redhat.com>
6439
6440 * c-typeck.c (c_finish_omp_clauses): Make sure
6441 OMP_CLAUSE_LINEAR_STEP has correct type.
6442
c203e8a7
TS
64432014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6444
6445 * c-decl.c: Adjust.
6446
56ad0e38
JJ
64472014-06-24 Jakub Jelinek <jakub@redhat.com>
6448
6449 * c-parser.c (c_parser_omp_for_loop): For
6450 #pragma omp parallel for simd move lastprivate clause from parallel
6451 to for rather than simd.
6452
47c2554f
MP
64532014-06-23 Marek Polacek <polacek@redhat.com>
6454
6455 * c-typeck.c (parser_build_binary_op): Don't call
6456 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6457
56363ffd
JH
64582014-06-15 Jan Hubicka <hubicka@ucw.cz>
6459
6460 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6461 * c-decl.c (merge_decls): Likewise.
6462
d7ff7ae5
MP
64632014-06-09 Marek Polacek <polacek@redhat.com>
6464
6465 PR c/36446
6466 * c-typeck.c (error_init): Call inform instead of error_at.
6467 (pedwarn_init): Call inform instead of pedwarn.
6468 (warning_init): Call inform instead of warning_at.
6469
24d047a3
JH
64702014-06-07 Jan Hubicka <hubicka@ucw.cz>
6471
6472 * c-decl.c (merge_decls): Use set_decl_section_name.
6473 (duplicate_decls): Remove node if it exists.
6474
9bac5cbb
G
64752014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6476
6477 PR c/53119
6478 * c-typeck.c (push_init_level, process_init_element,
6479 pop_init_level): Correct check for zero initialization, move
6480 missing brace warning to respect zero initialization.
6481
8ffcdea8
MP
64822014-06-05 Marek Polacek <polacek@redhat.com>
6483
6484 PR c/56724
6485 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6486
742938c9
MP
64872014-06-05 Marek Polacek <polacek@redhat.com>
6488
6489 PR c/49706
6490 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6491 on the left hand side operand of a comparison.
742938c9 6492
6447c55d
MP
64932014-06-05 Marek Polacek <polacek@redhat.com>
6494
6495 PR c/48062
6496 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6497 Print note only if the warning was printed.
6498
9dc7743c
IZ
64992014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6500
6501 PR c/58942
6502 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6503 with a pointer.
6504
fedfecef
MP
65052014-06-03 Marek Polacek <polacek@redhat.com>
6506
6507 PR c/60439
6508 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6509 c_start_case.
6510 * c-tree.h (c_start_case): Update.
6511 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6512 switch condition has boolean value.
6513
9b2b7279
AM
65142014-06-02 Andrew MacLeod <amacleod@redhat.com>
6515
6516 * c-decl.c: Include builtins.h.
6517 * c-parser.c: Likewise.
6518
5c1bc275
MP
65192014-05-27 Marek Polacek <polacek@redhat.com>
6520
6521 PR c/56724
6522 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6523 error and warning calls to error_at and warning_at. Pass location of
6524 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6525 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6526 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6527
97563bc8
IZ
65282014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6529
6530 PR c/61191
6531 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6532 function parameters.
6533
aede2c10
JH
65342014-05-23 Jan Hubicka <hubicka@ucw.cz>
6535
6536 * c-decl.c (merge_decls): Preserve symtab node pointers.
6537 (duplicate_decls): Free new decl.
6538
edbba2ce
TS
65392014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6540
f3316c6d
TS
6541 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6542 initialization.
6543
edbba2ce
TS
6544 * c-parser.c (c_parser_omp_target): Return bool values.
6545
68c81f24
TS
65462014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6547
6548 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6549 num_teams_loc variable to num_thread_limit_loc.
6550
632f2871
RS
65512014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6552
6553 * c-array-notation.c (expand_array_notations): Use void_node
6554 instead of void_zero_node.
6555
766090c2
TS
65562014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6557
6558 * c-decl.c (finish_struct): Adjust.
6559 (finish_enum): Likewise.
6560 (bind): Adjust.
6561 (record_inline_static): Likewise.
6562 (push_scope): Likewise.
6563 (make_label): Likewise.
6564 (lookup_label_for_goto): Likewise.
6565 (finish_struct): Likewise.
6566 (finish_enum): Likewise.
6567 (store_parm_decls): Likewise.
6568 (c_push_function_context): Likewise.
6569 * c-lang.h: Remove usage of variable_size gty attribute.
6570 * c-parser.c (c_parse_init): Adjust.
6571 (c_parse_file): Likewise.
6572
2b107f6b
MP
65732014-05-13 Marek Polacek <polacek@redhat.com>
6574
6575 PR c/61162
6576 * c-typeck.c (convert_for_assignment): Pass location to
6577 WARN_FOR_ASSIGNMENT instead of input_location.
6578
d033409e
MP
65792014-05-10 Marek Polacek <polacek@redhat.com>
6580
6581 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6582 maybe_warn_string_init.
6583 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6584 maybe_warn_string_init.
6585 * c-tree.h (maybe_warn_string_init): Update declaration.
6586 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6587 Call pedwarn_init with loc instead of with input_location.
6588 (digest_init): Pass init_loc to maybe_warn_string_init.
6589 (pop_init_level): Call pedwarn_init with loc instead of with
6590 input_location.
6591 (set_init_index): Likewise.
6592 (process_init_element): Likewise.
6593
ea58ef42
MP
65942014-05-09 Marek Polacek <polacek@redhat.com>
6595
6596 PR c/61096
6597 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6598 (c_parser_initelt): Pass location to set_init_label. Pass array index
6599 location to set_init_index.
6600 * c-tree.h (push_init_level): Update declaration.
6601 (pop_init_level): Likewise.
6602 (set_init_index): Likewise.
6603 (set_init_label): Likewise.
6604 * c-typeck.c (error_init): Add location parameter. Call error_at
6605 instead of error.
6606 (digest_init): Pass init_loc to error_init.
6607 (really_start_incremental_init):
6608 (push_init_level): Add location parameter. Pass loc to pop_init_level
6609 and error_init.
6610 (pop_init_level): Likewise.
6611 (set_designator): Add location parameter. Pass loc to pop_init_level,
6612 push_init_level, and error_init.
6613 (set_init_index): Add location parameter. Pass loc to error_init and
6614 set_designator.
6615 (set_init_label): Likewise.
6616 (output_init_element): Pass loc to error_init.
6617 (process_init_element): Pass loc to error_init, pop_init_level,
6618 pedwarn_init, and push_init_level.
6619
661a0813
MP
66202014-05-09 Marek Polacek <polacek@redhat.com>
6621
6622 PR c/50459
6623 * c-parser.c (c_parser_attributes): Parse the arguments as an
6624 expression-list if the attribute takes identifier.
6625
2793eeab
MP
66262014-05-08 Marek Polacek <polacek@redhat.com>
6627
6628 PR c/61053
6629 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6630 TYPE_ALIGN_UNIT.
6631
f827930a
MP
66322014-05-08 Marek Polacek <polacek@redhat.com>
6633
6634 PR c/61077
6635 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6636 of main.
6637
1d60af08
KZ
66382014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6639 Mike Stump <mikestump@comcast.net>
6640 Richard Sandiford <rdsandiford@googlemail.com>
6641
6642 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6643 (finish_enum): Use wide-int interfaces.
6644 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6645 * c-typeck.c (build_c_cast): Likewise.
6646 (set_nonincremental_init_from_string): Likewise.
6647 (c_tree_equal): Likewise.
6648
a0e24419
MP
66492014-05-02 Marek Polacek <polacek@redhat.com>
6650
6651 PR c/25801
6652 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6653 Return size_one_node when the type is not complete.
6654 (pointer_diff): Remove comment.
6655 (build_unary_op): Improve error messages.
6656
19fc9faa
MP
66572014-05-02 Marek Polacek <polacek@redhat.com>
6658
6659 * c-typeck.c (c_finish_return): Separate warning_at calls.
6660
63bc4e87
MP
66612014-05-02 Marek Polacek <polacek@redhat.com>
6662
6663 * c-tree.h (error_init): Remove declaration.
6664 (pedwarn_init): Likewise.
6665 * c-typeck.c (error_init): Make static and move above.
6666 (pedwarn_init): Likewise.
6667 (warning_init): Move above.
6668 (maybe_warn_string_init): Likewise.
6669
4bd2511b
JL
66702014-05-01 Jeff Law <law@redhat.com>
6671
6672 Revert:
6673
6674 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6675 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6676 avoid goto.
6677
6a358dcb
MP
66782014-05-02 Marek Polacek <polacek@redhat.com>
6679
6680 PR c/60784
6681 * c-typeck.c (push_init_level): Set constructor_designated to
6682 p->designated for structures.
6683
ae5ebda4
MP
66842014-05-01 Marek Polacek <polacek@redhat.com>
6685
6686 PR c/60915
6687 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6688 function-definition has an attribute after the declarator.
6689
96b40f8d
MP
66902014-05-01 Marek Polacek <polacek@redhat.com>
6691
6692 PR c/60257
6693 * c-typeck.c (warning_init): Add location_t parameter. Call
6694 warning_at instead of warning.
6695 (push_init_level): Pass input_location to warning_init.
6696 (add_pending_init): Add location_t parameter. Pass loc to
6697 warning_init.
6698 (set_nonincremental_init): Pass input_location to add_pending_init.
6699 (set_nonincremental_init_from_string): Likewise.
6700 (output_init_element): Pass loc to warning_init and to
6701 add_pending_init.
6702
32e00768
MP
67032014-05-01 Marek Polacek <polacek@redhat.com>
6704
6705 PR c/43395
6706 * c-typeck.c (c_finish_return): Distinguish between label and variable
6707 when warning about returning local address.
6708
c9379ce2
MP
67092014-05-01 Marek Polacek <polacek@redhat.com>
6710
6711 PR c/29467
6712 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6713 in C89 mode.
6714
d00887e8
MP
67152014-05-01 Marek Polacek <polacek@redhat.com>
6716
6717 PR c/43245
6718 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6719 instead of 0 to WARN_FOR_QUALIFIERS.
6720
5436fa2e
MP
67212014-05-01 Marek Polacek <polacek@redhat.com>
6722
6723 PR c/56989
6724 * c-typeck.c (default_conversion): Use better location for
6725 error call.
6726
f8ed5150
MP
67272014-04-30 Marek Polacek <polacek@redhat.com>
6728
6729 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6730 also when SANITIZE_FLOAT_DIVIDE is on.
6731
8337d1db
MP
67322014-04-30 Marek Polacek <polacek@redhat.com>
6733
6734 PR c/60139
6735 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6736 and pedwarn_init. Use loc insted of input_location.
6737
c4bdc42f
MP
67382014-04-30 Marek Polacek <polacek@redhat.com>
6739
6740 PR c/60351
6741 * c-typeck.c (build_binary_op): Use location when warning about
6742 shift count.
6743
45484dcf
MP
67442014-04-25 Marek Polacek <polacek@redhat.com>
6745
6746 PR c/18079
6747 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6748 always_inline/noinline and hot/cold attributes.
6749
34cf811f
MP
67502014-04-25 Marek Polacek <polacek@redhat.com>
6751
6752 PR c/60114
6753 * c-parser.c (c_parser_initelt): Pass input_location to
6754 process_init_element.
6755 (c_parser_initval): Pass loc to process_init_element.
6756 * c-tree.h (process_init_element): Adjust declaration.
6757 * c-typeck.c (push_init_level): Pass input_location to
6758 process_init_element.
6759 (pop_init_level): Likewise.
6760 (set_designator): Likewise.
6761 (output_init_element): Add location_t parameter. Pass loc to
6762 digest_init.
6763 (output_pending_init_elements): Pass input_location to
6764 output_init_element.
6765 (process_init_element): Add location_t parameter. Pass loc to
6766 output_init_element.
6767
42056eac
JJ
67682014-04-24 Jakub Jelinek <jakub@redhat.com>
6769
6770 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
6771 atomic-clause, allow comma in between atomic-clause and
6772 seq_cst.
6773
e162a134
JJ
67742014-04-22 Jakub Jelinek <jakub@redhat.com>
6775
6776 PR c/59073
6777 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
6778 fails, don't set OM_PARALLEL_COMBINED and return NULL.
6779
2f6babac
IZ
67802014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6781
6782 PR middle-end/60469
6783 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6784 create_tmp_var instead build_decl for creating temps.
6785 (build_array_notation_expr): Likewise.
6786 (fix_conditional_array_notations_1): Likewise.
6787 (fix_array_notation_expr): Likewise.
6788 (fix_array_notation_call_expr): Likewise.
6789
8edbfaa6
JJ
67902014-03-28 Jakub Jelinek <jakub@redhat.com>
6791
6792 PR c++/60689
6793 * c-tree.h (c_build_function_call_vec): New prototype.
6794 * c-typeck.c (build_function_call_vec): Don't call
6795 resolve_overloaded_builtin here.
6796 (c_build_function_call_vec): New wrapper function around
6797 build_function_call_vec. Call resolve_overloaded_builtin here.
6798 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
6799 Call c_build_function_call_vec instead of build_function_call_vec.
6800 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
6801 * c-decl.c (finish_decl): Likewise.
6802
7485aeea
MLI
68032014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6804
6805 PR c/55383
6806 * c-typeck.c: Use correct format string in cast-qual warning
6807
b17a8b07
TS
68082014-03-07 Thomas Schwinge <thomas@codesourcery.com>
6809
6810 * c-decl.c (c_decl_attributes): Use
6811 lang_hooks.types.omp_mappable_type.
6812 * c-typeck.c (c_finish_omp_clauses): Likewise.
6813
3af9c5e9
MP
68142014-03-06 Marek Polacek <polacek@redhat.com>
6815
6816 PR c/60197
6817 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
6818 of checking tree code.
6819
1c9f5f33
PK
68202014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6821
6822 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
6823 (c_parser_parameter_declaration): Likewise.
6824
cc28fc7f
MP
68252014-02-19 Marek Polacek <polacek@redhat.com>
6826
6827 PR c/60195
6828 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
6829 Call mark_exp_read on exp.value.
6830 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
6831 TREE_ADDRESSABLE on old instead of val.
6832 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
6833
b581c05c
PK
68342014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6835
6836 * c-parser.c (c_parser_get_builtin_args): Replace calls to
6837 C_EXPR_APPEND by vec_safe_push.
6838 * c-tree.h (C_EXPR_APPEND): Remove.
6839
81e5eca8
MP
68402014-01-31 Marek Polacek <polacek@redhat.com>
6841
6842 PR c/59963
6843 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
6844 build_function_call_vec.
6845 (build_function_call): Likewise.
6846 (build_atomic_assign): Likewise.
6847 (build_function_call_vec): Add arg_loc parameter. Use it.
6848 (convert_arguments): Likewise.
6849 (convert_for_assignment): Rename rhs_loc to expr_loc.
6850 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
6851 (c_parser_objc_keywordexpr): Likewise.
6852 (c_parser_postfix_expression_after_primary): Call
6853 build_function_call_vec with expr_loc rather than op_loc.
6854 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
6855 build_function_call_vec.
6856 (c_parser_expr_list): Add locations parameter. Fill it with locations
6857 of function arguments.
6858 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
6859
68fca595
MP
68602014-01-30 Marek Polacek <polacek@redhat.com>
6861
6862 PR c/59940
6863 * c-typeck.c (build_function_call_vec): Use loc parameter.
6864 (convert_arguments): Add location parameter. Use it.
6865 (ep_convert_and_check): Likewise.
6866 (build_atomic_assign): Adjust convert_for_assignment call.
6867 (build_modify_expr): Likewise.
6868 (digest_init): Likewise.
6869 (c_finish_return): Likewise.
6870 (build_conditional_expr): Adjust ep_convert_and_check calls.
6871 (convert_for_assignment): Add rhs_loc parameter. Use it.
6872 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
6873 calls.
6874
fa337f3a
RB
68752014-01-30 Richard Biener <rguenther@suse.de>
6876
6877 PR c/59905
6878 * c-typeck.c (build_function_call_vec): Do not replace calls
6879 to a function via an incompatible type with a runtime abort.
6880
b72271b9
BI
68812014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6882
6883 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6884 flag_enable_cilkplus with flag_cilkplus.
6885 (c_parser_direct_declarator_inner): Likewise.
6886 (c_parser_attribute_any_word): Likewise.
6887 (c_parser_attributes): Likewise.
6888 (c_parser_compound_statement): Likewise.
6889 (c_parser_statement_after_labels): Likewise.
6890 (c_parser_if_statement): Likewise.
6891 (c_parser_switch_statement): Likewise.
6892 (c_parser_do_statement): Likewise.
6893 (c_parser_for_statement): Likewise.
6894 (c_parser_unary_expression): Likewise.
6895 (c_parser_postfix_expression): Likewise.
6896 (c_parser_postfix_expression_after_primary): Likewise.
6897 (c_parser_postfix_expression_after_primary): Likewise.
6898 (c_parser_omp_clause_name): Likewise.
6899 (c_finish_omp_declare_simd): Likewise.
6900 (c_parser_cilk_verify_simd): Likewise.
6901 * c-typeck.c (build_array_ref): Likewise.
6902 (build_function_call_vec): Likewise.
6903 (convert_arguments): Likewise.
6904 (build_compound_expr): Likewise.
6905 (c_finish_return): Likewise.
6906 (c_finish_if_stmt): Likewise.
6907 (c_finish_loop): Likewise.
6908 (build_binary_op): Likewise.
6909
393e8e8b
MP
69102014-01-23 Marek Polacek <polacek@redhat.com>
6911
6912 PR c/59846
6913 * c-typeck.c (parser_build_binary_op): Use location instead of
6914 input_location.
6915 (build_binary_op): Pass location to shorten_compare.
6916
f04dda30
MP
69172014-01-23 Marek Polacek <polacek@redhat.com>
6918
6919 PR c/58346
6920 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6921 an empty aggregate.
6922
789eadcd
MP
69232014-01-23 Marek Polacek <polacek@redhat.com>
6924
6925 PR c/59871
6926 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6927 of a comma expression.
6928 (emit_side_effect_warnings): Likewise.
6929
40f14e9f
BI
69302014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6931
6932 PR c/59825
6933 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6934 function to use walk_tree and moved a lot of its functionality to
6935 expand_array_notations.
6936 (expand_array_notations): New function.
6937
74558dd9
BI
69382014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6939
6940 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6941 attribute an attribute without value.
6942
652fea39
JJ
69432014-01-23 Jakub Jelinek <jakub@redhat.com>
6944
6945 PR middle-end/58809
6946 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6947 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6948
f34f1c87
MP
69492014-01-22 Marek Polacek <polacek@redhat.com>
6950
6951 PR c/59891
6952 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6953 of remove_c_maybe_const_expr on op1 and op2.
6954
241f845a
JJ
69552014-01-15 Jakub Jelinek <jakub@redhat.com>
6956
6957 PR c/58943
6958 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6959 effects, preevaluate rhs using SAVE_EXPR first.
6960
9a74f20c
BI
69612014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6962
6963 PR c++/59631
6964 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6965 statements with if-elseif statements.
6966
96066ce1
MP
69672014-01-06 Marek Polacek <polacek@redhat.com>
6968
6969 PR c/57773
6970 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6971 defined bit-field types only in ISO C.
6972
23a5b65a
RS
69732014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6974
6975 Update copyright years
6976
f9030485
RS
69772014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6978
6979 * c-array-notation.c: Use the standard form for the copyright notice.
6980
41958c28
BI
69812013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6982
6983 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6984 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6985 field in parser is not empty. If not-empty, call the function
6986 c_parser_finish_omp_declare_simd.
6987 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6988 between SIMD-enabled functions and #pragma simd. Added new parameter.
6989 (c_parser_cilk_all_clauses): Modified the usage of the function
6990 c_parser_cilk_clause_vectorlength as mentioned above.
6991 (c_parser_cilk_simd_fn_vector_attrs): New function.
6992 (c_finish_cilk_simd_fn_tokens): Likewise.
6993 (is_cilkplus_vector_p): Likewise.
6994 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6995 "nomask," and "mask" strings in clause name.
6996 (c_parser_omp_all_clauses): Added 3 new case statements:
6997 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6998 PRAGMA_CILK_CLAUSE_NOMASK.
6999 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7000 check for vector attribute and if so call the function
7001 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7002 called the function c_finish_cilk_simd_fn_tokens.
7003 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7004 parser field is non-empty. If so, parse them as you would parse
7005 the omp declare simd pragma.
7006 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7007 Added a check when step is a parameter and flag it as error.
7008 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7009 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7010 pragma_omp_clause.
7011
cef0fd0e
TS
70122013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7013
7014 * c-parser.c (c_parser_omp_parallel): Fix description.
7015
12893402
BI
70162013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7017
7018 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7019 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7020 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7021 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7022
296674db
JM
70232013-12-04 Joseph Myers <joseph@codesourcery.com>
7024
7025 PR c/52023
7026 * c-parser.c (c_parser_alignas_specifier): Use
7027 c_sizeof_or_alignof_type instead of c_alignof.
7028 (c_parser_alignof_expression): Likewise, with min_alignof
7029 parameter depending on alignof spelling used.
7030
edd28054
MP
70312013-12-04 Marek Polacek <polacek@redhat.com>
7032
7033 PR c/54113
7034 * c-decl.c (start_function): Don't warn for missing prototype for
7035 inline functions.
7036
da0fc454
MP
70372013-12-03 Marek Polacek <polacek@redhat.com>
7038
7039 PR c/59351
7040 * c-decl.c (build_compound_literal): Allow compound literals with
7041 empty initial value.
7042
4c2ecab0
JM
70432013-12-02 Joseph Myers <joseph@codesourcery.com>
7044
7045 PR c/58235
7046 * c-typeck.c (build_modify_expr): Diagnose assignment to
7047 expression with array type.
7048
340baef7
JM
70492013-11-29 Joseph Myers <joseph@codesourcery.com>
7050
7051 PR c/42262
7052 * c-typeck.c (process_init_element): Do not treat a string as
7053 initializing a whole array when used with a designator for an
7054 individual element.
7055
6763b9f7
JM
70562013-11-29 Joseph Myers <joseph@codesourcery.com>
7057
7058 PR c/57574
7059 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7060 an inline function following a static declaration.
7061
e7bd1de1
JJ
70622013-11-28 Jakub Jelinek <jakub@redhat.com>
7063
7064 PR c/59310
7065 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7066 to p_name before calling c_parser_omp_teams instead of after.
7067 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7068 argument. Remove unused p_name variable.
7069
0136f8f0
AH
70702013-11-27 Aldy Hernandez <aldyh@redhat.com>
7071 Jakub Jelinek <jakub@redhat.com>
7072
7073 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7074 external_scope is NULL.
7075
241b71bb
TV
70762013-11-27 Tom de Vries <tom@codesourcery.com>
7077 Marc Glisse <marc.glisse@inria.fr>
7078
7079 PR c++/59032
7080 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7081
2fb9a547
AM
70822013-11-22 Andrew MacLeod <amacleod@redhat.com>
7083
7084 * c-typeck.c: Add required include files from gimple.h.
7085
8400e75e
DM
70862013-11-22 David Malcolm <dmalcolm@redhat.com>
7087
7088 * c-decl.c (define_label, shadow_tag_warned)
7089 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7090 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7091 (declspecs_add_type): Remove use of in_system_header macro.
7092 * c-parser.c (c_parser_unary_expression): Likewise.
7093 * c-typeck.c (store_init_value, process_init_element)
7094 (c_start_case): Likewise.
7095
7096 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7097 macro.
7098
7099 * c-parser.c (c_parser_set_source_position_from_token): Remove
7100 reference to in_system_header from comment.
7101
386b1f1f
RS
71022013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7103
7104 * c-decl.c (grokdeclarator): Update comment to refer to
7105 tree_to_[su]hwi rather than tree_low_cst.
7106
ae7e9ddd
RS
71072013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7108
7109 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7110 tree_to_uhwi throughout.
7111
9439e9a1
RS
71122013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7113
7114 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7115 throughout.
7116
9541ffee
RS
71172013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7118
7119 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7120 throughout.
7121
c02065fc
AH
71222013-11-15 Aldy Hernandez <aldyh@redhat.com>
7123
7124 * c-parser.c (c_parser_cilk_simd): New.
7125 (c_parser_cilk_verify_simd): New.
7126 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7127 (c_parser_omp_for_loop): Add case for NE_EXPR.
7128 Set c_break_label for CILK_SIMD.
7129 (c_parser_cilk_clause_vectorlength): New.
7130 (c_parser_cilk_clause_linear): New.
7131 (c_parser_cilk_clause_name): New.
7132 (c_parser_cilk_all_clauses): New.
7133 * c-typeck.c (build_unary_op): Pass location argument to
7134 readonly_error.
7135 (build_modify_expr): Same.
7136 (build_asm_expr): Same.
7137 (c_finish_bc_stmt): Error on break/continue in loops.
7138
18f429e2
AM
71392013-11-14 Andrew MacLeod <amacleod@redhat.com>
7140
7141 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7142
d8a2d370
DN
71432013-11-14 Diego Novillo <dnovillo@google.com>
7144
7145 * c-decl.c: Include print-tree.h.
7146 Include stor-layout.h.
7147 Include varasm.h.
7148 Include attribs.h.
7149 Include stringpool.h.
7150 * c-lang.c: Include fold-const.h.
7151 * c-parser.c: Include stringpool.h.
7152 Include attribs.h.
7153 Include stor-layout.h.
7154 Include varasm.h.
7155 Include trans-mem.h.
7156 * c-typeck.c: Include stor-layout.h.
7157 Include trans-mem.h.
7158 Include varasm.h.
7159 Include stmt.h.
7160
38b7bc7f
JM
71612013-11-13 Joseph Myers <joseph@codesourcery.com>
7162
7163 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7164 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7165 __auto_type.
7166 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7167 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7168 RID_AUTO_TYPE.
7169 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7170 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7171 (c_parser_declarator, c_parser_direct_declarator_inner)
7172 (c_parser_parameter_declaration, c_parser_type_name): All callers
7173 changed.
7174 (c_parser_declaration_or_fndef): Handle declarations with type
7175 determined from the initializer.
7176
45b0be94
AM
71772013-11-12 Andrew MacLeod <amacleod@redhat.com>
7178
18f429e2 7179 * c-typeck.c: Include gimplify.h.
45b0be94 7180
582d9b50
JM
71812013-11-12 Joseph Myers <joseph@codesourcery.com>
7182
7183 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7184 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7185 comment.
7186 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7187 or _Thread_local as appropriate in diagnostics.
7188 (build_null_declspecs): Initialize ret->thread_gnu_p.
7189 (declspecs_add_scspec): Handle either __thread or _Thread_local
7190 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7191 pedantic. Do not disallow _Thread_local extern and _Thread_local
7192 static.
7193
267bac10
JM
71942013-11-07 Joseph Myers <joseph@codesourcery.com>
7195 Andrew MacLeod <amacleod@redhat.com>
7196
7197 * c-aux-info.c (gen_type): Handle atomic qualifier.
7198 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7199 qualifiers when compating types.
7200 (shadow_tag_warned): Handle atomic_p in declspecs.
7201 (quals_from_declspecs): Likewise.
7202 (start_decl): Use c_type_promotes_to when promoting argument
7203 types.
7204 (grokdeclarator): Handle _Atomic.
7205 (get_parm_info): Diagnose any qualifier on "void" as only
7206 parameter.
7207 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7208 comparing types. Use c_type_promotes_to when promoting argument
7209 types.
7210 (finish_function): Use c_type_promotes_to when promoting argument
7211 types.
7212 (build_null_declspecs): Handle atomic_p in declspecs.
7213 (declspecs_add_qual): Handle RID_ATOMIC.
7214 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7215 (c_token_starts_declspecs): Handle RID_ATOMIC.
7216 (c_parser_declspecs): Handle atomic type specifiers and
7217 qualifiers.
7218 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7219 from types of expressions with atomic type.
7220 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7221 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7222 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7223 (c_parser_statement_after_labels, c_parser_switch_statement)
7224 (c_parser_for_statement, c_parser_expr_no_commas)
7225 (c_parser_conditional_expression, c_parser_binary_expression)
7226 (c_parser_cast_expression, c_parser_unary_expression)
7227 (c_parser_postfix_expression)
7228 (c_parser_postfix_expression_after_primary, c_parser_expression):
7229 Use convert_lvalue_to_rvalue.
7230 (c_parser_expression_conv, c_parser_expr_list): Document
7231 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7232 (c_parser_objc_synchronized_statement): Use
7233 convert_lvalue_to_rvalue.
7234 (c_parser_objc_selector): Handle RID_ATOMIC.
7235 (c_parser_objc_receiver, c_parser_array_notation): Use
7236 convert_lvalue_to_rvalue.
7237 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7238 _Atomic (type-name).
7239 (struct c_declspecs): Add atomic_p field.
7240 (convert_lvalue_to_rvalue): Declare.
7241 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7242 corresponding atomic types.
7243 (qualify_type): Don't add _Atomic qualifiers from second argument.
7244 (comp_target_types): Do not allow _Atomic mismatches.
7245 (type_lists_compatible_p): Do not remove atomic qualifiers when
7246 comparing types.
7247 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7248 (build_atomic_assign): New functions.
7249 (build_unary_op): Use build_atomic_assign for atomic increment and
7250 decrement.
7251 (build_conditional_expr): Do not treat _Atomic void as a qualified
7252 version of void.
7253 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7254 (find_anonymous_field_with_type, convert_to_anonymous_field)
7255 (convert_for_assignment): Do not remove atomic qualifiers when
7256 comparing types.
7257 (digest_init): Do not accept initialization of arrays of atomic
7258 elements by string constants.
7259 (build_asm_expr): Use convert_lvalue_to_rvalue.
7260 (build_binary_op): Do not treat _Atomic void as a qualified
7261 version of void.
7262
0c249d4b
DD
72632013-11-06 DJ Delorie <dj@redhat.com>
7264
7265 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7266 both explicit and builtin, print the location of the explicit one.
7267
6d7f7e0a
TB
72682013-11-05 Tobias Burnus <burnus@net-b.de>
7269
7270 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7271 c_parser_omp_distribute, c_parser_omp_teams,
7272 c_parser_omp_target, c_parser_omp_declare): Handle
7273 -fopenmp-simd.
7274
b906f4ca
MP
72752013-11-03 Marek Polacek <polacek@redhat.com>
7276
7277 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7278
ee1d5a02
JJ
72792013-11-01 Jakub Jelinek <jakub@redhat.com>
7280
7281 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7282 check_dup_generic at the end, unless remove is true.
7283 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7284 remove = true;.
7285 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7286
5a9785fb
JJ
72872013-10-31 Jakub Jelinek <jakub@redhat.com>
7288
7289 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7290 with decl that is not pointer nor array.
7291
939b37da
BI
72922013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7293
7294 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7295 a spawning function is found.
7296 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7297 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7298 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7299 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7300 case.
7301 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7302 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7303 expr.
7304 (c_finish_return): Added a check to reject _Cilk_spawn in return
7305 expression.
7306 (build_cilk_spawn): New function.
7307 (build_cilk_sync): Likewise.
7308 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7309
d4af74d4
TB
73102013-10-27 Tobias Burnus <burnus@net-b.de>
7311
7312 PR other/33426
7313 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7314 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7315 (c_parser_statement_after_labels): Update calls.
7316
d73749df 73172013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7318
7319 PR other/33426
7320 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7321 Handle PRAGMA_IVDEP.
7322 (c_parser_statement_after_labels): Update call.
7323
f28aa681
MP
73242013-10-24 Marek Polacek <polacek@redhat.com>
7325
7326 * c-parser.c (c_parser_struct_declaration): Add a comment.
7327 (c_parser_declarator): Don't allow _Alignas here.
7328
0645c1a2
AM
73292013-10-17 Andrew MacLeod <amacleod@redhat.com>
7330
7331 * c-parser.c: Include omp-low.h.
7332 * c-typeck.c: Likewise.
7333
568a31f2
MP
73342013-10-17 Marek Polacek <polacek@redhat.com>
7335
7336 PR c/58267
7337 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7338 Document syntax of the array-declarator.
7339 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7340 are not permitted.
7341 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7342 (c_parser_struct_declaration): Likewise.
7343 (c_parser_declarator): Likewise.
7344 (c_parser_direct_declarator_inner): Likewise.
7345 (c_parser_parameter_declaration): Likewise.
7346 (c_parser_type_name): Likewise.
7347
acf0174b
JJ
73482013-10-11 Jakub Jelinek <jakub@redhat.com>
7349
7350 * c-lang.h (current_omp_declare_target_attribute): New extern
7351 decl.
7352 * c-parser.c: Include c-lang.h.
7353 (struct c_parser): Change tokens to c_token *.
7354 Add tokens_buf field. Change tokens_avail type to unsigned int.
7355 (c_parser_consume_token): If parser->tokens isn't
7356 &parser->tokens_buf[0], increment parser->tokens.
7357 (c_parser_consume_pragma): Likewise.
7358 (enum pragma_context): Add pragma_struct and pragma_param.
7359 (c_parser_external_declaration): Adjust
7360 c_parser_declaration_or_fndef caller.
7361 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7362 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7363 Adjust recursive call.
7364 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7365 of pragma_external.
7366 (c_parser_parameter_declaration): Use pragma_param instead of
7367 pragma_external.
7368 (c_parser_compound_statement_nostart, c_parser_label,
7369 c_parser_for_statement): Adjust
7370 c_parser_declaration_or_fndef callers.
7371 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7372 it through to c_parser_conditional_expression.
7373 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7374 pass it through to c_parser_binary_expression. Adjust recursive
7375 call.
7376 (c_parser_binary_expression): Remove prec argument, add
7377 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7378 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7379 binop matches it, use build2 instead of parser_build_binary_op.
7380 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7381 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7382 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7383 Handle pragma_struct and pragma_param the same as pragma_external.
7384 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7385 (c_parser_omp_variable_list): Parse array sections for
7386 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7387 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7388 (c_parser_omp_clause_reduction): Handle user defined reductions.
7389 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7390 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7391 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7392 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7393 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7394 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7395 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7396 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7397 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7398 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7399 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7400 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7401 (c_parser_omp_for_loop): Add CODE argument, pass it through
7402 to c_finish_omp_for. Change last argument to cclauses,
7403 and adjust uses to grab parallel clauses from the array of all
7404 the split clauses. Adjust c_parser_binary_expression,
7405 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7406 (omp_split_clauses): New function.
7407 (c_parser_omp_simd): New function.
7408 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7409 Allow the function to be called also when parsing combined constructs,
7410 and call c_parser_omp_simd when parsing for simd.
7411 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7412 #pragma omp section, require exactly one structured-block instead of
7413 sequence of statements.
7414 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7415 Allow the function to be called also when parsing combined constructs.
7416 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7417 Allow the function to be called also when parsing combined
7418 constructs.
7419 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7420 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7421 c_parser_omp_teams, c_parser_omp_target_data,
7422 c_parser_omp_target_update, c_parser_omp_target,
7423 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7424 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7425 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7426 (c_parser_omp_construct): Add p_name and mask vars. Handle
7427 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7428 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7429 and c_parser_omp_sections callers.
7430 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7431 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7432 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7433 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7434 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7435 OMP_CLAUSE_DEPEND.
7436 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7437 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7438 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7439 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7440 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7441 * c-typeck.c: Include tree-inline.h.
7442 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7443 handle_omp_array_sections_1, handle_omp_array_sections,
7444 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7445 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7446 user defined reductions.
7447 (c_tree_equal): New function.
7448 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7449 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7450 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7451 c_check_omp_declare_reduction_r): New prototypes.
7452 * c-decl.c (current_omp_declare_target_attribute): New variable.
7453 (c_decl_attributes): New function.
7454 (start_decl, start_function): Use it instead of decl_attributes.
7455 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7456 c_omp_reduction_decl, c_omp_reduction_lookup,
7457 c_check_omp_declare_reduction_r): New functions.
7458
0a6c2227
TT
74592013-09-25 Tom Tromey <tromey@redhat.com>
7460
7461 * Make-lang.in (c/gccspec.o): Remove.
7462 (CFLAGS-c/gccspec.o): New variable.
7463 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7464 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7465 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7466
f3bc55f0
TT
74672013-09-25 Tom Tromey <tromey@redhat.com>
7468
7469 * Make-lang.in (c/gccspec.o): Don't use subshell.
7470
a24d975c
MP
74712013-09-18 Marek Polacek <polacek@redhat.com>
7472
7473 PR sanitize/58443
7474 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7475 Remove unnecessary check.
7476
ce6923c5
MP
74772013-09-18 Marek Polacek <polacek@redhat.com>
7478
7479 PR sanitizer/58411
7480 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7481 no_sanitize_undefined attribute.
7482
a1e51df9
KT
74832013-09-13 Kai Tietz <ktietz@redhat.com>
7484
7485 PR target/57848
7486 * c-decl.c (c_builtin_function_ext_scope): Remove
7487 wrong assumption that it is never called on prexisting
7488 symbol.
7489
0af94e6f
JR
74902013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7491
7492 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7493
20059c8b
GDR
74942013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7495
7496 * c-objc-common.c (c_tree_printer): Tidy.
7497
de5a5fa1
MP
74982013-08-30 Marek Polacek <polacek@redhat.com>
7499
7500 * c-typeck.c (build_binary_op): Add division by zero and shift
7501 instrumentation.
7502
2531a1d9 75032013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7504 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7505
6e2bcc98 7506 PR c/35649
2531a1d9
JR
7507 * c-typeck.c (c_common_type): Prefer double_type_node over
7508 other REAL_TYPE types with the same precision.
7509 (convert_arguments): Likewise.
7510
025311c4
GDR
75112013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7512
7513 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7514 (c_initialize_diagnostics): Call a destructor for the early printer.
7515
da6ca2b5
GDR
75162013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7517
7518 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7519 printer initialization.
7520
318cda85 75212013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7522
318cda85
BI
7523 PR c/57490
7524 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7525 check for truth values.
7526 (expand_array_notation_exprs): Added truth values case. Removed an
7527 unwanted else. Added for-loop to walk through subtrees in default
7528 case.
7529
b066401f
GDR
75302013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7531
7532 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7533
fb48aadc
JM
75342013-07-23 Joseph Myers <joseph@codesourcery.com>
7535
7536 * c-parser.c (struct c_generic_association): Fix typo.
7537
433cc7b0
TT
75382013-07-23 Tom Tromey <tromey@redhat.com>
7539 Joseph Myers <joseph@codesourcery.com>
7540
7541 * c-parser.c (struct c_generic_association): New.
7542 (c_generic_association_d): New typedef.
7543 (c_parser_generic_selection): New function.
7544 (c_parser_postfix_expression): Handle RID_GENERIC.
7545
26d40c3d
JM
75462013-07-13 Jason Merrill <jason@redhat.com>
7547
7548 PR c++/57793
7549 * c-decl.c (finish_struct): Check for too-large class.
7550
ecdbd01a 75512013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7552
7553 PR c/57821
7554 * c-typeck.c (set_init_index): When folding, check for index overflow.
7555
1141ed3f
BI
75562013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7557
7558 * c-parser.c (c_parser_array_notation): Removed rejection of array
7559 notations in an array of function pointers.
7560
713b46fa
BI
75612013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7562
7563 * c-array-notation.c (make_triplet_val_inv): New function.
7564 (create_cmp_incr): Likewise.
7565 (create_array_refs): Likewise.
7566 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7567 Also modularized common parts between functions and called the function.
7568 (build_array_notation_expr): Likewise.
7569 (fix_conditional_array_notations_1): Likewise.
7570 (fix_array_notation_expr): Likewise.
7571 (fix_array_notation_call_expr): Likewise.
7572
92f20202
MP
75732013-06-18 Marek Polacek <polacek@redhat.com>
7574
7575 PR c/57630
7576 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7577
73a23b06
BI
75782013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7579
7580 * c-array-notation.c (build_array_notation_expr): Reject array notation
7581 mismatch between LHS and RHS even inside a call_expr. Also, removed
7582 a couple while statements that were dead code.
7583
00b8517d
BI
75842013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7585
7586 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7587 excessive precision expressions in function parameters. Also removed
7588 couple unwanted while statements.
7589
1509bdda
BI
75902013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7591
7592 * c-array-notation.c (expand_array_notation_exprs): Added
7593 ARRAY_NOTATION_REF case.
ab20d992 7594
d60f1706
BI
75952013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7596
7597 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7598 function to c-family/array-notation-common.c.
7599 (is_cilkplus_reduce_builtin): Likewise.
7600 (find_rank): Likewise.
7601 (extract_array_notation_exprs): Likewise.
7602 (replace_array_notations): Likewise.
7603 (find_inv_trees): Likewise.
7604 (replace_inv_trees): Likewise.
7605 (contains_array_notation_expr): Likewise.
7606 (find_correct_array_notation_type): Likewise.
7607 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7608 (struct inv_list): Moved this to c-family/array-notation-common.c.
7609 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7610
6d6efbb3
BI
76112013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7612
7613 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7614 reduction functions outside the for-loop. Added a check if the fundecl
7615 is non-NULL. Finally, removed an unwanted if-statement, and made the
7616 body unconditional.
7617
25c22937
BI
76182013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7619
7620 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7621 condition of the if-statement matches the rank of else-block and then-
7622 block when array notations are used.
7623 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7624 expression after the entire function body is parsed.
7625 (c_parser_expr_no_commas): Delayed creating array notation expressions
7626 to the end of function parsing.
7627 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7628 whole if-statement instead of just the condition.
ab20d992 7629 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7630
edd25645
BI
76312013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7632
7633 PR c/57474
7634 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7635 array to NULL_TREE if they are unused. Also added a check for the
7636 field to be NULL before its fields are used in future.
ab20d992 7637
065ce7f1
RO
76382013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7639
7640 PR bootstrap/57450
7641 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7642 (build_array_notation_expr): Likewise.
7643
36536d79
BI
76442013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7645
7646 * c-typeck.c (build_array_ref): Added a check to see if array's
7647 index is greater than one. If true, then emit an error.
7648 (build_function_call_vec): Exclude error reporting and checking
7649 for builtin array-notation functions.
7650 (convert_arguments): Likewise.
7651 (c_finish_return): Added a check for array notations as a return
7652 expression. If true, then emit an error.
7653 (c_finish_loop): Added a check for array notations in a loop
7654 condition. If true then emit an error.
7655 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7656 (build_binary_op): Added a check for array notation expr inside
7657 op1 and op0. If present, we call another function to find correct
7658 type.
7659 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7660 * c-parser.c (c_parser_compound_statement): Check if array
7661 notation code is used in tree, if so, then transform them into
7662 appropriate C code.
7663 (c_parser_expr_no_commas): Check if array notation is used in LHS
7664 or RHS, if so, then build array notation expression instead of
7665 regular modify.
7666 (c_parser_postfix_expression_after_primary): Added a check for
7667 colon(s) after square braces, if so then handle it like an array
7668 notation. Also, break up array notations in unary op if found.
7669 (c_parser_direct_declarator_inner): Added a check for array
7670 notation.
7671 (c_parser_compound_statement): Added a check for array notation in
7672 a stmt. If one is present, then expand array notation expr.
7673 (c_parser_if_statement): Likewise.
7674 (c_parser_switch_statement): Added a check for array notations in
7675 a switch statement's condition. If true, then output an error.
7676 (c_parser_while_statement): Similarly, but for a while.
7677 (c_parser_do_statement): Similarly, but for a do-while.
7678 (c_parser_for_statement): Similarly, but for a for-loop.
7679 (c_parser_unary_expression): Check if array notation is used in a
7680 pre-increment or pre-decrement expression. If true, then expand
7681 them.
7682 (c_parser_array_notation): New function.
7683 * c-array-notation.c: New file.
7684 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7685
cd192ccc
MS
76862013-05-23 Mike Stump <mikestump@comcast.net>
7687
7688 * c-typeck.c (convert_for_assignment): Handle references to memory
7689 spaces better.
7690
427b248d
JM
76912013-05-16 Jason Merrill <jason@redhat.com>
7692
7693 * Make-lang.in (cc1$(exeext)): Use link mutex.
7694
44d90fe1
PC
76952013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7696
7697 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7698 to simply use OPT_Wpointer_arith.
7699 (build_unary_op): Likewise.
7700
4e7d7b3d
JJ
77012013-04-03 Jakub Jelinek <jakub@redhat.com>
7702
7703 PR c/19449
7704 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7705 argument. If set, or it temporarily for parsing of the first
7706 argument into force_folding_builtin_constant_p.
7707 (c_parser_postfix_expression): Adjust callers.
7708
839b422f
RB
77092013-03-21 Richard Biener <rguenther@suse.de>
7710
7711 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7712 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7713
2ee028f1
MP
77142013-02-12 Marek Polacek <polacek@redhat.com>
7715
7716 PR c/44938
7717 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7718 origtypes to NULL.
7719
8824edff
JJ
77202013-01-24 Jakub Jelinek <jakub@redhat.com>
7721
7722 PR c/56078
7723 * c-typeck.c (set_nonincremental_init_from_string): If
7724 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7725 returned false.
7726 (process_init_element): Likewise.
7727
eadd3d0d
JJ
77282012-12-20 Jakub Jelinek <jakub@redhat.com>
7729
7730 PR c++/55619
7731 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7732 argument, don't call default_function_array_conversion
7733 nor c_fully_fold here.
7734 (c_parser_asm_statement): Adjust callers.
7735 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7736 and outputs here, and call default_function_array_conversion
7737 on inputs that don't need to be addressable.
7738
f8a93a2e
JJ
77392012-12-18 Jakub Jelinek <jakub@redhat.com>
7740
7741 PR c/39464
7742 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7743 warning require that both c_common_unsigned_type as well as
7744 c_common_signed_type is the same for both mvl and mvr types.
7745
9771b263
DN
77462012-11-16 Diego Novillo <dnovillo@google.com>
7747
7748 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
7749
7750 * c-common.c: Use new vec API in vec.h.
7751 * c-common.h: Likewise.
7752 * c-gimplify.c: Likewise.
7753 * c-pragma.c: Likewise.
7754 * c-pretty-print.c: Likewise.
7755 * c-pretty-print.h: Likewise.
7756 * c-semantics.c: Likewise.
7757 * c-decl.c: Likewise.
7758 * c-parser.c: Likewise.
7759 * c-tree.h: Likewise.
7760 * c-typeck.c: Likewise.
7761
880661a4
JW
77622012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7763
7764 PR c++/54930
7765 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
7766
077d1abe
MLI
77672012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7768
7769 PR c/53066
7770 * c-decl.c (warn_if_shadowing): Do not warn if a variable
7771 shadows a function, unless the variable is a function or a
7772 pointer-to-function.
7773
3a785c97
JJ
77742012-10-12 Jakub Jelinek <jakub@redhat.com>
7775
7776 PR c/54381
7777 * c-parser.c (struct c_tree_loc_pair): Removed.
7778 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
7779 add location_t * and tree * arguments, fill in array of 3
7780 sizeof_arg trees and corresponding locs.
7781 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
7782 c_parser_expr_list callers.
7783 (c_parser_postfix_expression_after_primary): Likewise. Pass
7784 array of 3 sizeof_arg trees and locs (corresponding to first
7785 3 arguments) to sizeof_pointer_memaccess_warning.
7786
703c8606
LC
77872012-10-09 Lawrence Crowl <crowl@google.com>
7788
7789 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
7790 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
7791 hash table.
7792
5d9de0d0
PC
77932012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7794
7795 PR c++/54194
7796 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
7797 call.
7798
a212e43f
MG
77992012-10-09 Marc Glisse <marc.glisse@inria.fr>
7800
7801 PR c++/54427
7802 * c-typeck.c: Include c-common.h.
7803 (enum stv_conv): Moved to c-common.h.
7804 (scalar_to_vector): Moved to c-common.c.
7805 (build_binary_op): Adapt to scalar_to_vector's new prototype.
7806 * Make-lang.in: c-typeck.c depends on c-common.h.
7807
3b78de56
AC
78082012-10-04 Arnaud Charlet <charlet@adacore.com>
7809
7810 * c-decl.c (c_write_global_declarations): Fix handling of
7811 -fdump-ada-spec*.
7812
78c60e3d
SS
78132012-09-30 Sharad Singhai <singhai@google.com>
7814
7815 * c-decl.c (c_write_global_declarations): Use a different method
7816 to determine if the dump has ben initialized.
7817
9f33203d
JM
78182012-09-14 Joseph Myers <joseph@codesourcery.com>
7819
7820 PR c/54552
7821 * c-typeck.c (c_cast_expr): When casting to a type requiring
7822 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
7823 c_fully_fold first.
7824
a27d595d
JM
78252012-09-14 Joseph Myers <joseph@codesourcery.com>
7826
7827 PR c/54103
7828 * c-typeck.c (build_unary_op): Pass original argument of
7829 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
7830 any C_MAYBE_CONST_EXPR, if it has integer operands.
7831 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
7832 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
7833 to c_objc_common_truthvalue_conversion, then remove any
7834 C_MAYBE_CONST_EXPR, if they have integer operands. Use
7835 c_objc_common_truthvalue_conversion not
7836 c_common_truthvalue_conversion.
7837 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
7838 call note_integer_operands for arguments with integer operands
7839 that are not integer constants.
7840
9feb29df
JJ
78412012-09-13 Jakub Jelinek <jakub@redhat.com>
7842
7843 PR c/54559
7844 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
7845 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
7846
d409320c
JJ
78472012-08-31 Jakub Jelinek <jakub@redhat.com>
7848
7849 PR c/54428
7850 * c-convert.c (convert): Don't call fold_convert_loc if
7851 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
7852 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
7853 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
7854
6265d07c
JJ
78552012-08-24 Jakub Jelinek <jakub@redhat.com>
7856
7857 PR c/54355
7858 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
7859 for nested and empty_ok arguments in the call to
7860 c_parser_declaration_or_fndef.
7861
1a4049e7
JJ
78622012-08-17 Jakub Jelinek <jakub@redhat.com>
7863
7864 * c-tree.h (c_last_sizeof_arg): Declare.
7865 * c-parser.c (struct c_tree_loc_pair): New type.
7866 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
7867 non-NULL.
7868 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
7869 (c_parser_postfix_expression_after_primary): Likewise. Call
7870 sizeof_pointer_memaccess_warning if needed.
7871 (sizeof_ptr_memacc_comptypes): New function.
7872 * c-typeck.c (c_last_sizeof_arg): New global variable.
7873 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
7874
0229aee9
UB
78752012-07-24 Uros Bizjak <ubizjak@gmail.com>
7876
7877 * c-lang.h (lang_decl): Add variable_size GTY option.
7878
7ee2468b
SB
78792012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7880
7881 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
7882 * Make-lang.in: Fix dependencies.
7883
d4a10d0a
SB
78842012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7885
7886 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7887 and add language Makefile hooks.
7888 * config-lang.in: New file.
7889 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7890 add the required "normal" config-lang.in rules.
7891 * c-lang.h: Moved from gcc/ to here.
7892 * c-tree.h: Likewise.
7893 * c-objc-common.c: Likewise.
7894 * c-objc-common.h: Likewise.
7895 * c-typeck.c: Likewise.
7896 * c-convert.c: Likewise.
7897 * c-lang.c: Likewise.
7898 * c-aux-info.c: Likewise.
7899 * c-errors.c: Likewise.
7900 * gccspec.c: Likewise.
7901 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7902 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7903\f
c48514be 7904Copyright (C) 2012-2021 Free Software Foundation, Inc.
d4a10d0a
SB
7905
7906Copying and distribution of this file, with or without modification,
7907are permitted in any medium without royalty provided the copyright
7908notice and this notice are preserved.