]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
c++: tweak to (*(fn))() patch [PR104618]
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
4bf3bac1
GA
12022-02-23 Richard Biener <rguenther@suse.de>
2
3 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
4 SSA names without definition.
5 (c_parser_gimple_declaration): Handle pointer typed SSA names.
6
0bdb0498
GA
72022-02-17 Jakub Jelinek <jakub@redhat.com>
8
9 PR c/104532
10 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
11 convert_lvalue_to_rvalue and build_indirect_ref instead of
12 build_simple_mem_ref.
13
e8d68f0a
GA
142022-02-11 Richard Biener <rguenther@suse.de>
15
16 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
17 VEC_COND_EXPRs.
18
a645583d
GA
192022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
20
21 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
22 clause.
23 (c_parser_omp_variable_list): Handle array sections.
24 (c_parser_omp_clause_has_device_addr): Added.
25 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
26 case.
27 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
28 OMP_CLAUSE_MASK.
29 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
30 (c_finish_omp_clauses): Handle array sections.
31
3adf509f
GA
322022-02-09 Jakub Jelinek <jakub@redhat.com>
33
34 PR c/104427
35 * c-parser.cc (c_parser_postfix_expression)
36 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
37 instead of build1_loc to build PAREN_EXPR.
38 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
39 * c-fold.cc (c_fully_fold_internal): Likewise.
40
fc829782
GA
412022-01-17 Martin Liska <mliska@suse.cz>
42
43 * Make-lang.in: Rename .c names to .cc.
44 * c-convert.cc: Likewise.
45 * c-decl.cc (struct lang_identifier): Likewise.
46 (pop_scope): Likewise.
47 (finish_decl): Likewise.
48 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
49 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
50 * c-parser.h (GCC_C_PARSER_H): Likewise.
51 * c-tree.h (c_keyword_starts_typename): Likewise.
52 (finish_declspecs): Likewise.
53 (c_get_alias_set): Likewise.
54 (enum c_oracle_request): Likewise.
55 (tag_exists_p): Likewise.
56 (set_c_expr_source_range): Likewise.
57 * c-typeck.cc (c_common_type): Likewise.
58 (c_finish_omp_clauses): Likewise.
59 * config-lang.in: Likewise.
60
612022-01-17 Martin Liska <mliska@suse.cz>
62
63 * c-aux-info.c: Moved to...
64 * c-aux-info.cc: ...here.
65 * c-convert.c: Moved to...
66 * c-convert.cc: ...here.
67 * c-decl.c: Moved to...
68 * c-decl.cc: ...here.
69 * c-errors.c: Moved to...
70 * c-errors.cc: ...here.
71 * c-fold.c: Moved to...
72 * c-fold.cc: ...here.
73 * c-lang.c: Moved to...
74 * c-lang.cc: ...here.
75 * c-objc-common.c: Moved to...
76 * c-objc-common.cc: ...here.
77 * c-parser.c: Moved to...
78 * c-parser.cc: ...here.
79 * c-typeck.c: Moved to...
80 * c-typeck.cc: ...here.
81 * gccspec.c: Moved to...
82 * gccspec.cc: ...here.
83 * gimple-parser.c: Moved to...
84 * gimple-parser.cc: ...here.
85
862022-01-17 Andrew Stubbs <ams@codesourcery.com>
87
88 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
89
617db51d
GA
902022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
91
92 PR c++/103705
93 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
94 outer node for ARRAY_REFs.
95
62eb5308
GA
962022-01-01 Jakub Jelinek <jakub@redhat.com>
97
98 PR objc/103639
99 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
100 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
101
2554e2da
GA
1022021-12-17 Marek Polacek <polacek@redhat.com>
103
104 PR c/103649
105 * c-decl.c (c_warn_unused_attributes): Don't warn for
106 attribute_ignored_p.
107 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
108 arguments when the attribute is ignored.
109
9c6586bc
GA
1102021-12-14 Jakub Jelinek <jakub@redhat.com>
111
112 PR c/103587
113 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
114 consume the pragma and silently skip to the pragma eol.
115
c8dcf64b
GA
1162021-12-12 Jonathan Wakely <jwakely@redhat.com>
117
118 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
119 * c-parser.c: Likewise.
120
4b4839e3
GA
1212021-12-09 Jakub Jelinek <jakub@redhat.com>
122
123 PR pch/71934
124 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
125 to resort_data.new_value.
126
641ff219
GA
1272021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
128
129 * c-parser.c (struct omp_dim): New struct type for use inside
130 c_parser_omp_variable_list.
131 (c_parser_omp_variable_list): Allow multiple levels of array and
132 component accesses in array section base-pointer expression.
133 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
134 c_parser_omp_var_list_parens.
135 (c_parser_omp_clause_from): Likewise.
136 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
137 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
138 POINTER_PLUS_EXPR.
139 (c_finish_omp_clauses): Extend allowed ranged of expressions
140 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
141
1422021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
143
144 PR middle-end/92120
145 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
146 call to c_parser_omp_variable_list to 'true'.
147 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
148 array base handling.
149 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
150
c177e806
GA
1512021-11-30 Thomas Schwinge <thomas@codesourcery.com>
152
153 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
154 orphan loop" checking.
155
1562021-11-30 Cesar Philippidis <cesar@codesourcery.com>
157 Thomas Schwinge <thomas@codesourcery.com>
158
159 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
160 OpenACC gang reductions.
161
1622021-11-30 Richard Biener <rguenther@suse.de>
163
164 * gimple-parser.c (c_parser_gimple_postfix_expression):
165 avoid unreachable code after break.
166
87cd82c8
GA
1672021-11-29 Eric Gallager <egallager@gcc.gnu.org>
168
169 PR other/103021
170 * Make-lang.in: Use ETAGS variable in TAGS target.
171
1722021-11-29 Richard Biener <rguenther@suse.de>
173
174 * c-typeck.c (c_tree_equal): Remove unreachable return.
175 * c-parser.c (get_matching_symbol): Likewise.
176
e1d43592
GA
1772021-11-23 Jakub Jelinek <jakub@redhat.com>
178
179 * c-typeck.c (c_clone_omp_udr): Don't initialize
180 id.transform_lang_insert_block.
181
9c077398
GA
1822021-11-19 Martin Sebor <msebor@redhat.com>
183
184 PR c++/33925
185 PR c/102867
186 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
187 code resulting from macro expansion.
188
1892021-11-19 Martin Liska <mliska@suse.cz>
190
191 Revert:
192 2021-11-19 Martin Liska <mliska@suse.cz>
193
194 * c-parser.c (add_debug_begin_stmt): Use option directly.
195
483092d3
GA
1962021-11-18 Matthias Kretz <m.kretz@gsi.de>
197
198 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
199 * c-parser.c (c_parser_postfix_expression): Likewise.
200
2012021-11-18 Martin Liska <mliska@suse.cz>
202
203 * c-parser.c (add_debug_begin_stmt): Use option directly.
204
280d2838
GA
2052021-11-17 Martin Sebor <msebor@redhat.com>
206
207 PR c/101702
208 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
209 bounds before deciding if they're constant.
210
e2b57363
GA
2112021-11-15 Jakub Jelinek <jakub@redhat.com>
212
213 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
214 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
215
b39265d4
GA
2162021-11-11 Jakub Jelinek <jakub@redhat.com>
217
218 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
219 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
220 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
221 OMP_CLAUSE_NUM_TEAMS_EXPR.
222 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
223 combined target teams even lower-bound expression.
224
2252021-11-11 Richard Biener <rguenther@suse.de>
226
227 * gimple-parser.c: Shuffle bitmap.h include.
228
18ae471f
GA
2292021-11-03 Joseph Myers <joseph@codesourcery.com>
230
231 PR c/103031
232 * c-convert.c (c_convert): New function, based on convert.
233 (convert): Make into wrapper of c_convert.
234 (convert_init): New function.
235 * c-typeck.c (enum impl_conv): Add ic_init_const.
236 (convert_for_assignment): Handle ic_init_const like ic_init. Add
237 new argument to convert_and_check call.
238 (digest_init): Pass ic_init_const to convert_for_assignment for
239 initializers required to be constant.
240
b4df2dd3
GA
2412021-11-02 Richard Sandiford <richard.sandiford@arm.com>
242
243 * c-tree.h (c_simulate_record_decl): Declare.
244 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
245 * c-decl.c (c_simulate_record_decl): New function.
246
c2bd5d8a
GA
2472021-10-22 Eric Gallager <egallager@gcc.gnu.org>
248
249 PR other/102663
250 * Make-lang.in: Add dummy c.install-dvi target.
251
93d183a5
GA
2522021-10-15 Richard Biener <rguenther@suse.de>
253
254 PR c/102763
255 * gimple-parser.c
256 (c_parser_gimple_postfix_expression_after_primary): Check
257 for a pointer do be dereferenced by ->.
258
5d5885c9
GA
2592021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
260
261 * c-parser.c (c_finish_omp_declare_variant): Change call from
262 c_omp_check_context_selector to omp_check_context_selector. Change
263 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
264
c9db17b8
GA
2652021-10-09 Jakub Jelinek <jakub@redhat.com>
266
267 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
268 (c_parser_omp_scan_loop_body): Use it.
269 (c_parser_omp_sections_scope): Likewise.
270
50e20ee6
GA
2712021-10-07 Richard Biener <rguenther@suse.de>
272
273 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
274
bb6194e0
GA
2752021-10-05 Richard Biener <rguenther@suse.de>
276
277 PR c/102605
278 * gimple-parser.c (c_parser_gimple_postfix_expression):
279 Accept more address _Literals.
280
da9c5f78
GA
2812021-10-04 Marek Polacek <polacek@redhat.com>
282
283 PR c++/97573
284 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
285
9d116bcc
GA
2862021-10-01 Martin Sebor <msebor@redhat.com>
287
288 PR c/102103
289 * c-typeck.c (maybe_warn_for_null_address): New function.
290 (build_binary_op): Call it.
291
2922021-10-01 Jakub Jelinek <jakub@redhat.com>
293 Richard Biener <rguenther@suse.de>
294
295 PR sanitizer/102515
296 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
297 for division even for SANITIZE_SI_OVERFLOW.
298
2992021-10-01 Jakub Jelinek <jakub@redhat.com>
300
301 * c-parser.c (c_parser_omp_clause_order): Set
302 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
303
fd133479
GA
3042021-09-28 Andrew Pinski <apinski@marvell.com>
305
306 PR c/32122
307 * c-parser.c (c_parser_statement_after_labels): Pass
308 the c_expr instead of the tree to c_finish_goto_ptr.
309 * c-typeck.c (c_finish_goto_ptr): Change the second
310 argument type to c_expr.
311 * c-tree.h (c_finish_goto_ptr): Likewise.
312 Error out if the expression was not of a pointer type.
313
e4777439
GA
3142021-09-22 Jakub Jelinek <jakub@redhat.com>
315
316 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
317 modifiers.
318
cf74e7b5
GA
3192021-09-18 Jakub Jelinek <jakub@redhat.com>
320
321 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
322 and reproducible modifiers.
323 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
324
3252021-09-18 Jakub Jelinek <jakub@redhat.com>
326
327 * c-parser.c (c_parser_omp_clause_default): Handle private and
328 firstprivate arguments, adjust diagnostics on unknown argument.
329
0a4cb439
GA
3302021-09-17 Jakub Jelinek <jakub@redhat.com>
331
332 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
333 is true.
334
a26206ec
GA
3352021-09-10 Jakub Jelinek <jakub@redhat.com>
336
337 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
338 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
339 don't call build_conditional_expr, instead build a COND_EXPR directly.
340 (c_parser_binary_expression): Avoid calling parser_build_binary_op
341 if omp_atomic_lhs even in more cases for >, < or ==.
342 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
343 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
344 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
345 * c-typeck.c (build_binary_op): For flag_openmp only handle
346 MIN_EXPR/MAX_EXPR.
347
b2748138
GA
3482021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
349
350 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
351 directive.
352
e11c6046
GA
3532021-09-01 Iain Sandoe <iain@sandoe.co.uk>
354
355 * c-decl.c (enum deprecated_states): Add unavailable state.
356 (merge_decls): Copy unavailability.
357 (quals_from_declspecs): Handle unavailable case.
358 (start_decl): Amend the logic handling suppression of nested
359 deprecation states to include unavailability.
360 (smallest_type_quals_location): Amend comment.
361 (grokdeclarator): Handle the unavailable deprecation state.
362 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
363 * c-tree.h (struct c_declspecs): Add unavailable_p.
364 * c-typeck.c (build_component_ref): Handle unavailability.
365 (build_external_ref): Likewise.
366
3672021-09-01 Roger Sayle <roger@nextmovesoftware.com>
368 Joseph Myers <joseph@codesourcery.com>
369
370 PR c/79412
371 * c-decl.c (duplicate_decls): On significant mismatches, mark the
372 types of both (non-function) decls as error_mark_node, so that the
373 middle-end can see the code is malformed.
374 (free_attr_access_data): Don't process if the type has been set to
375 error_mark_node.
376
6d51ee43
GA
3772021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
378
379 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
380 and 'ancestor' in 'target device' clauses.
381
38b19c5b
GA
3822021-08-23 Jakub Jelinek <jakub@redhat.com>
383
384 * c-parser.c (c_parser_omp_clause_num_tasks,
385 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
386
5b2876f9
GA
3872021-08-22 Martin Uecker <muecker@gwdg.de>
388
389 PR c/98397
390 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
391 for pointers to arrays with qualifiers.
392 (build_conditional_expr): For C23 don't lose qualifiers for pointers
393 to arrays when the other pointer is a void pointer. Update warnings.
394 (convert_for_assignment): Update warnings for C2X when converting from
395 void* with qualifiers to a pointer to array with the same qualifiers.
396
7c9e1645
GA
3972021-08-20 Jakub Jelinek <jakub@redhat.com>
398
399 * c-parser.c (c_parser_omp_error): New function.
400 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
401
4022021-08-20 Jakub Jelinek <jakub@redhat.com>
403
404 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
405 comma at the end of list.
406 (c_parser_omp_requires): Likewise.
407
b57fba5e
GA
4082021-08-19 Jakub Jelinek <jakub@redhat.com>
409
410 * c-parser.c (c_parser_omp_requires): Don't call
411 c_parser_peek_2nd_token and optionally consume token if current
412 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
413
6e529985
GA
4142021-08-18 Jakub Jelinek <jakub@redhat.com>
415
416 * c-parser.c (c_parser_omp_nothing): New function.
417 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
418
4192021-08-18 Jakub Jelinek <jakub@redhat.com>
420
421 * c-parser.c (c_parser_statement_after_labels): Add restart label
422 near the start of the function. If c_parser_pragma returns false,
423 goto restart.
424 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
425 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
426 return what c_parser_omp_declare returned. Return true instead of
427 false after emitting errors that the directive is not allowed in
428 pragma_stmt context.
429 (c_parser_omp_ordered): Return true instead of
430 false after emitting errors that the directive is not allowed in
431 pragma_stmt context.
432 (c_parser_omp_target_update): Likewise.
433 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
434 Change return type from tree to bool, return false if the
435 directive should be ignored in pragma_stmt contexts.
436 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
437 return their result directly.
438 (c_parser_omp_cancellation_point): Change return type from void to
439 bool, return false if the directive should be ignored in pragma_stmt
440 contexts.
441 (c_parser_omp_declare): Likewise.
442
2d14d64b
GA
4432021-08-17 Jakub Jelinek <jakub@redhat.com>
444
445 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
446 (c_parser_omp_scope): New function.
447 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
448
72be20e2
GA
4492021-08-12 Jakub Jelinek <jakub@redhat.com>
450
451 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
452 (c_parser_omp_clause_filter): New function.
453 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
454 (OMP_MASKED_CLAUSE_MASK): Define.
455 (c_parser_omp_masked): New function.
456 (c_parser_omp_parallel): Handle parallel masked.
457 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
458 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
459
4602021-08-12 Martin Uecker <muecker@gwdg.de>
461
462 PR c/101838
463 PR c/29970
464 * c-typeck.c (c_expr_sizeof_type): Evaluate
465 size expressions for structs of variable size.
466
4672021-08-12 Tobias Burnus <tobias@codesourcery.com>
468
469 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
470 'primary' as alias for 'master'.
471
3ae564ea
GA
4722021-08-10 Martin Uecker <muecker@gwdg.de>
473
474 PR c/29970
475 * c-typeck.c (c_expr_sizeof_expr): Evaluate
476 size expressions for structs of variable size.
477
f92f4778
GA
4782021-08-06 Tamar Christina <tamar.christina@arm.com>
479
480 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
481 * c-tree.h (c_simulate_enum_decl): Likewise.
482
4832021-08-06 Martin Sebor <msebor@redhat.com>
484
485 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
486 vec arguments to by-reference.
487 (c_finish_omp_declare_simd): Same.
488 (c_parser_compound_statement_nostart): Same.
489 (c_parser_for_statement): Same.
490 (c_parser_objc_methodprotolist): Same.
491 (c_parser_oacc_routine): Same.
492 (c_parser_omp_for_loop): Same.
493 (c_parser_omp_declare_simd): Same.
494
419c6c68
GA
4952021-07-21 Thomas Schwinge <thomas@codesourcery.com>
496 Joseph Myers <joseph@codesourcery.com>
497 Cesar Philippidis <cesar@codesourcery.com>
498
499 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
500 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
501 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
502 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
503
92d45509
GA
5042021-07-20 Martin Sebor <msebor@redhat.com>
505
506 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
507 by-const-reference.
508 * c-typeck.c (c_build_function_call_vec): Same.
509
d97d71a1
GA
5102021-07-15 Martin Sebor <msebor@redhat.com>
511
512 PR c/101289
513 PR c/97548
514 * c-decl.c (get_parm_array_spec): Strip nops.
515
6fba0eea
GA
5162021-07-06 Martin Sebor <msebor@redhat.com>
517
518 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
519
7a60a6e8
GA
5202021-07-02 Jakub Jelinek <jakub@redhat.com>
521
522 PR c/101297
523 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
524 appears before a CPP_NAME.
525
90708f87
GA
5262021-06-25 Martin Sebor <msebor@redhat.com>
527
528 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
529 warning_suppressed_p, suppress_warning, and copy_no_warning.
530 (diagnose_mismatched_decls): Same.
531 (duplicate_decls): Same.
532 (grokdeclarator): Same.
533 (finish_function): Same.
534 (c_write_global_declarations_1): Same.
535 * c-fold.c (c_fully_fold_internal): Same.
536 * c-parser.c (c_parser_expr_no_commas): Same.
537 (c_parser_postfix_expression): Same.
538 * c-typeck.c (array_to_pointer_conversion): Same.
539 (function_to_pointer_conversion): Same.
540 (default_function_array_conversion): Same.
541 (convert_lvalue_to_rvalue): Same.
542 (default_conversion): Same.
543 (build_indirect_ref): Same.
544 (build_function_call_vec): Same.
545 (build_atomic_assign): Same.
546 (build_unary_op): Same.
547 (c_finish_return): Same.
548 (emit_side_effect_warnings): Same.
549 (c_finish_stmt_expr): Same.
550 (c_omp_clause_copy_ctor): Same.
551
9aa8327e
GA
5522021-06-24 Jakub Jelinek <jakub@redhat.com>
553
554 PR c/101176
555 * c-parser.c (c_parser_has_attribute_expression): Set source range for
556 the result.
557
5582021-06-24 Jakub Jelinek <jakub@redhat.com>
559
560 PR c/101171
561 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
562 error_mark_node.
563
5642021-06-24 Jakub Jelinek <jakub@redhat.com>
565
566 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
567 C_ORT_OMP for clauses on target construct.
568 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
569 (c_parser_omp_target): For non-combined target add
570 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
571 C_ORT_OMP_TARGET to c_finish_omp_clauses.
572 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
573 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
574 never present on C_ORT_*DECLARE_SIMD.
575 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
576 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
577 corresponding map clauses.
578
2f080224
GA
5792021-06-21 Jakub Jelinek <jakub@redhat.com>
580
581 PR inline-asm/100785
582 * c-typeck.c (c_mark_addressable): Diagnose trying to make
583 bit-fields addressable.
584
ede6c356
GA
5852021-06-15 Robin Dapp <rdapp@linux.ibm.com>
586
587 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
588 similar.
589
8dc48181
GA
5902021-06-14 Tobias Burnus <tobias@codesourcery.com>
591
592 PR c/100913
593 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
594 var in the error case.
595
438aac59
GA
5962021-06-07 Eric Botcazou <ebotcazou@adacore.com>
597
598 PR c/100920
599 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
600 spot built-in functions.
601
7d6987e9
GA
6022021-06-06 Jakub Jelinek <jakub@redhat.com>
603
604 PR c/100902
605 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
606 even when target is combined with other constructs.
607
6082021-06-06 Eric Botcazou <ebotcazou@adacore.com>
609
610 PR c/100920
611 * c-decl.c (finish_struct): Fix thinko in previous change.
612 * c-typeck.c (convert_for_assignment): Do not warn on pointer
613 assignment and initialization for storage order purposes if the
614 RHS is a call to a DECL_IS_MALLOC function.
615
600f90cb
GA
6162021-06-04 Martin Sebor <msebor@redhat.com>
617
618 PR c/100783
619 * c-objc-common.c (print_type): Handle erroneous types.
620
440c8a0a
GA
6212021-06-03 Jakub Jelinek <jakub@redhat.com>
622
623 PR c++/100859
624 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
625 after depend only cases.
626
ee682192
GA
6272021-05-31 Richard Biener <rguenther@suse.de>
628
629 PR c++/88601
630 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
631 * c-parser.c (c_parser_postfix_expression): Likewise.
632
48166757
GA
6332021-05-28 Richard Biener <rguenther@suse.de>
634
635 PR c/100803
636 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
637 invalid if conditions.
638
6392021-05-28 Jakub Jelinek <jakub@redhat.com>
640
641 PR middle-end/99928
642 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
643 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
644 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
645 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
646 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
647 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
648 if present in map_head, map_field_head or map_firstprivate_head
649 bitmaps.
650
6512021-05-28 Tobias Burnus <tobias@codesourcery.com>
652
653 * c-parser.c (c_parser_omp_clause_affinity): New.
654 (c_parser_omp_clause_name, c_parser_omp_variable_list,
655 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
656 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
657 c_finish_omp_clauses): Likewise.
658
01c59ef2
GA
6592021-05-26 Eric Botcazou <ebotcazou@adacore.com>
660
661 PR c/100653
662 * c-decl.c (finish_struct): Warn for a union containing an aggregate
663 field with a differing scalar storage order.
664
2832d51b
GA
6652021-05-21 Jakub Jelinek <jakub@redhat.com>
666
667 PR middle-end/99928
668 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
669 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
670 if a decl is mentioned both in map clause and in such firstprivate
671 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
672
65f32e5d
GA
6732021-05-19 Jakub Jelinek <jakub@redhat.com>
674
675 PR middle-end/99928
676 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
677 master when combined with taskloop.
678 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
679 parallel master when not combined with taskloop.
680
a8daf9a1
GA
6812021-05-18 Richard Biener <rguenther@suse.de>
682
683 PR c/100522
684 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
685 Diagnose calls to non-functions.
686 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
687
a7ffc1ef
GA
6882021-05-17 Richard Biener <rguenther@suse.de>
689
690 PR c/100625
691 * gimple-parser.c (c_parser_gimple_label): Avoid building
692 a GIMPLE label with NULL label decl.
693
f9af11c7
GA
6942021-05-13 Martin Sebor <msebor@redhat.com>
695
696 PR c/100550
697 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
698
0ff3a0f2
GA
6992021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
700
701 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
702 'close'.
703
aa891c56
GA
7042021-05-10 Martin Liska <mliska@suse.cz>
705
706 * c-aux-info.c (affix_data_type): Use startswith
707 function instead of strncmp.
708 * c-typeck.c (build_function_call_vec): Likewise.
709 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
710
62d87a32
GA
7112021-05-07 Eric Botcazou <ebotcazou@adacore.com>
712
713 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
714 on the address of a pointer field in a record with reverse SSO.
715
99e8df7a
GA
7162021-05-04 Tobias Burnus <tobias@codesourcery.com>
717
718 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
719 for || and && reductions.
720
3c8e539d
GA
7212021-04-29 Joseph Myers <joseph@codesourcery.com>
722
723 * c-typeck.c (function_types_compatible_p): For C2X, treat
724 unprototyped function as compatible with non-variadic prototyped
725 function even if some argument types are changed by the default
726 argument promotions.
727
ee351f7f
GA
7282021-04-15 Martin Sebor <msebor@redhat.com>
729
730 PR c/99420
731 PR c/99972
732 * c-decl.c (pushdecl): Always propagate type attribute.
733
7342021-04-15 Richard Sandiford <richard.sandiford@arm.com>
735
736 PR c/98852
737 * c-typeck.c (c_common_type): Do not drop attributes that
738 affect type identity.
739
1d54b138
GA
7402021-04-10 Jakub Jelinek <jakub@redhat.com>
741
742 PR c/99990
743 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
744 error_mark_node.
745
4493b1c1
GA
7462021-03-25 Jakub Jelinek <jakub@redhat.com>
747
748 PR c++/99565
749 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
750 to operand_equal_p.
751
5f256a70
GA
7522021-03-19 Jakub Jelinek <jakub@redhat.com>
753
754 PR c/99588
755 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
756 with modifycode NOP_EXPR produces and mark the _Atomic var as read
757 if found.
758 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
759 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
760 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
761
3c5b6d24
GA
7622021-03-15 Tobias Burnus <tobias@codesourcery.com>
763
764 PR c++/99509
765 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
766 ensure that the varpool node is marked as offloadable.
767
ceae9533
GA
7682021-03-05 Tobias Burnus <tobias@codesourcery.com>
769
770 PR c/99137
771 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
772
4028d01a
GA
7732021-02-24 Martin Sebor <msebor@redhat.com>
774
775 PR middle-end/97172
776 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
777
bf81237e
GA
7782021-02-18 Jakub Jelinek <jakub@redhat.com>
779
780 PR c/99136
781 * c-typeck.c (c_finish_return): Don't wrap retval into
782 EXCESS_PRECISION_EXPR in functions that return void.
783
0c5cdb31
GA
7842021-02-11 Marek Polacek <polacek@redhat.com>
785
786 * c-parser.c (c_parser_if_statement): Use vec_free.
787
a19dd5e6
GA
7882021-02-04 Martin Sebor <msebor@redhat.com>
789
790 PR c/97882
791 * c-decl.c (locate_old_decl): Add type to diagnostic output.
792 (diagnose_mismatched_decls): Same.
793 (start_function): Introduce temporaries for better readability.
794 * c-typeck.c (comptypes_internal): Only consider complete enum
795 types in comparisons with integers.
796
f7884fb1
GA
7972021-02-01 Martin Sebor <msebor@redhat.com>
798
799 PR middle-end/97172
800 * c-decl.c (free_attr_access_data): New function.
801 (c_parse_final_cleanups): Call free_attr_access_data.
802
59cf67d1
GA
8032021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
804
805 * c-parser.c (c_parser_omp_clause_detach): New.
806 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
807 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
808 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
809 clause. Prevent use of detach with mergeable and overriding the
810 data sharing mode of the event handle.
811
2f7f0d32
GA
8122021-01-15 Jakub Jelinek <jakub@redhat.com>
813
814 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
815 unqualified element type and then call c_build_qualified_type on the
816 ARRAY_TYPE.
817
7d187e4f
GA
8182021-01-07 Richard Biener <rguenther@suse.de>
819
820 * gimple-parser.c (c_parser_gimple_compound_statement): Only
821 reallocate loop array if it is too small.
822
eefe499f
GA
8232020-12-16 Martin Uecker <muecker@gwdg.de>
824
825 PR c/98047
826 * c-typeck.c (build_modify_expr): Drop qualifiers.
827
8282020-12-16 Martin Uecker <muecker@gwdg.de>
829
830 PR c/98260
831 * c-parser.c (c_parser_expression): Look into
832 nop expression when marking expressions as read.
833
d52945ce
GA
8342020-12-14 Martin Liska <mliska@suse.cz>
835
836 PR sanitizer/98204
837 * c-typeck.c (pointer_diff): Do not emit a top-level
838 sanitization.
839 (build_binary_op): Likewise.
840
ca2bd949
GA
8412020-12-09 Tobias Burnus <tobias@codesourcery.com>
842
843 * c-parser.c (c_parser_omp_allocate): New.
844 (c_parser_omp_construct): Call it.
845
8462020-12-09 Richard Biener <rguenther@suse.de>
847
848 PR c/98200
849 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
850 early on error.
851
bc8a7013
GA
8522020-12-07 Martin Uecker <muecker@gwdg.de>
853
854 PR c/97981
855 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
856 that drops qualifiers to the end of the function.
857
d48df6f2
GA
8582020-11-26 Martin Uecker <muecker@gwdg.de>
859
860 PR c/65455
861 PR c/92935
862 * c-parser.c (c_parser_declaration_or_fndef): Remove
863 redundant code to drop qualifiers of _Atomic types for __auto_type.
864 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
865 types for __typeof__.
866
1e2c9a27
GA
8672020-11-24 Jakub Jelinek <jakub@redhat.com>
868
869 PR c/97958
870 * c-parser.c (c_parser_binary_expression): For omp atomic binary
871 expressions, use make_node instead of build2 to avoid checking build2
872 performs.
873
8e6198d0
GA
8742020-11-23 Joseph Myers <joseph@codesourcery.com>
875
876 PR c/95630
877 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
878 for comparisons of complete and incomplete pointers.
879
7a97e2fc
GA
8802020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
881
882 * c-aux-info.c (gen_type): Support opaque types.
883
82e5048e
GA
8842020-11-20 Martin Sebor <msebor@redhat.com>
885
886 PR middle-end/97879
887 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
888
8892020-11-20 Jakub Jelinek <jakub@redhat.com>
890
891 PR other/97911
892 * Make-lang.in (c.serial): Change from goal to a variable.
893 (.PHONY): Drop c.serial.
894
8952020-11-20 Martin Uecker <muecker@gwdg.de>
896
897 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
898
d62586ee
GA
8992020-11-19 Jakub Jelinek <jakub@redhat.com>
900
901 PR c/97860
902 * c-decl.c (get_parm_array_spec): Bail out of nelts is
903 error_operand_p.
904
25bb75f8
GA
9052020-11-18 Jakub Jelinek <jakub@redhat.com>
906
907 * Make-lang.in (c.serial): New goal.
908 (.PHONY): Add c.serial c.prev.
909 (cc1$(exeext)): Call LINK_PROGRESS.
910
77f67db2
GA
9112020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
912
913 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
914 goto too.
915 * c-typeck.c (build_asm_expr): Remove an assert checking output
916 absence for asm goto.
917
9182020-11-13 Jakub Jelinek <jakub@redhat.com>
919
920 * c-typeck.c (c_finish_omp_clauses): Don't clear
921 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
922
9232020-11-13 Iain Sandoe <iain@sandoe.co.uk>
924
925 PR objc/77404
926 * c-parser.c (c_parser_objc_class_definition): Pass the
927 location of the class name to the interface declaration.
928
bb622641
GA
9292020-11-10 Strager Neds <strager.nds@gmail.com>
930
931 * c-decl.c (merge_decls): Use new overload of
932 set_decl_section_name.
933
9342020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
935
936 * c-parser.c (c_parser_omp_target_data): Add use of
937 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
938 handled map clause kind.
939 (c_parser_omp_target_enter_data): Likewise.
940 (c_parser_omp_target_exit_data): Likewise.
941 (c_parser_omp_target): Likewise.
942 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
943 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
944 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
945 same struct field access to co-exist on OpenMP construct.
946
2da7ee05
GA
9472020-11-07 Martin Uecker <muecker@gwdg.de>
948
949 * c-parser.c (c_parser_label): Implement mixing of labels and code.
950 (c_parser_all_labels): Likewise.
951
44cab2d8
GA
9522020-11-06 Iain Sandoe <iain@sandoe.co.uk>
953
954 * c-parser.c (c_parser_objc_at_property_declaration):
955 Improve parsing fidelity. Associate better location info
956 with @property attributes. Clean up the interface to
957 objc_add_property_declaration ().
958
9592020-11-06 Nathan Sidwell <nathan@acm.org>
960
961 * c-decl.c (diagnose_mismatched_decls): Rename
962 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
963 (warn_if_shadowing, implicitly_declare, names_builtin_p)
964 (collect_source_refs): Likewise.
965 * c-typeck.c (inform_declaration, inform_for_arg)
966 (convert_for_assignment): Likewise.
967
9682020-11-06 Tobias Burnus <tobias@codesourcery.com>
969
970 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
971 OpenACC matching.
972 (c_parser_omp_construct): Update call.
973
35c125cb
GA
9742020-11-04 Jakub Jelinek <jakub@redhat.com>
975
976 PR c++/97670
977 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
978 find underlying decl to clear in the aligned_head bitmap.
979
9802020-11-04 Joseph Myers <joseph@codesourcery.com>
981
982 * c-decl.c (handle_nodiscard_attribute): New.
983 (std_attribute_table): Add nodiscard.
984 * c-parser.c (c_parser_std_attribute): Expect argument to
985 nodiscard attribute to be a string. Do not special-case ignoring
986 nodiscard.
987 * c-typeck.c (maybe_warn_nodiscard): New.
988 (build_compound_expr, emit_side_effect_warnings): Call
989 maybe_warn_nodiscard.
990 (c_process_expr_stmt, c_finish_stmt_expr): Also call
991 emit_side_effect_warnings if warn_unused_result.
992
4f0606fe
GA
9932020-10-29 Asher Gordon <AsDaGo@posteo.net>
994
995 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
996 with XDELETE.
997 (finish_init): Likewise.
998 (pop_init_level): Likewise.
999
e93aae4a
GA
10002020-10-28 Joseph Myers <joseph@codesourcery.com>
1001
1002 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1003 error_at for omitted parameter name.
1004
10052020-10-28 Jakub Jelinek <jakub@redhat.com>
1006
1007 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1008 (c_parser_omp_clause_allocate): New function.
1009 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1010 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1011 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1012 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1013 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1014 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1015 PRAGMA_OMP_CLAUSE_ALLOCATE.
1016 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1017
89bb01e7
GA
10182020-10-27 Joseph Myers <joseph@codesourcery.com>
1019
1020 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1021 standard attributes.
1022
efe71fcc
GA
10232020-10-23 Marek Polacek <polacek@redhat.com>
1024
1025 PR c++/91741
1026 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1027 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1028 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1029 * c-tree.h (char_type_p): Declare.
1030 * c-typeck.c (char_type_p): No longer static.
1031
10322020-10-23 Martin Sebor <msebor@redhat.com>
1033
1034 PR middle-end/97552
1035 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1036
2fe5b7d1
GA
10372020-09-19 Martin Sebor <msebor@redhat.com>
1038
1039 PR c/50584
1040 * c-decl.c (lookup_last_decl): Define new function.
1041 (c_decl_attributes): Call it.
1042 (start_decl): Add argument and use it.
1043 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1044 (get_parm_array_spec): Define new function.
1045 (push_parm_decl): Call get_parm_array_spec.
1046 (start_function): Call warn_parm_array_mismatch. Build attribute
1047 access and add it to current function.
1048 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1049 in forms of array parameters.
1050 * c-tree.h (start_decl): Add argument.
1051
10522020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1053
1054 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1055 with...
1056 (in_statement): New.
1057 (start_function): Adjust for above change.
1058 (c_push_function_context, c_pop_function_context): Likewise.
1059 * c-lang.h (struct language_function): Likewise.
1060 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1061 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1062 New.
1063 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1064 (c_parser_switch_statement): Adjust break/switch context handling
1065 and calls to renamed functions.
1066 (c_parser_while_statement): Adjust break/switch context handling and
1067 build a WHILE_STMT.
1068 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1069 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1070 (c_parser_omp_for_loop): Adjust break/switch context handling.
1071 * c-tree.h (c_break_label, c_cont_label): Delete.
1072 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1073 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1074 (in_statement, switch_statement_break_seen_p): Declare.
1075 (c_start_case, c_finish_case): Renamed to...
1076 (c_start_switch, c_finish_switch).
1077 (c_finish_bc_stmt): Adjust arguments.
1078 * c-typeck.c (build_function_call_vec): Don't try to print
1079 statements with %qE format.
1080 (struct c_switch): Rename switch_expr field to switch_stmt.
1081 Add break_stmt_seen_p field.
1082 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1083 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1084 (do_case): Update for changes to struct c_switch.
1085 (c_finish_case): Rename to c_finish_switch. Update for changes to
1086 struct c_switch and change of representation from SWITCH_EXPR to
1087 SWITCH_STMT.
1088 (c_finish_loop): Delete.
1089 (c_finish_bc_stmt): Update to reflect changes to break/continue
1090 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1091 of a GOTO_EXPR except for objc foreach loops.
1092
e1a4a8a0
GA
10932020-09-01 Jakub Jelinek <jakub@redhat.com>
1094
1095 PR c++/96867
1096 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1097 only on PARM_DECLs.
1098
8f7ea26a
GA
10992020-08-28 Martin Sebor <msebor@redhat.com>
1100
1101 PR c/96596
1102 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1103 argument type.
1104
8b394f01
GA
11052020-08-27 Martin Liska <mliska@suse.cz>
1106
1107 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1108 growth function to true.
1109
db0f6efe
GA
11102020-08-25 Tobias Burnus <tobias@codesourcery.com>
1111
1112 PR c/96678
1113 * c-typeck.c (handle_omp_array_sections_1): Talk about
1114 array function parameter in the error message.
1115
5c265693
GA
11162020-08-18 Jakub Jelinek <jakub@redhat.com>
1117
1118 PR c/96571
1119 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1120 to int, holding index of the match. Call mark_exp_read on the selector
1121 expression and on expressions other than the selected one.
1122
4967ca2f
GA
11232020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1124
1125 PR c/96377
1126 * c-typeck.c (process_init_element): Split test for whether to
1127 recurse into a record, union or array into...
1128 (initialize_elementwise_p): ...this new function. Don't recurse
1129 into a vector type if the initialization value is also a vector.
1130
48cc2e46
GA
11312020-07-31 Richard Biener <rguenther@suse.de>
1132
1133 PR debug/96383
1134 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1135 Define to c_common_finalize_early_debug.
1136
3ea9abca
GA
11372020-07-22 Tobias Burnus <tobias@codesourcery.com>
1138
1139 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1140 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1141 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1142
30430061
GA
11432020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1144
1145 PR target/95237
1146 * c-decl.c (finish_decl): Call target hook
1147 lower_local_decl_alignment to lower local decl alignment.
1148
3f8ca9cb
GA
11492020-07-09 Julian Brown <julian@codesourcery.com>
1150 Thomas Schwinge <thomas@codesourcery.com>
1151
1152 PR middle-end/95270
1153 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1154 for standalone attach/detach clauses.
1155
a82c4c4c 11562020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1157
1158 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1159 set, warn for conversion between pointers that point to incompatible
1160 scalar storage orders.
1161
f60ee68d
GA
11622020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1163
1164 * c-parser.c (c_parser_statement_after_labels): Pass correct
1165 parameters to c_parser_do_statement.
1166
56638b9b
GA
11672020-06-16 Jakub Jelinek <jakub@redhat.com>
1168
1169 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1170 c_in_omp_for.
1171 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1172 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1173 c_finish_omp_for.
1174 * c-tree.h (c_in_omp_for): Declare.
1175 * c-typeck.c (c_in_omp_for): Define.
1176 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1177 (digest_init): Likewise.
1178 (build_binary_op): Likewise.
1179
11802020-06-16 Jakub Jelinek <jakub@redhat.com>
1181
1182 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1183 from kind by comma rather than colon.
1184
1a59f3db
GA
11852020-06-05 Mark Wielaard <mark@klomp.org>
1186
1187 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1188 an undeclared builtin, then add a fixit header hint, if found.
1189 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1190 warning_at about implicit builtin declaration type mismatch.
1191
9a5b7438
GA
11922020-06-03 Mark Wielaard <mark@klomp.org>
1193
1194 * c-parser.c (struct c_parser): Add seen_string_literal
1195 bitfield.
1196 (c_parser_consume_token): Reset seen_string_literal.
1197 (c_parser_error_richloc): Add name_hint if seen_string_literal
1198 and next token is a CPP_NAME and we have a missing header
1199 suggestion for the name.
1200 (c_parser_string_literal): Set seen_string_literal.
1201
12022020-06-03 Mark Wielaard <mark@klomp.org>
1203
1204 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1205 scope with matching_parens after CPP_OPEN_PAREN.
1206
12072020-06-03 Tobias Burnus <tobias@codesourcery.com>
1208
1209 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1210
53ffb43a
GA
12112020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1212
1213 * Make-lang.in: Remove extra slash.
1214
8f66f175
ML
12152020-05-19 Martin Liska <mliska@suse.cz>
1216
1217 * c-parser.c: Fix typo.
1218
49ddde69
JJ
12192020-05-14 Jakub Jelinek <jakub@redhat.com>
1220
1221 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1222
eb72dc66
RB
12232020-05-07 Richard Biener <rguenther@suse.de>
1224
1225 PR middle-end/94703
1226 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1227 DECL_GIMPLE_REG_P.
1228
bf915591
JJ
12292020-04-30 Jakub Jelinek <jakub@redhat.com>
1230
1231 PR c/94842
1232 * c-decl.c (set_labels_context_r): In addition to context-less
1233 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1234 parent function if any.
1235 (store_parm_decls): Adjust comment.
1236
e1113ffb
JJ
12372020-04-19 Jakub Jelinek <jakub@redhat.com>
1238
1239 PR objc/94637
1240 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1241 two CPP_COLON tokens.
1242
2e389749
JJ
12432020-04-17 Jakub Jelinek <jakub@redhat.com>
1244
1245 PR other/94629
1246 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1247 to data.clauses.
1248
2dc9294c
JJ
12492020-04-15 Jakub Jelinek <jakub@redhat.com>
1250
1251 PR c/94593
1252 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1253 requires directive when not at file scope.
1254
13e41d8b
TB
12552020-04-08 Tobias Burnus <tobias@codesourcery.com>
1256
1257 PR middle-end/94120
1258 * c-decl.c (c_check_in_current_scope): New function.
1259 * c-tree.h (c_check_in_current_scope): Declare it.
1260 * c-parser.c (c_parser_oacc_declare): Add check that variables
1261 are declared in the same scope as the directive. Fix handling
1262 of namespace vars.
1263
4df50a05
JJ
12642020-04-07 Jakub Jelinek <jakub@redhat.com>
1265
1266 PR c++/94512
1267 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1268 if c_parser_omp_master succeeded.
1269
5db9e893
JJ
12702020-03-23 Jakub Jelinek <jakub@redhat.com>
1271
1272 PR gcov-profile/94029
1273 PR c/94239
1274 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1275 the function_start_locus location. Don't do that afterwards for the
1276 __GIMPLE body parsing.
1277
9def91e9
JJ
12782020-03-19 Jakub Jelinek <jakub@redhat.com>
1279
1280 PR gcov-profile/94029
1281 * c-tree.h (finish_function): Add location_t argument defaulted to
1282 input_location.
1283 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1284 set it to the locus of closing } if non-NULL.
1285 (c_parser_compound_statement_nostart): Return locus of closing }.
1286 (c_parser_parse_rtl_body): Likewise.
1287 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1288 finish_function.
1289 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1290 input_location to set function_end_locus.
1291
046c5890
JJ
12922020-03-17 Jakub Jelinek <jakub@redhat.com>
1293
1294 PR c/94172
1295 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1296 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1297 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1298 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1299 ENUMERAL_TYPEs.
1300 (finish_incomplete_vars): New function, moved from finish_struct. Use
1301 relayout_decl instead of layout_decl.
1302 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1303 being TYPE_VFIELD. Use finish_incomplete_vars.
1304 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1305 finish_incomplete_vars.
1306 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1307 also on ENUMERAL_TYPEs.
1308
c015ff8c
JJ
13092020-03-16 Jakub Jelinek <jakub@redhat.com>
1310
1311 PR c/94179
1312 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1313
f2e9fe5f
MS
13142020-03-13 Martin Sebor <msebor@redhat.com>
1315
1316 PR c/94040
1317 * c-decl.c (builtin_structptr_type_count): New constant.
1318 (match_builtin_function_types): Reject decls that are incompatible
1319 in types pointed to by pointers.
1320 (diagnose_mismatched_decls): Adjust comments.
1321
c9d70946
JM
13222020-03-05 Joseph Myers <joseph@codesourcery.com>
1323
1324 PR c/93577
1325 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1326 empty when initialized type is error_mark_node.
1327 (set_designator, process_init_element): Ignore initializers for
1328 elements of a variable-size type or of error_mark_node.
1329
726e292d
MS
13302020-03-01 Martin Sebor <msebor@redhat.com>
1331
1332 PR middle-end/93926
1333 * c-decl.c (types_close_enough_to_match): New function.
1334 (match_builtin_function_types):
1335 (diagnose_mismatched_decls): Add missing inform call to a warning.
1336
a499c2f8
MS
13372020-03-01 Martin Sebor <msebor@redhat.com>
1338
1339 PR c/93812
1340 * c-typeck.c (build_functype_attribute_variant): New function.
1341 (composite_type): Call it.
1342
9c3da8cc
JJ
13432020-02-25 Jakub Jelinek <jakub@redhat.com>
1344
1345 PR other/93912
1346 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1347 Rename last argument from probablity to probability.
1348
bacdd5e9
JJ
13492020-02-13 Jakub Jelinek <jakub@redhat.com>
1350
1351 PR c/93576
1352 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1353 *expr if it has side effects.
1354
f9eb0973
JL
13552020-01-30 Jeff Law <law@redhat.com>
1356
1357 PR c/88660
1358 * c-parser.c (c_parser_switch_statement): Make sure to request
1359 marking the switch expr as used.
1360
ac68e287
JM
13612020-01-22 Joseph Myers <joseph@codesourcery.com>
1362
1363 PR c/93348
1364 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1365 argument with integer operands.
1366
852f0ae8
KK
13672020-01-16 Kerem Kat <keremkat@gmail.com>
1368
1369 PR c/92833
1370 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1371 to support 4 available tokens.
1372
e2346a33
JM
13732020-01-15 Joseph Myers <joseph@codesourcery.com>
1374
1375 PR c/93072
1376 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1377 determine whether to set DECL_CONTEXT.
1378
3d77686d
JM
13792020-01-13 Joseph Myers <joseph@codesourcery.com>
1380
1381 PR c/93241
1382 * c-typeck.c (build_c_cast): Check for expressions with integer
1383 operands that can occur in an unevaluated part of an integer
1384 constant expression and call note_integer_operands as needed.
1385
f74c4b2c
RB
13862019-01-08 Richard Biener <rguenther@suse.de>
1387
1388 PR middle-end/93199
1389 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1390 permanently.
1391
8d9254fc
JJ
13922020-01-01 Jakub Jelinek <jakub@redhat.com>
1393
1394 Update copyright years.
1395
39292e25
EB
13962019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1397
1398 * c-decl.c (collect_source_ref_cb): Delete.
1399 (for_each_global_decl): Rename into...
1400 (collect_source_refs): ...this. Call collect_source_ref directly.
1401 (c_parse_final_cleanups): Always call collect_source_ref on the main
1402 input filename.
1403
519d7496
JB
14042019-12-19 Julian Brown <julian@codesourcery.com>
1405 Cesar Philippidis <cesar@codesourcery.com>
1406
1407 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1408 detach clauses.
1409 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1410 Allow deref (->) in variable lists if true.
1411 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1412 Pass to c_parser_omp_variable_list.
1413 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1414 call to c_parser_omp_variable_list.
1415 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1416 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1417 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1418 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1419 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1420 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1421 and detach. Support deref.
1422 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1423 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1424 (c_oacc_check_attachments): New function.
1425 (c_finish_omp_clauses): Check attach/detach arguments for being
1426 pointers using above. Support deref.
1427
a6163563
JB
14282019-12-19 Julian Brown <julian@codesourcery.com>
1429 Maciej W. Rozycki <macro@codesourcery.com>
1430 Tobias Burnus <tobias@codesourcery.com>
1431 Thomas Schwinge <thomas@codesourcery.com>
1432
1433 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1434 (c_parser_oacc_data_clause): Likewise.
1435 (c_parser_oacc_all_clauses): Likewise.
1436 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1437 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1438 PRAGMA_OACC_CLAUSE_NO_CREATE.
1439 * c-typeck.c (handle_omp_array_sections): Support
1440 GOMP_MAP_NO_ALLOC.
1441
d68f5d45
DM
14422019-12-09 David Malcolm <dmalcolm@redhat.com>
1443
1444 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1445 Replace label_text ctor calls.
1446
4691bf46
JM
14472019-12-04 Joseph Myers <joseph@codesourcery.com>
1448
1449 PR c/36941
1450 PR c/88827
1451 * c-typeck.c (convert_lvalue_to_rvalue): Call
1452 require_complete_type for arguments not of void types.
1453 (build_indirect_ref): Do not diagnose dereferencing pointers to
1454 incomplete types.
1455 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1456
85d11957
JM
14572019-12-03 Joseph Myers <joseph@codesourcery.com>
1458
1459 PR c/88704
1460 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1461 old-style parameter definitions.
1462
4569f8b3
SL
14632019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1464
1465 PR target/92499
1466
1467 * c-decl.c (flexible_array_type_p): Move to common code.
1468
65ef05d0
RS
14692019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1470
1471 * c-decl.c (start_decl): Allow initialization of variables whose
1472 size is a POLY_INT_CST.
1473 (finish_decl): Use verify_type_context to check whether the target
1474 allows variables with a particular type to have static or thread-local
1475 storage duration. Don't raise a second error if such variables do
1476 not have a constant size.
1477 (grokdeclarator): Use verify_type_context to check whether the
1478 target allows fields or array elements to have a particular type.
1479 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1480 the target allows pointer difference for the types involved.
1481 (build_unary_op): Likewise for pointer increment and decrement.
1482
34b43828
JM
14832019-11-29 Joseph Myers <joseph@codesourcery.com>
1484
1485 * c-parser.c (struct c_parser): Add members raw_tokens and
1486 raw_tokens_used.
1487 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1488 using previously-lexed raw tokens.
1489 (c_parser_peek_nth_token_raw)
1490 (c_parser_check_balanced_raw_token_sequence): New functions.
1491 (c_parser_nth_token_starts_std_attributes): Use
1492 c_parser_check_balanced_raw_token_sequence for Objective-C.
1493
5b8d9367
JM
14942019-11-25 Joseph Myers <joseph@codesourcery.com>
1495
1496 PR c/91985
1497 * c-decl.c (finish_declspecs): Use int instead of decimal
1498 floating-point types if decimal floating-point not supported.
1499
1723e1be
JM
15002019-11-25 Joseph Myers <joseph@codesourcery.com>
1501
1502 * c-tree.h (struct c_declarator): Use a structure for id member.
1503 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1504 declarators at the start, not when handling individual declarators
1505 later. Use u.id.id instead of u.id.
1506 (grokfield): Use u.id.id instead of u.id.
1507 (build_id_declarator): Set u.id.id and u.id.attrs.
1508 (finish_declspecs): Handle postfix attributes in case of typedef
1509 name or typeof used.
1510 * c-parser.c (c_parser_direct_declarator)
1511 (c_parser_direct_declarator_inner): Place declarator for
1512 attributes inside that for function or array, not outside. Set
1513 u.id.attrs for identifiers.
1514 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1515 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1516 instead of u.id.
1517
bdaf8be1
JJ
15182019-11-22 Jakub Jelinek <jakub@redhat.com>
1519
1520 PR c/90677
1521 * c-decl.c (identifier_global_tag): Define.
1522
3e00ba47
RB
15232019-11-20 Richard Biener <rguenther@suse.de>
1524
1525 PR c/92088
1526 * c-decl.c (grokdeclarator): Prevent inlining of nested
1527 function with VLA arguments.
1528
8c5b727a
JM
15292019-11-20 Joseph Myers <joseph@codesourcery.com>
1530
1531 * c-decl.c (c_warn_type_attributes): New function.
1532 (groktypename, grokdeclarator, finish_declspecs): Call
1533 c_warn_type_attributes before applying attributes to types.
1534 * c-tree.h (c_warn_type_attributes): Declare.
1535
192961ff
JM
15362019-11-19 Joseph Myers <joseph@codesourcery.com>
1537
1538 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1539 standard attributes.
1540 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1541 pedwarn for unknown standard attributes and return error_mark_node
1542 for them.
1543
20a38017
MM
15442019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1545
1546 * c-parser.c (c_parser_parse_rtl_body): Always call
1547 run_rtl_passes, even if startwith pass is not provided.
1548
d5fbe5e0
JM
15492019-11-15 Joseph Myers <joseph@codesourcery.com>
1550
1551 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1552 duplicate standard attributes.
1553
97cc1187
JM
15542019-11-15 Joseph Myers <joseph@codesourcery.com>
1555
1556 * c-decl.c (std_attribute_table): Add maybe_unused.
1557
f8aea5e3
JM
15582019-11-15 Joseph Myers <joseph@codesourcery.com>
1559
1560 * c-decl.c (std_attribute_table): Add fallthrough.
1561 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1562 attribute at top level.
1563
2cc94aa8
JM
15642019-11-15 Joseph Myers <joseph@codesourcery.com>
1565
1566 * c-decl.c (std_attribute_table): New.
1567 (c_init_decl_processing): Register attributes from
1568 std_attribute_table.
1569 * c-parser.c (c_parser_attribute_arguments): Add arguments
1570 require_string and allow_empty_args. All callers changed.
1571 (c_parser_std_attribute): Set require_string argument for
1572 "deprecated" attribute.
1573
7c5890cc
JM
15742019-11-14 Joseph Myers <joseph@codesourcery.com>
1575
1576 * c-parser.c (c_parser_postfix_expression)
1577 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1578 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1579
e8738f4e
RS
15802019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1581
1582 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1583 of build_same_sized_truth_vector_type.
1584 (build_vec_cmp): Likewise.
1585
b2417b59
JJ
15862019-11-14 Jakub Jelinek <jakub@redhat.com>
1587
bedb7f04
JJ
1588 * c-parser.c (c_parser_omp_context_selector): Don't require score
1589 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1590 negative score.
1591
b2417b59
JJ
1592 * c-parser.c (c_parser_omp_context_selector): Rename
1593 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1594 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1595 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1596 and string literals.
1597
4e03c3a7
JM
15982019-11-14 Joseph Myers <joseph@codesourcery.com>
1599
1600 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1601 ctsk_tagfirstref_attrs.
1602 (struct c_declspecs): Update description of attrs. Add
1603 postfix_attrs and non_std_attrs_seen_p. Increase size of
1604 typespec_kind bit-field.
1605 (c_warn_unused_attributes): New declaration.
1606 (parser_xref_tag): Update prototype.
1607 * c-decl.c (c_warn_unused_attributes): New function.
1608 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1609 ctsk_tagref_attrs. Handle attribute declarations.
1610 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1611 (grokdeclarator): Handle standard attributes.
1612 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1613 attributes to incomplete type reference.
1614 (xref_tag): Update call to parser_xref_tag.
1615 (declspecs_add_addrspace, declspecs_add_type)
1616 (declspecs_add_scspec, declspecs_add_attrs): Set
1617 non_std_attrs_seen_p.
1618 (finish_declspecs): Apply postfix standard attributes to type.
1619 * c-parser.c (c_token_starts_declspecs)
1620 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1621 (c_parser_next_tokens_start_declaration): Update comments.
1622 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1623 parser->tokens[2] to parser->tokens[1].
1624 (c_parser_nth_token_starts_std_attributes)
1625 (c_parser_std_attribute_specifier_sequence): New functions.
1626 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1627 attrs. All callers changed. Handle standard attributes.
1628 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1629 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1630 All callers changed.
1631 (c_parser_declspecs): Add arguments start_std_attr_ok and
1632 end_std_attr_ok. All callers changed. Handle standard
1633 attributes.
1634 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1635 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1636 (c_parser_compound_statement_nostart, c_parser_all_labels)
1637 (c_parser_label, c_parser_statement, c_parser_for_statement):
1638 Handle standard attributes.
1639 * c-parser.h (c_parser_declspecs): Update prototype.
1640 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1641 c_parser_declspecs.
1642
0c29cac4
ML
16432019-11-12 Martin Liska <mliska@suse.cz>
1644
1645 * gimple-parser.c: Do not include params.h.
1646
028d4092
ML
16472019-11-12 Martin Liska <mliska@suse.cz>
1648
1649 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1650 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1651 macro.
1652
62aee289
MR
16532019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1654 Frederik Harwath <frederik@codesourcery.com>
1655
1656 gcc/c/
1657 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1658 (c_parser_oacc_kernels_parallel): Rename function to...
1659 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1660 (c_parser_omp_construct): Update accordingly.
1661
1662
7cec9588
JJ
16632019-11-11 Jakub Jelinek <jakub@redhat.com>
1664
1665 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1666 without corresponding end declare target.
1667
f486280c
RS
16682019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1669
1670 * c-convert.c (convert): Only handle vector conversions if one of
1671 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1672 allows it.
1673 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1674 vectors satisfy gnu_vector_type_p.
1675 (build_unary_op): Only allow unary operators to be applied to
1676 vectors if they satisfy gnu_vector_type_p.
1677 (digest_init): Only allow by-element initialization of vectors
1678 if they satisfy gnu_vector_type_p.
1679 (really_start_incremental_init): Likewise.
1680 (push_init_level): Likewise.
1681 (pop_init_level): Likewise.
1682 (process_init_element): Likewise.
1683 (build_binary_op): Only allow binary operators to be applied to
1684 vectors if they satisfy gnu_vector_type_p.
1685
017c6491
JM
16862019-11-08 Joseph Myers <joseph@codesourcery.com>
1687
1688 * c-decl.c (grokparms): Convert () in a function definition to
1689 (void) for C2x.
1690 (store_parm_decls_oldstyle): Pedwarn for C2x.
1691 (store_parm_decls): Update comment about () not generating a
1692 prototype.
1693
c01bd174
JM
16942019-11-07 Joseph Myers <joseph@codesourcery.com>
1695
1696 * c-parser.c (c_parser_attribute_arguments): New function.
1697 Factored out of c_parser_gnu_attribute.
1698 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1699 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1700 (c_parser_std_attribute_specifier): New functions.
1701 (c_parser_transaction_attributes): Use
1702 c_parser_std_attribute_specifier.
1703
471c5330
JM
17042019-11-07 Joseph Myers <joseph@codesourcery.com>
1705
1706 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1707 lex_joined_string and translate_strings_p.
1708 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1709 c_lex_with_flags.
1710 (c_parser_string_literal): New function.
1711 (c_parser_static_assert_declaration_no_semi): Use
1712 c_parser_string_literal. Do not set lex_untranslated_string.
1713 (c_parser_asm_string_literal): Use c_parser_string_literal.
1714 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1715 (c_parser_gnu_attributes): Set and restore translate_strings_p
1716 instead of lex_untranslated_string.
1717 (c_parser_asm_statement): Do not set lex_untranslated_string.
1718 (c_parser_asm_operands): Likewise.
1719 (c_parser_has_attribute_expression): Set and restore
1720 translate_strings_p instead of lex_untranslated_string.
1721 (c_parser_postfix_expression): Use c_parser_string_literal.
1722 (pragma_lex): Likewise.
1723 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1724 (c_parse_file): Set translate_strings_p.
1725 * gimple-parser.c (c_parser_gimple_postfix_expression)
1726 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1727 * c-parser.c (c_parser_string_literal): Declare function.
1728
d0c464d2
JJ
17292019-11-02 Jakub Jelinek <jakub@redhat.com>
1730
1731 * c-parser.c (c_finish_omp_declare_variant): Use
1732 omp_get_context_selector instead of c_omp_get_context_selector.
1733
ac2cfa6c
RS
17342019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1735
1736 * c-tree.h (c_simulate_enum_decl): Declare.
1737 * c-decl.c (c_simulate_enum_decl): New function.
1738 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1739
74078538
RS
17402019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1741
1742 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1743 * c-decl.c (c_simulate_builtin_function_decl): New function.
1744 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1745 to the above.
1746
ad1539d5
MS
17472019-10-28 Martin Sebor <msebor@redhat.com>
1748
1749 PR c/66970
1750 * c-decl.c (names_builtin_p): Define a new function.
1751
cb73e4e7
RB
17522019-10-28 Richard Biener <rguenther@suse.de>
1753
1754 PR c/92249
1755 * gimple-parser.c (c_parser_parse_gimple_body): Make
1756 current_bb the entry block initially to easier recover
1757 from errors.
1758 (c_parser_gimple_compound_statement): Adjust.
1759
135df52c
JJ
17602019-10-24 Jakub Jelinek <jakub@redhat.com>
1761
1762 * c-parser.c (c_finish_omp_declare_variant): Use
1763 omp_context_selector_matches instead of
1764 c_omp_context_selector_matches.
1765 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1766 attribute in between declare target and end declare target
1767 pragmas.
1768
783bfe5e
JM
17692019-10-15 Joseph Myers <joseph@codesourcery.com>
1770
1771 * c-parser.c (c_parser_attribute_any_word): Rename to
1772 c_parser_gnu_attribute_any_word. All callers changed.
1773 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1774 callers changed.
1775 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1776 callers changed.
1777 (c_parser_declaration_or_fndef, c_parser_declspecs)
1778 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1779 (c_parser_struct_declaration, c_parser_declarator)
1780 (c_parser_gnu_attribute, c_parser_compound_statement)
1781 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1782 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1783 attribute-related syntax productions.
1784
56898e43
RS
17852019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1786
1787 * c-objc-common.c (useful_aka_type_p): Replace with...
1788 (get_aka_type): ...this new function. Given the original type,
1789 decide which aka type to print (if any). Only look through typedefs
1790 if user_facing_original_type_p.
1791 (print_type): Update accordingly.
1792
b9424661
JJ
17932019-10-14 Jakub Jelinek <jakub@redhat.com>
1794
1795 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1796 into int NESTED, if it is 2, diagnose missing commas in between
1797 clauses.
1798 (c_parser_omp_context_selector): Pass 2 as last argument to
1799 c_parser_omp_all_clauses.
1800
20de9568
JJ
18012019-10-12 Jakub Jelinek <jakub@redhat.com>
1802
1803 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1804 For simd properties, put them directly into TREE_VALUE.
1805 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1806 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1807 add "omp declare variant base" attribute rather than
1808 "omp declare variant".
1809
fe2bc27c
JM
18102019-10-11 Joseph Myers <joseph@codesourcery.com>
1811
1812 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1813
94e7f906
JJ
18142019-10-10 Jakub Jelinek <jakub@redhat.com>
1815
1816 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1817 true, terminate processing on closing paren and don't skip to end of
1818 pragma line.
1819 (c_parser_omp_declare_simd): Handle also declare variant.
1820 (omp_construct_selectors, omp_device_selectors,
1821 omp_implementation_selectors, omp_user_selectors): New variables.
1822 (c_parser_omp_context_selector,
1823 c_parser_omp_context_selector_specification,
1824 c_finish_omp_declare_variant): New functions.
1825 (c_finish_omp_declare_simd): Handle both declare simd and
1826 declare variant.
1827 (c_parser_omp_declare): Handle declare variant.
1828
93313b94
JM
18292019-10-02 Joseph Myers <joseph@codesourcery.com>
1830
1831 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1832 CPP_COLON tokens.
1833
55879815
RS
18342019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1835
1836 * c-objc-common.c (useful_aka_type_p): New function.
1837 (print_type): Use it to decide whether an aka type is worth printing.
1838
59bc434a
JJ
18392019-09-27 Jakub Jelinek <jakub@redhat.com>
1840
1841 PR c++/88203
1842 * c-parser.c (c_parser_predefined_identifier): New function.
1843 (c_parser_postfix_expression): Use it.
1844 (c_parser_omp_variable_list): Parse predefined identifiers.
1845 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1846 in shared and firstprivate clauses, even when they are predetermined
1847 shared.
1848
c6447c20
RS
18492019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1850
1851 * c-typeck.c (build_function_call_vec): Take the original function
1852 decl as an optional final parameter. Pass all built-in calls to
1853 check_builtin_function_arguments.
1854
522da4c2
EB
18552019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1856
1857 PR c/91815
1858 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1859 of identifiers in the external scope only for variables and functions.
1860
68e2c199
PK
18612019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1862
1863 PR c/78736
1864 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1865
22f8849d
IS
18662019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1867
1868 PR pch/61250
1869 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1870 after determining that the first token is not
1871 PRAGMA_GCC_PCH_PREPROCESS.
1872
db376f45
EB
18732019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1874
1875 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1876 FUNCTION_DECL to the right value in the presence of nested declarators.
1877
4d732405
RS
18782019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1879
1880 PR middle-end/91421
1881 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1882
cb1180d5
RS
18832019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1884
1885 PR middle-end/91421
1886 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1887 of a built_in_function.
1888 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1889
77eb117f
JJ
18902019-08-10 Jakub Jelinek <jakub@redhat.com>
1891
1892 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1893 (c_parser_omp_clause_device_type): New function.
1894 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1895 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1896 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1897 diagnostics for declare target with clauses nested in clause-less
1898 declare target declaration-definition-seq.
1899 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1900
2c3b8bad
JJ
19012019-08-09 Jakub Jelinek <jakub@redhat.com>
1902
bb522e2e
JJ
1903 * c-parser.c (check_no_duplicate_clause): Simplify using
1904 omp_find_clause.
1905 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1906 directive name modifiers.
1907 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1908
2c3b8bad
JJ
1909 PR c/91401
1910 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1911 check_no_duplicate_clause call. Comment it out, instead emit a
1912 warning for duplicate dist_schedule clauses.
1913
99769e7f
RS
19142019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1915
1916 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1917
8860d270
JJ
19182019-08-08 Jakub Jelinek <jakub@redhat.com>
1919
1920 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1921 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1922 instead of generic_head to track duplicates.
1923
398e3feb
JJ
19242019-08-07 Jakub Jelinek <jakub@redhat.com>
1925
1926 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1927 (c_parser_omp_clause_use_device_addr): New function.
1928 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1929 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1930 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1931 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1932 map or use_device_* clauses.
1933 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1934 in OpenMP, require pointer type rather than pointer or array type.
1935 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1936
a28351e7
JJ
19372019-07-31 Jakub Jelinek <jakub@redhat.com>
1938
1939 PR c/91192
1940 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1941 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1942 case.
1943
6343b6bf
ML
19442019-07-25 Martin Liska <mliska@suse.cz>
1945 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1946
1947 PR c++/23383
1948 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1949
cb50701e
ML
19502019-07-25 Martin Liska <mliska@suse.cz>
1951
1952 * c-decl.c (merge_decls): Use new macros
1953 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1954
62e3e66f
RB
19552019-07-23 Richard Biener <rguenther@suse.de>
1956
1957 PR tree-optimization/83518
1958 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1959 a CFG also rebuild cgraph edges.
1960
554a530f
JJ
19612019-07-20 Jakub Jelinek <jakub@redhat.com>
1962
1963 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1964 (c_parser_omp_clause_bind): New function.
1965 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1966 (OMP_LOOP_CLAUSE_MASK): Define.
1967 (c_parser_omp_loop): New function.
1968 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1969 loop combined with parallel or teams.
1970 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1971 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1972
d119bf79
RS
19732019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1974
1975 PR c/53633
1976 * c-decl.c (finish_function): Check targetm.warn_func_return
1977 before issuing a -Wreturn-type warning.
1978
ab20d992 19792019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1980
1981 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1982 (c_parser_compound_statement): Call it.
1983
1fdd6f04
JJ
19842019-07-12 Jakub Jelinek <jakub@redhat.com>
1985
1986 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1987 (c_parser_omp_clause_order): New function.
1988 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1989 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1990 PRAGMA_OMP_CLAUSE_ORDER.
1991 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1992
8389386c
RB
19932019-07-10 Richard Biener <rguenther@suse.de>
1994
1995 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1996 _Literal (int *) &x for address literals.
1997
99b1c316
MS
19982019-07-09 Martin Sebor <msebor@redhat.com>
1999
2000 PR c++/61339
2001 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2002 to class.
2003 (field_decl_cmp): Same.
2004 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2005 * c-tree.h: Same.
2006 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2007
6c1dae73
MS
20082019-07-09 Martin Sebor <msebor@redhat.com>
2009
2010 PR c++/61339
2011 * c-decl.c: Change class-key from class to struct and vice versa
2012 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2013 * gimple-parser.c: Same.
2014
69b5279e
RB
20152019-07-01 Richard Biener <rguenther@suse.de>
2016
2017 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2018 _Literal (char *) &"foo" for address literals pointing to
2019 STRING_CSTs.
2020
ab20d992
JJ
20212019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2022
2023 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2024 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2025 C incompatibility if alternate "__intN__" form is used.
2026
1e3d475e
MS
20272019-06-24 Martin Sebor <msebor@redhat.com>
2028
2029 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2030
bf38f7e9
JJ
20312019-06-10 Jakub Jelinek <jakub@redhat.com>
2032
2033 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2034 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2035 (c_parser_omp_scan_loop_body): New function.
2036 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2037 inscan reduction clauses.
2038 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2039 non-inscan reductions on the same construct, or inscan reductions with
2040 ordered or schedule clauses, or inscan array reductions.
2041
65985d78
MS
20422019-06-05 Martin Sebor <msebor@redhat.com>
2043
2044 PR c/90737
2045 * c-typeck.c (c_finish_return): Only consider functions returning
2046 pointers as candidates for -Wreturn-local-addr.
2047
0ecf545c
MS
20482019-06-05 Martin Sebor <msebor@redhat.com>
2049
2050 * c-decl.c (start_decl): Adjust quoting and hyphenation
2051 in diagnostics.
2052 (finish_decl): Same.
2053 (finish_enum): Same.
2054 (start_function): Same.
2055 (declspecs_add_type): Same.
2056 * c-parser.c (warn_for_abs): Same.
2057 * c-typeck.c (build_binary_op): Same.
2058
e03436e7
TS
20592019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2060
b48f44bf
TS
2061 PR c/89433
2062 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2063 marked with an OpenACC 'routine' directive.
2064
5bf04509
TS
2065 PR c/89433
2066 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2067 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2068
e03436e7
TS
2069 PR c/89433
2070 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2071 clauses from "omp declare target" attribute.
2072
a9c697b8
MS
20732019-05-16 Martin Sebor <msebor@redhat.com>
2074
ab20d992
JJ
2075 * c-decl.c (start_decl): Quote keywords, operators, and
2076 types in diagnostics.
2077 (finish_decl): Same.
2078 * c-parser.c (c_parser_asm_statement): Same.
2079 (c_parser_conditional_expression): Same.
2080 (c_parser_transaction_cancel): Same.
2081 * c-typeck.c (c_common_type): Same.
2082 (build_conditional_expr): Same.
2083 (digest_init): Same.
2084 (process_init_element): Same.
2085 (build_binary_op): Same.
a9c697b8 2086
c4499192
RB
20872019-05-17 Richard Biener <rguenther@suse.de>
2088
2089 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2090 (c_parser_gimple_unary_expression): Likewise.
2091 (c_parser_gimple_parentized_ternary_expression): New function.
2092
adfe6e4b
RB
20932019-05-16 Richard Biener <rguenther@suse.de>
2094
2095 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2096 (c_parser_gimple_unary_expression): Likewise.
2097
186dabf2
RB
20982019-05-15 Richard Biener <rguenther@suse.de>
2099
2100 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2101 __BIT_FIELD_REF.
2102
1158c5b4
RB
21032019-05-14 Richard Biener <rguenther@suse.de>
2104
2105 * gimple-parser.c (c_parser_gimple_statement): Remove
2106 questionable auto-promotion to VIEW_CONVERT_EXPR.
2107 (c_parser_gimple_typespec): Split out from __MEM parsing.
2108 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2109 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2110 as __VIEW_CONVERT with -gimple.
2111
fd4485aa
ML
21122019-05-09 Martin Liska <mliska@suse.cz>
2113
2114 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2115 __MAX.
2116 (c_parser_gimple_unary_expression): Parse also binary expression
2117 __MIN and __MAX.
2118 (c_parser_gimple_parentized_binary_expression): New function.
2119
d276406a
ML
21202019-05-09 Martin Liska <mliska@suse.cz>
2121
2122 * gimple-parser.c (struct gimple_parser): Add probability.
2123 for gimple_parser_edge.
2124 (gimple_parser::push_edge): Add new argument probability.
2125 (c_parser_gimple_parse_bb_spec): Parse also probability
2126 if present.
2127 (c_parser_parse_gimple_body): Set edge probability.
2128 (c_parser_gimple_compound_statement): Consume token
2129 before calling c_parser_gimple_goto_stmt.
2130 Parse BB counts.
2131 (c_parser_gimple_statement): Pass new argument.
2132 (c_parser_gimple_goto_stmt): Likewise.
2133 (c_parser_gimple_if_stmt): Likewise.
2134 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2135 * c-parser.c (c_parser_declaration_or_fndef): Pass
2136 hot_bb_threshold argument.
2137 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2138 field.
2139 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2140
f179b64e
JJ
21412019-04-26 Jakub Jelinek <jakub@redhat.com>
2142
2143 PR debug/90197
2144 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2145 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2146 (c_parser_do_statement): Likewise.
2147 (c_parser_for_statement): Likewise. Formatting fixes.
2148 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2149 emit DEBUG_BEGIN_STMTs if needed.
2150
e7178413
JJ
21512019-04-19 Jakub Jelinek <jakub@redhat.com>
2152
c280b7ee
JJ
2153 PR c/89888
2154 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2155 (c_start_case): Don't clear it.
2156 (do_case): Adjust c_add_case_label caller.
2157 (c_finish_case): Adjust c_do_switch_warnings caller.
2158
e7178413
JJ
2159 PR c++/90108
2160 * c-decl.c (merge_decls): If remove is main variant and
2161 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2162 variant that has newdecl as TYPE_NAME if any.
2163
60a2c645
JJ
21642019-04-12 Jakub Jelinek <jakub@redhat.com>
2165
2166 PR c/89933
2167 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2168 don't try to remove it from the variant list, but instead assert
2169 it has no variants.
2170
2a82beaa
RB
21712019-04-01 Richard Biener <rguenther@suse.de>
2172
2173 PR c/71598
2174 * c-tree.h (c_get_alias_set): Declare.
2175 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2176 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2177 as the underlying integer type.
2178
bec1da64
MS
21792019-03-19 Martin Sebor <msebor@redhat.com>
2180
2181 PR tree-optimization/89688
2182 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2183 kinds of initializers.
2184
855cd9b1
JJ
21852019-03-19 Jakub Jelinek <jakub@redhat.com>
2186
2187 PR c/89734
2188 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2189 return type even if quals_used is 0. Formatting fixes.
2190
baa09dc5
RB
21912019-03-14 Richard Biener <rguenther@suse.de>
2192
2193 * c-tree.h (enum c_declspec_il): New.
2194 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2195 enum bitfield.
2196 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2197 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2198 (c_parser_declspecs): Adjust.
2199 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2200 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2201 and bitmap.h.
2202 (struct gimple_parser): New.
2203 (gimple_parser::push_edge): New method.
2204 (c_parser_gimple_parse_bb_spec): New helper.
2205 (c_parser_parse_gimple_body): Get start pass and IL specification.
2206 Initialize SSA and CFG.
2207 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2208 Build a gimple_parser parsing state and pass it along.
2209 (c_parser_gimple_statement): Change intermittend __PHI internal
2210 function argument for the edge.
2211 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2212 (c_parser_gimple_goto_stmt): Record edges to build.
2213 (c_parser_gimple_if_stmt): Likewise.
2214 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2215 (c_parser_gimple_or_rtl_pass_list): Likewise.
2216
a3f9f006
ML
22172019-03-11 Martin Liska <mliska@suse.cz>
2218
2219 * c-decl.c (check_for_loop_decls): Wrap an option name
2220 in a string format message and fix GNU coding style.
2221 * c-parser.c (c_parser_declspecs): Likewise.
2222
1db01ff9
JJ
22232019-03-08 Jakub Jelinek <jakub@redhat.com>
2224
2225 PR tree-optimization/89550
2226 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2227 returned true.
2228 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2229 or warning returned true.
2230
66dcb747
JJ
22312019-02-28 Jakub Jelinek <jakub@redhat.com>
2232
2233 PR c/89525
2234 * c-typeck.c (convert_arguments): Call inform_declaration only if
2235 the previous warning_at call returned true.
2236
2263c9f2
TS
22372019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2238
2239 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2240 parameter. Adjust all users.
2241 (c_parser_oacc_simple_clause): Replace parser with loc formal
2242 parameter. Adjust all users.
2243
ab20d992 22442019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2245
2246 PR c/87924
2247 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2248 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2249
5f88ba10
JJ
22502019-02-15 Jakub Jelinek <jakub@redhat.com>
2251
2252 PR c/89340
2253 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2254 before c_decl_attributes rather than after it.
2255
cfc30fd1
JJ
22562019-02-06 Jakub Jelinek <jakub@redhat.com>
2257
2258 PR c/89211
2259 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2260 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2261 instead of 3 nested ifs.
2262
fbe83e6b
JM
22632019-02-06 Joseph Myers <joseph@codesourcery.com>
2264
2265 PR c/88584
2266 * c-decl.c (finish_decl): Do not complete array types for arrays
2267 with external linkage not at file scope.
2268
f461f938
RB
22692019-02-05 Richard Biener <rguenther@suse.de>
2270
2271 PR c/88606
2272 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2273 all type variants when not supported.
2274
fe509359
JJ
22752019-01-30 Jakub Jelinek <jakub@redhat.com>
2276
2277 PR c/89061
2278 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2279 * c-decl.c (decl_jump_unsafe): Return false for
2280 C_DECL_COMPOUND_LITERAL_P decls.
2281 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2282
6a335b96
JJ
22832019-01-29 Jakub Jelinek <jakub@redhat.com>
2284
f4b7e754
JJ
2285 PR c/89045
2286 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2287 scope.
2288
6a335b96
JJ
2289 PR c/86125
2290 * c-decl.c (last_fileptr_type): Remove.
2291 (last_structptr_types): New variable.
2292 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2293 {old,new}rettype instead of the types themselves. Assert
2294 last_structptr_types array has the same number of elements
2295 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2296 argument oldtype and newtype. Instead of handling
2297 just fileptr_type_node specially, handle all builtin_structptr_types
2298 pointer nodes. Formatting fix.
2299
d8b5a1a0
MS
23002019-01-24 Martin Sebor <msebor@redhat.com>
2301
2302 PR c/86125
2303 PR c/88886
2304 PR middle-end/86308
2305 * c-decl.c (match_builtin_function_types): Add arguments.
2306 (diagnose_mismatched_decls): Diagnose mismatched declarations
2307 of built-ins more strictly.
2308
e21c4491
JJ
23092019-01-24 Jakub Jelinek <jakub@redhat.com>
2310
2311 PR c++/88976
2312 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2313 on #pragma omp cancel with different modifiers.
2314
420183d9
L
23152019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2316
2317 PR c/51628
2318 PR c/88664
2319 * c-typeck.c (convert_for_assignment): Upate the
2320 warn_for_address_or_pointer_of_packed_member call.
2321
17ad43dd
TH
23222019-01-16 Tom Honermann <tom@honermann.net>
2323 Jason Merrill <jason@redhat.com>
2324
2325 * c-typeck.c (digest_init): Revised the error message produced for
2326 ill-formed cases of array initialization with a string literal.
2327 (error_init): Make variadic.
2328
5f07d78a
JJ
23292019-01-12 Jakub Jelinek <jakub@redhat.com>
2330
2331 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2332
c4581bbf
JJ
23332019-01-07 Jakub Jelinek <jakub@redhat.com>
2334
2335 PR c/88701
2336 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2337 if current_function_decl is non-NULL.
2338
65c5b1eb
JM
23392019-01-07 Joseph Myers <joseph@codesourcery.com>
2340
2341 PR c/88720
2342 PR c/88726
2343 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2344 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2345 functions declared but never defined only for external scope, not
2346 for other scopes.
2347
d8fcab68
JJ
23482019-01-07 Jakub Jelinek <jakub@redhat.com>
2349
2350 PR c++/85052
2351 * c-parser.c (c_parser_postfix_expression): Parse
2352 __builtin_convertvector.
2353
a5544970
JJ
23542019-01-01 Jakub Jelinek <jakub@redhat.com>
2355
2356 Update copyright years.
2357
da77eace
L
23582018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2359
2360 PR c/51628
2361 * c-typeck.c (convert_for_assignment): Call
2362 warn_for_address_or_pointer_of_packed_member.
2363
1edf8866
SB
23642018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2365
2366 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2367 a more specific error message (instead of just falling through).
2368
db4fd626
SB
23692018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2370
2371 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2372 asm qualifier is first seen; use that to give nicer "duplicate asm
2373 qualifier" messages. Delete 'quals" variable, instead pass the
2374 "is_volatile_ flag to build_asm_stmt directly.
2375 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2376 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2377
9c9cfcbb
SB
23782018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2379
2380 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2381 "done" boolean variable.
2382
a14feb3c
DM
23832018-12-19 David Malcolm <dmalcolm@redhat.com>
2384
2385 PR c++/87504
2386 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2387 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2388 (build_binary_op): Use struct op_location_t and
2389 class binary_op_rich_location.
2390
6d939173
JJ
23912018-12-11 Jakub Jelinek <jakub@redhat.com>
2392
2393 PR sanitizer/88426
2394 * c-convert.c (convert): Call c_fully_fold before calling
2395 ubsan_instrument_float_cast.
2396
b7055028
SB
23972018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2398
2399 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2400 setting "quals".
2401
5b76e75f
SB
24022018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2403
2404 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2405 after asm. Pass a flag for it to build_asm_expr.
2406 * c-tree.h (build_asm_expr): Update declaration.
2407 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2408 set ASM_INLINE_P.
2409
30bd42b9
SB
24102018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2411
2412 PR inline-asm/55681
2413 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2414 combination of volatile and goto, in any order, without repetitions.
2415
9df6c0e4
JB
24162018-12-04 James Norris <jnorris@codesourcery.com>
2417 Cesar Philippidis <cesar@codesourcery.com>
2418 Julian Brown <julian@codesourcery.com>
2419
2420 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2421 code.
2422
f44697b7
RB
24232018-11-30 Richard Biener <rguenther@suse.de>
2424
2425 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2426 _Literal (type) { ... } as empty aggregate or vector constructor.
2427
550dfbdc
MS
24282018-11-29 Martin Sebor <msebor@redhat.com>
2429
2430 PR c/88091
2431 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2432 (convert_arguments): Add comments. Pass additional argument to
2433 the function above.
2434
673670da
MS
24352018-11-29 Martin Sebor <msebor@redhat.com>
2436
2437 PR c/88172
2438 PR testsuite/88208
2439 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2440
db1d09b0
MS
24412018-11-23 Martin Sebor <msebor@redhat.com>
2442
2443 PR testsuite/88098
2444 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2445 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2446
98f08eb8
MS
24472018-11-20 Martin Sebor <msebor@redhat.com>
2448
2449 * c-parser.c (c_parser_has_attribute_expression): New function.
2450 (c_parser_attribute): New function.
2451 (c_parser_attributes): Move code into c_parser_attribute.
2452 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2453
cd5da983
MS
24542018-11-15 Martin Sebor <msebor@redhat.com>
2455
2456 PR c/83656
2457 * c-decl.c (header_for_builtin_fn): Declare.
2458 (diagnose_mismatched_decls): Diagnose declarations of built-in
2459 functions without a prototype.
2460 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2461 (convert_argument): Same.
2462 (convert_arguments): Factor code out into convert_argument.
2463 Detect mismatches between built-in formal arguments in calls
2464 to built-in without prototype.
2465 (build_conditional_expr): Same.
2466 (type_or_builtin_type): New function.
2467 (convert_for_assignment): Add argument. Conditionally issue
2468 warnings instead of errors for mismatches.
2469
620e594b
DM
24702018-11-13 David Malcolm <dmalcolm@redhat.com>
2471
2472 * c-decl.c: Replace "source_location" with "location_t".
2473 * c-tree.h: Likewise.
2474 * c-typeck.c: Likewise.
2475 * gimple-parser.c: Likewise.
2476
3179ebae
JJ
24772018-11-09 Jakub Jelinek <jakub@redhat.com>
2478
81a227c6
JJ
2479 * c-parser.c (c_parser_omp_clause_final): Use
2480 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2481 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2482 parsing instead of c_parser_paren_condition.
2483 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2484 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2485 c_fully_fold instead of c_parser_condition.
2486 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2487 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2488 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2489 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2490 c_parser_expr_no_commas instead of c_parser_expression.
2491
98c91c56
JJ
2492 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2493 reduction clause with inscan modifier.
2494
3179ebae
JJ
2495 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2496 clauses other than atomic_default_mem_order.
2497
28567c40
JJ
24982018-11-08 Jakub Jelinek <jakub@redhat.com>
2499
2500 * c-parser.c: Include memmode.h.
2501 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2502 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2503 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2504 task_reduction clauses.
2505 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2506 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2507 section, or lvalue assignment expression.
2508 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2509 (c_parser_omp_clause_lastprivate): Parse optional
2510 conditional: modifier.
2511 (c_parser_omp_clause_hint): Require constant integer expression rather
2512 than just integer expression.
2513 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2514 clause.
2515 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2516 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2517 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2518 functions.
2519 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2520 iterators. Parse mutexinoutset and depobj kinds.
2521 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2522 callers.
2523 (c_parser_omp_all_clauses): Likewise. Handle
2524 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2525 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2526 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2527 default memory order from requires directive if any. Adjust
2528 c_finish_omp_atomic caller.
2529 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2530 (c_parser_omp_flush): Parse flush with memory-order-clause.
2531 (c_parser_omp_for_loop): Allow NE_EXPR even in
2532 OpenMP loops, adjust c_finish_omp_for caller.
2533 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2534 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2535 Allow to be called while parsing combined parallel master.
2536 Parse combined master taskloop{, simd}.
2537 (c_parser_omp_parallel): Parse combined
2538 parallel master{, taskloop{, simd}} constructs.
2539 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2540 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2541 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2542 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2543 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2544 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2545 around teams body. Use SET_EXPR_LOCATION.
2546 (c_parser_omp_target_data): Allow target data
2547 with only use_device_ptr clauses.
2548 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2549 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2550 (c_parser_omp_requires): New function.
2551 (c_finish_taskloop_clauses): New function.
2552 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2553 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2554 declaration. Disallow in_reduction clause when combined with parallel
2555 master.
2556 (c_parser_omp_construct): Adjust c_parser_omp_master and
2557 c_parser_omp_taskgroup callers.
2558 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2559 other than cancel.
2560 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2561 like OMP_CLAUSE_REDUCTION.
2562 (handle_omp_array_sections): Likewise. Call save_expr on array
2563 reductions before calling build_index_type. Handle depend clauses
2564 with iterators.
2565 (struct c_find_omp_var_s): New type.
2566 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2567 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2568 with static, runtime or auto schedule kinds. Call save_expr for whole
2569 array reduction sizes. Diagnose reductions with zero sized elements
2570 or variable length structures. Diagnose nogroup clause used with
2571 reduction clause(s). Handle depend clause with
2572 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2573 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2574 some different type for other kinds. Use build_unary_op with
2575 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2576 Handle depend clauses with iterators. Remove no longer needed special
2577 case that predetermined const qualified vars may be specified in
2578 firstprivate clause. Complain if const qualified vars are mentioned
2579 in data-sharing clauses other than firstprivate or shared. Use
2580 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2581 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2582 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2583 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2584
7e2de6df
DM
25852018-10-29 David Malcolm <dmalcolm@redhat.com>
2586
2587 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2588 logic for change to name_hint::operator bool.
2589 (undeclared_variable): Likewise.
2590 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2591 (c_parser_parameter_declaration): Likewise.
2592
9f936c86
JM
25932018-10-17 Joseph Myers <joseph@codesourcery.com>
2594
2595 * c-errors.c (pedwarn_c11): New function.
2596 * c-parser.c (disable_extension_diagnostics): Save
2597 warn_c11_c2x_compat and set it to 0.
2598 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2599 (c_parser_static_assert_declaration_no_semi): Handle
2600 _Static_assert without string constant.
2601 * c-tree.h (pedwarn_c11): New prototype.
2602
033eb567
DM
26032018-10-17 David Malcolm <dmalcolm@redhat.com>
2604
2605 * Make-lang.in (selftest-c): New.
2606 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2607 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2608 from gcc/Makefile.in.
2609
0edf3afe
RB
26102018-10-02 Richard Biener <rguenther@suse.de>
2611
2612 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2613
8313a764
JM
26142018-09-26 Joseph Myers <joseph@codesourcery.com>
2615
2616 PR c/87390
2617 * c-typeck.c (build_binary_op): Use excess precision for
2618 comparisons of integers and floating-point for C11 and later.
2619
ce6f0888
MJ
26202018-09-26 Martin Jambor <mjambor@suse.cz>
2621
2622 PR c/87347
2623 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2624 comment.
ce6f0888 2625
9c4a4b3c
DM
26262018-09-17 David Malcolm <dmalcolm@redhat.com>
2627
2628 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2629 Update for new param.
2630 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2631 Likewise.
2632
80c6d1f4
MJ
26332018-09-17 Martin Jambor <mjambor@suse.cz>
2634
2635 PR c/63886
2636 * c-parser.c: (warn_for_abs): New function.
2637 (c_parser_postfix_expression_after_primary): Call it.
2638
4a426e36
BE
26392018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2640
2641 * c-typeck.c (digest_init): Shorten overlength strings.
2642
6d900107
BE
26432018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2644
2645 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2646
b5764229
BE
26472018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2648
2649 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2650 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2651
22eea6b2
AM
26522018-08-30 Alexander Monakov <amonakov@ispras.ru>
2653
2654 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2655 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2656
85204e23
DM
26572018-08-27 David Malcolm <dmalcolm@redhat.com>
2658
2659 PR 87091
2660 * c-decl.c (implicitly_declare): Update call to
2661 maybe_add_include_fixit to suggest overriding the location, as it
2662 is for a note.
2663 * c-objc-common.c (c_tree_printer): Update for conversion of
2664 show_caret_p to a tri-state.
2665
3d78e008
ML
26662018-08-27 Martin Liska <mliska@suse.cz>
2667
2668 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2669 fndecl_built_in_p and remove check for FUNCTION_DECL if
2670 possible.
3d78e008
ML
2671 (diagnose_mismatched_decls): Likewise.
2672 (merge_decls): Likewise.
2673 (warn_if_shadowing): Likewise.
2674 (pushdecl): Likewise.
2675 (implicitly_declare): Likewise.
2676 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2677 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2678 * c-typeck.c (build_function_call_vec): Likewise.
2679 (convert_arguments): Likewise.
2680
097f82ec
DM
26812018-08-20 David Malcolm <dmalcolm@redhat.com>
2682
2683 PR other/84889
2684 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2685 (diagnose_mismatched_decls): Likewise, in various places.
2686 (warn_if_shadowing): Likewise.
2687 (implicit_decl_warning): Likewise.
2688 (implicitly_declare): Likewise.
2689 (undeclared_variable): Likewise.
2690 (declare_label): Likewise.
2691 (grokdeclarator): Likewise.
2692 (start_function): Likewise.
2693 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2694 (c_parser_parameter_declaration): Likewise.
2695 (c_parser_binary_expression): Likewise.
2696 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2697 (parser_build_binary_op): Likewise.
2698 (build_unary_op): Likewise.
2699 (error_init): Likewise.
2700 (pedwarn_init): Likewise.
2701 (warning_init): Likewise.
2702 (convert_for_assignment): Likewise.
2703
96e6ae57
DM
27042018-08-15 David Malcolm <dmalcolm@redhat.com>
2705
2706 * c-objc-common.c: Include "gcc-rich-location.h".
2707 (c_tree_printer): Move implemenation of '%T' to...
2708 (print_type): ...this new function.
2709 (range_label_for_type_mismatch::get_text): New function.
2710 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2711 range for the various ic_argpass cases.
2712 (class maybe_range_label_for_tree_type_mismatch): New class.
2713 (build_binary_op): Use it when calling binary_op_error.
2714
0cd020ae 27152018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2716
0cd020ae
PK
2717 * c-decl.c (start_decl): Do not warn if variables is named as main
2718 and is a local variable.
2719
72733314
IS
27202018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2721
2722 PR c/19315
2723 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2724 objects of unknown size.
2725
23aa9f7c
MS
27262018-08-13 Martin Sebor <msebor@redhat.com>
2727
2728 PR tree-optimization/71625
2729 * c-parser.c (c_parser_declaration_or_fndef): Call
2730 braced_list_to_string.
2731
e5e7e50d
BH
27322018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2733
2734 PR c/86690
2735 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2736 errors.
2737
8a45b051
MS
27382018-08-01 Martin Sebor <msebor@redhat.com>
2739
2740 PR tree-optimization/86650
2741 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2742 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2743
5922dcb5
JJ
27442018-08-01 Jakub Jelinek <jakub@redhat.com>
2745
2746 PR c/85704
2747 * c-typeck.c (init_field_decl_cmp): New function.
2748 (output_pending_init_elements): Use it for field comparisons
2749 instead of pure bit_position comparisons.
2750
9b452033
JJ
27512018-07-12 Jakub Jelinek <jakub@redhat.com>
2752
2753 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2754 type here, instead add "omp declare target implicit" attribute.
2755 (finish_decl): Diagnose vars without mappable type here.
2756
ab20d992
JJ
27572018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2758 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2759 Cesar Philippidis <cesar@codesourcery.com>
2760
2761 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2762 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2763 to their non-present_or_* counterparts. Make 'self' an alias to
2764 PRAGMA_OACC_CLAUSE_HOST.
2765 (c_parser_oacc_data_clause): Update GOMP mappings for
2766 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2767 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2768 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2769 Remove support for present_or_* clauses.
2770 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2771 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2772 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2773 (OACC_DATA_CLAUSE_MASK): Likewise.
2774 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2775 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2776 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2777 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2778 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2779
e197e64e
KV
27802018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2781
2782 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2783 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2784 (c_parser_gimple_unary_expression): Likewise.
2785
487f2f61
JJ
27862018-06-15 Jakub Jelinek <jakub@redhat.com>
2787
2788 PR c/86093
2789 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2790 before doing POINTER_DIFF_EXPR.
2791
e4d44a37
MP
27922018-06-07 Marek Polacek <polacek@redhat.com>
2793
2794 PR c/85318
2795 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2796 for loop initial declarations.
2797
b67b9225
DP
27982018-05-30 David Pagan <dave.pagan@oracle.com>
2799
2800 PR c/55976
2801 * c-decl.c (grokdeclarator): Update check for return type warnings.
2802 (start_function): Likewise.
2803 (finish_function): Likewise.
2804 * c-typeck.c (c_finish_return): Update check for return type warnings.
2805 Pass OPT_Wreturn_type to pedwarn when appropriate.
2806
c566cc9f
RS
28072018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2808
2809 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2810 __FMA_EXPR handlng.
2811
e4f81565
RS
28122018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2813
2814 * gimple-parser.c: Include internal-fn.h.
2815 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2816 (c_parser_gimple_call_internal): New function.
2817 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2818 Fix typos in comment.
2819
79e7b1fe
JJ
28202018-05-10 Jakub Jelinek <jakub@redhat.com>
2821
2822 PR c++/85662
2823 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2824 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2825 fold_convert_loc.
2826 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2827 fold_offsetof_1, pass argtype as TYPE to it and drop the
2828 fold_convert_loc.
2829
f7584c81
DP
28302018-05-02 David Pagan <dave.pagan@oracle.com>
2831
2832 PR c/30552
2833 * c-decl.c (old_style_parameter_scope): New function.
2834 * c-parser.c (c_parser_postfix_expression): Check for statement
2835 expressions in old-style function parameter list declarations.
2836 * c-parser.h (old_style_parameter_scope): New extern declaration.
2837
b33a0cb3
JJ
28382018-04-25 Jakub Jelinek <jakub@redhat.com>
2839
2840 PR sanitizer/84307
2841 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2842 it is not TREE_STATIC.
2843 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2844 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2845 its COMPOUND_LITERAL_EXPR_DECL.
2846
c5c5822a
JM
28472018-03-21 Joseph Myers <joseph@codesourcery.com>
2848
2849 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2850 where all functions return the same _FloatN or _FloatNx type,
2851 treat integer types as _Float64 instead of double.
2852
aa1c9429
JJ
28532018-03-21 Jakub Jelinek <jakub@redhat.com>
2854
2855 PR c/84999
2856 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2857 building vector comparison, diagnose it and return error_mark_node.
2858
9bb45a95
JJ
28592018-03-15 Jakub Jelinek <jakub@redhat.com>
2860
2861 PR c/84853
2862 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2863 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2864 INTEGER_TYPE element type.
2865
ada6bad9
DP
28662018-03-13 David Pagan <dave.pagan@oracle.com>
2867
2868 PR c/46921
2869 * c-typeck.c (output_init_element): Ensure field initializer
2870 expression is always evaluated if there are side effects.
2871
849bbdb9
JJ
28722018-03-06 Jakub Jelinek <jakub@redhat.com>
2873
2874 PR c/84721
2875 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2876 !building_stmt_list_p ().
2877
d74641bd
RS
28782018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2879
2880 PR c/84305
2881 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2882 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2883 and include the BIND_EXPR in the list of things that need to be
2884 pre-evaluated.
2885
0444aa9c
NS
28862018-02-09 Nathan Sidwell <nathan@acm.org>
2887
2888 PR c/84293
2889 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2890 to strict_aliasing_warning.
2891
7c30b12a
PC
28922018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2893
2894 * c-typeck.c (really_start_incremental_init, push_init_level,
2895 set_nonincremental_init, output_init_element, process_init_element):
2896 Use DECL_UNNAMED_BIT_FIELD.
2897
2be4dfcb
MP
28982018-01-31 Marek Polacek <polacek@redhat.com>
2899
2900 PR c/81779
2901 * c-parser.c (c_parser_compound_statement_nostart): Call
2902 expansion_point_location_if_in_system_header.
2903
bb9869d5
DM
29042018-01-17 David Malcolm <dmalcolm@redhat.com>
2905
2906 PR c++/83814
2907 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2908 the C part.
2909
b4923738
JJ
29102018-01-13 Jakub Jelinek <jakub@redhat.com>
2911
2912 PR c/83801
2913 * c-tree.h (decl_constant_value_1): Add a bool argument.
2914 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2915 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2916 (decl_constant_value): Adjust caller.
2917 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2918 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2919 decl_constant_value returns initializer that has BLKmode or
2920 array type.
2921 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2922
928686b1
RS
29232018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2924 Alan Hayward <alan.hayward@arm.com>
2925 David Sherwood <david.sherwood@arm.com>
2926
2927 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2928 TYPE_VECTOR_SUBPARTS.
2929
85ec4feb
JJ
29302018-01-03 Jakub Jelinek <jakub@redhat.com>
2931
2932 Update copyright years.
2933
913884f7
JJ
29342018-01-01 Jakub Jelinek <jakub@redhat.com>
2935
2936 PR c/83595
2937 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2938 c_parser_conditional_expression, c_parser_cast_expression,
2939 c_parser_sizeof_expression, c_parser_alignof_expression,
2940 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2941 c_parser_transaction_expression): Use set_error () method instead
2942 of setting value member to error_mark_node.
2943
c6cfa2bf
MM
29442017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2945
2946 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2947 and _Float<N>X built-in functions.
2948
11d29d63
JJ
29492017-12-22 Jakub Jelinek <jakub@redhat.com>
2950
14ec014e
JJ
2951 PR debug/83550
2952 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2953 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2954 incomplete vars rather than after it.
2955
11d29d63
JJ
2956 PR debug/83547
2957 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2958 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2959 and consider empty ones if there are no other stmts. For
2960 -Wunused-value walk all statements before the one only followed by
2961 DEBUG_BEGIN_STMTs.
2962
170a8bd6 29632017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2964 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2965
2966 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2967 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2968 (c_parser_do_statement): Likewise.
2969 (c_parser_for_statement): Likewise.
2970 (c_parser_statement_after_labels): Adjust calls to above.
2971 (c_parse_pragma_ivdep): New static function.
2972 (c_parser_pragma_unroll): Likewise.
2973 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2974 <PRAGMA_UNROLL>: New case.
2975
01512446
JJ
29762017-12-19 Jakub Jelinek <jakub@redhat.com>
2977
2978 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2979 perform_integral_promotions, digest_init): Replace Yoda conditions
2980 with typical order conditions.
2981 * c-decl.c (check_bitfield_type_and_width): Likewise.
2982
c65e18d3
BE
29832017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2984
2985 * c-typeck.c (c_safe_arg_type_equiv_p,
2986 c_safe_function_type_cast_p): New function.
2987 (build_c_cast): Implement -Wcast-function-type.
2988
b7280579
RB
29892017-12-14 Richard Biener <rguenther@suse.de>
2990
2991 PR c/83415
2992 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2993 like REALPART_EXPR for the behavior of whether its operand
2994 is an lvalue.
2995
49e6a6c0
MP
29962017-12-12 Marek Polacek <polacek@redhat.com>
2997
2998 PR c/82679
2999 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3000
ab20d992 30012017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3002
3003 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3004 * c-parser.c (add_debug_begin_stmt): New.
3005 (c_parser_declaration_or_fndef): Call it.
3006 (c_parser_compound_statement_nostart): Likewise.
3007 (c_parser_statement_after_labels): Likewise.
3008 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3009
4b2b493f
JM
30102017-12-07 Joseph Myers <joseph@codesourcery.com>
3011
3012 * c-decl.c (build_compound_literal): Add parameter alignas_align
3013 and set alignment of decl if nonzero.
3014 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3015 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3016 qualifier.
3017 (c_parser_struct_declaration): Update syntax comment.
3018 (c_parser_type_name): Add alignas_ok argument and pass it to
3019 c_parser_declspecs.
3020 (c_parser_cast_expression): Pass true to c_parser_type_name and
3021 give error if a cast used an _Alignas specifier.
3022 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3023 give error if sizeof (type-name) used an _Alignas specifier.
3024 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3025 give error if _Alignof (type-name) used an _Alignas specifier.
3026 (c_parser_postfix_expression_after_paren_type): Check specified
3027 alignment for a compound literal and pass it to
3028 build_compound_literal.
3029 * c-parser.h (c_parser_type_name): Update prototype.
3030 * c-tree.h (build_compound_literal): Update prototype.
3031
5d9ae53d
MS
30322017-12-07 Martin Sebor <msebor@redhat.com>
3033
3034 PR c/81544
3035 * c-decl.c (c_decl_attributes): Look up existing declaration and
3036 pass it to decl_attributes.
3037
c79144f8
DM
30382017-12-06 David Malcolm <dmalcolm@redhat.com>
3039
3040 PR c/83236
3041 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3042 reserved for use by the implementation.
3043
613bc14f
DM
30442017-12-06 David Malcolm <dmalcolm@redhat.com>
3045
3046 * c-decl.c: Include "c-family/c-spellcheck.h".
3047
05abad4c
ML
30482017-12-05 Martin Liska <mliska@suse.cz>
3049 Jakub Jelinek <jakub@redhat.com>
3050
3051 * c-typeck.c (pointer_diff): Add new argument and instrument
3052 pointer subtraction.
3053 (build_binary_op): Similar for pointer comparison.
3054
cc6534d4
JJ
30552017-12-01 Jakub Jelinek <jakub@redhat.com>
3056
65791f42
JJ
3057 PR c/79153
3058 * c-parser.c: Include tree-iterator.h.
3059 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3060 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3061 on it.
3062
cc6534d4
JJ
3063 PR c/83222
3064 * c-tree.h (decl_constant_value_1): Declare.
3065 * c-typeck.c (decl_constant_value_1): New function.
3066 (decl_constant_value): Use it.
3067 * c-fold.c (c_fully_fold_internal): If in_init, use
3068 decl_constant_value_1 instead of decl_constant_value.
3069
5de73c05
JJ
30702017-11-30 Jakub Jelinek <jakub@redhat.com>
3071
3072 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3073
058f0b9e
JJ
30742017-11-28 Jakub Jelinek <jakub@redhat.com>
3075
3076 PR sanitizer/81275
3077 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3078 c_switch_covers_all_cases_p returns true.
3079
5e9d6aa4 30802017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3081 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3082
3083 * Make-lang.in (c/c-array-notation.o): Remove.
3084 * c-array-notation.c: Delete.
3085 * c-decl.c: Remove cilkplus condition.
3086 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3087 c_parser_cilk_verify_simd, c_parser_array_notation,
3088 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3089 c_parser_cilk_simd_fn_vector_attrs,
3090 c_finish_cilk_simd_fn_tokens): Delete.
3091 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3092 (c_parser_direct_declarator_inner): Ditto.
3093 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3094 (c_parser_attributes, c_parser_compound_statement,
3095 c_parser_statement_after_labels, c_parser_if_statement,
3096 c_parser_switch_statement, c_parser_while_statement,
3097 c_parser_do_statement, c_parser_for_statement,
3098 c_parser_unary_expression, c_parser_postfix_expression,
3099 c_parser_postfix_expression_after_primary,
3100 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3101 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3102 support.
3103 * c-typeck.c (build_array_ref, build_function_call_vec,
3104 convert_arguments,
3105 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3106 c_finish_loop, build_binary_op): Remove cilkplus support.
3107
9e851845
JJ
31082017-11-28 Jakub Jelinek <jakub@redhat.com>
3109
3110 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3111 of build3.
3112
ab20d992 31132017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
3114
3115 * Make-lang.in (c.install-plugin): Install backend import library.
3116
41521dee
JJ
31172017-11-23 Jakub Jelinek <jakub@redhat.com>
3118
3119 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3120 pragma_stmt context.
3121
ac9effed
EB
31222017-11-23 Mike Stump <mikestump@comcast.net>
3123 Eric Botcazou <ebotcazou@adacore.com>
3124
3125 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3126 ANNOTATE_EXPR.
3127 (c_parser_do_statement): Likewise.
3128 (c_parser_for_statement): Likewise.
3129
ce95abc4
DM
31302017-11-22 David Malcolm <dmalcolm@redhat.com>
3131
3132 PR c++/62170
3133 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3134 bool to bool *. Within '%T' handling, if showing an "aka", use
3135 "quoted" param to add appropriate quoting.
3136
974aedcc
MP
31372017-11-22 Marek Polacek <polacek@redhat.com>
3138
3139 PR c++/60336
3140 PR middle-end/67239
3141 PR target/68355
3142 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3143
d4300cc6
DM
31442017-11-21 David Malcolm <dmalcolm@redhat.com>
3145
3146 PR c/83056
3147 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3148 earlier failed lookups.
3149
1af4ebf5
MG
31502017-11-21 Marc Glisse <marc.glisse@inria.fr>
3151
3152 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3153 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3154
26edace6
DM
31552017-11-20 David Malcolm <dmalcolm@redhat.com>
3156
3157 PR c/81404
3158 * c-decl.c: Include "c-family/known-headers.h".
3159 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3160 to known-headers.cc.
3161 (class suggest_missing_header): Move to known-header.h.
3162 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3163 than get_c_name_hint.
3164
b1212255
DM
31652017-11-20 David Malcolm <dmalcolm@redhat.com>
3166
3167 * c-decl.c (get_c_name_hint): New function.
3168 (class suggest_missing_header): New class.
3169 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3170 suggest missing headers to the user.
3171
6c7a259b
DM
31722017-11-20 David Malcolm <dmalcolm@redhat.com>
3173
3174 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3175 Include "c-family/name-hint.h"
3176 (implicit_decl_warning): Convert "hint" from
3177 const char * to name_hint. Pass location to
3178 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3179 warning was not printed.
3180 (undeclared_variable): Likewise for "guessed_id".
3181 (lookup_name_fuzzy): Convert return type from const char *
3182 to name_hint. Add location_t param.
3183 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3184 Include "c-family/name-hint.h"
3185 (c_parser_declaration_or_fndef): Convert "hint" from
3186 const char * to name_hint. Pass location to lookup_name_fuzzy.
3187 (c_parser_parameter_declaration): Likewise.
3188
f9c59f7e
JJ
31892017-11-19 Jakub Jelinek <jakub@redhat.com>
3190
3191 PR c/66618
3192 PR c/69960
3193 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3194 where needed.
3195 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3196 handle_omp_array_sections): Likewise.
3197 (digest_init): Don't call decl_constant_value_for_optimization.
3198 * c-tree.h (decl_constant_value_for_optimization): Removed.
3199 * c-fold.c (c_fold_array_ref): New function.
3200 (c_fully_fold_internal): Add LVAL argument, propagate it through
3201 recursive calls. For VAR_P call decl_constant_value and
3202 unshare if not LVAL and either optimizing or IN_INIT. Remove
3203 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3204 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3205 (c_fully_fold): Add LVAL argument, pass it through to
3206 c_fully_fold_internal.
3207 (decl_constant_value_for_optimization): Removed.
3208
3ca0dc60
JM
32092017-11-15 Joseph Myers <joseph@codesourcery.com>
3210
3211 PR c/81156
3212 * c-parser.c (check_tgmath_function): New function.
3213 (enum tgmath_parm_kind): New enum.
3214 (c_parser_postfix_expression): Handle __builtin_tgmath.
3215
64a5912c
DM
32162017-10-31 David Malcolm <dmalcolm@redhat.com>
3217
3218 * c-decl.c (implicit_decl_warning): Update for renaming of
3219 pedwarn_at_rich_loc and warning_at_rich_loc.
3220 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3221 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3222 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3223 (c_parser_struct_or_union_specifier): Likewise for renaming of
3224 pedwarn_at_rich_loc.
3225 (c_parser_parameter_declaration): Likewise for renaming of
3226 error_at_rich_loc.
3227 * c-typeck.c (build_component_ref): Likewise.
3228 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3229 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3230 (set_init_label): Likewise for renaming of error_at_rich_loc.
3231
c1136864
RB
32322017-10-30 Richard Biener <rguenther@suse.de>
3233
3234 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3235 stmts.
3236
ee5fd23a
MM
32372017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3238
3239 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3240 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3241
1a59ccf2
DM
32422017-10-25 David Malcolm <dmalcolm@redhat.com>
3243
3244 PR c/7356
3245 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3246 semicolons.
3247
bc1a75dd
JJ
32482017-10-25 Jakub Jelinek <jakub@redhat.com>
3249
3250 PR libstdc++/81706
3251 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3252 newdecl to corresponding __builtin_ if any.
3253
ff1ff960
PC
32542017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3255
3256 PR c++/82466
3257 * c-decl.c (diagnose_mismatched_decls): Use
3258 OPT_Wbuiltin_declaration_mismatch.
3259
62e1c678
DM
32602017-10-12 David Malcolm <dmalcolm@redhat.com>
3261
3262 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3263 use it to guard calls to maybe_suggest_missing_token_insertion.
3264 (c_parser_parms_list_declarator): Override default value of new
3265 "type_is_unique" param to c_parser_require.
3266 (c_parser_asm_statement): Likewise.
3267 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3268 defaulting to true.
3269
a92f6726
NS
32702017-10-11 Nathan Sidwell <nathan@acm.org>
3271
3272 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3273
8e6cdc90
RS
32742017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3275
3276 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3277 operating on trees as wide_ints.
3278 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3279 (c_tree_equal): Likewise.
3280
8139a48e
DM
32812017-10-04 David Malcolm <dmalcolm@redhat.com>
3282
3283 * c-decl.c (push_parm_decl): Store c_parm's location into the
3284 PARAM_DECL.
3285 (build_c_parm): Add "loc" param and store it within the c_parm.
3286 * c-parser.c (struct c_parser): Add "last_token_location" field.
3287 (c_parser_consume_token): Store location of the token into the
3288 new field.
3289 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3290 when handling a FUNCTION_DECL, if it doesn't already have them.
3291 (c_parser_parameter_declaration): Generate a location for the
3292 parameter, and pass it to the call to build_c_parm.
3293 * c-tree.h (struct c_parm): Add field "loc".
3294 (build_c_parm): Add location_t param.
3295 * c-typeck.c (get_fndecl_argument_location): New function.
3296 (inform_for_arg): New function.
3297 (convert_for_assignment): Use inform_for_arg when dealing with
3298 ic_argpass.
3299
2a389958
JJ
33002017-09-29 Jakub Jelinek <jakub@redhat.com>
3301
7d386d45
JJ
3302 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3303 width is non-NULL.
3304 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3305 don't SET_DECL_C_BIT_FIELD here.
3306
2a389958
JJ
3307 PR c/82340
3308 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3309 instead of trying to set just TREE_READONLY manually.
3310
ebc6a85e
TV
33112017-09-16 Tom de Vries <tom@codesourcery.com>
3312
3313 PR c/81875
3314 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3315 cond itself.
3316
bb75facd
JM
33172017-09-15 Joseph Myers <joseph@codesourcery.com>
3318
3319 PR c/82071
3320 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3321 for C11.
3322 (build_conditional_expr): For C11, generate result with excess
3323 precision when one argument is an integer and the other is of a
3324 type using excess precision.
3325
1d933576
BE
33262017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3327
3328 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3329
267bbb6f
MP
33302017-09-13 Marek Polacek <polacek@redhat.com>
3331
3332 PR c/82167
3333 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3334 than expr.original_type.
3335
6836632e
NS
33362017-09-12 Nathan Sidwell <nathan@acm.org>
3337
3338 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3339 resort_sorted_fields): Moved from c-family/c-common.c.
3340 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3341
e035be33
JM
33422017-09-01 Joseph Myers <joseph@codesourcery.com>
3343
3344 PR c/82071
3345 * c-typeck.c (build_atomic_assign): Handle argument with excess
3346 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3347 argument passed to build_binary_op and convert_for_assignment but
3348 not for call to c_fully_fold.
3349 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3350 Ensure build_binary_op is called with argument with original
3351 semantic type. Avoid calling c_fully_fold with an
3352 EXCESS_PRECISION_EXPR from build_binary_op.
3353
d2e05fcb
JJ
33542017-09-01 Jakub Jelinek <jakub@redhat.com>
3355
3356 PR c/81887
3357 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3358
b397965c
RS
33592017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3360 Alan Hayward <alan.hayward@arm.com>
3361 David Sherwood <david.sherwood@arm.com>
3362
3363 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3364 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3365 m1 and m2 to the signed equivalent of a fixed-point
3366 SCALAR_TYPE_MODE.
3367
14e18d71
DM
33682017-08-24 David Malcolm <dmalcolm@redhat.com>
3369
3370 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3371 than CAN_HAVE_LOCATION_P when determining whether to use the
3372 location_t value within "value".
3373
7f204c0f
DM
33742017-08-21 David Malcolm <dmalcolm@redhat.com>
3375
3376 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3377 rather than peeking the location of the first token.
3378 * c-tree.h (c_expr::get_location): New method.
3379
2f687306
DM
33802017-08-21 David Malcolm <dmalcolm@redhat.com>
3381
3382 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3383 to check_function_arguments.
3384
3e7b80d7
MP
33852017-08-18 Marek Polacek <polacek@redhat.com>
3386
3387 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3388 commentary.
3389
00aa1fa2
L
33902017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3391
3392 PR c/53037
3393 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3394 (check_bitfield_type_and_width): Don't allow bit-field with
3395 warn_if_not_aligned type.
3396
da67acb9
MS
33972017-08-14 Martin Sebor <msebor@redhat.com>
3398
3399 PR c/81117
3400 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3401
bb85aa74
MP
34022017-08-11 Marek Polacek <polacek@redhat.com>
3403
3404 PR c/81795
3405 * c-decl.c (pushtag): Only print inform if the warning was printed.
3406 (grokdeclarator): Likewise.
3407
32129a17
DM
34082017-08-10 David Malcolm <dmalcolm@redhat.com>
3409
3410 * c-parser.c (c_parser_error): Rename to...
3411 (c_parser_error_richloc): ...this, making static, and adding
3412 "richloc" parameter, passing it to the c_parse_error call,
3413 rather than calling c_parser_set_source_position_from_token.
3414 (c_parser_error): Reintroduce, reimplementing in terms of the
3415 above, converting return type from void to bool.
3416 (class token_pair): New class.
3417 (struct matching_paren_traits): New struct.
3418 (matching_parens): New typedef.
3419 (struct matching_brace_traits): New struct.
3420 (matching_braces): New typedef.
3421 (get_matching_symbol): New function.
3422 (c_parser_require): Add param MATCHING_LOCATION, using it to
3423 highlight matching "opening" tokens for missing "closing" tokens.
3424 (c_parser_skip_until_found): Likewise.
3425 (c_parser_static_assert_declaration_no_semi): Convert explicit
3426 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3427 class matching_parens, so that the pertinent open parenthesis is
3428 highlighted when there are problems locating the close
3429 parenthesis.
3430 (c_parser_struct_or_union_specifier): Likewise.
3431 (c_parser_typeof_specifier): Likewise.
3432 (c_parser_alignas_specifier): Likewise.
3433 (c_parser_simple_asm_expr): Likewise.
3434 (c_parser_braced_init): Likewise, for matching_braces.
3435 (c_parser_paren_condition): Likewise, for matching_parens.
3436 (c_parser_switch_statement): Likewise.
3437 (c_parser_for_statement): Likewise.
3438 (c_parser_asm_statement): Likewise.
3439 (c_parser_asm_operands): Likewise.
3440 (c_parser_cast_expression): Likewise.
3441 (c_parser_sizeof_expression): Likewise.
3442 (c_parser_alignof_expression): Likewise.
3443 (c_parser_generic_selection): Likewise.
3444 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3445 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3446 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3447 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3448 c_parser_skip_until_found call.
3449 (c_parser_objc_class_definition): Use class matching_parens as
3450 above.
3451 (c_parser_objc_method_decl): Likewise.
3452 (c_parser_objc_try_catch_finally_statement): Likewise.
3453 (c_parser_objc_synchronized_statement): Likewise.
3454 (c_parser_objc_at_property_declaration): Likewise.
3455 (c_parser_oacc_wait_list): Likewise.
3456 (c_parser_omp_var_list_parens): Likewise.
3457 (c_parser_omp_clause_collapse): Likewise.
3458 (c_parser_omp_clause_default): Likewise.
3459 (c_parser_omp_clause_if): Likewise.
3460 (c_parser_omp_clause_num_threads): Likewise.
3461 (c_parser_omp_clause_num_tasks): Likewise.
3462 (c_parser_omp_clause_grainsize): Likewise.
3463 (c_parser_omp_clause_priority): Likewise.
3464 (c_parser_omp_clause_hint): Likewise.
3465 (c_parser_omp_clause_defaultmap): Likewise.
3466 (c_parser_oacc_single_int_clause): Likewise.
3467 (c_parser_omp_clause_ordered): Likewise.
3468 (c_parser_omp_clause_reduction): Likewise.
3469 (c_parser_omp_clause_schedule): Likewise.
3470 (c_parser_omp_clause_num_teams): Likewise.
3471 (c_parser_omp_clause_thread_limit): Likewise.
3472 (c_parser_omp_clause_aligned): Likewise.
3473 (c_parser_omp_clause_linear): Likewise.
3474 (c_parser_omp_clause_safelen): Likewise.
3475 (c_parser_omp_clause_simdlen): Likewise.
3476 (c_parser_omp_clause_depend): Likewise.
3477 (c_parser_omp_clause_map): Likewise.
3478 (c_parser_omp_clause_device): Likewise.
3479 (c_parser_omp_clause_dist_schedule): Likewise.
3480 (c_parser_omp_clause_proc_bind): Likewise.
3481 (c_parser_omp_clause_uniform): Likewise.
3482 (c_parser_omp_for_loop): Likewise.
3483 (c_parser_cilk_clause_vectorlength): Likewise.
3484 (c_parser_cilk_clause_linear): Likewise.
3485 (c_parser_transaction_expression): Likewise.
3486 * c-parser.h (c_parser_require): Add param matching_location with
3487 default UNKNOWN_LOCATION.
3488 (c_parser_error): Convert return type from void to bool.
3489 (c_parser_skip_until_found): Add param matching_location with
3490 default UNKNOWN_LOCATION.
3491
30af3a2b
MP
34922017-08-09 Marek Polacek <polacek@redhat.com>
3493
3494 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3495 * c-tree.h (build_external_ref): Update declaration.
3496 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3497 (build_external_ref): Change the type of a parameter to bool.
3498 (parser_build_binary_op): Use true/false instead of 1/0.
3499 (pointer_diff): Likewise.
3500 (build_modify_expr): Likewise.
3501 (set_designator): Change the type of a parameter to bool.
3502 (set_init_index): Use true/false instead of 1/0.
3503 (set_init_label): Likewise.
3504 (output_init_element): Change the type of a parameter to bool.
3505 (output_pending_init_elements): Use true/false instead of 1/0.
3506 (process_init_element): Likewise.
3507 (build_binary_op): Change the type of a parameter to bool.
3508
296c53ac
MP
35092017-08-09 Marek Polacek <polacek@redhat.com>
3510
3511 PR c/81233
3512 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3513 Call emit_diagnostic_valist instead of pedwarn.
3514 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3515 Print the relevant types in diagnostics.
3516
a32c8316
MP
35172017-08-09 Marek Polacek <polacek@redhat.com>
3518
3519 PR c/81417
3520 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3521 build_conditional_expr.
a32c8316
MP
3522 * c-parser.c (c_parser_conditional_expression): Create locations for
3523 EXP1 and EXP2 from their source ranges. Pass the locations down to
3524 build_conditional_expr.
3525 * c-tree.h (build_conditional_expr): Update declaration.
3526 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3527 For -Wsign-compare, also print the types.
3528
314e6352
ML
35292017-08-08 Martin Liska <mliska@suse.cz>
3530
3531 * c-convert.c: Include header files.
3532 * c-typeck.c: Likewise.
3533
577eec56
ML
35342017-08-07 Martin Liska <mliska@suse.cz>
3535
3536 * c-parser.c (c_parser_attributes): Canonicalize name of an
3537 attribute.
3538
f7b6353a
MP
35392017-08-02 Marek Polacek <polacek@redhat.com>
3540
3541 PR c/81289
3542 * c-parser.c (c_parser_unary_expression): Use set_error.
3543
8a6eab34
MP
3544 PR c/81448
3545 PR c/81306
3546 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3547 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3548
ab20d992 35492017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3550 Martin Liska <mliska@suse.cz>
3551
3552 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3553 statement.
7fef86d3 3554
f34ebeb2
ML
35552017-07-31 Martin Liska <mliska@suse.cz>
3556
3557 PR sanitize/81530
3558 * c-convert.c (convert): Guard condition with flag_sanitize_p
3559 also with current_function_decl non-null equality.
3560 * c-decl.c (grokdeclarator): Likewise.
3561 * c-typeck.c (build_binary_op): Likewise.
3562
8595f67b
MP
35632017-07-25 Marek Polacek <polacek@redhat.com>
3564
3565 * c-decl.c (grokfield): Remove local variable.
3566
d49718d6
MP
35672017-07-25 Marek Polacek <polacek@redhat.com>
3568
3569 PR c/81364
3570 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3571 macro expansion if the body is in { }.
3572 (c_parser_while_statement): Likewise.
3573 (c_parser_for_statement): Likewise.
3574
ff22eb12
NS
35752017-07-18 Nathan Sidwell <nathan@acm.org>
3576
3577 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3578
eea77d1f
DM
35792017-07-14 David Malcolm <dmalcolm@redhat.com>
3580
3581 * c-decl.c (implicitly_declare): When suggesting a missing
3582 #include, provide a fix-it hint.
3583
b6f43128
DM
35842017-07-06 David Malcolm <dmalcolm@redhat.com>
3585
3586 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3587 and call that instead.
3588 * c-tree.h (selftest::run_c_tests): New decl.
3589
3e2becc4
MP
35902017-06-26 Marek Polacek <polacek@redhat.com>
3591
3592 PR c/80116
3593 * c-parser.c (c_parser_if_body): Set the location of the
3594 body of the conditional after parsing all the labels. Call
3595 warn_for_multistatement_macros.
3596 (c_parser_else_body): Likewise.
3597 (c_parser_switch_statement): Likewise.
3598 (c_parser_while_statement): Likewise.
3599 (c_parser_for_statement): Likewise.
3600 (c_parser_statement): Add a default argument. Save the location
3601 after labels have been parsed.
3602 (c_parser_c99_block_statement): Likewise.
3603
343ae898
RB
36042017-06-19 Richard Biener <rguenther@suse.de>
3605
3606 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3607 negated _Literals to parse _Literal (int) -1.
3608
45b2222a
ML
36092017-06-13 Martin Liska <mliska@suse.cz>
3610
3611 PR sanitize/78204
3612 * c-convert.c (convert): Use sanitize_flags_p.
3613 * c-decl.c (grokdeclarator): Likewise.
3614 * c-typeck.c (convert_for_assignment): Likewise.
3615 (c_finish_return): Likewise.
3616 (build_binary_op): Likewise.
3617
8ab7005b
JJ
36182017-06-08 Jakub Jelinek <jakub@redhat.com>
3619
3620 PR c/81006
3621 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3622 to sizetype before size_binop.
3623
363dc72c
JJ
36242017-06-07 Jakub Jelinek <jakub@redhat.com>
3625
3626 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3627 of TDI_generic.
3628
dc949728
MP
36292017-06-06 Marek Polacek <polacek@redhat.com>
3630
3631 PR c/79983
3632 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3633 ref.
3634 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3635
40ffd95f
BE
36362017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3637
3638 * c-parser.c (c_parser_binary_expression): Implement the
3639 -Wsizeof_pointer_div warning.
3640 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3641 from a parenthesized expression.
3642 (c_parser_expr_list): Use c_last_sizeof_loc.
3643 * c-tree.h (c_last_sizeof_loc): New external.
3644 * c-typeck.c (c_last_sizeof_loc): New variable.
3645 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3646
9fc5e7a4
MM
36472017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3648
3649 PR testsuite/80580
3650 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3651
f012c8ef
DM
36522017-05-30 David Malcolm <dmalcolm@redhat.com>
3653
3654 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3655 parameters.
3656
3cd211af
MS
36572017-05-24 Martin Sebor <msebor@redhat.com>
3658
3659 PR c/80731
3660 * c-fold.c (c_fully_fold_internal): Adjust.
3661 * c-typeck.c (parser_build_unary_op): Adjust.
3662
fd71a9a2
TS
36632017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3664
3665 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3666 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3667 "VECTOR_LENGTH".
3668
92fa0f9e
MP
36692017-05-23 Marek Polacek <polacek@redhat.com>
3670
3671 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3672 quotes.
3673
d11c168a
JJ
36742017-05-22 Jakub Jelinek <jakub@redhat.com>
3675
3676 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3677 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3678 it returned invariant. Call tree_invariant_p unconditionally
3679 afterwards to decide whether to return expr or op0.
3680
58aca9d9
NS
36812017-05-22 Nathan Sidwell <nathan@acm.org>
3682
3683 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3684
7fd549d2
TS
36852017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3686
3687 * c-parser.c (c_parser_omp_clause_default): Handle
3688 "OMP_CLAUSE_DEFAULT_PRESENT".
3689
6ecd2339
BE
36902017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3691
3692 * config-lang.in (gtfiles): Add c-family/c-format.c.
3693
8a57ecff
NS
36942017-05-18 Nathan Sidwell <nathan@acm.org>
3695
3696 * c-decl.c (pushdecl_top_level): Delete unused function.
3697
6574d78e
MP
36982017-05-18 Marek Polacek <polacek@redhat.com>
3699
3700 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3701 (check_earlier_gotos): Likewise.
3702 (define_label): Likewise.
3703 (pending_xref_error): Likewise.
3704 (smallest_type_quals_location): Likewise.
3705 (grokdeclarator): Likewise.
3706 (grokparms): Likewise.
3707 (identifier_global_value): Likewise.
3708 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3709 (find_init_member): Likewise.
3710
e3455240
MP
37112017-05-18 Marek Polacek <polacek@redhat.com>
3712
3713 * c-decl.c (start_decl): Use false/true instead of 0/1.
3714 (grokdeclarator): Likewise.
3715 (finish_struct): Likewise.
3716 (start_function): Change the return type to bool. Use false/true
3717 instead of 0/1.
3718 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3719 * c-tree.h (start_function): Update.
3720 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3721 (set_designator): Change the return type to bool. Use false/true
3722 instead of 0/1.
3723
3fa8871b
MP
37242017-05-17 Marek Polacek <polacek@redhat.com>
3725
3726 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3727 * c-typeck.c: Likewise.
3728
142473df
MP
37292017-05-17 Marek Polacek <polacek@redhat.com>
3730
3731 PR sanitizer/80659
3732 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3733 DECL_IGNORED_P even for non-static compound literals.
3734
1a817418
ML
37352017-05-17 Martin Liska <mliska@suse.cz>
3736
3737 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3738 use it instead of int type.
3739
b2fa0a8b
MP
37402017-05-17 Marek Polacek <polacek@redhat.com>
3741
3742 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3743 call c_fully_fold.
3744 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3745 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3746 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3747 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3748 save_expr.
3749 (c_parser_conditional_expression): Likewise.
3750 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3751 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3752 (process_init_element): Likewise.
3753 (build_binary_op): Likewise.
3754 (handle_omp_array_sections_1): Likewise.
3755
1e47f02b
TS
37562017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3757
3758 * c-parser.c (c_parser_omp_clause_num_gangs)
3759 (c_parser_omp_clause_num_workers)
3760 (c_parser_omp_clause_vector_length): Merge functions into...
3761 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3762 all users.
3763
c24e924f
NS
37642017-05-11 Nathan Sidwell <nathan@acm.org>
3765
3766 * gimple-parser.c: Don't #include tree-dump.h.
3767
c587104e
MM
37682017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3769
3770 PR testsuite/80580
3771 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3772
67ac9a9d
MM
37732017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3774
3775 PR testsuite/80580
3776 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3777 incorrect __MEM syntax.
3778
ac4eb40f
MM
37792017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3780
3781 PR testsuite/80580
3782 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3783 type of unary '*'.
3784
641da50a
NS
37852017-05-09 Nathan Sidwell <nathan@acm.org>
3786
3787 * c-tree.h (pushdecl): Declare.
3788
56d35585
DM
37892017-05-05 David Malcolm <dmalcolm@redhat.com>
3790
3791 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3792 with diagnostic_report_diagnostic.
3793 * c-errors.c (pedwarn_c99): Likewise.
3794 (pedwarn_c90): Likewise.
3795
815d9cc6
XR
37962017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3797
92a285c1 3798 PR c++/80038
815d9cc6
XR
3799 * c-gimplify.c (c_gimplify_expr): Remove calls to
3800 cilk_gimplifY_call_params_in_spawned_fn.
3801
1c4ea66f
DM
38022017-04-25 David Malcolm <dmalcolm@redhat.com>
3803
3804 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3805 hint for removing extra semicolon.
3806
666f7903
JJ
38072017-04-21 Jakub Jelinek <jakub@redhat.com>
3808
3809 PR c/80468
3810 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3811 enabled, set specs->type to integer_type_node.
3812
5764ee3c
JW
38132017-04-03 Jonathan Wakely <jwakely@redhat.com>
3814
3815 * c-array-notation.c: Fix typo in comment.
3816
10fa8dfb
MP
38172017-03-29 Marek Polacek <polacek@redhat.com>
3818
3819 PR c/79730
3820 * c-decl.c (finish_decl): Check VAR_P.
3821
a9e4a1a5
JJ
38222017-03-27 Jakub Jelinek <jakub@redhat.com>
3823
3824 PR middle-end/80162
3825 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3826 * c-typeck.c (c_mark_addressable): Likewise. Look through
3827 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3828 to ARRAY_TYPE.
3829 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3830
ee3ff394
MP
38312017-03-23 Marek Polacek <polacek@redhat.com>
3832
3833 * c-tree.h: Remove a C_RID_YYCODE reference.
3834
4d1b8e70
JJ
38352017-03-21 Jakub Jelinek <jakub@redhat.com>
3836
3837 PR c/80097
3838 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3839 optional COMPOUND_EXPR with ubsan instrumentation.
3840
31dc71a8
MP
38412017-03-17 Marek Polacek <polacek@redhat.com>
3842
3843 * c-parser.c: Add C11 references.
3844
d579c385
MP
38452017-03-15 Marek Polacek <polacek@redhat.com>
3846
3847 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3848
85059a38
MP
38492017-03-11 Marek Polacek <polacek@redhat.com>
3850
3851 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3852
2f6f187a
DM
38532017-03-10 David Malcolm <dmalcolm@redhat.com>
3854
3855 PR translation/79848
3856 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3857 "%qs".
3858 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3859
36618428
MP
38602017-03-09 Marek Polacek <polacek@redhat.com>
3861
3862 PR sanitizer/79757
3863 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3864 parameter declarations with initializers.
3865
01e5af5a
JJ
38662017-03-09 Jakub Jelinek <jakub@redhat.com>
3867
3868 PR c/79969
3869 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3870 TYPE_STUB_DECL.
3871
a71dbc63
JJ
38722017-03-07 Jakub Jelinek <jakub@redhat.com>
3873
3874 PR c/79834
3875 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3876 for "may only be used in compound statements" diagnostics, change it
3877 such that the same translatable string is used for all pragmas. For
3878 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3879 diagnostics.
3880 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3881 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3882 "may only be used in compound statements" diagnostics, such that the
3883 same translatable string is used for all pragmas.
3884
1ff4bae6
MP
38852017-03-04 Marek Polacek <polacek@redhat.com>
3886
3887 PR c/79847
3888 * c-decl.c (implicit_decl_warning): Add missing space.
3889
7f5a7d78
MP
38902017-03-03 Marek Polacek <polacek@redhat.com>
3891
3892 PR c/79758
3893 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3894 current_function_prototype_arg_types is error_mark_node. Fix
3895 formatting. Use TREE_VALUE instead of TREE_TYPE.
3896
883c8f06
JJ
38972017-03-03 Jakub Jelinek <jakub@redhat.com>
3898
79c9b7a8
JJ
3899 PR c/79837
3900 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3901 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3902 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3903 diagnostics.
3904
883c8f06
JJ
3905 PR c/79836
3906 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3907 instead of %<_Generic>.
3908 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3909 (c_parser_omp_target_exit_data): Use %<release%> instead of
3910 %<release>.
3911
324ff1a0
JJ
39122017-02-28 Jakub Jelinek <jakub@redhat.com>
3913
3914 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3915 instead of just cond ? "..." : "...".
3916 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3917 for "enter"/"exit" keyword.
3918 (c_finish_oacc_routine): Don't use %s to supply portions of the
3919 message.
3920
4227c9ad
JJ
39212017-02-24 Jakub Jelinek <jakub@redhat.com>
3922
3923 PR c++/79588
3924 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3925 handle -Wrestrict here.
3926 * c-typeck.c (build_function_call_vec): Adjust
3927 check_function_arguments caller.
3928
5d972e66
RB
39292017-02-23 Richard Biener <rguenther@suse.de>
3930
3931 PR c/79684
3932 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3933 to initialize c_exprs to return.
3934 (c_parser_gimple_binary_expression): Likewise.
3935 (c_parser_gimple_unary_expression): Likewise.
3936 (c_parser_gimple_postfix_expression): Likewise.
3937
61ac5ebe
MP
39382017-02-22 Marek Polacek <polacek@redhat.com>
3939
3940 PR c/79662
3941 * c-typeck.c (convert_arguments): Handle error_mark_node.
3942
41d1b0b1
PK
39432017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3944
3945 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3946 value of c_parser_parse_ssa_name against error_mark_node and emit
3947 error if ssa name is anonymous and written as default definition.
3948
eab1f169
PK
39492017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3950
3951 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3952 FMA_EXPR.
3953
bcac0b4d
JJ
39542017-02-16 Jakub Jelinek <jakub@redhat.com>
3955
3956 PR c++/79512
3957 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3958 ignore #pragma omp target even when not followed by identifier.
3959
1be33173
PK
39602017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3961
3962 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3963 (c_parser_gimple_unary_expression): Likewise.
3964
aa326bfb
JJ
39652017-02-13 Jakub Jelinek <jakub@redhat.com>
3966
3967 * c-parser.c (c_parser_oacc_declare): Add missing space in
3968 diagnostics.
3969
8a398bc5
PK
39702017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3971
3972 PR c/79478
3973 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3974 set_c_expr_source_range when parsing ssa-name.
3975
3dcde5ef 39762017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3977 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3978
3979 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3980 building IL when arguments are error_mark_node.
3981 (c_parser_gimple_unary_expression): Likewise.
3982 (c_parser_gimple_if_stmt): Likewise.
3983 (c_parser_gimple_switch_stmt): Likewise.
3984 (c_parser_gimple_return_stmt): Likewise.
3985 (c_parser_parse_ssa_name): When name lookup fails do not build
3986 an SSA name. Use undeclared rather than not declared in error
3987 reporting.
3988
192b048b
MP
39892017-02-09 Marek Polacek <polacek@redhat.com>
3990
3991 PR c/79428
3992 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3993 instead of c_parser_skip_until_found.
3994
56f71478
JJ
39952017-02-09 Jakub Jelinek <jakub@redhat.com>
3996
3997 PR c/79431
3998 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3999 symtab_node::get on automatic variables.
4000
02889d23
CLT
40012016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4002 Chung-Lin Tang <cltang@codesourcery.com>
4003
4004 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4005 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4006 semantic checking.
4007 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4008
7af4b20d
RB
40092017-02-07 Richard Biener <rguenther@suse.de>
4010
4011 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4012 (c_parser_gimple_postfix_expression_after_primary):
4013 Do not use c_build_function_call_vec to avoid folding and promotion.
4014 Simplify.
4015
e5e391d6
MO
40162017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4017
4018 PR lto/79061
4019 * c-decl.c (pop_scope): Pass main_input_filename to
4020 build_translation_unit_decl.
4021
c2e84327
DM
40222017-01-24 David Malcolm <dmalcolm@redhat.com>
4023
4024 * c-parser.c: Include "read-rtl-function.h" and
4025 "run-rtl-passes.h".
4026 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4027 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4028 production. Update for renaming of field "gimple_pass" to
4029 "gimple_or_rtl_pass". If __RTL was seen, call
4030 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4031 to an auto_timevar, to cope with early exit.
4032 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4033 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4034 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4035 Handle RID_RTL.
4036 (c_parser_parse_rtl_body): New function.
4037 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4038 (struct c_declspecs): Rename field "gimple_pass" to
4039 "gimple_or_rtl_pass". Add field "rtl_p".
4040 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4041 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4042 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4043 (c_parser_gimple_or_rtl_pass_list): ...this.
4044
2ebd93e1
MP
40452017-01-20 Marek Polacek <polacek@redhat.com>
4046
4047 PR c/64279
4048 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4049
b1c95bb5
RB
40502017-01-13 Richard Biener <rguenther@suse.de>
4051
4052 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4053 nops.
4054
25329913
RB
40552017-01-13 Richard Biener <rguenther@suse.de>
4056
4057 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4058 _Literal ( type-name ) number.
4059
6bb4ea5c
RB
40602017-01-12 Richard Biener <rguenther@suse.de>
4061
4062 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4063 __MEM.
4064
6b5b4e9c
JJ
40652017-01-11 Jakub Jelinek <jakub@redhat.com>
4066
4067 PR c++/72813
4068 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4069 PCH file.
4070
e3252775
RB
40712017-01-11 Richard Biener <rguenther@suse.de>
4072
4073 PR bootstrap/79052
4074 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4075 returns on parse errors.
4076
a9342885
MP
40772017-01-04 Marek Polacek <polacek@redhat.com>
4078
4079 PR c++/64767
4080 * c-parser.c (c_parser_postfix_expression): Mark zero character
4081 constants by setting original_type in c_expr.
4082 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4083 with a zero character constant.
4084 (char_type_p): New function.
4085
5dd9a9d0
DM
40862017-01-04 David Malcolm <dmalcolm@redhat.com>
4087
4088 * c-parser.c (c_parser_declaration_or_fndef): Create a
4089 rich_location at init_loc and parse it to start_init.
4090 (last_init_list_comma): New global.
4091 (c_parser_braced_init): Update last_init_list_comma when parsing
4092 commas. Pass it to pop_init_level. Pass location of closing
4093 brace to pop_init_level.
4094 (c_parser_postfix_expression_after_paren_type): Create a
4095 rich_location at type_loc and parse it to start_init.
4096 (c_parser_omp_declare_reduction): Likewise for loc.
4097 * c-tree.h (start_init): Add rich_location * param.
4098 (pop_init_level): Add location_t param.
4099 * c-typeck.c (struct initializer_stack): Add field
4100 "missing_brace_richloc".
4101 (start_init): Add richloc param, use it to initialize
4102 the stack node's missing_brace_richloc.
4103 (last_init_list_comma): New decl.
4104 (finish_implicit_inits): Pass last_init_list_comma to
4105 pop_init_level.
4106 (push_init_level): When finding missing open braces, add fix-it
4107 hints to the richloc.
4108 (pop_init_level): Add "insert_before" param and pass it
4109 when calling pop_init_level. Add fixits about missing
4110 close braces to any richloc. Use the richloc for the
4111 -Wmissing-braces warning.
4112 (set_designator): Pass last_init_list_comma to pop_init_level.
4113 (process_init_element): Likewise.
4114
cbe34bb5
JJ
41152017-01-01 Jakub Jelinek <jakub@redhat.com>
4116
4117 Update copyright years.
4118
d17680f3
JJ
41192016-12-21 Jakub Jelinek <jakub@redhat.com>
4120
0dba7960
JJ
4121 PR bootstrap/78817
4122 * c-typeck.c (build_function_call_vec): If check_function_arguments
4123 returns true, set TREE_NO_WARNING on CALL_EXPR.
4124
d17680f3
JJ
4125 PR c/77767
4126 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4127 to *expr instead of overwriting it.
4128
aa90531e
RB
41292016-12-20 Richard Biener <rguenther@suse.de>
4130
4131 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4132 error recovery.
4133 (c_parser_gimple_statement): Only build assigns for non-error
4134 stmts.
4135 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4136
629b3d75
MJ
41372016-12-14 Martin Jambor <mjambor@suse.cz>
4138
4139 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4140 omp-low.h.
4141 (c_finish_oacc_routine): Adjusted call to
4142 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4143 to use their new names.
4144 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4145 use its new name.
4146 (c_parser_oacc_update): Likewise.
4147 (c_parser_omp_simd): Likewise.
4148 (c_parser_omp_target_update): Likewise.
4149 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4150 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4151 name.
4152 (c_finish_omp_cancellation_point): Likewise.
4153 * gimple-parser.c: Do not include omp-low.h
4154
c5af52eb
CP
41552016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4156 James Norris <jnorris@codesourcery.com>
4157
4158 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4159 EXIT_DATA,WAIT} are not used in compound statements.
4160 (c_parser_oacc_enter_exit_data): Update diagnostics.
4161
48330c93
BE
41622016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4163
4164 PR c++/71973
4165 * c-decl.c (diagnose_mismatched_decls): Use
4166 OPT_Wbuiltin_declaration_mismatch here too.
4167
899ca90e 41682016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
4169 Alan Hayward <alan.hayward@arm.com>
4170 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
4171
4172 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4173 (make_label, finish_struct): Likewise.
4174
1ee62b92 41752016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 4176 Richard Biener <rguenther@suse.de>
22b15758 4177
8e745a17
JJ
4178 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4179 * config-lang.in (gtfiles): Add c/c-parser.h.
4180 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4181 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4182 * c-parser.c (enum c_id_kind, struct c_token,
4183 c_parser_next_token_is, c_parser_next_token_is_not,
4184 c_parser_next_token_is_keyword,
4185 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4186 Split out to ...
4187 * c-parser.h: ... new header.
4188 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 4189 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
4190 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4191 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4192 c_parser_error, c_parser_require, c_parser_skip_until_found,
4193 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4194 c_parser_type_name): Export.
4195 (c_parser_tokens_buf): New function.
4196 (c_parser_error): Likewise.
4197 (c_parser_set_error): Likewise.
4198 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
4199 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4200 via c_parser_parse_gimple_body.
8e745a17
JJ
4201 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4202 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4203 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4204 c_parser_error, c_parser_require, c_parser_skip_until_found,
4205 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4206 c_parser_type_name): Declare.
1ee62b92
PG
4207 (struct c_parser): Declare forward.
4208 (c_parser_tokens_buf): Declare.
8e745a17
JJ
4209 (c_parser_error): Likewise.
4210 (c_parser_set_error): Likewise.
4211 * gimple-parser.c: New file.
4212 * gimple-parser.h: Likewise.
1ee62b92 4213
22b15758
UB
42142016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4215
4216 PR c/35503
4217 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4218 warn_for_restrict.
4219
84ff4775
LCW
42202016-09-11 Le-Chun Wu <lcwu@google.com>
4221 Mark Wielaard <mjw@redhat.com>
4222
4223 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4224 to the given -Wshadow= variant.
4225
4d0cdd0c
TP
42262016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4227
4228 * c-typeck.c: Include memmodel.h.
4229
1202f33e
JJ
42302016-10-13 Jakub Jelinek <jakub@redhat.com>
4231
4232 PR target/77957
4233 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4234 instead of lhd_return_null_tree_v.
4235
8a14afd0
BS
42362016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4237
4238 PR c++/69733
4239 * c-decl.c (smallest_type_quals_location): New static function.
4240 (grokdeclarator): Try to find the correct location for an ignored
4241 qualifier.
4242
81fea426
MP
42432016-09-26 Marek Polacek <polacek@redhat.com>
4244
4245 PR c/7652
4246 * c-decl.c (pop_scope): Add gcc_fallthrough.
4247
42482016-09-26 Marek Polacek <polacek@redhat.com>
4249
4250 PR c/7652
4251 * c-parser.c (struct c_token): Add flags field.
4252 (c_lex_one_token): Pass it to c_lex_with_flags.
4253 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4254 into IFN_FALLTHROUGH.
4255 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4256 attribute fallthrough after a case label or default label.
4257 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4258
9a2300e9
MP
42592016-09-24 Marek Polacek <polacek@redhat.com>
4260
4261 PR c/77490
4262 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4263 have boolean value. Warn about ++/-- on booleans.
4264
7de76362
JJ
42652016-09-23 Jakub Jelinek <jakub@redhat.com>
4266
4267 * c-parser.c (incomplete_record_decls): Remove unnecessary
4268 = vNULL initialization of file scope vec.
4269
5b73d2ab
MP
42702016-09-16 Marek Polacek <polacek@redhat.com>
4271
4272 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4273
e51fbec3
MP
42742016-09-14 Marek Polacek <polacek@redhat.com>
4275
4276 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4277 (fix_array_notation_expr): Likewise.
4278 * c-decl.c (finish_decl): Likewise.
4279 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4280 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4281 (function_to_pointer_conversion): Use false instead of 0.
4282 (convert_lvalue_to_rvalue): Likewise.
4283 (parser_build_unary_op): Likewise.
4284 (build_atomic_assign): Likewise.
4285 (build_unary_op): Change nonconvert parameter type to bool, use
4286 true/false instead of 1/0.
4287 (build_binary_op): Use true instead of 1.
4288
254830ba
DM
42892016-09-13 David Malcolm <dmalcolm@redhat.com>
4290
4291 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4292 of add_fixit_insert to add_fixit_insert_before.
4293
4c13ba17
MP
42942016-09-13 Marek Polacek <polacek@redhat.com>
4295
4296 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4297 it.
4298
54dcdb88
BE
42992016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4300
4301 PR c++/77496
4302 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4303 COMPOUND_EXPR to warn_for_omitted_condop.
4304
e5106e27
DM
43052016-09-07 David Malcolm <dmalcolm@redhat.com>
4306
4307 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4308 c_get_substring_location for this new langhook.
4309
9dc5773f
JJ
43102016-09-02 Jakub Jelinek <jakub@redhat.com>
4311
4312 PR c/65467
4313 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4314 flag_openmp.
4315 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4316 instead of mark_exp_read on low_bound/length expression.
4317 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4318 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4319 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4320 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4321 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4322 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4323 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4324 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4325 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4326 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4327 instead of mark_expr_read.
4328 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4329 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4330 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4331 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4332 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4333 array section bases outside of depend clause, for depend clause
4334 use convert_lvalue_to_rvalue on the base.
4335 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4336 linear, aligned, map, to and from clauses.
4337 (c_omp_clause_copy_ctor): New function.
4338
295844f6
MP
43392016-09-01 Marek Polacek <polacek@redhat.com>
4340
4341 PR c/7652
4342 * c-typeck.c (composite_type): Add FALLTHRU comment.
4343
089af25c
DM
43442016-08-31 David Malcolm <dmalcolm@redhat.com>
4345
4346 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4347 to the insertion fixits for "struct", "union", and "enum".
4348
f9087798
DM
43492016-08-30 David Malcolm <dmalcolm@redhat.com>
4350
4351 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4352 rather than add_fixit_misspelled_id.
4353 (undeclared_variable): Likewise.
4354 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4355 now-redundant "here" params from add_fixit_insert method calls.
4356 (c_parser_parameter_declaration): Likewise.
4357 * c-typeck.c (build_component_ref): Remove now-redundant range
4358 param from add_fixit_replace method calls.
4359
ebef225f
MP
43602016-08-25 Marek Polacek <polacek@redhat.com>
4361
4362 * c-typeck.c (parser_build_binary_op): Pass LHS to
4363 warn_logical_not_parentheses.
4364
fe377a48
MP
43652016-08-25 Marek Polacek <polacek@redhat.com>
4366
4367 PR c/77323
4368 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4369 or _FloatN or _FloatNx is not supported.
4370 (finish_declspecs): Set type to integer_type_node when _FloatN or
4371 _FloatNx is not supported.
4372
c65699ef
JM
43732016-08-19 Joseph Myers <joseph@codesourcery.com>
4374
4375 PR c/32187
4376 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4377 (struct c_declspecs): Add field floatn_nx_idx.
4378 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4379 and _FloatNx type specifiers.
4380 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4381 (c_parser_declspecs, c_parser_attribute_any_word)
4382 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4383 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4384 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4385 narrower than double.
4386
2f1364c2
JJ
43872016-08-12 Jakub Jelinek <jakub@redhat.com>
4388 Martin Liska <mliska@suse.cz>
4389
4390 PR c/67410
4391 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4392 % to determine val element to change. Assert that
4393 wchar_bytes * charwidth fits into val array.
4394
191816a3
MP
43952016-08-12 Marek Polacek <polacek@redhat.com>
4396
4397 PR c/7652
4398 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4399 (c_parser_postfix_expression): Likewise.
4400 * c-typeck.c (build_unary_op): Adjust fall through comment.
4401 (c_mark_addressable): Likewise.
4402
b95a64bb
JJ
44032016-08-11 Jakub Jelinek <jakub@redhat.com>
4404
4405 PR c/72816
4406 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4407 array member through typedef, for orig_qual_indirect == 0 clear
4408 orig_qual_type.
4409
895aa8e1
DM
44102016-08-08 David Malcolm <dmalcolm@redhat.com>
4411
4412 PR c/64955
4413 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4414 this up to selftest::run_c_tests.
4415 (selftest::run_c_tests): New function.
4416
0b212d8c
TS
44172016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4418
ae9281fc
TS
4419 * c-parser.c (struct oacc_routine_data): Add error_seen and
4420 fndecl_seen members.
4421 (c_finish_oacc_routine): Use these.
4422 (c_parser_declaration_or_fndef): Adjust.
4423 (c_parser_oacc_routine): Likewise. Support more C language
4424 constructs, and improve diagnostics. Move pragma context
4425 checking...
4426 (c_parser_pragma): ... here.
4427
0b212d8c
TS
4428 * c-parser.c (struct oacc_routine_data): New.
4429 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4430 Simplify code.
4431 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4432 declare target" attribute.
4433
76e2c821
JB
44342016-08-01 Jan Beulich <jbeulich@suse.com>
4435
4436 * c-fold.c (c_fully_fold_internal): Also emit shift count
4437 warnings for vector types.
4438 * c-typeck.c (build_binary_op): Likewise.
4439
f618a472
MP
44402016-07-29 Marek Polacek <polacek@redhat.com>
4441
4442 PR c/71742
4443 * c-decl.c (finish_struct): Rephrase an error message.
4444
efd0786f
MP
4445 PR c/71853
4446 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4447 to error node for invalid code.
4448
e00dceaf
MP
4449 PR c/71573
4450 * c-decl.c (implicitly_declare): Return decl early not only for
4451 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4452
673a107a
JJ
44532016-07-29 Jakub Jelinek <jakub@redhat.com>
4454
4455 PR c/71969
4456 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4457 on GNU extern inline functions.
4458
a5b5c8b6
MP
44592016-07-29 Marek Polacek <polacek@redhat.com>
4460
4461 PR c/71583
4462 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4463 check expr.value.
4464
e3fe09c1
UB
44652016-07-22 Uros Bizjak <ubizjak@gmail.com>
4466
4467 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4468
7c8f7eaa
DM
44692016-07-20 David Malcolm <dmalcolm@redhat.com>
4470
4471 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4472 spellcheck-tree.h
4473 (best_macro_match): Likewise, converting from a typedef to a
4474 subclass.
4475 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4476 (lookup_name_fuzzy): Update for change of best_macro_match to a
4477 subclass with a ctor that calls cpp_forall_identifiers.
4478
de6a69ee
DM
44792016-07-20 David Malcolm <dmalcolm@redhat.com>
4480
4481 * c-decl.c (implicit_decl_warning): Update for conversion of
4482 return type of lookup_name_fuzzy to const char *.
4483 (undeclared_variable): Likewise.
4484 (lookup_name_fuzzy): Convert return type from tree to
4485 const char *.
4486 * c-parser.c (c_parser_declaration_or_fndef): Update for
4487 conversion of return type of lookup_name_fuzzy to const char *.
4488 (c_parser_parameter_declaration): Likewise.
4489
b1c9c068
CP
44902016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4491
4492 * c-parser.c (c_parser_oacc_declare): Don't scan for
4493 GOMP_MAP_POINTER.
4494 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4495 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4496 zero-length subarrays.
4497
ddbbcb19
JJ
44982016-07-15 Jakub Jelinek <jakub@redhat.com>
4499
4500 PR c/71858
4501 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4502 instead of FUZZY_LOOKUP_NAME.
4503 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4504 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4505
dd36b877
JJ
45062016-07-14 Jakub Jelinek <jakub@redhat.com>
4507
4508 PR c/71858
4509 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4510
8c681247
TS
45112016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4512
4513 * c-parser.c (c_parser_generic_selection): Make type of variable
4514 auto_vec.
4515 (c_parser_omp_declare_simd): Likewise.
4516
bf4fa671
TS
45172016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4518
4519 * c-decl.c (struct c_struct_parse_info): Change member types
4520 from vec to auto_vec.
4521 (start_struct): Adjust.
4522 (finish_struct): Likewise.
4523
557e8c49
JJ
45242016-07-02 Jakub Jelinek <jakub@redhat.com>
4525
4526 PR c/71719
4527 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4528
54d19c3b
TS
45292016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4530
4531 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4532 Move pragma context checking into...
4533 (c_parser_omp_cancellation_point): ... here, and improve
4534 diagnostic messages.
4535 * c-typeck.c (c_finish_omp_cancel)
4536 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4537
152ef731
JJ
45382016-06-29 Jakub Jelinek <jakub@redhat.com>
4539
4540 PR c/71685
4541 * c-typeck.c (c_build_qualified_type): Don't clear
4542 C_TYPE_INCOMPLETE_VARS for the main variant.
4543
45442016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4545
4546 PR c/71552
4547 * c-typeck.c (output_init_element): Diagnose incompatible types
4548 before non-constant initializers.
4549
e9ac1f86
JJ
45502016-06-28 Jakub Jelinek <jakub@redhat.com>
4551
4552 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4553
277d7ee0
AK
45542016-06-23 Andi Kleen <ak@linux.intel.com>
4555
4556 * Make-lang.in: Add support for autofdo.
4557
1a4f11c8
DM
45582016-06-22 David Malcolm <dmalcolm@redhat.com>
4559
4560 PR c/70339
4561 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4562 (implicit_decl_warning): When issuing warnings for implicit
4563 declarations, attempt to provide a suggestion via
4564 lookup_name_fuzzy.
4565 (undeclared_variable): Likewise when issuing errors.
4566 (lookup_name_in_scope): Likewise.
4567 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4568 (best_macro_match): New typedef.
4569 (find_closest_macro_cpp_cb): New function.
4570 (lookup_name_fuzzy): New function.
4571 * c-parser.c: Include gcc-rich-location.h.
4572 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4573 (c_keyword_starts_typename): ...this new function.
4574 (c_parser_declaration_or_fndef): When issuing errors about
4575 missing "struct" etc, add a fixit. For other kinds of errors,
4576 attempt to provide a suggestion via lookup_name_fuzzy.
4577 (c_parser_parms_declarator): When looking ahead to detect typos in
4578 type names, also reject CPP_KEYWORD.
4579 (c_parser_parameter_declaration): When issuing errors about
4580 unknown type names, attempt to provide a suggestion via
4581 lookup_name_fuzzy.
4582 * c-tree.h (c_keyword_starts_typename): New prototype.
4583
5a578671
JM
45842016-06-20 Joseph Myers <joseph@codesourcery.com>
4585
4586 PR c/71601
4587 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4588 c_common_type returns error_mark_node.
4589
3f8257db 45902016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4591
4592 PR c/69507
4593 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4594 __alignof__ (expression).
4595
6a3f203c
DM
45962016-06-14 David Malcolm <dmalcolm@redhat.com>
4597
4598 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4599
264757fb
DM
46002016-06-14 David Malcolm <dmalcolm@redhat.com>
4601
4602 * c-typeck.c (build_component_ref): Simplify fixit code by
4603 using gcc_rich_location::add_fixit_misspelled_id.
4604 (set_init_label): Likewise.
4605
f7e4f2e3
DM
46062016-06-13 David Malcolm <dmalcolm@redhat.com>
4607
4608 * c-parser.c (c_parser_initelt): Provide location of name for new
4609 location_t param of set_init_label.
4610 * c-tree.h (set_init_label): Add location_t param.
4611 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4612 param and use it when issuing error messages about unrecognized
4613 field names. Attempt to provide a fixit hint if appropriate,
4614 otherwise update the error message to provide the type name.
4615
4b1ffdb1
TS
46162016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4617
4618 PR c/71381
4619 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4620 Loosen checking.
4621
44a845ca
MS
46222016-06-08 Martin Sebor <msebor@redhat.com>
4623 Jakub Jelinek <jakub@redhat.com>
4624
4625 PR c++/70507
4626 PR c/68120
4627 * c-typeck.c (convert_arguments): Don't promote last argument
4628 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4629
92a5f2ba
MP
46302016-06-08 Marek Polacek <polacek@redhat.com>
4631
4632 PR c/71418
4633 * c-decl.c (grokdeclarator): Check TYPE_P.
4634
08203f73
MP
4635 PR c/71426
4636 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4637 code.
4638
6ffd47b7
DM
46392016-06-07 David Malcolm <dmalcolm@redhat.com>
4640
4641 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4642 and structure element reference, capture the location of the
4643 element name token and pass it to build_component_ref.
4644 (c_parser_postfix_expression_after_primary): Likewise for
4645 structure element dereference.
4646 (c_parser_omp_variable_list): Likewise for
4647 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4648 * c-tree.h (build_component_ref): Add location_t param.
4649 * c-typeck.c (build_component_ref): Add location_t param
4650 COMPONENT_LOC. Use it, if available, when issuing hints about
4651 mispelled member names to provide a fixit replacement hint.
4652
1f40cff3
MP
46532016-06-06 Marek Polacek <polacek@redhat.com>
4654
4655 PR c/71362
4656 * c-parser.c (c_parser_direct_declarator): Set location.
4657
5545a907
MP
46582016-06-06 Marek Polacek <polacek@redhat.com>
4659
4660 * c-typeck.c (comptypes_internal): Handle comparisons of
4661 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4662 TYPE_REF_CAN_ALIAS_ALL.
4663
b605f663
CLT
46642016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4665
4666 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4667 arguments as addressable when async clause exists.
4668
00631022
JJ
46692016-05-30 Jakub Jelinek <jakub@redhat.com>
4670
4671 PR c++/71349
4672 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4673 when combined with target construct.
4674
7211a097
JJ
46752016-05-26 Jakub Jelinek <jakub@redhat.com>
4676
4677 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4678 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4679
95efe6b6
MP
46802016-05-25 Marek Polacek <polacek@redhat.com>
4681
4682 PR c/71265
4683 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4684
a23faf7a
MP
4685 PR c/71266
4686 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4687
e46c7770
CP
46882016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4689
4690 * c-parser.c (c_parser_oacc_declare): Add support for
4691 GOMP_MAP_FIRSTPRIVATE_POINTER.
4692 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4693 argument with enum c_omp_region_type ort.
4694 (handle_omp_array_sections): Likewise. Update call to
4695 handle_omp_array_sections_1.
4696 (c_finish_omp_clauses): Add specific errors and warning messages for
4697 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4698 call to handle_omp_array_sections.
4699
a04e69c0
TS
47002016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4701
4702 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4703
f17a223d
RB
47042016-05-24 Richard Biener <rguenther@suse.de>
4705
4706 PR middle-end/70434
4707 PR c/69504
4708 * c-typeck.c (build_array_ref): Do not complain about indexing
4709 non-lvalue vectors. Adjust for function name change.
4710
79063edd
MS
47112016-05-20 Martin Sebor <msebor@redhat.com>
4712
4713 PR c/71115
4714 * c-typeck.c (error_init): Use
4715 expansion_point_location_if_in_system_header.
4716 (warning_init): Same.
4717
8a40fef3
DM
47182016-05-19 David Malcolm <dmalcolm@redhat.com>
4719
4720 PR c/71171
4721 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4722 in error-handling.
4723 (c_parser_postfix_expression): Likewise.
4724 * c-tree.h (c_expr::set_error): New method.
4725 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4726 that result's range is initialized.
4727
e9892350
JG
47282016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4729
4730 * c-typeck.c (parser_build_unary_op): Fix formatting.
4731
8fad45f5
MW
47322016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4733
4734 * c-decl.c (grokdeclarator): Remove errmsg and use of
4735 targetm.invalid_return_type.
4736 (grokparms): Remove errmsg and use of
4737 targetm.invalid_parameter_type.
4738
aa4b467b
JM
47392016-05-13 Joseph Myers <joseph@codesourcery.com>
4740
4741 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4742 function return type.
4743
4f2e1536
MP
47442016-05-12 Marek Polacek <polacek@redhat.com>
4745
4746 PR c/70756
4747 * c-decl.c (build_compound_literal): Pass LOC down to
4748 c_incomplete_type_error.
4749 * c-tree.h (require_complete_type): Adjust declaration.
4750 (c_incomplete_type_error): Likewise.
4751 * c-typeck.c (require_complete_type): Add location parameter, pass it
4752 down to c_incomplete_type_error.
4753 (c_incomplete_type_error): Add location parameter, pass it down to
4754 error_at.
4755 (build_component_ref): Pass location down to c_incomplete_type_error.
4756 (default_conversion): Pass location down to require_complete_type.
4757 (build_array_ref): Likewise.
4758 (build_function_call_vec): Likewise.
4759 (convert_arguments): Likewise.
4760 (build_unary_op): Likewise.
4761 (build_c_cast): Likewise.
4762 (build_modify_expr): Likewise.
4763 (convert_for_assignment): Likewise.
4764 (c_finish_omp_clauses): Likewise.
4765
d6e83a8d
MM
47662016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4767
4768 PR c/43651
4769 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4770 is enabled.
4771 * c-errors.c (pedwarn_c90): Return true if warned.
4772 * c-tree.h (pedwarn_c90): Change return type to bool.
4773 (enum c_declspec_word): Add new enumerator cdw_atomic.
4774
5c3a10fb
MP
47752016-05-11 Marek Polacek <polacek@redhat.com>
4776
4777 PR c++/71024
4778 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4779 diagnose_mismatched_attributes and call it.
4780
cf68d92c
MP
47812016-05-10 Marek Polacek <polacek@redhat.com>
4782
4783 PR c/70255
4784 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4785 on a declaration following the definition.
4786
351f85c5
JJ
47872016-05-05 Jakub Jelinek <jakub@redhat.com>
4788
4789 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4790 parse it through to c_parser_c99_block_statement.
4791 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4792 caller.
4793
deef7113
MP
47942016-05-04 Marek Polacek <polacek@redhat.com>
4795
4796 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4797 OPT_Wdangling_else.
4798
de55efd5
MP
47992016-05-04 Marek Polacek <polacek@redhat.com>
4800
4801 PR c/48778
4802 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4803 for macro expansions.
4804
79ce98bc
MP
48052016-05-03 Marek Polacek <polacek@redhat.com>
4806
4807 PR c/70859
4808 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4809 check_builtin_function_arguments.
4810
fb2647aa
RB
48112016-05-03 Richard Biener <rguenther@suse.de>
4812
4813 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4814 the checksum from the previous stage.
4815
77886428
CP
48162016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4817
4818 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4819 c_finish_omp_clauses.
4820 (c_parser_omp_all_clauses): Likewise.
4821 (c_parser_oacc_cache): Likewise.
4822 (c_parser_oacc_loop): Likewise.
4823 (omp_split_clauses): Likewise.
4824 (c_parser_omp_declare_target): Likewise.
4825 (c_parser_cilk_all_clauses): Likewise.
4826 (c_parser_cilk_for): Likewise.
4827 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4828 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4829
7176a4a0
MP
48302016-05-02 Marek Polacek <polacek@redhat.com>
4831
4832 PR c/70851
4833 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4834 incomplete type.
4835
e7ff0319
CP
48362016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4837
4838 PR middle-end/70626
4839 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4840 OACC_LOOP_CLAUSE_MASK.
4841 (c_parser_oacc_kernels_parallel): Update call to
4842 c_oacc_split_loop_clauses.
4843
9f405ce1
AM
48442016-04-28 Andrew MacLeod <amacleod@redhat.com>
4845
4846 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4847 argument to build_modify_expr in two cases.
4848
c1e1f433
BS
48492016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4850
4851 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4852 warn_for_memset instead of warning directly here.
4853
2448a956
MP
48542016-04-26 Marek Polacek <polacek@redhat.com>
4855
4856 PR c/67784
4857 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4858 out of ...
4859 (c_parser_for_statement): ... here.
4860 (c_parser_if_statement): Use it.
4861 (c_parser_switch_statement): Use it.
4862 (c_parser_while_statement): Use it.
4863
b02a5e26
MP
4864 PR c/70791
4865 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4866
477d4906
IV
48672016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4868
4869 PR c++/69363
4870 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4871 instead of c_finish_cilk_clauses.
4872 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4873 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4874 floating-point variables in the linear clause for Cilk Plus.
4875
fe37c7af
MM
48762016-04-18 Michael Matz <matz@suse.de>
4877
4878 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4879 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4880
949505a9
MP
48812016-04-15 Marek Polacek <polacek@redhat.com>
4882
4883 PR c/70671
4884 * c-typeck.c (build_unary_op): Pass location down to error and
4885 warning call.
4886
dda1bf61
JJ
48872016-04-15 Jakub Jelinek <jakub@redhat.com>
4888
4889 PR c/70436
4890 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4891 where needed.
4892 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4893 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4894 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4895 Adjust c_parser_pragma callers.
4896 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4897 caller.
4898 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4899 c_parser_statement.
4900 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4901 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4902 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4903 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4904 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4905 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4906 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4907 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4908 down where needed.
4909 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4910 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4911 calls.
4912
99cd9857
MP
49132016-04-13 Marek Polacek <polacek@redhat.com>
4914
4915 PR c/70436
4916 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4917 adjust callers.
4918 (c_parser_statement): Likewise.
4919 (c_parser_c99_block_statement): Likewise.
4920 (c_parser_while_statement): Likewise.
4921 (c_parser_for_statement): Likewise.
4922 (c_parser_if_body): Don't set IF_P here.
4923 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4924 about dangling else here.
4925 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4926 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4927 warn about dangling else here.
4928
f13355da
MP
49292016-04-04 Marek Polacek <polacek@redhat.com>
4930
4931 PR c/70307
4932 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4933
5fde6a45
MP
49342016-03-31 Marek Polacek <polacek@redhat.com>
4935
4936 PR c/70297
4937 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4938
4bbf545b
DM
49392016-03-18 David Malcolm <dmalcolm@redhat.com>
4940
4941 PR c/70281
4942 * c-parser.c (c_parser_postfix_expression): Set the source range
4943 for uses of "__builtin_types_compatible_p".
4944
fcc2b74f
JJ
49452016-03-17 Jakub Jelinek <jakub@redhat.com>
4946
4947 PR c/70280
4948 * c-typeck.c (composite_type): Don't count void_list_node
4949 into len, if the list is terminated by void_list_node, start
4950 with void_list_node instead of NULL for newargs. Stop
4951 at void_list_node.
4952
ab4c578f
MP
49532016-03-16 Marek Polacek <polacek@redhat.com>
4954
4955 PR c/70093
4956 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4957 nested functions returning VM types.
4958
96b3c82d
CP
49592016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4960
4961 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4962 when calling c_finish_omp_clauses.
4963
29b9828f
BS
49642016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4965
4966 PR c/69824
4967 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4968 for later.
4969
7ff6ca38
MP
49702016-03-04 Marek Polacek <polacek@redhat.com>
4971
4972 PR c/69798
4973 * c-parser.c (c_parser_postfix_expression): Call
4974 c_parser_cast_expression rather than c_parser_postfix_expression.
4975
686e2237
JJ
49762016-03-01 Jakub Jelinek <jakub@redhat.com>
4977
4978 PR c/69796
4979 PR c/69974
4980 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4981 of incomplete decls to error_mark_node.
4982
0b05329b
MP
49832016-02-24 Marek Polacek <polacek@redhat.com>
4984
4985 PR c/69819
4986 * c-decl.c (finish_decl): Don't update the copy of the type of a
4987 different decl type.
4988
067fbd8b
JJ
49892016-02-23 Jakub Jelinek <jakub@redhat.com>
4990
4991 PR objc/69844
4992 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4993 in id_kind reclassification.
4994
bf14eba2
JJ
49952016-02-16 Jakub Jelinek <jakub@redhat.com>
4996
4997 PR c/69835
4998 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4999
ba539195
JN
50002016-02-16 James Norris <jnorris@codesourcery.com>
5001
5002 PR c/64748
5003 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5004
16595a1f
BS
50052016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5006
f48dfe98
BS
5007 * c-decl.c (build_null_declspecs): Zero the entire struct.
5008
16595a1f
BS
5009 PR c/69522
5010 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5011 callers changed. If nested_p is true, use it to call
5012 finish_implicit_inits.
5013 * c-tree.h (finish_implicit_inits): Declare.
5014 * c-typeck.c (finish_implicit_inits): New function. Move code
5015 from ...
5016 (push_init_level): ... here.
5017 (set_designator, process_init_element): Call finish_implicit_inits.
5018
66756373
JJ
50192016-02-11 Jakub Jelinek <jakub@redhat.com>
5020
5021 PR c/69768
5022 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5023 arguments for -Waddress warning.
5024
1066e9b5
JJ
50252016-02-04 Jakub Jelinek <jakub@redhat.com>
5026
5027 PR c/69669
5028 * c-decl.c (finish_enum): When honoring mode attribute,
5029 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5030
3a5d2ba4
JJ
50312016-01-29 Jakub Jelinek <jakub@redhat.com>
5032
5033 PR debug/69518
5034 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5035 all type variants, not just TYPE_MAIN_VARIANT.
5036
cbdd8ae0
JJ
50372016-01-27 Jakub Jelinek <jakub@redhat.com>
5038
5039 PR debug/66869
5040 * c-decl.c (c_write_global_declarations_1): Warn with
5041 warn_unused_function if static prototype without definition
5042 is not C_DECL_USED.
5043
fa74a4bc
MP
50442016-01-27 Marek Polacek <polacek@redhat.com>
5045
5046 PR c/68062
5047 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5048 to unsigned, if needed. Add -Wsign-compare warning.
5049
13f92e8d
JJ
50502016-01-26 Jakub Jelinek <jakub@redhat.com>
5051
5052 PR tree-optimization/69483
5053 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5054
cd8e73dc 50552016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
5056
5057 PR c/24293
5058 * c-tree.h (incomplete_record_decls): Declare.
5059 * c-parser.c (incomplete_record_decls): Define.
5060 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5061 report error if any decl has zero size.
5062 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5063 or enum type to incomplete_record_decls.
5064
e6d6ec9e
TV
50652016-01-14 Tom de Vries <tom@codesourcery.com>
5066
5067 PR tree-optimization/68773
5068 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5069 set force_output.
5070
00083992
MP
50712016-01-14 Marek Polacek <polacek@redhat.com>
5072
5073 PR c/69262
5074 * c-decl.c (grokdeclarator): Provide more information for invalid
5075 array declarations.
5076
7443cf13
DM
50772016-01-06 David Malcolm <dmalcolm@redhat.com>
5078
5079 * c-parser.c (c_parser_unary_expression): For dereferences, build
5080 a combined location before calling build_indirect_ref, so that
5081 error reports cover the full range, manually updating the c_expr
5082 src_range.
5083
6b131d5b
MP
50842016-01-06 Marek Polacek <polacek@redhat.com>
5085
5086 PR sanitizer/69099
5087 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5088 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5089 NULL.
5090
818ab71a
JJ
50912016-01-04 Jakub Jelinek <jakub@redhat.com>
5092
5093 Update copyright years.
5094
2fe0a208
MP
50952016-01-04 Marek Polacek <polacek@redhat.com>
5096
5097 PR c/68908
5098 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5099 optimization to use __atomic_fetch_* built-in if possible.
5100
c7b48c8a
TS
51012015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5102
5103 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5104 into...
5105 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5106 all users.
5107
fda5652f
MP
51082015-12-22 Marek Polacek <polacek@redhat.com>
5109
5110 PR c/69002
5111 * c-typeck.c (build_component_ref): Warn when acessing elements of
5112 atomic structures or unions.
5113
745e411d
DM
51142015-12-21 David Malcolm <dmalcolm@redhat.com>
5115
5116 * c-typeck.c: Include "gcc-rich-location.h".
5117 (build_binary_op): In the two places that call binary_op_error,
5118 create a gcc_rich_location and populate it with the location of
5119 the binary op and its two operands.
5120
94c40e19
DM
51212015-12-16 David Malcolm <dmalcolm@redhat.com>
5122
5123 * c-parser.c (c_parser_statement_after_labels): When calling
5124 c_finish_return, Use the return expression's location if it has
5125 one, falling back to the location of the first token within it.
5126 * c-typeck.c (c_finish_return): When issuing warnings about
5127 the incorrect presence/absence of a return value, issue a note
5128 showing the declaration of the function.
5129
de67c4c3
DM
51302015-12-16 David Malcolm <dmalcolm@redhat.com>
5131
5132 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5133 to 4.
5134 (c_parser_peek_nth_token): New function.
5135 (c_parser_peek_conflict_marker): New function.
5136 (c_parser_error): Detect conflict markers and report them as such.
5137
a10704e1
DM
51382015-12-16 David Malcolm <dmalcolm@redhat.com>
5139
5140 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5141 to preserve range information for the primary expression
5142 in the call to c_parser_postfix_expression_after_primary.
5143
8062bca6
DM
51442015-12-16 David Malcolm <dmalcolm@redhat.com>
5145
5146 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5147 expression location, falling back on the first token location,
5148 rather than always using the latter.
5149
d06f8b75
MP
51502015-12-16 Marek Polacek <polacek@redhat.com>
5151
5152 PR c/64637
5153 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5154 available.
5155
2994fb91
MP
51562015-12-15 Marek Polacek <polacek@redhat.com>
5157
5158 PR c/68907
5159 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5160 artificial decl.
5161
a1b93f8d
DM
51622015-12-08 David Malcolm <dmalcolm@redhat.com>
5163
5164 * c-parser.c (c_parser_alignof_expression): Capture location of
5165 closing parenthesis (if any), or of end of unary expression, and
5166 use it to build a src_range for the expression.
5167
46c6e1e2
DM
51682015-12-08 David Malcolm <dmalcolm@redhat.com>
5169
5170 PR c/68757
5171 * c-parser.c (c_parser_get_builtin_args): Add
5172 "out_close_paren_loc" param, and write back to it.
5173 (c_parser_postfix_expression): Capture the closing
5174 parenthesis location for RID_CHOOSE_EXPR,
5175 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5176 RID_BUILTIN_SHUFFLE and use it to set the source range
5177 for such expressions; within RID_BUILTIN_COMPLEX set
5178 the underlying location.
5179
66189108
MP
51802015-12-07 Marek Polacek <polacek@redhat.com>
5181
5182 PR c/68668
5183 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5184 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5185
f187980b
EB
51862015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5187
5188 * c-tree.h (c_build_va_arg): Adjust prototype.
5189 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5190 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5191 parameter, adjust throughout and issue an error if EXPR is a component
5192 with reverse storage order.
5193
4250754e
JM
51942015-12-02 Jason Merrill <jason@redhat.com>
5195
5196 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5197 (c_fully_fold_internal, decl_constant_value_for_optimization):
5198 Move from c-common.c.
5199 * c-tree.h: Declare decl_constant_value_for_optimization.
5200 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5201
e9e32ee6
JM
52022015-12-02 Joseph Myers <joseph@codesourcery.com>
5203
5204 PR c/68162
5205 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5206 following link from declarator to next declarator. Track original
5207 qualified type and pass it to c_build_qualified_type.
5208 * c-typeck.c (c_build_qualified_type): Add arguments
5209 orig_qual_type and orig_qual_indirect.
5210
ff7a55bf
TS
52112015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5212
5213 * c-parser.c (c_parser_omp_clause_name)
5214 (c_parser_oacc_all_clauses): Alphabetical sorting.
5215
657e4e47
JJ
52162015-12-02 Jakub Jelinek <jakub@redhat.com>
5217
5218 PR c/68533
5219 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5220 for diagnostics.
5221
37d5ad46
JB
52222015-12-01 Julian Brown <julian@codesourcery.com>
5223 Cesar Philippidis <cesar@codesourcery.com>
5224 James Norris <James_Norris@mentor.com>
5225
5226 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5227 (c_parser_oacc_clause_use_device): New function.
5228 (c_parser_oacc_all_clauses): Add use_device support.
5229 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5230 (c_parser_oacc_host_data): New function.
5231 (c_parser_omp_construct): Add host_data support.
5232 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5233 * c-typeck.c (c_finish_oacc_host_data): New function.
5234 (c_finish_omp_clauses): Add use_device support.
5235
a4850ce9
JH
52362015-11-29 Jan Hubicka <hubicka@ucw.cz>
5237
5238 PR c/67106
5239 * c-decl.c: Set TYPE_PACKED in variants.
5240
b58d3df2
ML
52412015-11-27 Martin Liska <mliska@suse.cz>
5242
5243 PR c++/68312
5244 * c-array-notation.c (fix_builtin_array_notation_fn):
5245 Use release_vec_vec instead of vec::release.
5246 (build_array_notation_expr): Likewise.
5247 (fix_conditional_array_notations_1): Likewise.
5248 (fix_array_notation_expr): Likewise.
5249 (fix_array_notation_call_expr): Likewise.
5250
aec17bfe
JJ
52512015-11-27 Jakub Jelinek <jakub@redhat.com>
5252
5253 PR c/63326
5254 * c-parser.c (c_parser_compound_statement_nostart): If
5255 last_label is true, use pragma_stmt instead of pragma_compound
5256 as second c_parser_pragma argument.
5257 (c_parser_omp_ordered, c_parser_omp_target_update,
5258 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5259 false as second argument to c_parser_skip_to_pragma_eol after
5260 diagnosing standalone directives used in pragma_stmt context.
5261
688c4de0
IV
52622015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5263
5264 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5265 with "if (ENABLE_OFFLOADING)".
5266
cbd03aee
DM
52672015-11-23 David Malcolm <dmalcolm@redhat.com>
5268
5269 PR objc/68438
5270 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5271 for various Objective-C constructs: Class.name syntax,
5272 @selector(), @protocol(), @encode(), and [] message syntax.
5273
a87a86e1
DM
52742015-11-20 David Malcolm <dmalcolm@redhat.com>
5275
5276 PR 62314
5277 * c-typeck.c (should_suggest_deref_p): New function.
5278 (build_component_ref): Special-case POINTER_TYPE when
5279 generating a "not a structure of union" error message, and
5280 suggest a "->" rather than a ".", providing a fix-it hint.
5281
8ece8dfb
DM
52822015-11-19 David Malcolm <dmalcolm@redhat.com>
5283
5284 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5285 candidate into a new function, find_closest_identifier.
5286
433068cc
MP
52872015-11-19 Marek Polacek <polacek@redhat.com>
5288
5289 PR c/68412
5290 * c-typeck.c (parser_build_binary_op): Properly handle
5291 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5292
bef08b71
DM
52932015-11-17 David Malcolm <dmalcolm@redhat.com>
5294
5295 * c-parser.c (set_c_expr_source_range): Bulletproof both
5296 overloaded implementations against NULL expr->value.
5297 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5298 values.
5299 (c_parser_unary_expression): Likewise when handling addresses of
5300 labels.
5301 (c_parser_postfix_expression): Likewise for statement expressions,
5302 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5303 __builtin_va_arg, and for __builtin_offset_of.
5304 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5305 src_range using the range of the braced initializer.
5306 (c_parser_transaction_expression): Set src_range for "ret" to a
5307 sane pair of values.
5308
fff77217
KY
53092015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5310
5311 * c-parser.c (c_finish_omp_declare_simd): Look for
5312 "simd" attribute as well. Update error message.
5313
1d899da2
TS
53142015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5315
5316 * c-parser.c (c_parser_omp_declare_target): Adjust.
5317
e4606348
JJ
53182015-11-14 Jakub Jelinek <jakub@redhat.com>
5319
5320 * c-typeck.c (c_finish_omp_clauses): Don't mark
5321 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5322
3e636daf
MP
53232015-11-14 Marek Polacek <polacek@redhat.com>
5324
5325 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5326 * c-typeck.c: Likewise.
5327
ebedc9a3
DM
53282015-11-13 David Malcolm <dmalcolm@redhat.com>
5329
5330 * c-decl.c (warn_defaults_to): Pass line_table to
5331 rich_location ctor.
5332 * c-errors.c (pedwarn_c99): Likewise.
5333 (pedwarn_c90): Likewise.
5334 * c-parser.c (set_c_expr_source_range): New functions.
5335 (c_token::get_range): New method.
5336 (c_token::get_finish): New method.
5337 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5338 based on the range from the start of the LHS to the end of the
5339 RHS.
5340 (c_parser_conditional_expression): Likewise, based on the range
5341 from the start of the cond.value to the end of exp2.value.
5342 (c_parser_binary_expression): Call set_c_expr_source_range on
5343 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5344 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5345 based on the cast_loc through to the end of the expr.
5346 (c_parser_unary_expression): Likewise, based on the
5347 op_loc through to the end of op.
5348 (c_parser_sizeof_expression) Likewise, based on the start of the
5349 sizeof token through to either the closing paren or the end of
5350 expr.
5351 (c_parser_postfix_expression): Likewise, using the token range,
5352 or from the open paren through to the close paren for
5353 parenthesized expressions.
5354 (c_parser_postfix_expression_after_primary): Likewise, for
5355 various kinds of expression.
5356 * c-tree.h (struct c_expr): Add field "src_range".
5357 (c_expr::get_start): New method.
5358 (c_expr::get_finish): New method.
5359 (set_c_expr_source_range): New decls.
5360 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5361 on ret for prefix unary ops.
5362 (parser_build_binary_op): Likewise, running from the start of
5363 arg1.value through to the end of arg2.value.
5364
ec8b536f
MP
53652015-11-13 Marek Polacek <polacek@redhat.com>
5366
5367 PR c/68320
5368 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5369
277fe616
DM
53702015-11-13 David Malcolm <dmalcolm@redhat.com>
5371
5372 * c-typeck.c: Include spellcheck.h.
5373 (lookup_field_fuzzy_find_candidates): New function.
5374 (lookup_field_fuzzy): New function.
5375 (build_component_ref): If the field was not found, try using
5376 lookup_field_fuzzy and potentially offer a suggestion.
5377
6e232ba4
JN
53782015-11-12 James Norris <jnorris@codesourcery.com>
5379 Joseph Myers <joseph@codesourcery.com>
5380
5381 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5382 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5383 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5384 and PRAGMA_OMP_CLAUSE_LINK.
5385 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5386 and PRAGMA_OACC_CLAUSE_LINK.
5387 (OACC_DECLARE_CLAUSE_MASK): New definition.
5388 (c_parser_oacc_declare): New function.
5389
9be4f715
MP
53902015-11-12 Marek Polacek <polacek@redhat.com>
5391
5392 PR c/67784
5393 * c-parser.c (c_parser_for_statement): Reclassify the token in
5394 a correct scope.
5395
e78bede6
MP
53962015-11-11 Marek Polacek <polacek@redhat.com>
5397
5398 PR c/68107
5399 PR c++/68266
5400 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5401 checking the size of an array.
5402
69f293c9
AM
54032015-11-11 Andrew MacLeod <amacleod@redhat.com>
5404
5405 * c-array-notation.c: Remove unused header files.
5406 * c-aux-info.c: Likewise.
5407 * c-convert.c: Likewise.
5408 * c-decl.c: Likewise.
5409 * c-errors.c: Likewise.
5410 * c-lang.c: Likewise.
5411 * c-objc-common.c: Likewise.
5412 * c-parser.c: Likewise.
5413 * c-typeck.c: Likewise.
5414 * gccspec.c: Likewise.
5415
3a40d81d
NS
54162015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5417 Cesar Philippidis <cesar@codesourcery.com>
5418 James Norris <jnorris@codesourcery.com>
5419 Julian Brown <julian@codesourcery.com>
5420 Nathan Sidwell <nathan@codesourcery.com>
5421
3a40d81d
NS
5422 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5423 routine arg.
5424 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5425 (c_parser_pragma): Parse 'acc routine'.
5426 (OACC_ROUTINE_CLAUSE_MARK): Define.
5427 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5428
fc402eec
AA
54292015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5430
5431 PR debug/67192
5432 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5433 location of the backward-goto to the start of the loop body.
5434
f6b0b3db
AA
54352015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5436
5437 PR debug/67192
5438 * c-parser.c (c_parser_while_statement): Finish the loop before
5439 parsing ahead for misleading indentation.
5440 (c_parser_for_statement): Likewise.
5441
ee45a32d
EB
54422015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5443
5444 * c-decl.c (finish_struct): If the structure has reverse storage
5445 order, rewrite the type of array fields with scalar component. Call
5446 maybe_apply_pragma_scalar_storage_order on entry.
5447 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5448 errors on bit-fields and reverse SSO here and not...
5449 (c_mark_addressable): ...here.
5450 (output_init_element): Adjust call to initializer_constant_valid_p.
5451 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5452
8a645150
DM
54532015-11-06 David Malcolm <dmalcolm@redhat.com>
5454
5455 * c-decl.c (warn_defaults_to): Update for change in signature
5456 of diagnostic_set_info.
5457 * c-errors.c (pedwarn_c99): Likewise.
5458 (pedwarn_c90): Likewise.
5459 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5460 for textinfo::set_location.
5461
7a5e4956
CP
54622015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5463 Thomas Schwinge <thomas@codesourcery.com>
5464 James Norris <jnorris@codesourcery.com>
5465
5466 * c-parser.c (c_parser_omp_clause_name): Add support for
5467 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5468 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5469 default(none) in OpenACC.
5470 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5471 arguments.
5472 (c_parser_oacc_clause_tile): New function.
5473 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5474 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5475 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5476 TILE}.
5477 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5478 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5479 FIRSTPRIVATE}.
5480 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5481 (c_parser_oacc_update): Update the error message for missing clauses.
5482 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5483 and OMP_CLAUSE_INDEPENDENT.
5484
bfcfbfa0
MP
54852015-11-05 Marek Polacek <polacek@redhat.com>
5486
5487 PR c/68090
5488 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5489 deal with pre-evaluation on invalid types.
5490
e01d41e5
JJ
54912015-11-05 Jakub Jelinek <jakub@redhat.com>
5492 Ilya Verbin <ilya.verbin@intel.com>
5493
5494 * c-parser.c: Include context.h and gimple-expr.h.
5495 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5496 monotonic together with nonmonotonic.
5497 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5498 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5499 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5500 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5501 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5502 expressions on combined target teams before the target.
5503 (c_parser_omp_declare_target): If decl has "omp declare target" or
5504 "omp declare target link" attribute, and cgraph or varpool node already
5505 exists, then set corresponding flags. Call c_finish_omp_clauses
5506 in the parenthesized extended-list syntax case.
5507 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5508 declare target.
5509 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5510 on OMP_CLAUSE_REDUCTION array sections.
5511 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5512 into the constant offset, or for variable low-bound using
5513 POINTER_PLUS_EXPR. For structure element based array sections use
5514 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5515 (c_finish_omp_clauses): Drop generic_field_head, structure
5516 elements are now always mapped even as array section bases,
5517 diagnose same var in data sharing and mapping clauses. Diagnose if
5518 linear step on declare simd is neither a constant nor a uniform
5519 parameter. Look through POINTER_PLUS_EXPR for array section
5520 reductions. Diagnose the same var or function appearing multiple
5521 times on the same directive. Fix up wording for the to clause if t
5522 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5523 modifier on kinds other than dynamic or guided or nonmonotonic
5524 modifier together with ordered clause.
5525
4bf9e5a8
TS
55262015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5527 Chung-Lin Tang <cltang@codesourcery.com>
5528
5529 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5530
2adfab87
AM
55312015-10-29 Andrew MacLeod <amacleod@redhat.com>
5532
5533 * c-array-notation.c: Reorder #include's and remove duplicates.
5534 * c-aux-info.c: Likewise.
5535 * c-convert.c: Likewise.
5536 * c-decl.c: Likewise.
5537 * c-errors.c: Likewise.
5538 * c-lang.c: Likewise.
5539 * c-objc-common.c: Likewise.
5540 * c-parser.c: Likewise.
5541 * c-typeck.c: Likewise.
5542
e922069e
JW
55432015-10-26 Jim Wilson <jim.wilson@linaro.org>
5544
5545 PR debug/66068
5546 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5547 after calling build_qualified_type.
5548
765dd391
CP
55492015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5550 Thomas Schwinge <thomas@codesourcery.com>
5551 James Norris <jnorris@codesourcery.com>
5552 Joseph Myers <joseph@codesourcery.com>
5553 Julian Brown <julian@codesourcery.com>
5554 Bernd Schmidt <bschmidt@redhat.com>
5555
5556 * c-parser.c (c_parser_oacc_shape_clause): New.
5557 (c_parser_oacc_simple_clause): New.
5558 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5559 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5560
88bae6f4
TS
55612015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5562 James Norris <jnorris@codesourcery.com>
5563 Cesar Philippidis <cesar@codesourcery.com>
5564
5565 PR c/64765
5566 PR c/64880
5567 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5568 parameters, and handle these. Adjust all users.
5569 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5570 into...
5571 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5572 all users.
5573 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5574 declare functions.
5575 (c_finish_omp_construct): Declare function.
5576 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5577 Merge functions into...
5578 (c_finish_omp_construct): ... this new function.
5579
a8fc2579
RB
55802015-10-22 Richard Biener <rguenther@suse.de>
5581
5582 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5583 before folding a MINUS_EXPR.
5584
e9122ef6
MP
55852015-10-21 Marek Polacek <polacek@redhat.com>
5586
5587 PR c/68024
5588 * c-decl.c (start_function): Warn about vararg functions without
5589 a prototype.
5590
9f47c7e5
IE
55912015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5592
5593 * c-typeck.c (build_conditional_expr): Use boolean vector
5594 type for vector comparison.
5595 (build_vec_cmp): New.
5596 (build_binary_op): Use build_vec_cmp for comparison.
5597
fa60eeb9
MP
55982015-10-20 Marek Polacek <polacek@redhat.com>
5599
5600 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5601
2c7020eb
MP
56022015-10-20 Marek Polacek <polacek@redhat.com>
5603
5604 PR c/67964
5605 * c-parser.c (c_parser_attributes): Break out of the loop if the
5606 token after an attribute isn't a comma.
5607
d9a6bd32
JJ
56082015-10-13 Jakub Jelinek <jakub@redhat.com>
5609 Aldy Hernandez <aldyh@redhat.com>
5610
5611 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5612 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5613 (c_parser_omp_variable_list): Handle structure elements for
5614 map, to and from clauses. Handle array sections in reduction
5615 clause. Formatting fixes.
5616 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5617 if clause modifiers.
5618 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5619 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5620 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5621 c_parser_omp_clause_is_device_ptr): New functions.
5622 (c_parser_omp_clause_ordered): Parse optional parameter.
5623 (c_parser_omp_clause_reduction): Handle array reductions.
5624 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5625 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5626 functions.
5627 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5628 (c_parser_omp_clause_depend_sink): New function.
5629 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5630 (c_parser_omp_clause_map): Parse release/delete map kinds and
5631 optional always modifier.
5632 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5633 and c_finish_omp_clauses callers.
5634 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5635 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5636 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5637 (OMP_CRITICAL_CLAUSE_MASK): Define.
5638 (c_parser_omp_critical): Parse critical clauses.
5639 (c_parser_omp_for_loop): Handle doacross loops, adjust
5640 c_finish_omp_for and c_finish_omp_clauses callers.
5641 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5642 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5643 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5644 (c_parser_omp_for): Disallow ordered clause when combined with
5645 distribute. Disallow linear clause when combined with distribute
5646 and not combined with simd.
5647 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5648 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5649 parse clauses and if depend clause is found, don't parse a body.
5650 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5651 Allow target parallel without for after it.
5652 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5653 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5654 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5655 invalid kinds.
5656 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5657 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5658 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5659 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5660 functions.
5661 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5662 defaultmap and is_device_ptr clauses.
5663 (c_parser_omp_target): Parse target parallel and target simd. Set
5664 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5665 and target exit data. Diagnose invalid map kinds.
5666 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5667 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5668 construct.
5669 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5670 &omp_priv.
5671 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5672 (c_parser_omp_taskloop): New function.
5673 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5674 handle PRAGMA_OMP_TASKLOOP.
5675 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5676 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5677 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5678 Add IS_OMP argument, handle structure element bases, diagnose
5679 bitfields, pass IS_OMP recursively, diagnose known zero length
5680 array sections in depend clauses, handle array sections in reduction
5681 clause, diagnose negative length even for pointers.
5682 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5683 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5684 array sections in reduction clause, set
5685 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5686 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5687 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5688 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5689
21ba0cea
MP
56902015-10-06 Marek Polacek <polacek@redhat.com>
5691
5692 * c-parser.c (c_parser_statement_after_labels): Use
5693 protected_set_expr_location.
5694 (c_parser_omp_clause_num_gangs): Likewise.
5695 (c_parser_omp_clause_num_threads): Likewise.
5696 (c_parser_omp_clause_num_workers): Likewise.
5697 (c_parser_omp_clause_vector_length): Likewise.
5698 (c_parser_omp_clause_num_teams): Likewise.
5699 (c_parser_omp_clause_thread_limit): Likewise.
5700 * c-typeck.c (build_c_cast): Likewise.
5701 (c_cast_expr): Likewise.
5702
624d31fe
RS
57032015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5704
5705 * c-typeck.c (c_tree_equal): Use real_equal instead of
5706 REAL_VALUES_EQUAL.
5707
b8fd7909
JM
57082015-10-04 Jason Merrill <jason@redhat.com>
5709
5710 * c-parser.c (c_lex_one_token): Handle @synchronized.
5711 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5712 can change whether the function is transaction_safe.
5713
1c7485af
MP
57142015-10-02 Marek Polacek <polacek@redhat.com>
5715
5716 PR c/67730
5717 * c-typeck.c (convert_for_assignment): Use the expansion point
5718 location throughout.
5719
3e3b8d63
MP
57202015-10-02 Marek Polacek <polacek@redhat.com>
5721
5722 PR c/64249
5723 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5724 and pass it down to c_parser_if_statement.
5725 (c_parser_else_body): Add CHAIN parameter and pass it down to
5726 c_parser_statement_after_labels.
5727 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5728 duplicated if-else-if conditions.
5729
aabef2de
MP
57302015-10-01 Marek Polacek <polacek@redhat.com>
5731
5732 * c-typeck.c (convert_for_assignment): Improve commentary.
5733
de8ddd5f
MP
57342015-09-30 Marek Polacek <polacek@redhat.com>
5735
5736 PR c/67730
5737 * c-typeck.c (c_finish_return): Use the expansion point location for
5738 certain "return with value" warnings.
5739
c4914de6
MLI
57402015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5741
5742 * c-parser.c (pragma_lex): Add loc argument.
5743
0e36f5c7
MP
57442015-09-15 Marek Polacek <polacek@redhat.com>
5745
5746 PR c/67580
5747 * c-decl.c (tag_exists_p): New function.
5748 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5749 struct/union/enum keywords are missing.
5750 * c-tree.h (tag_exists_p): Declare.
5751
2f3bb934
MP
57522015-09-15 Marek Polacek <polacek@redhat.com>
5753
5754 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5755 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5756 Return NULL_TREE instead of 0.
5757 (lookup_name): Return NULL_TREE instead of 0.
5758 (lookup_name_in_scope): Likewise.
5759 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5760 (parser_xref_tag): Use false instead of 0.
5761 (start_struct): Use true instead of 1.
5762 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5763
aa256c4a
MP
57642015-09-14 Marek Polacek <polacek@redhat.com>
5765
5766 * c-typeck.c (set_nonincremental_init_from_string): Use
5767 HOST_WIDE_INT_M1U when shifting a negative value.
5768
dbb68221
MW
57692015-09-09 Mark Wielaard <mjw@redhat.com>
5770
5771 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5772 parm against NULL.
5773
a8a098ac
JJ
57742015-09-10 Jakub Jelinek <jakub@redhat.com>
5775
5776 PR c/67502
5777 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5778 into OMP_FOR_PRE_BODY rather than before the loop.
5779
f4b189d5
JJ
57802015-09-09 Jakub Jelinek <jakub@redhat.com>
5781
0bb99c11
JJ
5782 PR c/67501
5783 * c-parser.c (c_parser_oacc_all_clauses,
5784 c_parser_omp_all_clauses): Remove invalid clause from
5785 list of clauses even if parser->error is set.
5786
fce5e5e3
JJ
5787 PR c/67500
5788 * c-parser.c (c_parser_omp_clause_aligned,
5789 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5790 test for errors.
5791 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5792 error_mark_node.
5793
f4b189d5
JJ
5794 PR c/67495
5795 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5796 instead of c_parser_unary_expression. If the result is !lvalue_p,
5797 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5798
b2aaf235
MP
57992015-09-04 Marek Polacek <polacek@redhat.com>
5800
5801 PR sanitizer/67279
5802 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5803
1807ffc1
MS
58042015-09-03 Martin Sebor <msebor@redhat.com>
5805
5806 PR c/66516
8b652e65
JJ
5807 * c-typeck.c (convert_arguments, parser_build_unary_op,
5808 build_conditional_expr, c_cast_expr, convert_for_assignment,
5809 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5810 reject_gcc_builtin.
5811 (c_decl_implicit): Define.
5812
d04ff417
MP
58132015-09-02 Marek Polacek <polacek@redhat.com>
5814
5815 PR c/67432
5816 * c-parser.c (c_parser_enum_specifier): Give a better error for
5817 an empty enum.
5818
a79683d5
TS
58192015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5820
5821 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5822
191a6b94
MP
58232015-08-12 Marek Polacek <polacek@redhat.com>
5824
5825 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5826 LOC to it.
5827
420a9d9b
MP
58282015-08-03 Marek Polacek <polacek@redhat.com>
5829
5830 PR c/67088
5831 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5832 Use it.
5833 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5834
992118a1
PP
58352015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5836
5837 * c-parser.c (c_parser_if_body): Take token_indent_info
5838 argument. Call warn_for_misleading_indentation even when the
5839 body is a semicolon. Extract token_indent_infos corresponding
5840 to the guard, body and next tokens. Adjust call to
5841 warn_for_misleading_indentation accordingly.
5842 (c_parser_else_body): Likewise.
5843 (c_parser_if_statement): Likewise.
5844 (c_parser_while_statement): Likewise.
5845 (c_parser_for_statement): Likewise.
5846
46308474
LFSM
58472015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5848 Manuel López-Ibáñez <manu@gcc.gnu.org>
5849
5850 * c-decl.c (get_parm_info): Remove static var. Update warning
5851 message.
5852
05b28fd6
MP
58532015-07-27 Marek Polacek <polacek@redhat.com>
5854
5855 PR c++/66555
5856 PR c/54979
5857 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5858
451b5e48
MP
58592015-07-20 Marek Polacek <polacek@redhat.com>
5860
5861 PR c++/55095
5862 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5863 (build_binary_op): Warn about left shift overflows.
5864
1916bcb5
AM
58652015-07-09 Andrew MacLeod <amacleod@redhat.com>
5866
5867 * c-array-notation.c: Adjust includes for flags.h changes.
5868 * c-objc-common.c: Likewise.
5869
c7131fb2
AM
58702015-07-07 Andrew MacLeod <amacleod@redhat.com>
5871
5872 * c-array-notation.c: Adjust includes.
5873 * c-aux-info.c: Likewise.
5874 * c-convert.c: Likewise.
5875 * c-decl.c: Likewise.
5876 * c-errors.c: Likewise.
5877 * c-lang.c: Likewise.
5878 * c-objc-common.c: Likewise.
5879 * c-parser.c: Likewise.
5880 * c-typeck.c: Likewise.
5881
da2e71c9
MLI
58822015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5883
5884 PR fortran/66605
5885 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5886
b155cfd9
MP
58872015-06-29 Marek Polacek <polacek@redhat.com>
5888
5889 PR c/66322
5890 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5891 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5892 about -Wswitch-bool here.
5893 (do_case): Update c_add_case_label call.
5894 (c_finish_case): Update c_do_switch_warnings call.
5895
31521951
MP
58962015-06-27 Marek Polacek <polacek@redhat.com>
5897
5898 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5899
22d03525
MP
59002015-06-26 Marek Polacek <polacek@redhat.com>
5901
5902 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5903 INDIRECT_REF_P.
5904 * c-typeck.c (array_to_pointer_conversion): Likewise.
5905 (build_unary_op): Likewise.
5906 (c_finish_return): Likewise.
5907
f0889939
AM
59082015-06-25 Andrew MacLeod <amacleod@redhat.com>
5909
5910 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5911 * c-parser.c: Likewise.
5912
8d67ee55
RS
59132015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5914
5915 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5916 instead of pointer_hash.
5917 (detect_field_duplicates): Likewise.
5918
0ae9bd27
MP
59192015-06-25 Marek Polacek <polacek@redhat.com>
5920
5921 * c-array-notation.c: Use VAR_P throughout.
5922 * c-decl.c: Likewise.
5923 * c-objc-common.c: Likewise.
5924 * c-parser.c: Likewise.
5925 * c-typeck.c: Likewise.
5926
62f9079a
MP
59272015-06-25 Marek Polacek <polacek@redhat.com>
5928
5929 * c-decl.c: Use is_global_var throughout.
5930 * c-parser.c: Likewise.
5931 * c-typeck.c: Likewise.
5932
abb226c9
AM
59332015-06-17 Andrew MacLeod <amacleod@redhat.com>
5934
5935 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5936 * c-aux-info.c: Likewise.
5937 * c-convert.c: Likewise.
5938 * c-decl.c: Likewise.
5939 * c-errors.c: Likewise.
5940 * c-lang.c: Likewise.
5941 * c-objc-common.c: Likewise.
5942 * c-parser.c: Likewise.
5943 * c-typeck.c: Likewise.
5944
8cbababc
JH
59452015-06-11 Jan Hubicka <hubicka@ucw.cz>
5946
5947 PR middle-end/66325
5948 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5949 variants.
5950
a0349665
PMR
59512015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5952
5953 * c-decl.c (pop_scope): Register the main translation unit
5954 through the new debug hook.
5955
13fdf2e2
AM
59562015-06-08 Andrew MacLeod <amacleod@redhat.com>
5957
5958 * c-array-notation.c : Adjust include files.
5959 * c-aux-info.c : Likewise.
5960 * c-convert.c : Likewise.
5961 * c-decl.c : Likewise.
5962 * c-errors.c : Likewise.
5963 * c-lang.c : Likewise.
5964 * c-lang.h : Likewise.
5965 * c-objc-common.c : Likewise.
5966 * c-parser.c : Likewise.
5967 * c-typeck.c : Likewise.
5968
d7438551
AH
59692015-06-05 Aldy Hernandez <aldyh@redhat.com>
5970
5971 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5972 immediately clobber it.
5973 (c_write_global_declarations_1): Remove call to
5974 check_global_declaration_1.
5975 (c_write_global_declarations_2): Remove.
5976 (c_write_final_cleanups): Rename from c_write_global_declarations.
5977 Remove call to finalize_compilation_unit.
5978 Remove calls to debugging hooks.
5979 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5980 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5981 * c-tree.h: Remove c_write_global_declarations.
5982
ecb9f223
AM
59832015-06-04 Andrew MacLeod <amacleod@redhat.com>
5984
5985 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5986 * c-aux-info.c: Likewise.
5987 * c-convert.c: Likewise.
5988 * c-decl.c: Likewise.
5989 * c-errors.c: Likewise.
5990 * c-lang.c: Likewise.
5991 * c-objc-common.c: Likewise.
5992 * c-parser.c: Likewise.
5993 * c-typeck.c: Likewise.
5994
9482b620
MP
59952015-06-04 Marek Polacek <polacek@redhat.com>
5996
5997 PR c/66341
5998 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5999 it is a lvalue.
6000
bc51ace3
PK
60012015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6002
6003 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6004 Warn for empty struct.
6005 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6006
ea5b45b6
AT
60072015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6008
6009 * c-decl.c (start_function): Call plugin before parsing.
6010 (finish_function): Call plugin after parsing.
6011
c2d47482
PK
60122015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6013
6014 PR c/49551
6015 * c-decl.c (merge_decls): Merge DECL_COMMON.
6016
a95492ab
JW
60172015-05-22 Jim Wilson <jim.wilson@linaro.org>
6018
6019 * Make-lang.in (check_gcc_pallelize): Define.
6020
fd5c817a
MP
60212015-05-22 Marek Polacek <polacek@redhat.com>
6022
6023 PR c/47043
6024 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6025 attributes.
6026
c7b70a3c
MP
60272015-05-21 Marek Polacek <polacek@redhat.com>
6028
6029 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6030 DECL_BUILT_IN.
6031
21b634ae
MP
60322015-05-20 Marek Polacek <polacek@redhat.com>
6033
6034 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6035 * c-typeck.c: Likewise.
6036
296a8c2f
MP
60372015-05-19 Marek Polacek <polacek@redhat.com>
6038
6039 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6040
41b37d5e
JJ
60412015-05-19 Jakub Jelinek <jakub@redhat.com>
6042
6043 PR middle-end/66199
6044 * c-parser.c (c_parser_omp_for_loop): Don't add
6045 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6046 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6047 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6048 constructs.
6049
fab27f52
MM
60502015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6051
6052 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 6053 swaps.
fab27f52 6054
40de31cf
MLI
60552015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6056
6057 PR fortran/44054
6058 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6059 accessor function.
6060
3aa3c9fc
MP
60612015-05-14 Marek Polacek <polacek@redhat.com>
6062
6063 PR c/66066
6064 PR c/66127
6065 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6066 rather than with 0.
6067
c3388e62
DM
60682015-05-12 David Malcolm <dmalcolm@redhat.com>
6069
6070 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6071 to add a call to warn_for_misleading_indentation.
6072 (c_parser_else_body): Likewise, adding param "else_loc".
6073 (c_parser_if_statement): Check for misleading indentation.
6074 (c_parser_while_statement): Likewise.
6075 (c_parser_for_statement): Likewise.
6076
755e528f
MP
60772015-05-08 Marek Polacek <polacek@redhat.com>
6078
6079 PR c/64918
6080 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6081 (output_init_element): Likewise.
6082
0173bd2a
MP
60832015-05-07 Marek Polacek <polacek@redhat.com>
6084
6085 PR c/65179
6086 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6087 value.
6088
9babc352
MP
60892015-04-30 Marek Polacek <polacek@redhat.com>
6090
6091 * c-typeck.c (set_init_label): Call error_at instead of error and
6092 pass LOC to it.
6093
ac9f18db
MP
6094 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6095 the type of a decl.
6096
ec3fba51
MP
6097 * c-typeck.c (c_build_va_arg): Clarify the error message.
6098
b811915d
TS
60992015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6100
6101 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6102 OMP_STANDALONE_CLAUSES.
6103
f3075008
MP
61042015-04-28 Marek Polacek <polacek@redhat.com>
6105
6106 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6107
4e81b788
MP
61082015-04-28 Marek Polacek <polacek@redhat.com>
6109
6110 PR c/65901
6111 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6112
6c1db78e
MP
61132015-04-25 Marek Polacek <polacek@redhat.com>
6114
6115 PR c/52085
6116 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6117 attribute.
6118
5c4abbb8
MP
61192015-04-23 Marek Polacek <polacek@redhat.com>
6120
6121 PR c/65345
6122 * c-decl.c (set_labels_context_r): New function.
6123 (store_parm_decls): Call it via walk_tree_without_duplicates.
6124 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6125 instead of create_tmp_var. Build TARGET_EXPR instead of
6126 COMPOUND_EXPR.
6127 (build_atomic_assign): Use create_tmp_var_raw instead of
6128 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6129
06aca1d5
IV
61302015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6131
6132 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6133 (c_parser_omp_target_update): Add missed %> to error_at ().
6134
8fba1830
BRF
61352015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6136
6137 PR target/55143
6138 * c-decl.c (c_default_pointer_mode): Remove definition.
6139 * c-tree.h (c_default_pointer_mode): Remove declaration.
6140
62021f64
TB
61412015-03-27 Tobias Burnus <burnus@net-b.de>
6142
6143 PR c/65586
6144 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6145 error out.
6146 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6147 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6148 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6149
9b65e171
JJ
61502015-03-19 Jakub Jelinek <jakub@redhat.com>
6151
6152 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6153 attribute for DECL_EXTERNAL VAR_DECLs.
6154
17958621
JJ
61552015-03-11 Jakub Jelinek <jakub@redhat.com>
6156
6157 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6158 argument.
6159
7ccb1a11
JJ
61602015-03-10 Jakub Jelinek <jakub@redhat.com>
6161
6162 PR c/65120
6163 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6164 before preparing arguments to warn_logical_not_parentheses.
6165
01177669
JJ
61662015-03-09 Jakub Jelinek <jakub@redhat.com>
6167
6168 PR c/65120
6169 * c-typeck.c (parser_build_binary_op): Don't warn for
6170 !!x == y or !b == y where b is _Bool.
6171
802ac282
MP
61722015-03-09 Marek Polacek <polacek@redhat.com>
6173
6174 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6175 * c-decl.c (grokdeclarator): Likewise.
6176 * c-typeck.c (build_binary_op): Likewise.
6177
e5165b60
MP
61782015-02-27 Marek Polacek <polacek@redhat.com>
6179
6180 PR c/65228
6181 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6182
065d214c
MP
61832015-02-14 Marek Polacek <polacek@redhat.com>
6184
6185 PR c/64768
6186 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6187 declared through a typedef name.
6188
e5d9235b
MP
61892015-02-13 Marek Polacek <polacek@redhat.com>
6190
6191 PR c/65050
6192 * c-decl.c (grokdeclarator): Print also the type when giving
6193 the error message about array's incomplete element type.
6194
fa01ffcc
JJ
61952015-02-11 Jakub Jelinek <jakub@redhat.com>
6196
6197 PR c/64824
6198 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6199 check in the POP macro.
6200
c3e38a03
MP
62012015-02-09 Marek Polacek <polacek@redhat.com>
6202
6203 PR c/64856
6204 * c-typeck.c (process_init_element): Don't always wrap
6205 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6206 initializing a range of elements.
6207
4886ec8e
JJ
62082015-02-04 Jakub Jelinek <jakub@redhat.com>
6209
6210 PR c/64824
6211 PR c/64868
6212 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6213
c3e38a03 62142015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
6215
6216 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6217 processing enum declaration.
6218
7b33f0c8
MP
62192015-01-29 Marek Polacek <polacek@redhat.com>
6220
6221 PR c/64709
6222 * c-typeck.c (pop_init_level): If constructor_elements has
6223 exactly one element with integer_zerop value, set constructor_zeroinit
6224 to 1. Remove braces around warning_init call.
6225
dea63e49
JJ
62262015-01-27 Jakub Jelinek <jakub@redhat.com>
6227
6228 PR c/64766
6229 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6230 of FUNCTION_DECLs with error_mark_node.
6231
d38f7dce
JJ
62322015-01-26 Jakub Jelinek <jakub@redhat.com>
6233
6234 PR c/64778
6235 * c-typeck.c (convert_arguments): Return -1 if there are
6236 error_args, even if we've diagnosed too many arguments.
6237
cbf5d0e7
RB
62382015-01-21 Richard Biener <rguenther@suse.de>
6239
6240 PR middle-end/64313
6241 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6242 for builtins the user declared correctly.
6243
41dbbb37
TS
62442015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6245 Bernd Schmidt <bernds@codesourcery.com>
6246 Cesar Philippidis <cesar@codesourcery.com>
6247 James Norris <jnorris@codesourcery.com>
6248 Jakub Jelinek <jakub@redhat.com>
6249 Ilmir Usmanov <i.usmanov@samsung.com>
6250
6251 * c-parser.c: Include "gomp-constants.h".
6252 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6253 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6254 Use OMP_CLAUSE_SET_MAP_KIND.
6255 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6256 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6257 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6258 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6259 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6260 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6261 "copyout", "create", "delete", "deviceptr", "gang", "host",
6262 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6263 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6264 "present_or_create", "pcreate", "seq", "self", "vector",
6265 "vector_length", "wait", "worker".
6266 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6267 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6268 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6269 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6270 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6271 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6272 (c_parser_oacc_data_clause_deviceptr)
6273 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6274 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6275 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6276 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6277 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6278 (c_parser_oacc_parallel, c_parser_oacc_update)
6279 (c_parser_oacc_wait): New functions.
6280 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6281 (c_finish_oacc_data): New prototypes.
6282 * c-typeck.c: Include "gomp-constants.h".
6283 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6284 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6285 OMP_CLAUSE_SET_MAP_KIND.
6286 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6287 (c_finish_oacc_data): New functions.
6288 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6289 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6290 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6291 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6292 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6293 GOMP_MAP_FORCE_DEVICEPTR.
6294
adfac8df
JJ
62952015-01-09 Michael Collison <michael.collison@linaro.org>
6296
6297 * c-array-notation.c: Include hash-set.h, machmode.h,
6298 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6299 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6300 * c-aux-info.c: Ditto.
6301 * c-convert.c: Ditto.
6302 * c-decl.c: Ditto.
6303 * c-errors.c: Ditto.
6304 * c-lang.c: Dittoxs.
6305 * c-objc-common.c: Ditto.
6306 * c-parser.c: Ditto.
6307 * c-typeck.c: Include hash-set.h, machmode.h,
6308 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6309 fold-const.h, wide-int.h, inchash.h, real.h and
6310 fixed-value.h due to flattening of tree.h.
6311
2cc901dc
MP
63122015-01-07 Marek Polacek <polacek@redhat.com>
6313
6314 PR c/64417
6315 * c-typeck.c (process_init_element): Disallow initialization of
6316 a flexible array member with a string constant if the structure
6317 is in an array.
6318
5624e564
JJ
63192015-01-05 Jakub Jelinek <jakub@redhat.com>
6320
e5341100
JJ
6321 PR sanitizer/64344
6322 * c-typeck.c (convert_for_assignment, c_finish_return): For
6323 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6324 types also set in_late_binary_op around convert call.
6325 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6326 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6327 result on expr as last argument to ubsan_instrument_float_cast,
6328 if in_late_binary_op, don't use c_save_expr but save_expr.
6329
5624e564
JJ
6330 Update copyright years.
6331
5bd012f8
MP
63322015-01-05 Marek Polacek <polacek@redhat.com>
6333
6334 PR c/64423
6335 * c-typeck.c (build_array_ref): Pass loc down to
6336 warn_array_subscript_with_type_char.
6337
3f8257db 63382014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6339
6340 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6341 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6342 element type.
8e745a17 6343 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6344 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6345 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6346 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6347 to PEDWARN_FOR_QUALIFIERS.
768952be 6348
8f94a8c4
JJ
63492014-12-17 Jakub Jelinek <jakub@redhat.com>
6350
6351 PR sanitizer/64289
6352 * c-convert.c: Include ubsan.h.
6353 (convert): For real -> integral casts and
6354 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6355 instead instrument the float cast directly.
6356
b731b390
JJ
63572014-11-29 Jakub Jelinek <jakub@redhat.com>
6358
6359 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6360 c_finish_stmt_expr): Remove NULL last argument from
6361 create_tmp_var_raw and create_tmp_var calls.
6362 * c-array-notation.c (fix_builtin_array_notation_fn,
6363 build_array_notation_expr, fix_conditional_array_notations_1,
6364 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6365
541e35a6
MP
63662014-11-28 Marek Polacek <polacek@redhat.com>
6367
6368 PR c/63862
6369 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6370 convert the right operand to integer type.
6371
b286be94
MP
63722014-11-25 Marek Polacek <polacek@redhat.com>
6373
6374 PR c/63877
6375 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6376 for inline functions.
6377
aa7da51a
JJ
63782014-11-21 Jakub Jelinek <jakub@redhat.com>
6379
6380 PR target/63764
6381 * c-typeck.c (build_array_ref): Adjust
6382 convert_vector_to_pointer_for_subscript caller. If it returns true,
6383 call non_lvalue_loc on the result.
6384
d876207f
RB
63852014-11-11 Richard Biener <rguenther@suse.de>
6386
6387 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6388 to true.
6389
e5e44252
AK
63902014-11-10 Andi Kleen <ak@linux.intel.com>
6391
6392 PR c/60804
6393 * c-parser.c (c_parser_statement_after_labels): Call
6394 check_no_cilk.
6395 (c_parser_if_statement): Dito.
6396 (c_parser_switch_statement): Dito.
6397 (c_parser_while_statement): Dito.
6398 (c_parser_do_statement): Dito.
6399 (c_parser_for_statement): Dito.
6400 * c-typeck.c (c_finish_loop): Dito.
6401
13c21655
PC
64022014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6403
6404 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6405 OPT_Wshift_count_overflow in the warnings.
6406
2d51fcef
MP
64072014-10-30 Marek Polacek <polacek@redhat.com>
6408
6409 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6410 print the stripped version as well, if they're not the same.
6411
ef4bddc2
RS
64122014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6413
6414 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6415 machine_mode.
6416
c582198b
AM
64172014-10-28 Andrew MacLeod <amacleod@redhat.com>
6418
6419 * c-decl.c: Adjust include files.
6420 * c-parser.c: Ditto.
6421
ddc8de03
PM
64222014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6423 Tom Tromey <tromey@redhat.com>
6424
6425 * c-tree.h (enum c_oracle_request): New.
6426 (c_binding_oracle_function): New typedef.
6427 (c_binding_oracle, c_pushtag, c_bind): Declare.
6428 * c-decl.c (c_binding_oracle): New global.
6429 (I_SYMBOL_CHECKED): New macro.
6430 (i_symbol_binding): New function.
6431 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6432 (I_TAG_CHECKED): New macro.
6433 (i_tag_binding): New function.
6434 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6435 (I_LABEL_CHECKED): New macro.
6436 (i_label_binding): New function.
6437 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6438 (c_print_identifier): Save and restore c_binding_oracle.
6439 (c_pushtag, c_bind): New functions.
6440
60393bbc
AM
64412014-10-27 Andrew MacLeod <amacleod@redhat.com>
6442
6443 * c-typeck.c: Adjust include files.
6444
d723bb7c
MLI
64452014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6446
6447 PR c++/53061
6448 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6449 initialization here...
6450 (c_initialize_diagnostics): ... but here. Set defaults after
6451 building pretty-printer.
6452
1bc5a451
MP
64532014-10-23 Marek Polacek <polacek@redhat.com>
6454
6455 PR c/63626
6456 * c-decl.c (pop_scope): Don't print warning in external_scope.
6457
4435bb92
MP
64582014-10-19 Marek Polacek <polacek@redhat.com>
6459
6460 PR c/63567
6461 * c-typeck.c (output_init_element): Allow initializing objects with
6462 static storage duration with compound literals even in C99 and add
6463 pedwarn for it.
6464
7278465e
MP
64652014-10-17 Marek Polacek <polacek@redhat.com>
6466
6467 PR c/63567
6468 * c-typeck.c (digest_init): Allow initializing objects with static
6469 storage duration with compound literals even in C99 and add pedwarn
6470 for it.
6471
d9b7be2e
MP
64722014-10-17 Marek Polacek <polacek@redhat.com>
6473
6474 PR c/63543
6475 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6476 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6477 error multiple times. Print the type.
6478
f406ae1f
MP
64792014-10-17 Marek Polacek <polacek@redhat.com>
6480
6481 PR c/63549
6482 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6483 type.
6484
92574c7c
MP
64852014-10-17 Marek Polacek <polacek@redhat.com>
6486
6487 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6488 (start_function): Use OPT_Wimplicit_int instead of 0.
6489 (store_parm_decls_oldstyle): Likewise.
6490
1bc4a978
MT
64912014-10-17 Alan Modra <amodra@gmail.com>
6492
6493 PR middle-end/61848
6494 * c-decl.c (merge_decls): Don't merge section name or tls model
6495 to newdecl symtab node, instead merge to olddecl. Override
6496 existing olddecl section name. Set tls_model for all thread-local
6497 vars, not just OMP thread-private ones. Remove incorrect comment.
6498
83685514
AM
64992014-10-16 Andrew MacLeod <amacleod@redhat.com>
6500
6501 * c-decl.c: Adjust include files.
6502
78a7c317
DD
65032014-10-14 DJ Delorie <dj@redhat.com>
6504
6505 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6506 (c_token_starts_typename): Check all __intN, not just __int128.
6507 (c_token_starts_declspecs): Likewise.
6508 (c_parser_declspecs): Likewise.
6509 (c_parser_attribute_any_word): Likewise.
6510 (c_parser_objc_selector): Likewise.
6511 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6512 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6513 is specified.
6514 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6515 __int128.
6516 (finish_declspecs): Likewise.
6517
74d98c1e
AB
65182014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6519
8e745a17 6520 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6521 the duplicate code.
8e745a17 6522 (c_parser_statement): Call the new function.
74d98c1e 6523
84937de2
MP
65242014-10-09 Marek Polacek <polacek@redhat.com>
6525
6526 PR c/63480
6527 * c-typeck.c (pop_init_level): Don't warn about initializing
6528 with { }.
6529
0382aaa0
MP
65302014-10-07 Marek Polacek <polacek@redhat.com>
6531
6532 PR c/59717
6533 * c-decl.c (header_for_builtin_fn): New function.
6534 (implicitly_declare): Suggest which header to include.
6535
7a0ca710
MP
65362014-10-07 Marek Polacek <polacek@redhat.com>
6537
6538 * c-convert.c (convert): Use error_operand_p.
6539 * c-typeck.c (require_complete_type): Likewise.
6540 (really_atomic_lvalue): Likewise.
6541 (digest_init): Likewise.
6542 (handle_omp_array_sections_1): Likewise.
6543
6bc8a126
MP
65442014-10-03 Marek Polacek <polacek@redhat.com>
6545
6546 PR c/63453
6547 * c-decl.c (pop_scope): Don't warn about "inline function declared
6548 but never defined" for functions marked with gnu_inline attribute.
6549
d90c0a59
JJ
65502014-09-25 Jakub Jelinek <jakub@redhat.com>
6551
6552 PR c++/63249
6553 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6554 on low_bound and length.
6555
083e891e
MP
65562014-09-24 Marek Polacek <polacek@redhat.com>
6557
6558 PR c/61405
6559 PR c/53874
6560 * c-parser.c: Don't define CPP_KEYWORD.
6561 (c_parser_switch_statement): Pass original type to c_finish_case.
6562 * c-tree.h (c_finish_case): Update declaration.
6563 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6564 conditionally to c_do_switch_warnings.
6565
8d95fe25
MP
65662014-09-03 Marek Polacek <polacek@redhat.com>
6567
6568 PR c/62024
6569 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6570 conversions.
6571
9a771876
JJ
65722014-09-02 Jakub Jelinek <jakub@redhat.com>
6573 Balaji V. Iyer <balaji.v.iyer@intel.com>
6574 Igor Zamyatin <igor.zamyatin@intel.com>
6575
6576 * c-parser.c (c_parser_cilk_for): New function.
6577 (c_parser_cilk_grainsize): Likewise.
6578 (c_get_temp_regvar): Likewise.
6579 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6580 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6581 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6582 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6583 case.
6584
b7679d96
CG
65852014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6586
6587 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6588 with using HOST_WIDE_INT without truncation to 'int'
6589
59ea0364
MP
65902014-08-22 Marek Polacek <polacek@redhat.com>
6591
6592 PR c++/62199
6593 * c-typeck.c (parser_build_binary_op): Adjust call to
6594 warn_logical_not_parentheses.
6595
671a475e
IZ
65962014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6597
6598 PR other/62008
6599 * c-parser.c (c_parser_array_notation): Check for correct
6600 type of an array added.
6601
04159acf
MP
66022014-08-19 Marek Polacek <polacek@redhat.com>
6603
6604 PR c++/62153
6605 * c-typeck.c (build_binary_op): If either operand of a comparison
6606 is a boolean expression, call maybe_warn_bool_compare.
6607
c77935ee
PP
66082014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6609
6610 PR c/45584
6611 * c-typeck.c (build_c_cast): Do a conversion even when the
6612 TYPE_MAIN_VARIANTs are the same.
6613
35aff4fb
MP
66142014-08-19 Marek Polacek <polacek@redhat.com>
6615
6616 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6617 pedwarn_c99 instead of pedwarn.
6618 (grokfield): Likewise.
6619 (warn_defaults_to): New function.
6620 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6621 Unconditionally call pedwarn_c99 instead of pedwarn.
6622 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6623 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6624 check flag_isoc11 before.
6625 * c-errors.c (pedwarn_c99): Change the return type to bool.
6626 Handle -Wc99-c11-compat.
6627 * c-parser.c (disable_extension_diagnostics): Handle
6628 warn_c99_c11_compat.
6629 (restore_extension_diagnostics): Likewise.
6630 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6631 instead of pedwarn, don't check flag_isoc11 before.
6632 (c_parser_declspecs): Likewise.
6633 (c_parser_alignas_specifier): Likewise.
6634 (c_parser_alignof_expression): Likewise.
6635 (c_parser_generic_selection): Likewise.
6636 * c-tree.h (pedwarn_c99): Update declaration.
6637 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6638 of pedwarn_c99.
6639
177cce46
MP
66402014-08-19 Marek Polacek <polacek@redhat.com>
6641
6642 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6643 to pedwarn_c90.
6644 * c-errors.c: Include "opts.h".
6645 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6646 * c-parser.c (disable_extension_diagnostics): Handle negative value
6647 of warn_c90_c99_compat, too.
6648 (restore_extension_diagnostics): Likewise.
6649 (c_parser_compound_statement_nostart): Pass
6650 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6651
6dc99c33
MP
66522014-08-12 Marek Polacek <polacek@redhat.com>
6653
6654 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6655 Add pedwarn.
6656 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6657 Likewise.
6658 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6659
3f8257db 66602014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6661
6662 PR c/51849
6663 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6664 Call pedwarn_c90 instead of pedwarn.
6665 (check_bitfield_type_and_width): Likewise.
6666 (declspecs_add_qual): Likewise.
6667 (declspecs_add_type): Likewise.
6668 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6669 Adjust to only call pedwarn_c90.
6670 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6671 pedwarn_c90 instead of pedwarn.
6672 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6673 * c-parser.c (disable_extension_diagnostics): Handle
6674 warn_c90_c99_compat.
6675 (restore_extension_diagnostics): Likewise.
6676 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6677 pedwarn_c90 instead of pedwarn.
6678 (c_parser_initelt): Likewise.
6679 (c_parser_postfix_expression): Likewise.
6680 (c_parser_postfix_expression_after_paren_type): Likewise.
6681 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6682 * c-tree.h: Fix formatting.
6683 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6684 pedwarn_c90 instead of pedwarn.
6685
9f25a338
TS
66862014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6687
6688 * c-typeck.c: Remove include of pointer-set.h.
6689
044331a8
MP
66902014-08-07 Marek Polacek <polacek@redhat.com>
6691
6692 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6693
b787e7a2
TS
66942014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6695
6696 * c-typeck.c: Use hash_map instead of pointer_map.
6697
6e2830c3
TS
66982014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6699
6700 * c-decl.c: Use hash_set instead of pointer_set.
6701
a7ee52fb
IZ
67022014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6703
6704 PR middle-end/61455
6705 * c-array-notation.c (expand_array_notations): Handling
6706 of DECL_EXPR added.
6707
b4dfdc11
MG
67082014-07-31 Marc Glisse <marc.glisse@inria.fr>
6709
6710 PR c++/60517
6711 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6712 a local variable.
6713
976d5a22
TT
67142014-07-30 Tom Tromey <tromey@redhat.com>
6715
6716 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6717 field.
6718 (really_start_incremental_init, push_init_level): Initialize
6719 designator_depth.
6720 (pop_init_level): Set global designator_depth.
6721 (process_init_element): Check for designated_init attribute.
6722
30281de2
MP
67232014-07-20 Marek Polacek <polacek@redhat.com>
6724
6725 PR c/61852
6726 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6727 (implicitly_declare): Pass location to implicit_decl_warning.
6728
b108f48f
JJ
67292014-07-14 Jakub Jelinek <jakub@redhat.com>
6730
6731 PR middle-end/61294
6732 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6733 If non-NULL, call c_parser_check_literal_zero.
6734 (c_parser_check_literal_zero): New function.
6735 (c_parser_postfix_expression_after_primary): Adjust
6736 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6737
773ec47f
MP
67382014-07-06 Marek Polacek <polacek@redhat.com>
6739
6740 PR c/6940
6741 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6742 * c-tree.h (C_ARRAY_PARAMETER): Define.
6743 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6744 function parameter.
6745
22e1cf1c 67462014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6747 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6748
6749 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6750 releasing symbol.
6751
52ec0ea3
MP
67522014-07-01 Marek Polacek <polacek@redhat.com>
6753
6754 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6755 instead of 0 to WARN_FOR_ASSIGNMENT.
6756
d5c3d343
MP
67572014-07-01 Marek Polacek <polacek@redhat.com>
6758
6759 PR c/58286
6760 * c-typeck.c (convert_for_assignment): Pass
6761 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6762
6a7253a4
MP
67632014-06-30 Marek Polacek <polacek@redhat.com>
6764
6765 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6766 has no_sanitize_undefined attribute.
6767
5e88a8f4
IZ
67682014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6769
6770 PR middle-end/57541
6771 * c-array-notation.c (fix_builtin_array_notation_fn):
6772 Check for 0 arguments in builtin call. Check that bultin argument is
6773 correct.
6774 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6775 index.
6776
9698b078
SH
67772014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6778
6779 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6780 qualifiers in __auto_type for atomic types.
6781 (c_parser_typeof_specifier): Discard all type qualifiers in
6782 __typeof__ for atomic types.
6783
6e07c515
MP
67842014-06-25 Marek Polacek <polacek@redhat.com>
6785
6786 PR c/61162
6787 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6788 the return expression to c_finish_return.
6789
da6f124d
JJ
67902014-06-25 Jakub Jelinek <jakub@redhat.com>
6791
6792 * c-typeck.c (c_finish_omp_clauses): Make sure
6793 OMP_CLAUSE_LINEAR_STEP has correct type.
6794
c203e8a7
TS
67952014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6796
6797 * c-decl.c: Adjust.
6798
56ad0e38
JJ
67992014-06-24 Jakub Jelinek <jakub@redhat.com>
6800
6801 * c-parser.c (c_parser_omp_for_loop): For
6802 #pragma omp parallel for simd move lastprivate clause from parallel
6803 to for rather than simd.
6804
47c2554f
MP
68052014-06-23 Marek Polacek <polacek@redhat.com>
6806
6807 * c-typeck.c (parser_build_binary_op): Don't call
6808 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6809
56363ffd
JH
68102014-06-15 Jan Hubicka <hubicka@ucw.cz>
6811
6812 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6813 * c-decl.c (merge_decls): Likewise.
6814
d7ff7ae5
MP
68152014-06-09 Marek Polacek <polacek@redhat.com>
6816
6817 PR c/36446
6818 * c-typeck.c (error_init): Call inform instead of error_at.
6819 (pedwarn_init): Call inform instead of pedwarn.
6820 (warning_init): Call inform instead of warning_at.
6821
24d047a3
JH
68222014-06-07 Jan Hubicka <hubicka@ucw.cz>
6823
6824 * c-decl.c (merge_decls): Use set_decl_section_name.
6825 (duplicate_decls): Remove node if it exists.
6826
9bac5cbb
G
68272014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6828
6829 PR c/53119
6830 * c-typeck.c (push_init_level, process_init_element,
6831 pop_init_level): Correct check for zero initialization, move
6832 missing brace warning to respect zero initialization.
6833
8ffcdea8
MP
68342014-06-05 Marek Polacek <polacek@redhat.com>
6835
6836 PR c/56724
6837 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6838
742938c9
MP
68392014-06-05 Marek Polacek <polacek@redhat.com>
6840
6841 PR c/49706
6842 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6843 on the left hand side operand of a comparison.
742938c9 6844
6447c55d
MP
68452014-06-05 Marek Polacek <polacek@redhat.com>
6846
6847 PR c/48062
6848 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6849 Print note only if the warning was printed.
6850
9dc7743c
IZ
68512014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6852
6853 PR c/58942
6854 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6855 with a pointer.
6856
fedfecef
MP
68572014-06-03 Marek Polacek <polacek@redhat.com>
6858
6859 PR c/60439
6860 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6861 c_start_case.
6862 * c-tree.h (c_start_case): Update.
6863 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6864 switch condition has boolean value.
6865
9b2b7279
AM
68662014-06-02 Andrew MacLeod <amacleod@redhat.com>
6867
6868 * c-decl.c: Include builtins.h.
6869 * c-parser.c: Likewise.
6870
5c1bc275
MP
68712014-05-27 Marek Polacek <polacek@redhat.com>
6872
6873 PR c/56724
6874 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6875 error and warning calls to error_at and warning_at. Pass location of
6876 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6877 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6878 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6879
97563bc8
IZ
68802014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6881
6882 PR c/61191
6883 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6884 function parameters.
6885
aede2c10
JH
68862014-05-23 Jan Hubicka <hubicka@ucw.cz>
6887
6888 * c-decl.c (merge_decls): Preserve symtab node pointers.
6889 (duplicate_decls): Free new decl.
6890
edbba2ce
TS
68912014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6892
f3316c6d
TS
6893 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6894 initialization.
6895
edbba2ce
TS
6896 * c-parser.c (c_parser_omp_target): Return bool values.
6897
68c81f24
TS
68982014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6899
6900 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6901 num_teams_loc variable to num_thread_limit_loc.
6902
632f2871
RS
69032014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6904
6905 * c-array-notation.c (expand_array_notations): Use void_node
6906 instead of void_zero_node.
6907
766090c2
TS
69082014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6909
6910 * c-decl.c (finish_struct): Adjust.
6911 (finish_enum): Likewise.
6912 (bind): Adjust.
6913 (record_inline_static): Likewise.
6914 (push_scope): Likewise.
6915 (make_label): Likewise.
6916 (lookup_label_for_goto): Likewise.
6917 (finish_struct): Likewise.
6918 (finish_enum): Likewise.
6919 (store_parm_decls): Likewise.
6920 (c_push_function_context): Likewise.
6921 * c-lang.h: Remove usage of variable_size gty attribute.
6922 * c-parser.c (c_parse_init): Adjust.
6923 (c_parse_file): Likewise.
6924
2b107f6b
MP
69252014-05-13 Marek Polacek <polacek@redhat.com>
6926
6927 PR c/61162
6928 * c-typeck.c (convert_for_assignment): Pass location to
6929 WARN_FOR_ASSIGNMENT instead of input_location.
6930
d033409e
MP
69312014-05-10 Marek Polacek <polacek@redhat.com>
6932
6933 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6934 maybe_warn_string_init.
6935 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6936 maybe_warn_string_init.
6937 * c-tree.h (maybe_warn_string_init): Update declaration.
6938 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6939 Call pedwarn_init with loc instead of with input_location.
6940 (digest_init): Pass init_loc to maybe_warn_string_init.
6941 (pop_init_level): Call pedwarn_init with loc instead of with
6942 input_location.
6943 (set_init_index): Likewise.
6944 (process_init_element): Likewise.
6945
ea58ef42
MP
69462014-05-09 Marek Polacek <polacek@redhat.com>
6947
6948 PR c/61096
6949 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6950 (c_parser_initelt): Pass location to set_init_label. Pass array index
6951 location to set_init_index.
6952 * c-tree.h (push_init_level): Update declaration.
6953 (pop_init_level): Likewise.
6954 (set_init_index): Likewise.
6955 (set_init_label): Likewise.
6956 * c-typeck.c (error_init): Add location parameter. Call error_at
6957 instead of error.
6958 (digest_init): Pass init_loc to error_init.
6959 (really_start_incremental_init):
6960 (push_init_level): Add location parameter. Pass loc to pop_init_level
6961 and error_init.
6962 (pop_init_level): Likewise.
6963 (set_designator): Add location parameter. Pass loc to pop_init_level,
6964 push_init_level, and error_init.
6965 (set_init_index): Add location parameter. Pass loc to error_init and
6966 set_designator.
6967 (set_init_label): Likewise.
6968 (output_init_element): Pass loc to error_init.
6969 (process_init_element): Pass loc to error_init, pop_init_level,
6970 pedwarn_init, and push_init_level.
6971
661a0813
MP
69722014-05-09 Marek Polacek <polacek@redhat.com>
6973
6974 PR c/50459
6975 * c-parser.c (c_parser_attributes): Parse the arguments as an
6976 expression-list if the attribute takes identifier.
6977
2793eeab
MP
69782014-05-08 Marek Polacek <polacek@redhat.com>
6979
6980 PR c/61053
6981 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6982 TYPE_ALIGN_UNIT.
6983
f827930a
MP
69842014-05-08 Marek Polacek <polacek@redhat.com>
6985
6986 PR c/61077
6987 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6988 of main.
6989
1d60af08
KZ
69902014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6991 Mike Stump <mikestump@comcast.net>
6992 Richard Sandiford <rdsandiford@googlemail.com>
6993
6994 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6995 (finish_enum): Use wide-int interfaces.
6996 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6997 * c-typeck.c (build_c_cast): Likewise.
6998 (set_nonincremental_init_from_string): Likewise.
6999 (c_tree_equal): Likewise.
7000
a0e24419
MP
70012014-05-02 Marek Polacek <polacek@redhat.com>
7002
7003 PR c/25801
7004 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7005 Return size_one_node when the type is not complete.
7006 (pointer_diff): Remove comment.
7007 (build_unary_op): Improve error messages.
7008
19fc9faa
MP
70092014-05-02 Marek Polacek <polacek@redhat.com>
7010
7011 * c-typeck.c (c_finish_return): Separate warning_at calls.
7012
63bc4e87
MP
70132014-05-02 Marek Polacek <polacek@redhat.com>
7014
7015 * c-tree.h (error_init): Remove declaration.
7016 (pedwarn_init): Likewise.
7017 * c-typeck.c (error_init): Make static and move above.
7018 (pedwarn_init): Likewise.
7019 (warning_init): Move above.
7020 (maybe_warn_string_init): Likewise.
7021
4bd2511b
JL
70222014-05-01 Jeff Law <law@redhat.com>
7023
7024 Revert:
7025
7026 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7027 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7028 avoid goto.
7029
6a358dcb
MP
70302014-05-02 Marek Polacek <polacek@redhat.com>
7031
7032 PR c/60784
7033 * c-typeck.c (push_init_level): Set constructor_designated to
7034 p->designated for structures.
7035
ae5ebda4
MP
70362014-05-01 Marek Polacek <polacek@redhat.com>
7037
7038 PR c/60915
7039 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7040 function-definition has an attribute after the declarator.
7041
96b40f8d
MP
70422014-05-01 Marek Polacek <polacek@redhat.com>
7043
7044 PR c/60257
7045 * c-typeck.c (warning_init): Add location_t parameter. Call
7046 warning_at instead of warning.
7047 (push_init_level): Pass input_location to warning_init.
7048 (add_pending_init): Add location_t parameter. Pass loc to
7049 warning_init.
7050 (set_nonincremental_init): Pass input_location to add_pending_init.
7051 (set_nonincremental_init_from_string): Likewise.
7052 (output_init_element): Pass loc to warning_init and to
7053 add_pending_init.
7054
32e00768
MP
70552014-05-01 Marek Polacek <polacek@redhat.com>
7056
7057 PR c/43395
7058 * c-typeck.c (c_finish_return): Distinguish between label and variable
7059 when warning about returning local address.
7060
c9379ce2
MP
70612014-05-01 Marek Polacek <polacek@redhat.com>
7062
7063 PR c/29467
7064 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7065 in C89 mode.
7066
d00887e8
MP
70672014-05-01 Marek Polacek <polacek@redhat.com>
7068
7069 PR c/43245
7070 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7071 instead of 0 to WARN_FOR_QUALIFIERS.
7072
5436fa2e
MP
70732014-05-01 Marek Polacek <polacek@redhat.com>
7074
7075 PR c/56989
7076 * c-typeck.c (default_conversion): Use better location for
7077 error call.
7078
f8ed5150
MP
70792014-04-30 Marek Polacek <polacek@redhat.com>
7080
7081 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7082 also when SANITIZE_FLOAT_DIVIDE is on.
7083
8337d1db
MP
70842014-04-30 Marek Polacek <polacek@redhat.com>
7085
7086 PR c/60139
7087 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7088 and pedwarn_init. Use loc insted of input_location.
7089
c4bdc42f
MP
70902014-04-30 Marek Polacek <polacek@redhat.com>
7091
7092 PR c/60351
7093 * c-typeck.c (build_binary_op): Use location when warning about
7094 shift count.
7095
45484dcf
MP
70962014-04-25 Marek Polacek <polacek@redhat.com>
7097
7098 PR c/18079
7099 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7100 always_inline/noinline and hot/cold attributes.
7101
34cf811f
MP
71022014-04-25 Marek Polacek <polacek@redhat.com>
7103
7104 PR c/60114
7105 * c-parser.c (c_parser_initelt): Pass input_location to
7106 process_init_element.
7107 (c_parser_initval): Pass loc to process_init_element.
7108 * c-tree.h (process_init_element): Adjust declaration.
7109 * c-typeck.c (push_init_level): Pass input_location to
7110 process_init_element.
7111 (pop_init_level): Likewise.
7112 (set_designator): Likewise.
7113 (output_init_element): Add location_t parameter. Pass loc to
7114 digest_init.
7115 (output_pending_init_elements): Pass input_location to
7116 output_init_element.
7117 (process_init_element): Add location_t parameter. Pass loc to
7118 output_init_element.
7119
42056eac
JJ
71202014-04-24 Jakub Jelinek <jakub@redhat.com>
7121
7122 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7123 atomic-clause, allow comma in between atomic-clause and
7124 seq_cst.
7125
e162a134
JJ
71262014-04-22 Jakub Jelinek <jakub@redhat.com>
7127
7128 PR c/59073
7129 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7130 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7131
2f6babac
IZ
71322014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7133
7134 PR middle-end/60469
7135 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7136 create_tmp_var instead build_decl for creating temps.
7137 (build_array_notation_expr): Likewise.
7138 (fix_conditional_array_notations_1): Likewise.
7139 (fix_array_notation_expr): Likewise.
7140 (fix_array_notation_call_expr): Likewise.
7141
8edbfaa6
JJ
71422014-03-28 Jakub Jelinek <jakub@redhat.com>
7143
7144 PR c++/60689
7145 * c-tree.h (c_build_function_call_vec): New prototype.
7146 * c-typeck.c (build_function_call_vec): Don't call
7147 resolve_overloaded_builtin here.
7148 (c_build_function_call_vec): New wrapper function around
7149 build_function_call_vec. Call resolve_overloaded_builtin here.
7150 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7151 Call c_build_function_call_vec instead of build_function_call_vec.
7152 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7153 * c-decl.c (finish_decl): Likewise.
7154
7485aeea
MLI
71552014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7156
7157 PR c/55383
7158 * c-typeck.c: Use correct format string in cast-qual warning
7159
b17a8b07
TS
71602014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7161
7162 * c-decl.c (c_decl_attributes): Use
7163 lang_hooks.types.omp_mappable_type.
7164 * c-typeck.c (c_finish_omp_clauses): Likewise.
7165
3af9c5e9
MP
71662014-03-06 Marek Polacek <polacek@redhat.com>
7167
7168 PR c/60197
7169 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7170 of checking tree code.
7171
1c9f5f33
PK
71722014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7173
7174 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7175 (c_parser_parameter_declaration): Likewise.
7176
cc28fc7f
MP
71772014-02-19 Marek Polacek <polacek@redhat.com>
7178
7179 PR c/60195
7180 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7181 Call mark_exp_read on exp.value.
7182 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7183 TREE_ADDRESSABLE on old instead of val.
7184 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7185
b581c05c
PK
71862014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7187
7188 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7189 C_EXPR_APPEND by vec_safe_push.
7190 * c-tree.h (C_EXPR_APPEND): Remove.
7191
81e5eca8
MP
71922014-01-31 Marek Polacek <polacek@redhat.com>
7193
7194 PR c/59963
7195 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7196 build_function_call_vec.
7197 (build_function_call): Likewise.
7198 (build_atomic_assign): Likewise.
7199 (build_function_call_vec): Add arg_loc parameter. Use it.
7200 (convert_arguments): Likewise.
7201 (convert_for_assignment): Rename rhs_loc to expr_loc.
7202 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7203 (c_parser_objc_keywordexpr): Likewise.
7204 (c_parser_postfix_expression_after_primary): Call
7205 build_function_call_vec with expr_loc rather than op_loc.
7206 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7207 build_function_call_vec.
7208 (c_parser_expr_list): Add locations parameter. Fill it with locations
7209 of function arguments.
7210 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7211
68fca595
MP
72122014-01-30 Marek Polacek <polacek@redhat.com>
7213
7214 PR c/59940
7215 * c-typeck.c (build_function_call_vec): Use loc parameter.
7216 (convert_arguments): Add location parameter. Use it.
7217 (ep_convert_and_check): Likewise.
7218 (build_atomic_assign): Adjust convert_for_assignment call.
7219 (build_modify_expr): Likewise.
7220 (digest_init): Likewise.
7221 (c_finish_return): Likewise.
7222 (build_conditional_expr): Adjust ep_convert_and_check calls.
7223 (convert_for_assignment): Add rhs_loc parameter. Use it.
7224 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7225 calls.
7226
fa337f3a
RB
72272014-01-30 Richard Biener <rguenther@suse.de>
7228
7229 PR c/59905
7230 * c-typeck.c (build_function_call_vec): Do not replace calls
7231 to a function via an incompatible type with a runtime abort.
7232
b72271b9
BI
72332014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7234
7235 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7236 flag_enable_cilkplus with flag_cilkplus.
7237 (c_parser_direct_declarator_inner): Likewise.
7238 (c_parser_attribute_any_word): Likewise.
7239 (c_parser_attributes): Likewise.
7240 (c_parser_compound_statement): Likewise.
7241 (c_parser_statement_after_labels): Likewise.
7242 (c_parser_if_statement): Likewise.
7243 (c_parser_switch_statement): Likewise.
7244 (c_parser_do_statement): Likewise.
7245 (c_parser_for_statement): Likewise.
7246 (c_parser_unary_expression): Likewise.
7247 (c_parser_postfix_expression): Likewise.
7248 (c_parser_postfix_expression_after_primary): Likewise.
7249 (c_parser_postfix_expression_after_primary): Likewise.
7250 (c_parser_omp_clause_name): Likewise.
7251 (c_finish_omp_declare_simd): Likewise.
7252 (c_parser_cilk_verify_simd): Likewise.
7253 * c-typeck.c (build_array_ref): Likewise.
7254 (build_function_call_vec): Likewise.
7255 (convert_arguments): Likewise.
7256 (build_compound_expr): Likewise.
7257 (c_finish_return): Likewise.
7258 (c_finish_if_stmt): Likewise.
7259 (c_finish_loop): Likewise.
7260 (build_binary_op): Likewise.
7261
393e8e8b
MP
72622014-01-23 Marek Polacek <polacek@redhat.com>
7263
7264 PR c/59846
7265 * c-typeck.c (parser_build_binary_op): Use location instead of
7266 input_location.
7267 (build_binary_op): Pass location to shorten_compare.
7268
f04dda30
MP
72692014-01-23 Marek Polacek <polacek@redhat.com>
7270
7271 PR c/58346
7272 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7273 an empty aggregate.
7274
789eadcd
MP
72752014-01-23 Marek Polacek <polacek@redhat.com>
7276
7277 PR c/59871
7278 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7279 of a comma expression.
7280 (emit_side_effect_warnings): Likewise.
7281
40f14e9f
BI
72822014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7283
7284 PR c/59825
7285 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7286 function to use walk_tree and moved a lot of its functionality to
7287 expand_array_notations.
7288 (expand_array_notations): New function.
7289
74558dd9
BI
72902014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7291
7292 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7293 attribute an attribute without value.
7294
652fea39
JJ
72952014-01-23 Jakub Jelinek <jakub@redhat.com>
7296
7297 PR middle-end/58809
7298 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7299 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7300
f34f1c87
MP
73012014-01-22 Marek Polacek <polacek@redhat.com>
7302
7303 PR c/59891
7304 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7305 of remove_c_maybe_const_expr on op1 and op2.
7306
241f845a
JJ
73072014-01-15 Jakub Jelinek <jakub@redhat.com>
7308
7309 PR c/58943
7310 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7311 effects, preevaluate rhs using SAVE_EXPR first.
7312
9a74f20c
BI
73132014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7314
7315 PR c++/59631
7316 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7317 statements with if-elseif statements.
7318
96066ce1
MP
73192014-01-06 Marek Polacek <polacek@redhat.com>
7320
7321 PR c/57773
7322 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7323 defined bit-field types only in ISO C.
7324
23a5b65a
RS
73252014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7326
7327 Update copyright years
7328
f9030485
RS
73292014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7330
7331 * c-array-notation.c: Use the standard form for the copyright notice.
7332
41958c28
BI
73332013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7334
7335 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7336 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7337 field in parser is not empty. If not-empty, call the function
7338 c_parser_finish_omp_declare_simd.
7339 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7340 between SIMD-enabled functions and #pragma simd. Added new parameter.
7341 (c_parser_cilk_all_clauses): Modified the usage of the function
7342 c_parser_cilk_clause_vectorlength as mentioned above.
7343 (c_parser_cilk_simd_fn_vector_attrs): New function.
7344 (c_finish_cilk_simd_fn_tokens): Likewise.
7345 (is_cilkplus_vector_p): Likewise.
7346 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7347 "nomask," and "mask" strings in clause name.
7348 (c_parser_omp_all_clauses): Added 3 new case statements:
7349 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7350 PRAGMA_CILK_CLAUSE_NOMASK.
7351 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7352 check for vector attribute and if so call the function
7353 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7354 called the function c_finish_cilk_simd_fn_tokens.
7355 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7356 parser field is non-empty. If so, parse them as you would parse
7357 the omp declare simd pragma.
7358 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7359 Added a check when step is a parameter and flag it as error.
7360 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7361 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7362 pragma_omp_clause.
7363
cef0fd0e
TS
73642013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7365
7366 * c-parser.c (c_parser_omp_parallel): Fix description.
7367
12893402
BI
73682013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7369
7370 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7371 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7372 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7373 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7374
296674db
JM
73752013-12-04 Joseph Myers <joseph@codesourcery.com>
7376
7377 PR c/52023
7378 * c-parser.c (c_parser_alignas_specifier): Use
7379 c_sizeof_or_alignof_type instead of c_alignof.
7380 (c_parser_alignof_expression): Likewise, with min_alignof
7381 parameter depending on alignof spelling used.
7382
edd28054
MP
73832013-12-04 Marek Polacek <polacek@redhat.com>
7384
7385 PR c/54113
7386 * c-decl.c (start_function): Don't warn for missing prototype for
7387 inline functions.
7388
da0fc454
MP
73892013-12-03 Marek Polacek <polacek@redhat.com>
7390
7391 PR c/59351
7392 * c-decl.c (build_compound_literal): Allow compound literals with
7393 empty initial value.
7394
4c2ecab0
JM
73952013-12-02 Joseph Myers <joseph@codesourcery.com>
7396
7397 PR c/58235
7398 * c-typeck.c (build_modify_expr): Diagnose assignment to
7399 expression with array type.
7400
340baef7
JM
74012013-11-29 Joseph Myers <joseph@codesourcery.com>
7402
7403 PR c/42262
7404 * c-typeck.c (process_init_element): Do not treat a string as
7405 initializing a whole array when used with a designator for an
7406 individual element.
7407
6763b9f7
JM
74082013-11-29 Joseph Myers <joseph@codesourcery.com>
7409
7410 PR c/57574
7411 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7412 an inline function following a static declaration.
7413
e7bd1de1
JJ
74142013-11-28 Jakub Jelinek <jakub@redhat.com>
7415
7416 PR c/59310
7417 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7418 to p_name before calling c_parser_omp_teams instead of after.
7419 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7420 argument. Remove unused p_name variable.
7421
0136f8f0
AH
74222013-11-27 Aldy Hernandez <aldyh@redhat.com>
7423 Jakub Jelinek <jakub@redhat.com>
7424
7425 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7426 external_scope is NULL.
7427
241b71bb
TV
74282013-11-27 Tom de Vries <tom@codesourcery.com>
7429 Marc Glisse <marc.glisse@inria.fr>
7430
7431 PR c++/59032
7432 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7433
2fb9a547
AM
74342013-11-22 Andrew MacLeod <amacleod@redhat.com>
7435
7436 * c-typeck.c: Add required include files from gimple.h.
7437
8400e75e
DM
74382013-11-22 David Malcolm <dmalcolm@redhat.com>
7439
7440 * c-decl.c (define_label, shadow_tag_warned)
7441 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7442 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7443 (declspecs_add_type): Remove use of in_system_header macro.
7444 * c-parser.c (c_parser_unary_expression): Likewise.
7445 * c-typeck.c (store_init_value, process_init_element)
7446 (c_start_case): Likewise.
7447
7448 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7449 macro.
7450
7451 * c-parser.c (c_parser_set_source_position_from_token): Remove
7452 reference to in_system_header from comment.
7453
386b1f1f
RS
74542013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7455
7456 * c-decl.c (grokdeclarator): Update comment to refer to
7457 tree_to_[su]hwi rather than tree_low_cst.
7458
ae7e9ddd
RS
74592013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7460
7461 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7462 tree_to_uhwi throughout.
7463
9439e9a1
RS
74642013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7465
7466 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7467 throughout.
7468
9541ffee
RS
74692013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7470
7471 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7472 throughout.
7473
c02065fc
AH
74742013-11-15 Aldy Hernandez <aldyh@redhat.com>
7475
7476 * c-parser.c (c_parser_cilk_simd): New.
7477 (c_parser_cilk_verify_simd): New.
7478 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7479 (c_parser_omp_for_loop): Add case for NE_EXPR.
7480 Set c_break_label for CILK_SIMD.
7481 (c_parser_cilk_clause_vectorlength): New.
7482 (c_parser_cilk_clause_linear): New.
7483 (c_parser_cilk_clause_name): New.
7484 (c_parser_cilk_all_clauses): New.
7485 * c-typeck.c (build_unary_op): Pass location argument to
7486 readonly_error.
7487 (build_modify_expr): Same.
7488 (build_asm_expr): Same.
7489 (c_finish_bc_stmt): Error on break/continue in loops.
7490
18f429e2
AM
74912013-11-14 Andrew MacLeod <amacleod@redhat.com>
7492
7493 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7494
d8a2d370
DN
74952013-11-14 Diego Novillo <dnovillo@google.com>
7496
7497 * c-decl.c: Include print-tree.h.
7498 Include stor-layout.h.
7499 Include varasm.h.
7500 Include attribs.h.
7501 Include stringpool.h.
7502 * c-lang.c: Include fold-const.h.
7503 * c-parser.c: Include stringpool.h.
7504 Include attribs.h.
7505 Include stor-layout.h.
7506 Include varasm.h.
7507 Include trans-mem.h.
7508 * c-typeck.c: Include stor-layout.h.
7509 Include trans-mem.h.
7510 Include varasm.h.
7511 Include stmt.h.
7512
38b7bc7f
JM
75132013-11-13 Joseph Myers <joseph@codesourcery.com>
7514
7515 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7516 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7517 __auto_type.
7518 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7519 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7520 RID_AUTO_TYPE.
7521 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7522 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7523 (c_parser_declarator, c_parser_direct_declarator_inner)
7524 (c_parser_parameter_declaration, c_parser_type_name): All callers
7525 changed.
7526 (c_parser_declaration_or_fndef): Handle declarations with type
7527 determined from the initializer.
7528
45b0be94
AM
75292013-11-12 Andrew MacLeod <amacleod@redhat.com>
7530
18f429e2 7531 * c-typeck.c: Include gimplify.h.
45b0be94 7532
582d9b50
JM
75332013-11-12 Joseph Myers <joseph@codesourcery.com>
7534
7535 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7536 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7537 comment.
7538 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7539 or _Thread_local as appropriate in diagnostics.
7540 (build_null_declspecs): Initialize ret->thread_gnu_p.
7541 (declspecs_add_scspec): Handle either __thread or _Thread_local
7542 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7543 pedantic. Do not disallow _Thread_local extern and _Thread_local
7544 static.
7545
267bac10
JM
75462013-11-07 Joseph Myers <joseph@codesourcery.com>
7547 Andrew MacLeod <amacleod@redhat.com>
7548
7549 * c-aux-info.c (gen_type): Handle atomic qualifier.
7550 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7551 qualifiers when compating types.
7552 (shadow_tag_warned): Handle atomic_p in declspecs.
7553 (quals_from_declspecs): Likewise.
7554 (start_decl): Use c_type_promotes_to when promoting argument
7555 types.
7556 (grokdeclarator): Handle _Atomic.
7557 (get_parm_info): Diagnose any qualifier on "void" as only
7558 parameter.
7559 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7560 comparing types. Use c_type_promotes_to when promoting argument
7561 types.
7562 (finish_function): Use c_type_promotes_to when promoting argument
7563 types.
7564 (build_null_declspecs): Handle atomic_p in declspecs.
7565 (declspecs_add_qual): Handle RID_ATOMIC.
7566 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7567 (c_token_starts_declspecs): Handle RID_ATOMIC.
7568 (c_parser_declspecs): Handle atomic type specifiers and
7569 qualifiers.
7570 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7571 from types of expressions with atomic type.
7572 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7573 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7574 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7575 (c_parser_statement_after_labels, c_parser_switch_statement)
7576 (c_parser_for_statement, c_parser_expr_no_commas)
7577 (c_parser_conditional_expression, c_parser_binary_expression)
7578 (c_parser_cast_expression, c_parser_unary_expression)
7579 (c_parser_postfix_expression)
7580 (c_parser_postfix_expression_after_primary, c_parser_expression):
7581 Use convert_lvalue_to_rvalue.
7582 (c_parser_expression_conv, c_parser_expr_list): Document
7583 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7584 (c_parser_objc_synchronized_statement): Use
7585 convert_lvalue_to_rvalue.
7586 (c_parser_objc_selector): Handle RID_ATOMIC.
7587 (c_parser_objc_receiver, c_parser_array_notation): Use
7588 convert_lvalue_to_rvalue.
7589 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7590 _Atomic (type-name).
7591 (struct c_declspecs): Add atomic_p field.
7592 (convert_lvalue_to_rvalue): Declare.
7593 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7594 corresponding atomic types.
7595 (qualify_type): Don't add _Atomic qualifiers from second argument.
7596 (comp_target_types): Do not allow _Atomic mismatches.
7597 (type_lists_compatible_p): Do not remove atomic qualifiers when
7598 comparing types.
7599 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7600 (build_atomic_assign): New functions.
7601 (build_unary_op): Use build_atomic_assign for atomic increment and
7602 decrement.
7603 (build_conditional_expr): Do not treat _Atomic void as a qualified
7604 version of void.
7605 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7606 (find_anonymous_field_with_type, convert_to_anonymous_field)
7607 (convert_for_assignment): Do not remove atomic qualifiers when
7608 comparing types.
7609 (digest_init): Do not accept initialization of arrays of atomic
7610 elements by string constants.
7611 (build_asm_expr): Use convert_lvalue_to_rvalue.
7612 (build_binary_op): Do not treat _Atomic void as a qualified
7613 version of void.
7614
0c249d4b
DD
76152013-11-06 DJ Delorie <dj@redhat.com>
7616
7617 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7618 both explicit and builtin, print the location of the explicit one.
7619
6d7f7e0a
TB
76202013-11-05 Tobias Burnus <burnus@net-b.de>
7621
7622 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7623 c_parser_omp_distribute, c_parser_omp_teams,
7624 c_parser_omp_target, c_parser_omp_declare): Handle
7625 -fopenmp-simd.
7626
b906f4ca
MP
76272013-11-03 Marek Polacek <polacek@redhat.com>
7628
7629 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7630
ee1d5a02
JJ
76312013-11-01 Jakub Jelinek <jakub@redhat.com>
7632
7633 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7634 check_dup_generic at the end, unless remove is true.
7635 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7636 remove = true;.
7637 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7638
5a9785fb
JJ
76392013-10-31 Jakub Jelinek <jakub@redhat.com>
7640
7641 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7642 with decl that is not pointer nor array.
7643
939b37da
BI
76442013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7645
7646 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7647 a spawning function is found.
7648 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7649 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7650 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7651 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7652 case.
7653 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7654 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7655 expr.
7656 (c_finish_return): Added a check to reject _Cilk_spawn in return
7657 expression.
7658 (build_cilk_spawn): New function.
7659 (build_cilk_sync): Likewise.
7660 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7661
d4af74d4
TB
76622013-10-27 Tobias Burnus <burnus@net-b.de>
7663
7664 PR other/33426
7665 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7666 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7667 (c_parser_statement_after_labels): Update calls.
7668
d73749df 76692013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7670
7671 PR other/33426
7672 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7673 Handle PRAGMA_IVDEP.
7674 (c_parser_statement_after_labels): Update call.
7675
f28aa681
MP
76762013-10-24 Marek Polacek <polacek@redhat.com>
7677
7678 * c-parser.c (c_parser_struct_declaration): Add a comment.
7679 (c_parser_declarator): Don't allow _Alignas here.
7680
0645c1a2
AM
76812013-10-17 Andrew MacLeod <amacleod@redhat.com>
7682
7683 * c-parser.c: Include omp-low.h.
7684 * c-typeck.c: Likewise.
7685
568a31f2
MP
76862013-10-17 Marek Polacek <polacek@redhat.com>
7687
7688 PR c/58267
7689 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7690 Document syntax of the array-declarator.
7691 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7692 are not permitted.
7693 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7694 (c_parser_struct_declaration): Likewise.
7695 (c_parser_declarator): Likewise.
7696 (c_parser_direct_declarator_inner): Likewise.
7697 (c_parser_parameter_declaration): Likewise.
7698 (c_parser_type_name): Likewise.
7699
acf0174b
JJ
77002013-10-11 Jakub Jelinek <jakub@redhat.com>
7701
7702 * c-lang.h (current_omp_declare_target_attribute): New extern
7703 decl.
7704 * c-parser.c: Include c-lang.h.
7705 (struct c_parser): Change tokens to c_token *.
7706 Add tokens_buf field. Change tokens_avail type to unsigned int.
7707 (c_parser_consume_token): If parser->tokens isn't
7708 &parser->tokens_buf[0], increment parser->tokens.
7709 (c_parser_consume_pragma): Likewise.
7710 (enum pragma_context): Add pragma_struct and pragma_param.
7711 (c_parser_external_declaration): Adjust
7712 c_parser_declaration_or_fndef caller.
7713 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7714 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7715 Adjust recursive call.
7716 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7717 of pragma_external.
7718 (c_parser_parameter_declaration): Use pragma_param instead of
7719 pragma_external.
7720 (c_parser_compound_statement_nostart, c_parser_label,
7721 c_parser_for_statement): Adjust
7722 c_parser_declaration_or_fndef callers.
7723 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7724 it through to c_parser_conditional_expression.
7725 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7726 pass it through to c_parser_binary_expression. Adjust recursive
7727 call.
7728 (c_parser_binary_expression): Remove prec argument, add
7729 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7730 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7731 binop matches it, use build2 instead of parser_build_binary_op.
7732 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7733 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7734 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7735 Handle pragma_struct and pragma_param the same as pragma_external.
7736 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7737 (c_parser_omp_variable_list): Parse array sections for
7738 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7739 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7740 (c_parser_omp_clause_reduction): Handle user defined reductions.
7741 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7742 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7743 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7744 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7745 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7746 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7747 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7748 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7749 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7750 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7751 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7752 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7753 (c_parser_omp_for_loop): Add CODE argument, pass it through
7754 to c_finish_omp_for. Change last argument to cclauses,
7755 and adjust uses to grab parallel clauses from the array of all
7756 the split clauses. Adjust c_parser_binary_expression,
7757 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7758 (omp_split_clauses): New function.
7759 (c_parser_omp_simd): New function.
7760 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7761 Allow the function to be called also when parsing combined constructs,
7762 and call c_parser_omp_simd when parsing for simd.
7763 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7764 #pragma omp section, require exactly one structured-block instead of
7765 sequence of statements.
7766 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7767 Allow the function to be called also when parsing combined constructs.
7768 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7769 Allow the function to be called also when parsing combined
7770 constructs.
7771 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7772 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7773 c_parser_omp_teams, c_parser_omp_target_data,
7774 c_parser_omp_target_update, c_parser_omp_target,
7775 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7776 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7777 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7778 (c_parser_omp_construct): Add p_name and mask vars. Handle
7779 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7780 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7781 and c_parser_omp_sections callers.
7782 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7783 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7784 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7785 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7786 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7787 OMP_CLAUSE_DEPEND.
7788 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7789 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7790 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7791 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7792 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7793 * c-typeck.c: Include tree-inline.h.
7794 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7795 handle_omp_array_sections_1, handle_omp_array_sections,
7796 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7797 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7798 user defined reductions.
7799 (c_tree_equal): New function.
7800 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7801 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7802 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7803 c_check_omp_declare_reduction_r): New prototypes.
7804 * c-decl.c (current_omp_declare_target_attribute): New variable.
7805 (c_decl_attributes): New function.
7806 (start_decl, start_function): Use it instead of decl_attributes.
7807 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7808 c_omp_reduction_decl, c_omp_reduction_lookup,
7809 c_check_omp_declare_reduction_r): New functions.
7810
0a6c2227
TT
78112013-09-25 Tom Tromey <tromey@redhat.com>
7812
7813 * Make-lang.in (c/gccspec.o): Remove.
7814 (CFLAGS-c/gccspec.o): New variable.
7815 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7816 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7817 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7818
f3bc55f0
TT
78192013-09-25 Tom Tromey <tromey@redhat.com>
7820
7821 * Make-lang.in (c/gccspec.o): Don't use subshell.
7822
a24d975c
MP
78232013-09-18 Marek Polacek <polacek@redhat.com>
7824
7825 PR sanitize/58443
7826 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7827 Remove unnecessary check.
7828
ce6923c5
MP
78292013-09-18 Marek Polacek <polacek@redhat.com>
7830
7831 PR sanitizer/58411
7832 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7833 no_sanitize_undefined attribute.
7834
a1e51df9
KT
78352013-09-13 Kai Tietz <ktietz@redhat.com>
7836
7837 PR target/57848
7838 * c-decl.c (c_builtin_function_ext_scope): Remove
7839 wrong assumption that it is never called on prexisting
7840 symbol.
7841
0af94e6f
JR
78422013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7843
7844 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7845
20059c8b
GDR
78462013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7847
7848 * c-objc-common.c (c_tree_printer): Tidy.
7849
de5a5fa1
MP
78502013-08-30 Marek Polacek <polacek@redhat.com>
7851
7852 * c-typeck.c (build_binary_op): Add division by zero and shift
7853 instrumentation.
7854
2531a1d9 78552013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7856 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7857
6e2bcc98 7858 PR c/35649
2531a1d9
JR
7859 * c-typeck.c (c_common_type): Prefer double_type_node over
7860 other REAL_TYPE types with the same precision.
7861 (convert_arguments): Likewise.
7862
025311c4
GDR
78632013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7864
7865 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7866 (c_initialize_diagnostics): Call a destructor for the early printer.
7867
da6ca2b5
GDR
78682013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7869
7870 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7871 printer initialization.
7872
318cda85 78732013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7874
318cda85
BI
7875 PR c/57490
7876 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7877 check for truth values.
7878 (expand_array_notation_exprs): Added truth values case. Removed an
7879 unwanted else. Added for-loop to walk through subtrees in default
7880 case.
7881
b066401f
GDR
78822013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7883
7884 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7885
fb48aadc
JM
78862013-07-23 Joseph Myers <joseph@codesourcery.com>
7887
7888 * c-parser.c (struct c_generic_association): Fix typo.
7889
433cc7b0
TT
78902013-07-23 Tom Tromey <tromey@redhat.com>
7891 Joseph Myers <joseph@codesourcery.com>
7892
7893 * c-parser.c (struct c_generic_association): New.
7894 (c_generic_association_d): New typedef.
7895 (c_parser_generic_selection): New function.
7896 (c_parser_postfix_expression): Handle RID_GENERIC.
7897
26d40c3d
JM
78982013-07-13 Jason Merrill <jason@redhat.com>
7899
7900 PR c++/57793
7901 * c-decl.c (finish_struct): Check for too-large class.
7902
ecdbd01a 79032013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7904
7905 PR c/57821
7906 * c-typeck.c (set_init_index): When folding, check for index overflow.
7907
1141ed3f
BI
79082013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7909
7910 * c-parser.c (c_parser_array_notation): Removed rejection of array
7911 notations in an array of function pointers.
7912
713b46fa
BI
79132013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7914
7915 * c-array-notation.c (make_triplet_val_inv): New function.
7916 (create_cmp_incr): Likewise.
7917 (create_array_refs): Likewise.
7918 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7919 Also modularized common parts between functions and called the function.
7920 (build_array_notation_expr): Likewise.
7921 (fix_conditional_array_notations_1): Likewise.
7922 (fix_array_notation_expr): Likewise.
7923 (fix_array_notation_call_expr): Likewise.
7924
92f20202
MP
79252013-06-18 Marek Polacek <polacek@redhat.com>
7926
7927 PR c/57630
7928 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7929
73a23b06
BI
79302013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7931
7932 * c-array-notation.c (build_array_notation_expr): Reject array notation
7933 mismatch between LHS and RHS even inside a call_expr. Also, removed
7934 a couple while statements that were dead code.
7935
00b8517d
BI
79362013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7937
7938 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7939 excessive precision expressions in function parameters. Also removed
7940 couple unwanted while statements.
7941
1509bdda
BI
79422013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7943
7944 * c-array-notation.c (expand_array_notation_exprs): Added
7945 ARRAY_NOTATION_REF case.
ab20d992 7946
d60f1706
BI
79472013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7948
7949 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7950 function to c-family/array-notation-common.c.
7951 (is_cilkplus_reduce_builtin): Likewise.
7952 (find_rank): Likewise.
7953 (extract_array_notation_exprs): Likewise.
7954 (replace_array_notations): Likewise.
7955 (find_inv_trees): Likewise.
7956 (replace_inv_trees): Likewise.
7957 (contains_array_notation_expr): Likewise.
7958 (find_correct_array_notation_type): Likewise.
7959 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7960 (struct inv_list): Moved this to c-family/array-notation-common.c.
7961 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7962
6d6efbb3
BI
79632013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7964
7965 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7966 reduction functions outside the for-loop. Added a check if the fundecl
7967 is non-NULL. Finally, removed an unwanted if-statement, and made the
7968 body unconditional.
7969
25c22937
BI
79702013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7971
7972 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7973 condition of the if-statement matches the rank of else-block and then-
7974 block when array notations are used.
7975 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7976 expression after the entire function body is parsed.
7977 (c_parser_expr_no_commas): Delayed creating array notation expressions
7978 to the end of function parsing.
7979 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7980 whole if-statement instead of just the condition.
ab20d992 7981 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7982
edd25645
BI
79832013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7984
7985 PR c/57474
7986 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7987 array to NULL_TREE if they are unused. Also added a check for the
7988 field to be NULL before its fields are used in future.
ab20d992 7989
065ce7f1
RO
79902013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7991
7992 PR bootstrap/57450
7993 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7994 (build_array_notation_expr): Likewise.
7995
36536d79
BI
79962013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7997
7998 * c-typeck.c (build_array_ref): Added a check to see if array's
7999 index is greater than one. If true, then emit an error.
8000 (build_function_call_vec): Exclude error reporting and checking
8001 for builtin array-notation functions.
8002 (convert_arguments): Likewise.
8003 (c_finish_return): Added a check for array notations as a return
8004 expression. If true, then emit an error.
8005 (c_finish_loop): Added a check for array notations in a loop
8006 condition. If true then emit an error.
8007 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8008 (build_binary_op): Added a check for array notation expr inside
8009 op1 and op0. If present, we call another function to find correct
8010 type.
8011 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8012 * c-parser.c (c_parser_compound_statement): Check if array
8013 notation code is used in tree, if so, then transform them into
8014 appropriate C code.
8015 (c_parser_expr_no_commas): Check if array notation is used in LHS
8016 or RHS, if so, then build array notation expression instead of
8017 regular modify.
8018 (c_parser_postfix_expression_after_primary): Added a check for
8019 colon(s) after square braces, if so then handle it like an array
8020 notation. Also, break up array notations in unary op if found.
8021 (c_parser_direct_declarator_inner): Added a check for array
8022 notation.
8023 (c_parser_compound_statement): Added a check for array notation in
8024 a stmt. If one is present, then expand array notation expr.
8025 (c_parser_if_statement): Likewise.
8026 (c_parser_switch_statement): Added a check for array notations in
8027 a switch statement's condition. If true, then output an error.
8028 (c_parser_while_statement): Similarly, but for a while.
8029 (c_parser_do_statement): Similarly, but for a do-while.
8030 (c_parser_for_statement): Similarly, but for a for-loop.
8031 (c_parser_unary_expression): Check if array notation is used in a
8032 pre-increment or pre-decrement expression. If true, then expand
8033 them.
8034 (c_parser_array_notation): New function.
8035 * c-array-notation.c: New file.
8036 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 8037
cd192ccc
MS
80382013-05-23 Mike Stump <mikestump@comcast.net>
8039
8040 * c-typeck.c (convert_for_assignment): Handle references to memory
8041 spaces better.
8042
427b248d
JM
80432013-05-16 Jason Merrill <jason@redhat.com>
8044
8045 * Make-lang.in (cc1$(exeext)): Use link mutex.
8046
44d90fe1
PC
80472013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8048
8049 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8050 to simply use OPT_Wpointer_arith.
8051 (build_unary_op): Likewise.
8052
4e7d7b3d
JJ
80532013-04-03 Jakub Jelinek <jakub@redhat.com>
8054
8055 PR c/19449
8056 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8057 argument. If set, or it temporarily for parsing of the first
8058 argument into force_folding_builtin_constant_p.
8059 (c_parser_postfix_expression): Adjust callers.
8060
839b422f
RB
80612013-03-21 Richard Biener <rguenther@suse.de>
8062
8063 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8064 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8065
2ee028f1
MP
80662013-02-12 Marek Polacek <polacek@redhat.com>
8067
8068 PR c/44938
8069 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8070 origtypes to NULL.
8071
8824edff
JJ
80722013-01-24 Jakub Jelinek <jakub@redhat.com>
8073
8074 PR c/56078
8075 * c-typeck.c (set_nonincremental_init_from_string): If
8076 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8077 returned false.
8078 (process_init_element): Likewise.
8079
eadd3d0d
JJ
80802012-12-20 Jakub Jelinek <jakub@redhat.com>
8081
8082 PR c++/55619
8083 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8084 argument, don't call default_function_array_conversion
8085 nor c_fully_fold here.
8086 (c_parser_asm_statement): Adjust callers.
8087 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8088 and outputs here, and call default_function_array_conversion
8089 on inputs that don't need to be addressable.
8090
f8a93a2e
JJ
80912012-12-18 Jakub Jelinek <jakub@redhat.com>
8092
8093 PR c/39464
8094 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8095 warning require that both c_common_unsigned_type as well as
8096 c_common_signed_type is the same for both mvl and mvr types.
8097
9771b263
DN
80982012-11-16 Diego Novillo <dnovillo@google.com>
8099
8100 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8101
8102 * c-common.c: Use new vec API in vec.h.
8103 * c-common.h: Likewise.
8104 * c-gimplify.c: Likewise.
8105 * c-pragma.c: Likewise.
8106 * c-pretty-print.c: Likewise.
8107 * c-pretty-print.h: Likewise.
8108 * c-semantics.c: Likewise.
8109 * c-decl.c: Likewise.
8110 * c-parser.c: Likewise.
8111 * c-tree.h: Likewise.
8112 * c-typeck.c: Likewise.
8113
880661a4
JW
81142012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8115
8116 PR c++/54930
8117 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8118
077d1abe
MLI
81192012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8120
8121 PR c/53066
8122 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8123 shadows a function, unless the variable is a function or a
8124 pointer-to-function.
8125
3a785c97
JJ
81262012-10-12 Jakub Jelinek <jakub@redhat.com>
8127
8128 PR c/54381
8129 * c-parser.c (struct c_tree_loc_pair): Removed.
8130 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8131 add location_t * and tree * arguments, fill in array of 3
8132 sizeof_arg trees and corresponding locs.
8133 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8134 c_parser_expr_list callers.
8135 (c_parser_postfix_expression_after_primary): Likewise. Pass
8136 array of 3 sizeof_arg trees and locs (corresponding to first
8137 3 arguments) to sizeof_pointer_memaccess_warning.
8138
703c8606
LC
81392012-10-09 Lawrence Crowl <crowl@google.com>
8140
8141 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8142 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8143 hash table.
8144
5d9de0d0
PC
81452012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8146
8147 PR c++/54194
8148 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8149 call.
8150
a212e43f
MG
81512012-10-09 Marc Glisse <marc.glisse@inria.fr>
8152
8153 PR c++/54427
8154 * c-typeck.c: Include c-common.h.
8155 (enum stv_conv): Moved to c-common.h.
8156 (scalar_to_vector): Moved to c-common.c.
8157 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8158 * Make-lang.in: c-typeck.c depends on c-common.h.
8159
3b78de56
AC
81602012-10-04 Arnaud Charlet <charlet@adacore.com>
8161
8162 * c-decl.c (c_write_global_declarations): Fix handling of
8163 -fdump-ada-spec*.
8164
78c60e3d
SS
81652012-09-30 Sharad Singhai <singhai@google.com>
8166
8167 * c-decl.c (c_write_global_declarations): Use a different method
8168 to determine if the dump has ben initialized.
8169
9f33203d
JM
81702012-09-14 Joseph Myers <joseph@codesourcery.com>
8171
8172 PR c/54552
8173 * c-typeck.c (c_cast_expr): When casting to a type requiring
8174 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8175 c_fully_fold first.
8176
a27d595d
JM
81772012-09-14 Joseph Myers <joseph@codesourcery.com>
8178
8179 PR c/54103
8180 * c-typeck.c (build_unary_op): Pass original argument of
8181 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8182 any C_MAYBE_CONST_EXPR, if it has integer operands.
8183 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8184 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8185 to c_objc_common_truthvalue_conversion, then remove any
8186 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8187 c_objc_common_truthvalue_conversion not
8188 c_common_truthvalue_conversion.
8189 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8190 call note_integer_operands for arguments with integer operands
8191 that are not integer constants.
8192
9feb29df
JJ
81932012-09-13 Jakub Jelinek <jakub@redhat.com>
8194
8195 PR c/54559
8196 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8197 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8198
d409320c
JJ
81992012-08-31 Jakub Jelinek <jakub@redhat.com>
8200
8201 PR c/54428
8202 * c-convert.c (convert): Don't call fold_convert_loc if
8203 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8204 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8205 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8206
6265d07c
JJ
82072012-08-24 Jakub Jelinek <jakub@redhat.com>
8208
8209 PR c/54355
8210 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8211 for nested and empty_ok arguments in the call to
8212 c_parser_declaration_or_fndef.
8213
1a4049e7
JJ
82142012-08-17 Jakub Jelinek <jakub@redhat.com>
8215
8216 * c-tree.h (c_last_sizeof_arg): Declare.
8217 * c-parser.c (struct c_tree_loc_pair): New type.
8218 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8219 non-NULL.
8220 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8221 (c_parser_postfix_expression_after_primary): Likewise. Call
8222 sizeof_pointer_memaccess_warning if needed.
8223 (sizeof_ptr_memacc_comptypes): New function.
8224 * c-typeck.c (c_last_sizeof_arg): New global variable.
8225 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8226
0229aee9
UB
82272012-07-24 Uros Bizjak <ubizjak@gmail.com>
8228
8229 * c-lang.h (lang_decl): Add variable_size GTY option.
8230
7ee2468b
SB
82312012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8232
8233 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8234 * Make-lang.in: Fix dependencies.
8235
d4a10d0a
SB
82362012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8237
8238 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8239 and add language Makefile hooks.
8240 * config-lang.in: New file.
8241 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8242 add the required "normal" config-lang.in rules.
8243 * c-lang.h: Moved from gcc/ to here.
8244 * c-tree.h: Likewise.
8245 * c-objc-common.c: Likewise.
8246 * c-objc-common.h: Likewise.
8247 * c-typeck.c: Likewise.
8248 * c-convert.c: Likewise.
8249 * c-lang.c: Likewise.
8250 * c-aux-info.c: Likewise.
8251 * c-errors.c: Likewise.
8252 * gccspec.c: Likewise.
8253 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8254 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8255\f
877e3c2a 8256Copyright (C) 2012-2022 Free Software Foundation, Inc.
d4a10d0a
SB
8257
8258Copying and distribution of this file, with or without modification,
8259are permitted in any medium without royalty provided the copyright
8260notice and this notice are preserved.