]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
d: Merge upstream dmd 4d07f22f2, druntime f89da313, phobos d46814c86.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
3dff965c
GA
12022-05-25 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/91134
4 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
5 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
6 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
7 diagnostic and fixit hint if DATUM has pointer type.
8 * c-parser.cc (c_parser_postfix_expression,
9 c_parser_omp_variable_list): Adjust build_component_ref callers.
10 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
11 Likewise.
12
768f49a2
GA
132022-05-24 Jakub Jelinek <jakub@redhat.com>
14
15 PR c/105378
16 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
17
1cda629f
GA
182022-05-18 Marek Polacek <polacek@redhat.com>
19
20 PR c/105131
21 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
22 mismatches.
23 * c-tree.h (comptypes_check_enum_int): Declare.
24 * c-typeck.cc (comptypes): No longer static.
25
3d9439b1
GA
262022-05-17 Marek Polacek <polacek@redhat.com>
27
28 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
29 its value.
30
312022-05-17 Jakub Jelinek <jakub@redhat.com>
32
33 * c-parser.cc (c_parser_omp_clause_depend): Parse
34 inoutset depend-kind.
35 (c_parser_omp_depobj): Likewise.
36
702bd11f
GA
372022-05-16 Martin Liska <mliska@suse.cz>
38
39 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
40
49ace834
GA
412022-05-12 Jakub Jelinek <jakub@redhat.com>
42
43 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
44 if flag_openmp.
45 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
46 in postfix expressions.
47 (c_parser_omp_variable_list): Handle omp_all_memory in depend
48 clause.
49 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
50 keyword in depend clause as null_pointer_node, diagnose invalid
51 uses.
52
bd022ff9
GA
532022-05-09 Martin Liska <mliska@suse.cz>
54
55 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
56 macros.
57 (c_parser_binary_expression): Likewise.
58
a1947c92
GA
592022-05-07 Marek Polacek <polacek@redhat.com>
60
61 PR c++/101833
62 PR c++/47634
63 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
64
405eda0d
GA
652022-04-08 Jakub Jelinek <jakub@redhat.com>
66
67 PR c/105149
68 * c-typeck.cc (c_build_va_arg): Reject function types.
69
a2287813
GA
702022-03-22 Marek Polacek <polacek@redhat.com>
71
72 PR c/82283
73 PR c/84685
74 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
75 (start_init): Set it.
76 (finish_init): Restore constructor_designated.
77 (push_init_level): Set constructor_designated to the value of
78 constructor_designated in the upper constructor_stack.
79
57eeedda
GA
802022-03-12 Thomas Schwinge <thomas@codesourcery.com>
81
82 PR other/65095
83 * c-typeck.cc (handle_omp_array_sections_1)
84 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
85 instead of 'c_omp_map_clause_name'.
86
8cc4f9cd
GA
872022-03-09 Joseph Myers <joseph@codesourcery.com>
88
89 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
90 differently from earlier standards for unprototyped function type
91 compatibility.
92
932022-03-09 Jakub Jelinek <jakub@redhat.com>
94
95 PR c/104711
96 * c-fold.cc (c_fully_fold_internal): Don't emit
97 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
98 * c-typeck.cc (build_binary_op): Likewise.
99
e6533e2e
GA
1002022-03-07 Jakub Jelinek <jakub@redhat.com>
101
102 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
103 literal.
104
4bf3bac1
GA
1052022-02-23 Richard Biener <rguenther@suse.de>
106
107 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
108 SSA names without definition.
109 (c_parser_gimple_declaration): Handle pointer typed SSA names.
110
0bdb0498
GA
1112022-02-17 Jakub Jelinek <jakub@redhat.com>
112
113 PR c/104532
114 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
115 convert_lvalue_to_rvalue and build_indirect_ref instead of
116 build_simple_mem_ref.
117
e8d68f0a
GA
1182022-02-11 Richard Biener <rguenther@suse.de>
119
120 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
121 VEC_COND_EXPRs.
122
a645583d
GA
1232022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
124
125 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
126 clause.
127 (c_parser_omp_variable_list): Handle array sections.
128 (c_parser_omp_clause_has_device_addr): Added.
129 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
130 case.
131 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
132 OMP_CLAUSE_MASK.
133 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
134 (c_finish_omp_clauses): Handle array sections.
135
3adf509f
GA
1362022-02-09 Jakub Jelinek <jakub@redhat.com>
137
138 PR c/104427
139 * c-parser.cc (c_parser_postfix_expression)
140 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
141 instead of build1_loc to build PAREN_EXPR.
142 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
143 * c-fold.cc (c_fully_fold_internal): Likewise.
144
fc829782
GA
1452022-01-17 Martin Liska <mliska@suse.cz>
146
147 * Make-lang.in: Rename .c names to .cc.
148 * c-convert.cc: Likewise.
149 * c-decl.cc (struct lang_identifier): Likewise.
150 (pop_scope): Likewise.
151 (finish_decl): Likewise.
152 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
153 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
154 * c-parser.h (GCC_C_PARSER_H): Likewise.
155 * c-tree.h (c_keyword_starts_typename): Likewise.
156 (finish_declspecs): Likewise.
157 (c_get_alias_set): Likewise.
158 (enum c_oracle_request): Likewise.
159 (tag_exists_p): Likewise.
160 (set_c_expr_source_range): Likewise.
161 * c-typeck.cc (c_common_type): Likewise.
162 (c_finish_omp_clauses): Likewise.
163 * config-lang.in: Likewise.
164
1652022-01-17 Martin Liska <mliska@suse.cz>
166
167 * c-aux-info.c: Moved to...
168 * c-aux-info.cc: ...here.
169 * c-convert.c: Moved to...
170 * c-convert.cc: ...here.
171 * c-decl.c: Moved to...
172 * c-decl.cc: ...here.
173 * c-errors.c: Moved to...
174 * c-errors.cc: ...here.
175 * c-fold.c: Moved to...
176 * c-fold.cc: ...here.
177 * c-lang.c: Moved to...
178 * c-lang.cc: ...here.
179 * c-objc-common.c: Moved to...
180 * c-objc-common.cc: ...here.
181 * c-parser.c: Moved to...
182 * c-parser.cc: ...here.
183 * c-typeck.c: Moved to...
184 * c-typeck.cc: ...here.
185 * gccspec.c: Moved to...
186 * gccspec.cc: ...here.
187 * gimple-parser.c: Moved to...
188 * gimple-parser.cc: ...here.
189
1902022-01-17 Andrew Stubbs <ams@codesourcery.com>
191
192 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
193
617db51d
GA
1942022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
195
196 PR c++/103705
197 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
198 outer node for ARRAY_REFs.
199
62eb5308
GA
2002022-01-01 Jakub Jelinek <jakub@redhat.com>
201
202 PR objc/103639
203 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
204 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
205
2554e2da
GA
2062021-12-17 Marek Polacek <polacek@redhat.com>
207
208 PR c/103649
209 * c-decl.c (c_warn_unused_attributes): Don't warn for
210 attribute_ignored_p.
211 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
212 arguments when the attribute is ignored.
213
9c6586bc
GA
2142021-12-14 Jakub Jelinek <jakub@redhat.com>
215
216 PR c/103587
217 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
218 consume the pragma and silently skip to the pragma eol.
219
c8dcf64b
GA
2202021-12-12 Jonathan Wakely <jwakely@redhat.com>
221
222 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
223 * c-parser.c: Likewise.
224
4b4839e3
GA
2252021-12-09 Jakub Jelinek <jakub@redhat.com>
226
227 PR pch/71934
228 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
229 to resort_data.new_value.
230
641ff219
GA
2312021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
232
233 * c-parser.c (struct omp_dim): New struct type for use inside
234 c_parser_omp_variable_list.
235 (c_parser_omp_variable_list): Allow multiple levels of array and
236 component accesses in array section base-pointer expression.
237 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
238 c_parser_omp_var_list_parens.
239 (c_parser_omp_clause_from): Likewise.
240 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
241 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
242 POINTER_PLUS_EXPR.
243 (c_finish_omp_clauses): Extend allowed ranged of expressions
244 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
245
2462021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
247
248 PR middle-end/92120
249 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
250 call to c_parser_omp_variable_list to 'true'.
251 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
252 array base handling.
253 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
254
c177e806
GA
2552021-11-30 Thomas Schwinge <thomas@codesourcery.com>
256
257 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
258 orphan loop" checking.
259
2602021-11-30 Cesar Philippidis <cesar@codesourcery.com>
261 Thomas Schwinge <thomas@codesourcery.com>
262
263 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
264 OpenACC gang reductions.
265
2662021-11-30 Richard Biener <rguenther@suse.de>
267
268 * gimple-parser.c (c_parser_gimple_postfix_expression):
269 avoid unreachable code after break.
270
87cd82c8
GA
2712021-11-29 Eric Gallager <egallager@gcc.gnu.org>
272
273 PR other/103021
274 * Make-lang.in: Use ETAGS variable in TAGS target.
275
2762021-11-29 Richard Biener <rguenther@suse.de>
277
278 * c-typeck.c (c_tree_equal): Remove unreachable return.
279 * c-parser.c (get_matching_symbol): Likewise.
280
e1d43592
GA
2812021-11-23 Jakub Jelinek <jakub@redhat.com>
282
283 * c-typeck.c (c_clone_omp_udr): Don't initialize
284 id.transform_lang_insert_block.
285
9c077398
GA
2862021-11-19 Martin Sebor <msebor@redhat.com>
287
288 PR c++/33925
289 PR c/102867
290 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
291 code resulting from macro expansion.
292
2932021-11-19 Martin Liska <mliska@suse.cz>
294
295 Revert:
296 2021-11-19 Martin Liska <mliska@suse.cz>
297
298 * c-parser.c (add_debug_begin_stmt): Use option directly.
299
483092d3
GA
3002021-11-18 Matthias Kretz <m.kretz@gsi.de>
301
302 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
303 * c-parser.c (c_parser_postfix_expression): Likewise.
304
3052021-11-18 Martin Liska <mliska@suse.cz>
306
307 * c-parser.c (add_debug_begin_stmt): Use option directly.
308
280d2838
GA
3092021-11-17 Martin Sebor <msebor@redhat.com>
310
311 PR c/101702
312 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
313 bounds before deciding if they're constant.
314
e2b57363
GA
3152021-11-15 Jakub Jelinek <jakub@redhat.com>
316
317 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
318 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
319
b39265d4
GA
3202021-11-11 Jakub Jelinek <jakub@redhat.com>
321
322 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
323 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
324 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
325 OMP_CLAUSE_NUM_TEAMS_EXPR.
326 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
327 combined target teams even lower-bound expression.
328
3292021-11-11 Richard Biener <rguenther@suse.de>
330
331 * gimple-parser.c: Shuffle bitmap.h include.
332
18ae471f
GA
3332021-11-03 Joseph Myers <joseph@codesourcery.com>
334
335 PR c/103031
336 * c-convert.c (c_convert): New function, based on convert.
337 (convert): Make into wrapper of c_convert.
338 (convert_init): New function.
339 * c-typeck.c (enum impl_conv): Add ic_init_const.
340 (convert_for_assignment): Handle ic_init_const like ic_init. Add
341 new argument to convert_and_check call.
342 (digest_init): Pass ic_init_const to convert_for_assignment for
343 initializers required to be constant.
344
b4df2dd3
GA
3452021-11-02 Richard Sandiford <richard.sandiford@arm.com>
346
347 * c-tree.h (c_simulate_record_decl): Declare.
348 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
349 * c-decl.c (c_simulate_record_decl): New function.
350
c2bd5d8a
GA
3512021-10-22 Eric Gallager <egallager@gcc.gnu.org>
352
353 PR other/102663
354 * Make-lang.in: Add dummy c.install-dvi target.
355
93d183a5
GA
3562021-10-15 Richard Biener <rguenther@suse.de>
357
358 PR c/102763
359 * gimple-parser.c
360 (c_parser_gimple_postfix_expression_after_primary): Check
361 for a pointer do be dereferenced by ->.
362
5d5885c9
GA
3632021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
364
365 * c-parser.c (c_finish_omp_declare_variant): Change call from
366 c_omp_check_context_selector to omp_check_context_selector. Change
367 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
368
c9db17b8
GA
3692021-10-09 Jakub Jelinek <jakub@redhat.com>
370
371 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
372 (c_parser_omp_scan_loop_body): Use it.
373 (c_parser_omp_sections_scope): Likewise.
374
50e20ee6
GA
3752021-10-07 Richard Biener <rguenther@suse.de>
376
377 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
378
bb6194e0
GA
3792021-10-05 Richard Biener <rguenther@suse.de>
380
381 PR c/102605
382 * gimple-parser.c (c_parser_gimple_postfix_expression):
383 Accept more address _Literals.
384
da9c5f78
GA
3852021-10-04 Marek Polacek <polacek@redhat.com>
386
387 PR c++/97573
388 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
389
9d116bcc
GA
3902021-10-01 Martin Sebor <msebor@redhat.com>
391
392 PR c/102103
393 * c-typeck.c (maybe_warn_for_null_address): New function.
394 (build_binary_op): Call it.
395
3962021-10-01 Jakub Jelinek <jakub@redhat.com>
397 Richard Biener <rguenther@suse.de>
398
399 PR sanitizer/102515
400 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
401 for division even for SANITIZE_SI_OVERFLOW.
402
4032021-10-01 Jakub Jelinek <jakub@redhat.com>
404
405 * c-parser.c (c_parser_omp_clause_order): Set
406 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
407
fd133479
GA
4082021-09-28 Andrew Pinski <apinski@marvell.com>
409
410 PR c/32122
411 * c-parser.c (c_parser_statement_after_labels): Pass
412 the c_expr instead of the tree to c_finish_goto_ptr.
413 * c-typeck.c (c_finish_goto_ptr): Change the second
414 argument type to c_expr.
415 * c-tree.h (c_finish_goto_ptr): Likewise.
416 Error out if the expression was not of a pointer type.
417
e4777439
GA
4182021-09-22 Jakub Jelinek <jakub@redhat.com>
419
420 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
421 modifiers.
422
cf74e7b5
GA
4232021-09-18 Jakub Jelinek <jakub@redhat.com>
424
425 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
426 and reproducible modifiers.
427 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
428
4292021-09-18 Jakub Jelinek <jakub@redhat.com>
430
431 * c-parser.c (c_parser_omp_clause_default): Handle private and
432 firstprivate arguments, adjust diagnostics on unknown argument.
433
0a4cb439
GA
4342021-09-17 Jakub Jelinek <jakub@redhat.com>
435
436 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
437 is true.
438
a26206ec
GA
4392021-09-10 Jakub Jelinek <jakub@redhat.com>
440
441 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
442 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
443 don't call build_conditional_expr, instead build a COND_EXPR directly.
444 (c_parser_binary_expression): Avoid calling parser_build_binary_op
445 if omp_atomic_lhs even in more cases for >, < or ==.
446 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
447 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
448 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
449 * c-typeck.c (build_binary_op): For flag_openmp only handle
450 MIN_EXPR/MAX_EXPR.
451
b2748138
GA
4522021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
453
454 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
455 directive.
456
e11c6046
GA
4572021-09-01 Iain Sandoe <iain@sandoe.co.uk>
458
459 * c-decl.c (enum deprecated_states): Add unavailable state.
460 (merge_decls): Copy unavailability.
461 (quals_from_declspecs): Handle unavailable case.
462 (start_decl): Amend the logic handling suppression of nested
463 deprecation states to include unavailability.
464 (smallest_type_quals_location): Amend comment.
465 (grokdeclarator): Handle the unavailable deprecation state.
466 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
467 * c-tree.h (struct c_declspecs): Add unavailable_p.
468 * c-typeck.c (build_component_ref): Handle unavailability.
469 (build_external_ref): Likewise.
470
4712021-09-01 Roger Sayle <roger@nextmovesoftware.com>
472 Joseph Myers <joseph@codesourcery.com>
473
474 PR c/79412
475 * c-decl.c (duplicate_decls): On significant mismatches, mark the
476 types of both (non-function) decls as error_mark_node, so that the
477 middle-end can see the code is malformed.
478 (free_attr_access_data): Don't process if the type has been set to
479 error_mark_node.
480
6d51ee43
GA
4812021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
482
483 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
484 and 'ancestor' in 'target device' clauses.
485
38b19c5b
GA
4862021-08-23 Jakub Jelinek <jakub@redhat.com>
487
488 * c-parser.c (c_parser_omp_clause_num_tasks,
489 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
490
5b2876f9
GA
4912021-08-22 Martin Uecker <muecker@gwdg.de>
492
493 PR c/98397
494 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
495 for pointers to arrays with qualifiers.
496 (build_conditional_expr): For C23 don't lose qualifiers for pointers
497 to arrays when the other pointer is a void pointer. Update warnings.
498 (convert_for_assignment): Update warnings for C2X when converting from
499 void* with qualifiers to a pointer to array with the same qualifiers.
500
7c9e1645
GA
5012021-08-20 Jakub Jelinek <jakub@redhat.com>
502
503 * c-parser.c (c_parser_omp_error): New function.
504 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
505
5062021-08-20 Jakub Jelinek <jakub@redhat.com>
507
508 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
509 comma at the end of list.
510 (c_parser_omp_requires): Likewise.
511
b57fba5e
GA
5122021-08-19 Jakub Jelinek <jakub@redhat.com>
513
514 * c-parser.c (c_parser_omp_requires): Don't call
515 c_parser_peek_2nd_token and optionally consume token if current
516 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
517
6e529985
GA
5182021-08-18 Jakub Jelinek <jakub@redhat.com>
519
520 * c-parser.c (c_parser_omp_nothing): New function.
521 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
522
5232021-08-18 Jakub Jelinek <jakub@redhat.com>
524
525 * c-parser.c (c_parser_statement_after_labels): Add restart label
526 near the start of the function. If c_parser_pragma returns false,
527 goto restart.
528 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
529 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
530 return what c_parser_omp_declare returned. Return true instead of
531 false after emitting errors that the directive is not allowed in
532 pragma_stmt context.
533 (c_parser_omp_ordered): Return true instead of
534 false after emitting errors that the directive is not allowed in
535 pragma_stmt context.
536 (c_parser_omp_target_update): Likewise.
537 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
538 Change return type from tree to bool, return false if the
539 directive should be ignored in pragma_stmt contexts.
540 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
541 return their result directly.
542 (c_parser_omp_cancellation_point): Change return type from void to
543 bool, return false if the directive should be ignored in pragma_stmt
544 contexts.
545 (c_parser_omp_declare): Likewise.
546
2d14d64b
GA
5472021-08-17 Jakub Jelinek <jakub@redhat.com>
548
549 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
550 (c_parser_omp_scope): New function.
551 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
552
72be20e2
GA
5532021-08-12 Jakub Jelinek <jakub@redhat.com>
554
555 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
556 (c_parser_omp_clause_filter): New function.
557 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
558 (OMP_MASKED_CLAUSE_MASK): Define.
559 (c_parser_omp_masked): New function.
560 (c_parser_omp_parallel): Handle parallel masked.
561 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
562 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
563
5642021-08-12 Martin Uecker <muecker@gwdg.de>
565
566 PR c/101838
567 PR c/29970
568 * c-typeck.c (c_expr_sizeof_type): Evaluate
569 size expressions for structs of variable size.
570
5712021-08-12 Tobias Burnus <tobias@codesourcery.com>
572
573 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
574 'primary' as alias for 'master'.
575
3ae564ea
GA
5762021-08-10 Martin Uecker <muecker@gwdg.de>
577
578 PR c/29970
579 * c-typeck.c (c_expr_sizeof_expr): Evaluate
580 size expressions for structs of variable size.
581
f92f4778
GA
5822021-08-06 Tamar Christina <tamar.christina@arm.com>
583
584 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
585 * c-tree.h (c_simulate_enum_decl): Likewise.
586
5872021-08-06 Martin Sebor <msebor@redhat.com>
588
589 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
590 vec arguments to by-reference.
591 (c_finish_omp_declare_simd): Same.
592 (c_parser_compound_statement_nostart): Same.
593 (c_parser_for_statement): Same.
594 (c_parser_objc_methodprotolist): Same.
595 (c_parser_oacc_routine): Same.
596 (c_parser_omp_for_loop): Same.
597 (c_parser_omp_declare_simd): Same.
598
419c6c68
GA
5992021-07-21 Thomas Schwinge <thomas@codesourcery.com>
600 Joseph Myers <joseph@codesourcery.com>
601 Cesar Philippidis <cesar@codesourcery.com>
602
603 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
604 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
605 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
606 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
607
92d45509
GA
6082021-07-20 Martin Sebor <msebor@redhat.com>
609
610 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
611 by-const-reference.
612 * c-typeck.c (c_build_function_call_vec): Same.
613
d97d71a1
GA
6142021-07-15 Martin Sebor <msebor@redhat.com>
615
616 PR c/101289
617 PR c/97548
618 * c-decl.c (get_parm_array_spec): Strip nops.
619
6fba0eea
GA
6202021-07-06 Martin Sebor <msebor@redhat.com>
621
622 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
623
7a60a6e8
GA
6242021-07-02 Jakub Jelinek <jakub@redhat.com>
625
626 PR c/101297
627 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
628 appears before a CPP_NAME.
629
90708f87
GA
6302021-06-25 Martin Sebor <msebor@redhat.com>
631
632 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
633 warning_suppressed_p, suppress_warning, and copy_no_warning.
634 (diagnose_mismatched_decls): Same.
635 (duplicate_decls): Same.
636 (grokdeclarator): Same.
637 (finish_function): Same.
638 (c_write_global_declarations_1): Same.
639 * c-fold.c (c_fully_fold_internal): Same.
640 * c-parser.c (c_parser_expr_no_commas): Same.
641 (c_parser_postfix_expression): Same.
642 * c-typeck.c (array_to_pointer_conversion): Same.
643 (function_to_pointer_conversion): Same.
644 (default_function_array_conversion): Same.
645 (convert_lvalue_to_rvalue): Same.
646 (default_conversion): Same.
647 (build_indirect_ref): Same.
648 (build_function_call_vec): Same.
649 (build_atomic_assign): Same.
650 (build_unary_op): Same.
651 (c_finish_return): Same.
652 (emit_side_effect_warnings): Same.
653 (c_finish_stmt_expr): Same.
654 (c_omp_clause_copy_ctor): Same.
655
9aa8327e
GA
6562021-06-24 Jakub Jelinek <jakub@redhat.com>
657
658 PR c/101176
659 * c-parser.c (c_parser_has_attribute_expression): Set source range for
660 the result.
661
6622021-06-24 Jakub Jelinek <jakub@redhat.com>
663
664 PR c/101171
665 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
666 error_mark_node.
667
6682021-06-24 Jakub Jelinek <jakub@redhat.com>
669
670 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
671 C_ORT_OMP for clauses on target construct.
672 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
673 (c_parser_omp_target): For non-combined target add
674 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
675 C_ORT_OMP_TARGET to c_finish_omp_clauses.
676 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
677 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
678 never present on C_ORT_*DECLARE_SIMD.
679 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
680 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
681 corresponding map clauses.
682
2f080224
GA
6832021-06-21 Jakub Jelinek <jakub@redhat.com>
684
685 PR inline-asm/100785
686 * c-typeck.c (c_mark_addressable): Diagnose trying to make
687 bit-fields addressable.
688
ede6c356
GA
6892021-06-15 Robin Dapp <rdapp@linux.ibm.com>
690
691 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
692 similar.
693
8dc48181
GA
6942021-06-14 Tobias Burnus <tobias@codesourcery.com>
695
696 PR c/100913
697 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
698 var in the error case.
699
438aac59
GA
7002021-06-07 Eric Botcazou <ebotcazou@adacore.com>
701
702 PR c/100920
703 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
704 spot built-in functions.
705
7d6987e9
GA
7062021-06-06 Jakub Jelinek <jakub@redhat.com>
707
708 PR c/100902
709 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
710 even when target is combined with other constructs.
711
7122021-06-06 Eric Botcazou <ebotcazou@adacore.com>
713
714 PR c/100920
715 * c-decl.c (finish_struct): Fix thinko in previous change.
716 * c-typeck.c (convert_for_assignment): Do not warn on pointer
717 assignment and initialization for storage order purposes if the
718 RHS is a call to a DECL_IS_MALLOC function.
719
600f90cb
GA
7202021-06-04 Martin Sebor <msebor@redhat.com>
721
722 PR c/100783
723 * c-objc-common.c (print_type): Handle erroneous types.
724
440c8a0a
GA
7252021-06-03 Jakub Jelinek <jakub@redhat.com>
726
727 PR c++/100859
728 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
729 after depend only cases.
730
ee682192
GA
7312021-05-31 Richard Biener <rguenther@suse.de>
732
733 PR c++/88601
734 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
735 * c-parser.c (c_parser_postfix_expression): Likewise.
736
48166757
GA
7372021-05-28 Richard Biener <rguenther@suse.de>
738
739 PR c/100803
740 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
741 invalid if conditions.
742
7432021-05-28 Jakub Jelinek <jakub@redhat.com>
744
745 PR middle-end/99928
746 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
747 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
748 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
749 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
750 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
751 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
752 if present in map_head, map_field_head or map_firstprivate_head
753 bitmaps.
754
7552021-05-28 Tobias Burnus <tobias@codesourcery.com>
756
757 * c-parser.c (c_parser_omp_clause_affinity): New.
758 (c_parser_omp_clause_name, c_parser_omp_variable_list,
759 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
760 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
761 c_finish_omp_clauses): Likewise.
762
01c59ef2
GA
7632021-05-26 Eric Botcazou <ebotcazou@adacore.com>
764
765 PR c/100653
766 * c-decl.c (finish_struct): Warn for a union containing an aggregate
767 field with a differing scalar storage order.
768
2832d51b
GA
7692021-05-21 Jakub Jelinek <jakub@redhat.com>
770
771 PR middle-end/99928
772 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
773 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
774 if a decl is mentioned both in map clause and in such firstprivate
775 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
776
65f32e5d
GA
7772021-05-19 Jakub Jelinek <jakub@redhat.com>
778
779 PR middle-end/99928
780 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
781 master when combined with taskloop.
782 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
783 parallel master when not combined with taskloop.
784
a8daf9a1
GA
7852021-05-18 Richard Biener <rguenther@suse.de>
786
787 PR c/100522
788 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
789 Diagnose calls to non-functions.
790 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
791
a7ffc1ef
GA
7922021-05-17 Richard Biener <rguenther@suse.de>
793
794 PR c/100625
795 * gimple-parser.c (c_parser_gimple_label): Avoid building
796 a GIMPLE label with NULL label decl.
797
f9af11c7
GA
7982021-05-13 Martin Sebor <msebor@redhat.com>
799
800 PR c/100550
801 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
802
0ff3a0f2
GA
8032021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
804
805 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
806 'close'.
807
aa891c56
GA
8082021-05-10 Martin Liska <mliska@suse.cz>
809
810 * c-aux-info.c (affix_data_type): Use startswith
811 function instead of strncmp.
812 * c-typeck.c (build_function_call_vec): Likewise.
813 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
814
62d87a32
GA
8152021-05-07 Eric Botcazou <ebotcazou@adacore.com>
816
817 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
818 on the address of a pointer field in a record with reverse SSO.
819
99e8df7a
GA
8202021-05-04 Tobias Burnus <tobias@codesourcery.com>
821
822 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
823 for || and && reductions.
824
3c8e539d
GA
8252021-04-29 Joseph Myers <joseph@codesourcery.com>
826
827 * c-typeck.c (function_types_compatible_p): For C2X, treat
828 unprototyped function as compatible with non-variadic prototyped
829 function even if some argument types are changed by the default
830 argument promotions.
831
ee351f7f
GA
8322021-04-15 Martin Sebor <msebor@redhat.com>
833
834 PR c/99420
835 PR c/99972
836 * c-decl.c (pushdecl): Always propagate type attribute.
837
8382021-04-15 Richard Sandiford <richard.sandiford@arm.com>
839
840 PR c/98852
841 * c-typeck.c (c_common_type): Do not drop attributes that
842 affect type identity.
843
1d54b138
GA
8442021-04-10 Jakub Jelinek <jakub@redhat.com>
845
846 PR c/99990
847 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
848 error_mark_node.
849
4493b1c1
GA
8502021-03-25 Jakub Jelinek <jakub@redhat.com>
851
852 PR c++/99565
853 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
854 to operand_equal_p.
855
5f256a70
GA
8562021-03-19 Jakub Jelinek <jakub@redhat.com>
857
858 PR c/99588
859 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
860 with modifycode NOP_EXPR produces and mark the _Atomic var as read
861 if found.
862 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
863 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
864 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
865
3c5b6d24
GA
8662021-03-15 Tobias Burnus <tobias@codesourcery.com>
867
868 PR c++/99509
869 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
870 ensure that the varpool node is marked as offloadable.
871
ceae9533
GA
8722021-03-05 Tobias Burnus <tobias@codesourcery.com>
873
874 PR c/99137
875 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
876
4028d01a
GA
8772021-02-24 Martin Sebor <msebor@redhat.com>
878
879 PR middle-end/97172
880 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
881
bf81237e
GA
8822021-02-18 Jakub Jelinek <jakub@redhat.com>
883
884 PR c/99136
885 * c-typeck.c (c_finish_return): Don't wrap retval into
886 EXCESS_PRECISION_EXPR in functions that return void.
887
0c5cdb31
GA
8882021-02-11 Marek Polacek <polacek@redhat.com>
889
890 * c-parser.c (c_parser_if_statement): Use vec_free.
891
a19dd5e6
GA
8922021-02-04 Martin Sebor <msebor@redhat.com>
893
894 PR c/97882
895 * c-decl.c (locate_old_decl): Add type to diagnostic output.
896 (diagnose_mismatched_decls): Same.
897 (start_function): Introduce temporaries for better readability.
898 * c-typeck.c (comptypes_internal): Only consider complete enum
899 types in comparisons with integers.
900
f7884fb1
GA
9012021-02-01 Martin Sebor <msebor@redhat.com>
902
903 PR middle-end/97172
904 * c-decl.c (free_attr_access_data): New function.
905 (c_parse_final_cleanups): Call free_attr_access_data.
906
59cf67d1
GA
9072021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
908
909 * c-parser.c (c_parser_omp_clause_detach): New.
910 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
911 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
912 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
913 clause. Prevent use of detach with mergeable and overriding the
914 data sharing mode of the event handle.
915
2f7f0d32
GA
9162021-01-15 Jakub Jelinek <jakub@redhat.com>
917
918 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
919 unqualified element type and then call c_build_qualified_type on the
920 ARRAY_TYPE.
921
7d187e4f
GA
9222021-01-07 Richard Biener <rguenther@suse.de>
923
924 * gimple-parser.c (c_parser_gimple_compound_statement): Only
925 reallocate loop array if it is too small.
926
eefe499f
GA
9272020-12-16 Martin Uecker <muecker@gwdg.de>
928
929 PR c/98047
930 * c-typeck.c (build_modify_expr): Drop qualifiers.
931
9322020-12-16 Martin Uecker <muecker@gwdg.de>
933
934 PR c/98260
935 * c-parser.c (c_parser_expression): Look into
936 nop expression when marking expressions as read.
937
d52945ce
GA
9382020-12-14 Martin Liska <mliska@suse.cz>
939
940 PR sanitizer/98204
941 * c-typeck.c (pointer_diff): Do not emit a top-level
942 sanitization.
943 (build_binary_op): Likewise.
944
ca2bd949
GA
9452020-12-09 Tobias Burnus <tobias@codesourcery.com>
946
947 * c-parser.c (c_parser_omp_allocate): New.
948 (c_parser_omp_construct): Call it.
949
9502020-12-09 Richard Biener <rguenther@suse.de>
951
952 PR c/98200
953 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
954 early on error.
955
bc8a7013
GA
9562020-12-07 Martin Uecker <muecker@gwdg.de>
957
958 PR c/97981
959 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
960 that drops qualifiers to the end of the function.
961
d48df6f2
GA
9622020-11-26 Martin Uecker <muecker@gwdg.de>
963
964 PR c/65455
965 PR c/92935
966 * c-parser.c (c_parser_declaration_or_fndef): Remove
967 redundant code to drop qualifiers of _Atomic types for __auto_type.
968 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
969 types for __typeof__.
970
1e2c9a27
GA
9712020-11-24 Jakub Jelinek <jakub@redhat.com>
972
973 PR c/97958
974 * c-parser.c (c_parser_binary_expression): For omp atomic binary
975 expressions, use make_node instead of build2 to avoid checking build2
976 performs.
977
8e6198d0
GA
9782020-11-23 Joseph Myers <joseph@codesourcery.com>
979
980 PR c/95630
981 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
982 for comparisons of complete and incomplete pointers.
983
7a97e2fc
GA
9842020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
985
986 * c-aux-info.c (gen_type): Support opaque types.
987
82e5048e
GA
9882020-11-20 Martin Sebor <msebor@redhat.com>
989
990 PR middle-end/97879
991 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
992
9932020-11-20 Jakub Jelinek <jakub@redhat.com>
994
995 PR other/97911
996 * Make-lang.in (c.serial): Change from goal to a variable.
997 (.PHONY): Drop c.serial.
998
9992020-11-20 Martin Uecker <muecker@gwdg.de>
1000
1001 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1002
d62586ee
GA
10032020-11-19 Jakub Jelinek <jakub@redhat.com>
1004
1005 PR c/97860
1006 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1007 error_operand_p.
1008
25bb75f8
GA
10092020-11-18 Jakub Jelinek <jakub@redhat.com>
1010
1011 * Make-lang.in (c.serial): New goal.
1012 (.PHONY): Add c.serial c.prev.
1013 (cc1$(exeext)): Call LINK_PROGRESS.
1014
77f67db2
GA
10152020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1016
1017 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1018 goto too.
1019 * c-typeck.c (build_asm_expr): Remove an assert checking output
1020 absence for asm goto.
1021
10222020-11-13 Jakub Jelinek <jakub@redhat.com>
1023
1024 * c-typeck.c (c_finish_omp_clauses): Don't clear
1025 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1026
10272020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1028
1029 PR objc/77404
1030 * c-parser.c (c_parser_objc_class_definition): Pass the
1031 location of the class name to the interface declaration.
1032
bb622641
GA
10332020-11-10 Strager Neds <strager.nds@gmail.com>
1034
1035 * c-decl.c (merge_decls): Use new overload of
1036 set_decl_section_name.
1037
10382020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1039
1040 * c-parser.c (c_parser_omp_target_data): Add use of
1041 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1042 handled map clause kind.
1043 (c_parser_omp_target_enter_data): Likewise.
1044 (c_parser_omp_target_exit_data): Likewise.
1045 (c_parser_omp_target): Likewise.
1046 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1047 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1048 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1049 same struct field access to co-exist on OpenMP construct.
1050
2da7ee05
GA
10512020-11-07 Martin Uecker <muecker@gwdg.de>
1052
1053 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1054 (c_parser_all_labels): Likewise.
1055
44cab2d8
GA
10562020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1057
1058 * c-parser.c (c_parser_objc_at_property_declaration):
1059 Improve parsing fidelity. Associate better location info
1060 with @property attributes. Clean up the interface to
1061 objc_add_property_declaration ().
1062
10632020-11-06 Nathan Sidwell <nathan@acm.org>
1064
1065 * c-decl.c (diagnose_mismatched_decls): Rename
1066 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1067 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1068 (collect_source_refs): Likewise.
1069 * c-typeck.c (inform_declaration, inform_for_arg)
1070 (convert_for_assignment): Likewise.
1071
10722020-11-06 Tobias Burnus <tobias@codesourcery.com>
1073
1074 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1075 OpenACC matching.
1076 (c_parser_omp_construct): Update call.
1077
35c125cb
GA
10782020-11-04 Jakub Jelinek <jakub@redhat.com>
1079
1080 PR c++/97670
1081 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1082 find underlying decl to clear in the aligned_head bitmap.
1083
10842020-11-04 Joseph Myers <joseph@codesourcery.com>
1085
1086 * c-decl.c (handle_nodiscard_attribute): New.
1087 (std_attribute_table): Add nodiscard.
1088 * c-parser.c (c_parser_std_attribute): Expect argument to
1089 nodiscard attribute to be a string. Do not special-case ignoring
1090 nodiscard.
1091 * c-typeck.c (maybe_warn_nodiscard): New.
1092 (build_compound_expr, emit_side_effect_warnings): Call
1093 maybe_warn_nodiscard.
1094 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1095 emit_side_effect_warnings if warn_unused_result.
1096
4f0606fe
GA
10972020-10-29 Asher Gordon <AsDaGo@posteo.net>
1098
1099 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1100 with XDELETE.
1101 (finish_init): Likewise.
1102 (pop_init_level): Likewise.
1103
e93aae4a
GA
11042020-10-28 Joseph Myers <joseph@codesourcery.com>
1105
1106 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1107 error_at for omitted parameter name.
1108
11092020-10-28 Jakub Jelinek <jakub@redhat.com>
1110
1111 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1112 (c_parser_omp_clause_allocate): New function.
1113 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1114 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1115 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1116 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1117 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1118 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1119 PRAGMA_OMP_CLAUSE_ALLOCATE.
1120 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1121
89bb01e7
GA
11222020-10-27 Joseph Myers <joseph@codesourcery.com>
1123
1124 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1125 standard attributes.
1126
efe71fcc
GA
11272020-10-23 Marek Polacek <polacek@redhat.com>
1128
1129 PR c++/91741
1130 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1131 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1132 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1133 * c-tree.h (char_type_p): Declare.
1134 * c-typeck.c (char_type_p): No longer static.
1135
11362020-10-23 Martin Sebor <msebor@redhat.com>
1137
1138 PR middle-end/97552
1139 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1140
2fe5b7d1
GA
11412020-09-19 Martin Sebor <msebor@redhat.com>
1142
1143 PR c/50584
1144 * c-decl.c (lookup_last_decl): Define new function.
1145 (c_decl_attributes): Call it.
1146 (start_decl): Add argument and use it.
1147 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1148 (get_parm_array_spec): Define new function.
1149 (push_parm_decl): Call get_parm_array_spec.
1150 (start_function): Call warn_parm_array_mismatch. Build attribute
1151 access and add it to current function.
1152 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1153 in forms of array parameters.
1154 * c-tree.h (start_decl): Add argument.
1155
11562020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1157
1158 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1159 with...
1160 (in_statement): New.
1161 (start_function): Adjust for above change.
1162 (c_push_function_context, c_pop_function_context): Likewise.
1163 * c-lang.h (struct language_function): Likewise.
1164 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1165 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1166 New.
1167 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1168 (c_parser_switch_statement): Adjust break/switch context handling
1169 and calls to renamed functions.
1170 (c_parser_while_statement): Adjust break/switch context handling and
1171 build a WHILE_STMT.
1172 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1173 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1174 (c_parser_omp_for_loop): Adjust break/switch context handling.
1175 * c-tree.h (c_break_label, c_cont_label): Delete.
1176 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1177 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1178 (in_statement, switch_statement_break_seen_p): Declare.
1179 (c_start_case, c_finish_case): Renamed to...
1180 (c_start_switch, c_finish_switch).
1181 (c_finish_bc_stmt): Adjust arguments.
1182 * c-typeck.c (build_function_call_vec): Don't try to print
1183 statements with %qE format.
1184 (struct c_switch): Rename switch_expr field to switch_stmt.
1185 Add break_stmt_seen_p field.
1186 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1187 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1188 (do_case): Update for changes to struct c_switch.
1189 (c_finish_case): Rename to c_finish_switch. Update for changes to
1190 struct c_switch and change of representation from SWITCH_EXPR to
1191 SWITCH_STMT.
1192 (c_finish_loop): Delete.
1193 (c_finish_bc_stmt): Update to reflect changes to break/continue
1194 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1195 of a GOTO_EXPR except for objc foreach loops.
1196
e1a4a8a0
GA
11972020-09-01 Jakub Jelinek <jakub@redhat.com>
1198
1199 PR c++/96867
1200 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1201 only on PARM_DECLs.
1202
8f7ea26a
GA
12032020-08-28 Martin Sebor <msebor@redhat.com>
1204
1205 PR c/96596
1206 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1207 argument type.
1208
8b394f01
GA
12092020-08-27 Martin Liska <mliska@suse.cz>
1210
1211 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1212 growth function to true.
1213
db0f6efe
GA
12142020-08-25 Tobias Burnus <tobias@codesourcery.com>
1215
1216 PR c/96678
1217 * c-typeck.c (handle_omp_array_sections_1): Talk about
1218 array function parameter in the error message.
1219
5c265693
GA
12202020-08-18 Jakub Jelinek <jakub@redhat.com>
1221
1222 PR c/96571
1223 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1224 to int, holding index of the match. Call mark_exp_read on the selector
1225 expression and on expressions other than the selected one.
1226
4967ca2f
GA
12272020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1228
1229 PR c/96377
1230 * c-typeck.c (process_init_element): Split test for whether to
1231 recurse into a record, union or array into...
1232 (initialize_elementwise_p): ...this new function. Don't recurse
1233 into a vector type if the initialization value is also a vector.
1234
48cc2e46
GA
12352020-07-31 Richard Biener <rguenther@suse.de>
1236
1237 PR debug/96383
1238 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1239 Define to c_common_finalize_early_debug.
1240
3ea9abca
GA
12412020-07-22 Tobias Burnus <tobias@codesourcery.com>
1242
1243 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1244 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1245 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1246
30430061
GA
12472020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1248
1249 PR target/95237
1250 * c-decl.c (finish_decl): Call target hook
1251 lower_local_decl_alignment to lower local decl alignment.
1252
3f8ca9cb
GA
12532020-07-09 Julian Brown <julian@codesourcery.com>
1254 Thomas Schwinge <thomas@codesourcery.com>
1255
1256 PR middle-end/95270
1257 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1258 for standalone attach/detach clauses.
1259
a82c4c4c 12602020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1261
1262 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1263 set, warn for conversion between pointers that point to incompatible
1264 scalar storage orders.
1265
f60ee68d
GA
12662020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1267
1268 * c-parser.c (c_parser_statement_after_labels): Pass correct
1269 parameters to c_parser_do_statement.
1270
56638b9b
GA
12712020-06-16 Jakub Jelinek <jakub@redhat.com>
1272
1273 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1274 c_in_omp_for.
1275 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1276 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1277 c_finish_omp_for.
1278 * c-tree.h (c_in_omp_for): Declare.
1279 * c-typeck.c (c_in_omp_for): Define.
1280 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1281 (digest_init): Likewise.
1282 (build_binary_op): Likewise.
1283
12842020-06-16 Jakub Jelinek <jakub@redhat.com>
1285
1286 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1287 from kind by comma rather than colon.
1288
1a59f3db
GA
12892020-06-05 Mark Wielaard <mark@klomp.org>
1290
1291 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1292 an undeclared builtin, then add a fixit header hint, if found.
1293 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1294 warning_at about implicit builtin declaration type mismatch.
1295
9a5b7438
GA
12962020-06-03 Mark Wielaard <mark@klomp.org>
1297
1298 * c-parser.c (struct c_parser): Add seen_string_literal
1299 bitfield.
1300 (c_parser_consume_token): Reset seen_string_literal.
1301 (c_parser_error_richloc): Add name_hint if seen_string_literal
1302 and next token is a CPP_NAME and we have a missing header
1303 suggestion for the name.
1304 (c_parser_string_literal): Set seen_string_literal.
1305
13062020-06-03 Mark Wielaard <mark@klomp.org>
1307
1308 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1309 scope with matching_parens after CPP_OPEN_PAREN.
1310
13112020-06-03 Tobias Burnus <tobias@codesourcery.com>
1312
1313 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1314
53ffb43a
GA
13152020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1316
1317 * Make-lang.in: Remove extra slash.
1318
8f66f175
ML
13192020-05-19 Martin Liska <mliska@suse.cz>
1320
1321 * c-parser.c: Fix typo.
1322
49ddde69
JJ
13232020-05-14 Jakub Jelinek <jakub@redhat.com>
1324
1325 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1326
eb72dc66
RB
13272020-05-07 Richard Biener <rguenther@suse.de>
1328
1329 PR middle-end/94703
1330 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1331 DECL_GIMPLE_REG_P.
1332
bf915591
JJ
13332020-04-30 Jakub Jelinek <jakub@redhat.com>
1334
1335 PR c/94842
1336 * c-decl.c (set_labels_context_r): In addition to context-less
1337 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1338 parent function if any.
1339 (store_parm_decls): Adjust comment.
1340
e1113ffb
JJ
13412020-04-19 Jakub Jelinek <jakub@redhat.com>
1342
1343 PR objc/94637
1344 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1345 two CPP_COLON tokens.
1346
2e389749
JJ
13472020-04-17 Jakub Jelinek <jakub@redhat.com>
1348
1349 PR other/94629
1350 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1351 to data.clauses.
1352
2dc9294c
JJ
13532020-04-15 Jakub Jelinek <jakub@redhat.com>
1354
1355 PR c/94593
1356 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1357 requires directive when not at file scope.
1358
13e41d8b
TB
13592020-04-08 Tobias Burnus <tobias@codesourcery.com>
1360
1361 PR middle-end/94120
1362 * c-decl.c (c_check_in_current_scope): New function.
1363 * c-tree.h (c_check_in_current_scope): Declare it.
1364 * c-parser.c (c_parser_oacc_declare): Add check that variables
1365 are declared in the same scope as the directive. Fix handling
1366 of namespace vars.
1367
4df50a05
JJ
13682020-04-07 Jakub Jelinek <jakub@redhat.com>
1369
1370 PR c++/94512
1371 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1372 if c_parser_omp_master succeeded.
1373
5db9e893
JJ
13742020-03-23 Jakub Jelinek <jakub@redhat.com>
1375
1376 PR gcov-profile/94029
1377 PR c/94239
1378 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1379 the function_start_locus location. Don't do that afterwards for the
1380 __GIMPLE body parsing.
1381
9def91e9
JJ
13822020-03-19 Jakub Jelinek <jakub@redhat.com>
1383
1384 PR gcov-profile/94029
1385 * c-tree.h (finish_function): Add location_t argument defaulted to
1386 input_location.
1387 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1388 set it to the locus of closing } if non-NULL.
1389 (c_parser_compound_statement_nostart): Return locus of closing }.
1390 (c_parser_parse_rtl_body): Likewise.
1391 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1392 finish_function.
1393 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1394 input_location to set function_end_locus.
1395
046c5890
JJ
13962020-03-17 Jakub Jelinek <jakub@redhat.com>
1397
1398 PR c/94172
1399 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1400 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1401 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1402 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1403 ENUMERAL_TYPEs.
1404 (finish_incomplete_vars): New function, moved from finish_struct. Use
1405 relayout_decl instead of layout_decl.
1406 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1407 being TYPE_VFIELD. Use finish_incomplete_vars.
1408 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1409 finish_incomplete_vars.
1410 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1411 also on ENUMERAL_TYPEs.
1412
c015ff8c
JJ
14132020-03-16 Jakub Jelinek <jakub@redhat.com>
1414
1415 PR c/94179
1416 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1417
f2e9fe5f
MS
14182020-03-13 Martin Sebor <msebor@redhat.com>
1419
1420 PR c/94040
1421 * c-decl.c (builtin_structptr_type_count): New constant.
1422 (match_builtin_function_types): Reject decls that are incompatible
1423 in types pointed to by pointers.
1424 (diagnose_mismatched_decls): Adjust comments.
1425
c9d70946
JM
14262020-03-05 Joseph Myers <joseph@codesourcery.com>
1427
1428 PR c/93577
1429 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1430 empty when initialized type is error_mark_node.
1431 (set_designator, process_init_element): Ignore initializers for
1432 elements of a variable-size type or of error_mark_node.
1433
726e292d
MS
14342020-03-01 Martin Sebor <msebor@redhat.com>
1435
1436 PR middle-end/93926
1437 * c-decl.c (types_close_enough_to_match): New function.
1438 (match_builtin_function_types):
1439 (diagnose_mismatched_decls): Add missing inform call to a warning.
1440
a499c2f8
MS
14412020-03-01 Martin Sebor <msebor@redhat.com>
1442
1443 PR c/93812
1444 * c-typeck.c (build_functype_attribute_variant): New function.
1445 (composite_type): Call it.
1446
9c3da8cc
JJ
14472020-02-25 Jakub Jelinek <jakub@redhat.com>
1448
1449 PR other/93912
1450 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1451 Rename last argument from probablity to probability.
1452
bacdd5e9
JJ
14532020-02-13 Jakub Jelinek <jakub@redhat.com>
1454
1455 PR c/93576
1456 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1457 *expr if it has side effects.
1458
f9eb0973
JL
14592020-01-30 Jeff Law <law@redhat.com>
1460
1461 PR c/88660
1462 * c-parser.c (c_parser_switch_statement): Make sure to request
1463 marking the switch expr as used.
1464
ac68e287
JM
14652020-01-22 Joseph Myers <joseph@codesourcery.com>
1466
1467 PR c/93348
1468 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1469 argument with integer operands.
1470
852f0ae8
KK
14712020-01-16 Kerem Kat <keremkat@gmail.com>
1472
1473 PR c/92833
1474 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1475 to support 4 available tokens.
1476
e2346a33
JM
14772020-01-15 Joseph Myers <joseph@codesourcery.com>
1478
1479 PR c/93072
1480 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1481 determine whether to set DECL_CONTEXT.
1482
3d77686d
JM
14832020-01-13 Joseph Myers <joseph@codesourcery.com>
1484
1485 PR c/93241
1486 * c-typeck.c (build_c_cast): Check for expressions with integer
1487 operands that can occur in an unevaluated part of an integer
1488 constant expression and call note_integer_operands as needed.
1489
f74c4b2c
RB
14902019-01-08 Richard Biener <rguenther@suse.de>
1491
1492 PR middle-end/93199
1493 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1494 permanently.
1495
8d9254fc
JJ
14962020-01-01 Jakub Jelinek <jakub@redhat.com>
1497
1498 Update copyright years.
1499
39292e25
EB
15002019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1501
1502 * c-decl.c (collect_source_ref_cb): Delete.
1503 (for_each_global_decl): Rename into...
1504 (collect_source_refs): ...this. Call collect_source_ref directly.
1505 (c_parse_final_cleanups): Always call collect_source_ref on the main
1506 input filename.
1507
519d7496
JB
15082019-12-19 Julian Brown <julian@codesourcery.com>
1509 Cesar Philippidis <cesar@codesourcery.com>
1510
1511 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1512 detach clauses.
1513 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1514 Allow deref (->) in variable lists if true.
1515 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1516 Pass to c_parser_omp_variable_list.
1517 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1518 call to c_parser_omp_variable_list.
1519 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1520 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1521 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1522 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1523 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1524 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1525 and detach. Support deref.
1526 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1527 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1528 (c_oacc_check_attachments): New function.
1529 (c_finish_omp_clauses): Check attach/detach arguments for being
1530 pointers using above. Support deref.
1531
a6163563
JB
15322019-12-19 Julian Brown <julian@codesourcery.com>
1533 Maciej W. Rozycki <macro@codesourcery.com>
1534 Tobias Burnus <tobias@codesourcery.com>
1535 Thomas Schwinge <thomas@codesourcery.com>
1536
1537 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1538 (c_parser_oacc_data_clause): Likewise.
1539 (c_parser_oacc_all_clauses): Likewise.
1540 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1541 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1542 PRAGMA_OACC_CLAUSE_NO_CREATE.
1543 * c-typeck.c (handle_omp_array_sections): Support
1544 GOMP_MAP_NO_ALLOC.
1545
d68f5d45
DM
15462019-12-09 David Malcolm <dmalcolm@redhat.com>
1547
1548 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1549 Replace label_text ctor calls.
1550
4691bf46
JM
15512019-12-04 Joseph Myers <joseph@codesourcery.com>
1552
1553 PR c/36941
1554 PR c/88827
1555 * c-typeck.c (convert_lvalue_to_rvalue): Call
1556 require_complete_type for arguments not of void types.
1557 (build_indirect_ref): Do not diagnose dereferencing pointers to
1558 incomplete types.
1559 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1560
85d11957
JM
15612019-12-03 Joseph Myers <joseph@codesourcery.com>
1562
1563 PR c/88704
1564 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1565 old-style parameter definitions.
1566
4569f8b3
SL
15672019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1568
1569 PR target/92499
1570
1571 * c-decl.c (flexible_array_type_p): Move to common code.
1572
65ef05d0
RS
15732019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1574
1575 * c-decl.c (start_decl): Allow initialization of variables whose
1576 size is a POLY_INT_CST.
1577 (finish_decl): Use verify_type_context to check whether the target
1578 allows variables with a particular type to have static or thread-local
1579 storage duration. Don't raise a second error if such variables do
1580 not have a constant size.
1581 (grokdeclarator): Use verify_type_context to check whether the
1582 target allows fields or array elements to have a particular type.
1583 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1584 the target allows pointer difference for the types involved.
1585 (build_unary_op): Likewise for pointer increment and decrement.
1586
34b43828
JM
15872019-11-29 Joseph Myers <joseph@codesourcery.com>
1588
1589 * c-parser.c (struct c_parser): Add members raw_tokens and
1590 raw_tokens_used.
1591 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1592 using previously-lexed raw tokens.
1593 (c_parser_peek_nth_token_raw)
1594 (c_parser_check_balanced_raw_token_sequence): New functions.
1595 (c_parser_nth_token_starts_std_attributes): Use
1596 c_parser_check_balanced_raw_token_sequence for Objective-C.
1597
5b8d9367
JM
15982019-11-25 Joseph Myers <joseph@codesourcery.com>
1599
1600 PR c/91985
1601 * c-decl.c (finish_declspecs): Use int instead of decimal
1602 floating-point types if decimal floating-point not supported.
1603
1723e1be
JM
16042019-11-25 Joseph Myers <joseph@codesourcery.com>
1605
1606 * c-tree.h (struct c_declarator): Use a structure for id member.
1607 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1608 declarators at the start, not when handling individual declarators
1609 later. Use u.id.id instead of u.id.
1610 (grokfield): Use u.id.id instead of u.id.
1611 (build_id_declarator): Set u.id.id and u.id.attrs.
1612 (finish_declspecs): Handle postfix attributes in case of typedef
1613 name or typeof used.
1614 * c-parser.c (c_parser_direct_declarator)
1615 (c_parser_direct_declarator_inner): Place declarator for
1616 attributes inside that for function or array, not outside. Set
1617 u.id.attrs for identifiers.
1618 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1619 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1620 instead of u.id.
1621
bdaf8be1
JJ
16222019-11-22 Jakub Jelinek <jakub@redhat.com>
1623
1624 PR c/90677
1625 * c-decl.c (identifier_global_tag): Define.
1626
3e00ba47
RB
16272019-11-20 Richard Biener <rguenther@suse.de>
1628
1629 PR c/92088
1630 * c-decl.c (grokdeclarator): Prevent inlining of nested
1631 function with VLA arguments.
1632
8c5b727a
JM
16332019-11-20 Joseph Myers <joseph@codesourcery.com>
1634
1635 * c-decl.c (c_warn_type_attributes): New function.
1636 (groktypename, grokdeclarator, finish_declspecs): Call
1637 c_warn_type_attributes before applying attributes to types.
1638 * c-tree.h (c_warn_type_attributes): Declare.
1639
192961ff
JM
16402019-11-19 Joseph Myers <joseph@codesourcery.com>
1641
1642 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1643 standard attributes.
1644 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1645 pedwarn for unknown standard attributes and return error_mark_node
1646 for them.
1647
20a38017
MM
16482019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1649
1650 * c-parser.c (c_parser_parse_rtl_body): Always call
1651 run_rtl_passes, even if startwith pass is not provided.
1652
d5fbe5e0
JM
16532019-11-15 Joseph Myers <joseph@codesourcery.com>
1654
1655 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1656 duplicate standard attributes.
1657
97cc1187
JM
16582019-11-15 Joseph Myers <joseph@codesourcery.com>
1659
1660 * c-decl.c (std_attribute_table): Add maybe_unused.
1661
f8aea5e3
JM
16622019-11-15 Joseph Myers <joseph@codesourcery.com>
1663
1664 * c-decl.c (std_attribute_table): Add fallthrough.
1665 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1666 attribute at top level.
1667
2cc94aa8
JM
16682019-11-15 Joseph Myers <joseph@codesourcery.com>
1669
1670 * c-decl.c (std_attribute_table): New.
1671 (c_init_decl_processing): Register attributes from
1672 std_attribute_table.
1673 * c-parser.c (c_parser_attribute_arguments): Add arguments
1674 require_string and allow_empty_args. All callers changed.
1675 (c_parser_std_attribute): Set require_string argument for
1676 "deprecated" attribute.
1677
7c5890cc
JM
16782019-11-14 Joseph Myers <joseph@codesourcery.com>
1679
1680 * c-parser.c (c_parser_postfix_expression)
1681 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1682 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1683
e8738f4e
RS
16842019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1685
1686 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1687 of build_same_sized_truth_vector_type.
1688 (build_vec_cmp): Likewise.
1689
b2417b59
JJ
16902019-11-14 Jakub Jelinek <jakub@redhat.com>
1691
bedb7f04
JJ
1692 * c-parser.c (c_parser_omp_context_selector): Don't require score
1693 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1694 negative score.
1695
b2417b59
JJ
1696 * c-parser.c (c_parser_omp_context_selector): Rename
1697 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1698 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1699 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1700 and string literals.
1701
4e03c3a7
JM
17022019-11-14 Joseph Myers <joseph@codesourcery.com>
1703
1704 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1705 ctsk_tagfirstref_attrs.
1706 (struct c_declspecs): Update description of attrs. Add
1707 postfix_attrs and non_std_attrs_seen_p. Increase size of
1708 typespec_kind bit-field.
1709 (c_warn_unused_attributes): New declaration.
1710 (parser_xref_tag): Update prototype.
1711 * c-decl.c (c_warn_unused_attributes): New function.
1712 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1713 ctsk_tagref_attrs. Handle attribute declarations.
1714 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1715 (grokdeclarator): Handle standard attributes.
1716 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1717 attributes to incomplete type reference.
1718 (xref_tag): Update call to parser_xref_tag.
1719 (declspecs_add_addrspace, declspecs_add_type)
1720 (declspecs_add_scspec, declspecs_add_attrs): Set
1721 non_std_attrs_seen_p.
1722 (finish_declspecs): Apply postfix standard attributes to type.
1723 * c-parser.c (c_token_starts_declspecs)
1724 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1725 (c_parser_next_tokens_start_declaration): Update comments.
1726 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1727 parser->tokens[2] to parser->tokens[1].
1728 (c_parser_nth_token_starts_std_attributes)
1729 (c_parser_std_attribute_specifier_sequence): New functions.
1730 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1731 attrs. All callers changed. Handle standard attributes.
1732 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1733 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1734 All callers changed.
1735 (c_parser_declspecs): Add arguments start_std_attr_ok and
1736 end_std_attr_ok. All callers changed. Handle standard
1737 attributes.
1738 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1739 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1740 (c_parser_compound_statement_nostart, c_parser_all_labels)
1741 (c_parser_label, c_parser_statement, c_parser_for_statement):
1742 Handle standard attributes.
1743 * c-parser.h (c_parser_declspecs): Update prototype.
1744 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1745 c_parser_declspecs.
1746
0c29cac4
ML
17472019-11-12 Martin Liska <mliska@suse.cz>
1748
1749 * gimple-parser.c: Do not include params.h.
1750
028d4092
ML
17512019-11-12 Martin Liska <mliska@suse.cz>
1752
1753 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1754 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1755 macro.
1756
62aee289
MR
17572019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1758 Frederik Harwath <frederik@codesourcery.com>
1759
1760 gcc/c/
1761 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1762 (c_parser_oacc_kernels_parallel): Rename function to...
1763 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1764 (c_parser_omp_construct): Update accordingly.
1765
1766
7cec9588
JJ
17672019-11-11 Jakub Jelinek <jakub@redhat.com>
1768
1769 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1770 without corresponding end declare target.
1771
f486280c
RS
17722019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1773
1774 * c-convert.c (convert): Only handle vector conversions if one of
1775 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1776 allows it.
1777 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1778 vectors satisfy gnu_vector_type_p.
1779 (build_unary_op): Only allow unary operators to be applied to
1780 vectors if they satisfy gnu_vector_type_p.
1781 (digest_init): Only allow by-element initialization of vectors
1782 if they satisfy gnu_vector_type_p.
1783 (really_start_incremental_init): Likewise.
1784 (push_init_level): Likewise.
1785 (pop_init_level): Likewise.
1786 (process_init_element): Likewise.
1787 (build_binary_op): Only allow binary operators to be applied to
1788 vectors if they satisfy gnu_vector_type_p.
1789
017c6491
JM
17902019-11-08 Joseph Myers <joseph@codesourcery.com>
1791
1792 * c-decl.c (grokparms): Convert () in a function definition to
1793 (void) for C2x.
1794 (store_parm_decls_oldstyle): Pedwarn for C2x.
1795 (store_parm_decls): Update comment about () not generating a
1796 prototype.
1797
c01bd174
JM
17982019-11-07 Joseph Myers <joseph@codesourcery.com>
1799
1800 * c-parser.c (c_parser_attribute_arguments): New function.
1801 Factored out of c_parser_gnu_attribute.
1802 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1803 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1804 (c_parser_std_attribute_specifier): New functions.
1805 (c_parser_transaction_attributes): Use
1806 c_parser_std_attribute_specifier.
1807
471c5330
JM
18082019-11-07 Joseph Myers <joseph@codesourcery.com>
1809
1810 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1811 lex_joined_string and translate_strings_p.
1812 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1813 c_lex_with_flags.
1814 (c_parser_string_literal): New function.
1815 (c_parser_static_assert_declaration_no_semi): Use
1816 c_parser_string_literal. Do not set lex_untranslated_string.
1817 (c_parser_asm_string_literal): Use c_parser_string_literal.
1818 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1819 (c_parser_gnu_attributes): Set and restore translate_strings_p
1820 instead of lex_untranslated_string.
1821 (c_parser_asm_statement): Do not set lex_untranslated_string.
1822 (c_parser_asm_operands): Likewise.
1823 (c_parser_has_attribute_expression): Set and restore
1824 translate_strings_p instead of lex_untranslated_string.
1825 (c_parser_postfix_expression): Use c_parser_string_literal.
1826 (pragma_lex): Likewise.
1827 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1828 (c_parse_file): Set translate_strings_p.
1829 * gimple-parser.c (c_parser_gimple_postfix_expression)
1830 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1831 * c-parser.c (c_parser_string_literal): Declare function.
1832
d0c464d2
JJ
18332019-11-02 Jakub Jelinek <jakub@redhat.com>
1834
1835 * c-parser.c (c_finish_omp_declare_variant): Use
1836 omp_get_context_selector instead of c_omp_get_context_selector.
1837
ac2cfa6c
RS
18382019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1839
1840 * c-tree.h (c_simulate_enum_decl): Declare.
1841 * c-decl.c (c_simulate_enum_decl): New function.
1842 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1843
74078538
RS
18442019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1845
1846 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1847 * c-decl.c (c_simulate_builtin_function_decl): New function.
1848 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1849 to the above.
1850
ad1539d5
MS
18512019-10-28 Martin Sebor <msebor@redhat.com>
1852
1853 PR c/66970
1854 * c-decl.c (names_builtin_p): Define a new function.
1855
cb73e4e7
RB
18562019-10-28 Richard Biener <rguenther@suse.de>
1857
1858 PR c/92249
1859 * gimple-parser.c (c_parser_parse_gimple_body): Make
1860 current_bb the entry block initially to easier recover
1861 from errors.
1862 (c_parser_gimple_compound_statement): Adjust.
1863
135df52c
JJ
18642019-10-24 Jakub Jelinek <jakub@redhat.com>
1865
1866 * c-parser.c (c_finish_omp_declare_variant): Use
1867 omp_context_selector_matches instead of
1868 c_omp_context_selector_matches.
1869 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1870 attribute in between declare target and end declare target
1871 pragmas.
1872
783bfe5e
JM
18732019-10-15 Joseph Myers <joseph@codesourcery.com>
1874
1875 * c-parser.c (c_parser_attribute_any_word): Rename to
1876 c_parser_gnu_attribute_any_word. All callers changed.
1877 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1878 callers changed.
1879 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1880 callers changed.
1881 (c_parser_declaration_or_fndef, c_parser_declspecs)
1882 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1883 (c_parser_struct_declaration, c_parser_declarator)
1884 (c_parser_gnu_attribute, c_parser_compound_statement)
1885 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1886 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1887 attribute-related syntax productions.
1888
56898e43
RS
18892019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1890
1891 * c-objc-common.c (useful_aka_type_p): Replace with...
1892 (get_aka_type): ...this new function. Given the original type,
1893 decide which aka type to print (if any). Only look through typedefs
1894 if user_facing_original_type_p.
1895 (print_type): Update accordingly.
1896
b9424661
JJ
18972019-10-14 Jakub Jelinek <jakub@redhat.com>
1898
1899 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1900 into int NESTED, if it is 2, diagnose missing commas in between
1901 clauses.
1902 (c_parser_omp_context_selector): Pass 2 as last argument to
1903 c_parser_omp_all_clauses.
1904
20de9568
JJ
19052019-10-12 Jakub Jelinek <jakub@redhat.com>
1906
1907 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1908 For simd properties, put them directly into TREE_VALUE.
1909 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1910 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1911 add "omp declare variant base" attribute rather than
1912 "omp declare variant".
1913
fe2bc27c
JM
19142019-10-11 Joseph Myers <joseph@codesourcery.com>
1915
1916 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1917
94e7f906
JJ
19182019-10-10 Jakub Jelinek <jakub@redhat.com>
1919
1920 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1921 true, terminate processing on closing paren and don't skip to end of
1922 pragma line.
1923 (c_parser_omp_declare_simd): Handle also declare variant.
1924 (omp_construct_selectors, omp_device_selectors,
1925 omp_implementation_selectors, omp_user_selectors): New variables.
1926 (c_parser_omp_context_selector,
1927 c_parser_omp_context_selector_specification,
1928 c_finish_omp_declare_variant): New functions.
1929 (c_finish_omp_declare_simd): Handle both declare simd and
1930 declare variant.
1931 (c_parser_omp_declare): Handle declare variant.
1932
93313b94
JM
19332019-10-02 Joseph Myers <joseph@codesourcery.com>
1934
1935 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1936 CPP_COLON tokens.
1937
55879815
RS
19382019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1939
1940 * c-objc-common.c (useful_aka_type_p): New function.
1941 (print_type): Use it to decide whether an aka type is worth printing.
1942
59bc434a
JJ
19432019-09-27 Jakub Jelinek <jakub@redhat.com>
1944
1945 PR c++/88203
1946 * c-parser.c (c_parser_predefined_identifier): New function.
1947 (c_parser_postfix_expression): Use it.
1948 (c_parser_omp_variable_list): Parse predefined identifiers.
1949 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1950 in shared and firstprivate clauses, even when they are predetermined
1951 shared.
1952
c6447c20
RS
19532019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1954
1955 * c-typeck.c (build_function_call_vec): Take the original function
1956 decl as an optional final parameter. Pass all built-in calls to
1957 check_builtin_function_arguments.
1958
522da4c2
EB
19592019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1960
1961 PR c/91815
1962 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1963 of identifiers in the external scope only for variables and functions.
1964
68e2c199
PK
19652019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1966
1967 PR c/78736
1968 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1969
22f8849d
IS
19702019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1971
1972 PR pch/61250
1973 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1974 after determining that the first token is not
1975 PRAGMA_GCC_PCH_PREPROCESS.
1976
db376f45
EB
19772019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1978
1979 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1980 FUNCTION_DECL to the right value in the presence of nested declarators.
1981
4d732405
RS
19822019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1983
1984 PR middle-end/91421
1985 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1986
cb1180d5
RS
19872019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1988
1989 PR middle-end/91421
1990 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1991 of a built_in_function.
1992 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1993
77eb117f
JJ
19942019-08-10 Jakub Jelinek <jakub@redhat.com>
1995
1996 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1997 (c_parser_omp_clause_device_type): New function.
1998 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1999 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2000 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2001 diagnostics for declare target with clauses nested in clause-less
2002 declare target declaration-definition-seq.
2003 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2004
2c3b8bad
JJ
20052019-08-09 Jakub Jelinek <jakub@redhat.com>
2006
bb522e2e
JJ
2007 * c-parser.c (check_no_duplicate_clause): Simplify using
2008 omp_find_clause.
2009 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2010 directive name modifiers.
2011 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2012
2c3b8bad
JJ
2013 PR c/91401
2014 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2015 check_no_duplicate_clause call. Comment it out, instead emit a
2016 warning for duplicate dist_schedule clauses.
2017
99769e7f
RS
20182019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2019
2020 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2021
8860d270
JJ
20222019-08-08 Jakub Jelinek <jakub@redhat.com>
2023
2024 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2025 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2026 instead of generic_head to track duplicates.
2027
398e3feb
JJ
20282019-08-07 Jakub Jelinek <jakub@redhat.com>
2029
2030 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2031 (c_parser_omp_clause_use_device_addr): New function.
2032 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2033 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2034 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2035 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2036 map or use_device_* clauses.
2037 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2038 in OpenMP, require pointer type rather than pointer or array type.
2039 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2040
a28351e7
JJ
20412019-07-31 Jakub Jelinek <jakub@redhat.com>
2042
2043 PR c/91192
2044 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2045 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2046 case.
2047
6343b6bf
ML
20482019-07-25 Martin Liska <mliska@suse.cz>
2049 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2050
2051 PR c++/23383
2052 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2053
cb50701e
ML
20542019-07-25 Martin Liska <mliska@suse.cz>
2055
2056 * c-decl.c (merge_decls): Use new macros
2057 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2058
62e3e66f
RB
20592019-07-23 Richard Biener <rguenther@suse.de>
2060
2061 PR tree-optimization/83518
2062 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2063 a CFG also rebuild cgraph edges.
2064
554a530f
JJ
20652019-07-20 Jakub Jelinek <jakub@redhat.com>
2066
2067 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2068 (c_parser_omp_clause_bind): New function.
2069 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2070 (OMP_LOOP_CLAUSE_MASK): Define.
2071 (c_parser_omp_loop): New function.
2072 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2073 loop combined with parallel or teams.
2074 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2075 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2076
d119bf79
RS
20772019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2078
2079 PR c/53633
2080 * c-decl.c (finish_function): Check targetm.warn_func_return
2081 before issuing a -Wreturn-type warning.
2082
ab20d992 20832019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
2084
2085 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2086 (c_parser_compound_statement): Call it.
2087
1fdd6f04
JJ
20882019-07-12 Jakub Jelinek <jakub@redhat.com>
2089
2090 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2091 (c_parser_omp_clause_order): New function.
2092 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2093 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2094 PRAGMA_OMP_CLAUSE_ORDER.
2095 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2096
8389386c
RB
20972019-07-10 Richard Biener <rguenther@suse.de>
2098
2099 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2100 _Literal (int *) &x for address literals.
2101
99b1c316
MS
21022019-07-09 Martin Sebor <msebor@redhat.com>
2103
2104 PR c++/61339
2105 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2106 to class.
2107 (field_decl_cmp): Same.
2108 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2109 * c-tree.h: Same.
2110 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2111
6c1dae73
MS
21122019-07-09 Martin Sebor <msebor@redhat.com>
2113
2114 PR c++/61339
2115 * c-decl.c: Change class-key from class to struct and vice versa
2116 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2117 * gimple-parser.c: Same.
2118
69b5279e
RB
21192019-07-01 Richard Biener <rguenther@suse.de>
2120
2121 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2122 _Literal (char *) &"foo" for address literals pointing to
2123 STRING_CSTs.
2124
ab20d992
JJ
21252019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2126
2127 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2128 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2129 C incompatibility if alternate "__intN__" form is used.
2130
1e3d475e
MS
21312019-06-24 Martin Sebor <msebor@redhat.com>
2132
2133 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2134
bf38f7e9
JJ
21352019-06-10 Jakub Jelinek <jakub@redhat.com>
2136
2137 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2138 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2139 (c_parser_omp_scan_loop_body): New function.
2140 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2141 inscan reduction clauses.
2142 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2143 non-inscan reductions on the same construct, or inscan reductions with
2144 ordered or schedule clauses, or inscan array reductions.
2145
65985d78
MS
21462019-06-05 Martin Sebor <msebor@redhat.com>
2147
2148 PR c/90737
2149 * c-typeck.c (c_finish_return): Only consider functions returning
2150 pointers as candidates for -Wreturn-local-addr.
2151
0ecf545c
MS
21522019-06-05 Martin Sebor <msebor@redhat.com>
2153
2154 * c-decl.c (start_decl): Adjust quoting and hyphenation
2155 in diagnostics.
2156 (finish_decl): Same.
2157 (finish_enum): Same.
2158 (start_function): Same.
2159 (declspecs_add_type): Same.
2160 * c-parser.c (warn_for_abs): Same.
2161 * c-typeck.c (build_binary_op): Same.
2162
e03436e7
TS
21632019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2164
b48f44bf
TS
2165 PR c/89433
2166 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2167 marked with an OpenACC 'routine' directive.
2168
5bf04509
TS
2169 PR c/89433
2170 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2171 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2172
e03436e7
TS
2173 PR c/89433
2174 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2175 clauses from "omp declare target" attribute.
2176
a9c697b8
MS
21772019-05-16 Martin Sebor <msebor@redhat.com>
2178
ab20d992
JJ
2179 * c-decl.c (start_decl): Quote keywords, operators, and
2180 types in diagnostics.
2181 (finish_decl): Same.
2182 * c-parser.c (c_parser_asm_statement): Same.
2183 (c_parser_conditional_expression): Same.
2184 (c_parser_transaction_cancel): Same.
2185 * c-typeck.c (c_common_type): Same.
2186 (build_conditional_expr): Same.
2187 (digest_init): Same.
2188 (process_init_element): Same.
2189 (build_binary_op): Same.
a9c697b8 2190
c4499192
RB
21912019-05-17 Richard Biener <rguenther@suse.de>
2192
2193 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2194 (c_parser_gimple_unary_expression): Likewise.
2195 (c_parser_gimple_parentized_ternary_expression): New function.
2196
adfe6e4b
RB
21972019-05-16 Richard Biener <rguenther@suse.de>
2198
2199 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2200 (c_parser_gimple_unary_expression): Likewise.
2201
186dabf2
RB
22022019-05-15 Richard Biener <rguenther@suse.de>
2203
2204 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2205 __BIT_FIELD_REF.
2206
1158c5b4
RB
22072019-05-14 Richard Biener <rguenther@suse.de>
2208
2209 * gimple-parser.c (c_parser_gimple_statement): Remove
2210 questionable auto-promotion to VIEW_CONVERT_EXPR.
2211 (c_parser_gimple_typespec): Split out from __MEM parsing.
2212 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2213 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2214 as __VIEW_CONVERT with -gimple.
2215
fd4485aa
ML
22162019-05-09 Martin Liska <mliska@suse.cz>
2217
2218 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2219 __MAX.
2220 (c_parser_gimple_unary_expression): Parse also binary expression
2221 __MIN and __MAX.
2222 (c_parser_gimple_parentized_binary_expression): New function.
2223
d276406a
ML
22242019-05-09 Martin Liska <mliska@suse.cz>
2225
2226 * gimple-parser.c (struct gimple_parser): Add probability.
2227 for gimple_parser_edge.
2228 (gimple_parser::push_edge): Add new argument probability.
2229 (c_parser_gimple_parse_bb_spec): Parse also probability
2230 if present.
2231 (c_parser_parse_gimple_body): Set edge probability.
2232 (c_parser_gimple_compound_statement): Consume token
2233 before calling c_parser_gimple_goto_stmt.
2234 Parse BB counts.
2235 (c_parser_gimple_statement): Pass new argument.
2236 (c_parser_gimple_goto_stmt): Likewise.
2237 (c_parser_gimple_if_stmt): Likewise.
2238 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2239 * c-parser.c (c_parser_declaration_or_fndef): Pass
2240 hot_bb_threshold argument.
2241 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2242 field.
2243 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2244
f179b64e
JJ
22452019-04-26 Jakub Jelinek <jakub@redhat.com>
2246
2247 PR debug/90197
2248 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2249 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2250 (c_parser_do_statement): Likewise.
2251 (c_parser_for_statement): Likewise. Formatting fixes.
2252 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2253 emit DEBUG_BEGIN_STMTs if needed.
2254
e7178413
JJ
22552019-04-19 Jakub Jelinek <jakub@redhat.com>
2256
c280b7ee
JJ
2257 PR c/89888
2258 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2259 (c_start_case): Don't clear it.
2260 (do_case): Adjust c_add_case_label caller.
2261 (c_finish_case): Adjust c_do_switch_warnings caller.
2262
e7178413
JJ
2263 PR c++/90108
2264 * c-decl.c (merge_decls): If remove is main variant and
2265 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2266 variant that has newdecl as TYPE_NAME if any.
2267
60a2c645
JJ
22682019-04-12 Jakub Jelinek <jakub@redhat.com>
2269
2270 PR c/89933
2271 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2272 don't try to remove it from the variant list, but instead assert
2273 it has no variants.
2274
2a82beaa
RB
22752019-04-01 Richard Biener <rguenther@suse.de>
2276
2277 PR c/71598
2278 * c-tree.h (c_get_alias_set): Declare.
2279 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2280 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2281 as the underlying integer type.
2282
bec1da64
MS
22832019-03-19 Martin Sebor <msebor@redhat.com>
2284
2285 PR tree-optimization/89688
2286 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2287 kinds of initializers.
2288
855cd9b1
JJ
22892019-03-19 Jakub Jelinek <jakub@redhat.com>
2290
2291 PR c/89734
2292 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2293 return type even if quals_used is 0. Formatting fixes.
2294
baa09dc5
RB
22952019-03-14 Richard Biener <rguenther@suse.de>
2296
2297 * c-tree.h (enum c_declspec_il): New.
2298 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2299 enum bitfield.
2300 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2301 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2302 (c_parser_declspecs): Adjust.
2303 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2304 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2305 and bitmap.h.
2306 (struct gimple_parser): New.
2307 (gimple_parser::push_edge): New method.
2308 (c_parser_gimple_parse_bb_spec): New helper.
2309 (c_parser_parse_gimple_body): Get start pass and IL specification.
2310 Initialize SSA and CFG.
2311 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2312 Build a gimple_parser parsing state and pass it along.
2313 (c_parser_gimple_statement): Change intermittend __PHI internal
2314 function argument for the edge.
2315 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2316 (c_parser_gimple_goto_stmt): Record edges to build.
2317 (c_parser_gimple_if_stmt): Likewise.
2318 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2319 (c_parser_gimple_or_rtl_pass_list): Likewise.
2320
a3f9f006
ML
23212019-03-11 Martin Liska <mliska@suse.cz>
2322
2323 * c-decl.c (check_for_loop_decls): Wrap an option name
2324 in a string format message and fix GNU coding style.
2325 * c-parser.c (c_parser_declspecs): Likewise.
2326
1db01ff9
JJ
23272019-03-08 Jakub Jelinek <jakub@redhat.com>
2328
2329 PR tree-optimization/89550
2330 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2331 returned true.
2332 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2333 or warning returned true.
2334
66dcb747
JJ
23352019-02-28 Jakub Jelinek <jakub@redhat.com>
2336
2337 PR c/89525
2338 * c-typeck.c (convert_arguments): Call inform_declaration only if
2339 the previous warning_at call returned true.
2340
2263c9f2
TS
23412019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2342
2343 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2344 parameter. Adjust all users.
2345 (c_parser_oacc_simple_clause): Replace parser with loc formal
2346 parameter. Adjust all users.
2347
ab20d992 23482019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2349
2350 PR c/87924
2351 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2352 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2353
5f88ba10
JJ
23542019-02-15 Jakub Jelinek <jakub@redhat.com>
2355
2356 PR c/89340
2357 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2358 before c_decl_attributes rather than after it.
2359
cfc30fd1
JJ
23602019-02-06 Jakub Jelinek <jakub@redhat.com>
2361
2362 PR c/89211
2363 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2364 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2365 instead of 3 nested ifs.
2366
fbe83e6b
JM
23672019-02-06 Joseph Myers <joseph@codesourcery.com>
2368
2369 PR c/88584
2370 * c-decl.c (finish_decl): Do not complete array types for arrays
2371 with external linkage not at file scope.
2372
f461f938
RB
23732019-02-05 Richard Biener <rguenther@suse.de>
2374
2375 PR c/88606
2376 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2377 all type variants when not supported.
2378
fe509359
JJ
23792019-01-30 Jakub Jelinek <jakub@redhat.com>
2380
2381 PR c/89061
2382 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2383 * c-decl.c (decl_jump_unsafe): Return false for
2384 C_DECL_COMPOUND_LITERAL_P decls.
2385 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2386
6a335b96
JJ
23872019-01-29 Jakub Jelinek <jakub@redhat.com>
2388
f4b7e754
JJ
2389 PR c/89045
2390 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2391 scope.
2392
6a335b96
JJ
2393 PR c/86125
2394 * c-decl.c (last_fileptr_type): Remove.
2395 (last_structptr_types): New variable.
2396 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2397 {old,new}rettype instead of the types themselves. Assert
2398 last_structptr_types array has the same number of elements
2399 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2400 argument oldtype and newtype. Instead of handling
2401 just fileptr_type_node specially, handle all builtin_structptr_types
2402 pointer nodes. Formatting fix.
2403
d8b5a1a0
MS
24042019-01-24 Martin Sebor <msebor@redhat.com>
2405
2406 PR c/86125
2407 PR c/88886
2408 PR middle-end/86308
2409 * c-decl.c (match_builtin_function_types): Add arguments.
2410 (diagnose_mismatched_decls): Diagnose mismatched declarations
2411 of built-ins more strictly.
2412
e21c4491
JJ
24132019-01-24 Jakub Jelinek <jakub@redhat.com>
2414
2415 PR c++/88976
2416 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2417 on #pragma omp cancel with different modifiers.
2418
420183d9
L
24192019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2420
2421 PR c/51628
2422 PR c/88664
2423 * c-typeck.c (convert_for_assignment): Upate the
2424 warn_for_address_or_pointer_of_packed_member call.
2425
17ad43dd
TH
24262019-01-16 Tom Honermann <tom@honermann.net>
2427 Jason Merrill <jason@redhat.com>
2428
2429 * c-typeck.c (digest_init): Revised the error message produced for
2430 ill-formed cases of array initialization with a string literal.
2431 (error_init): Make variadic.
2432
5f07d78a
JJ
24332019-01-12 Jakub Jelinek <jakub@redhat.com>
2434
2435 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2436
c4581bbf
JJ
24372019-01-07 Jakub Jelinek <jakub@redhat.com>
2438
2439 PR c/88701
2440 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2441 if current_function_decl is non-NULL.
2442
65c5b1eb
JM
24432019-01-07 Joseph Myers <joseph@codesourcery.com>
2444
2445 PR c/88720
2446 PR c/88726
2447 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2448 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2449 functions declared but never defined only for external scope, not
2450 for other scopes.
2451
d8fcab68
JJ
24522019-01-07 Jakub Jelinek <jakub@redhat.com>
2453
2454 PR c++/85052
2455 * c-parser.c (c_parser_postfix_expression): Parse
2456 __builtin_convertvector.
2457
a5544970
JJ
24582019-01-01 Jakub Jelinek <jakub@redhat.com>
2459
2460 Update copyright years.
2461
da77eace
L
24622018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2463
2464 PR c/51628
2465 * c-typeck.c (convert_for_assignment): Call
2466 warn_for_address_or_pointer_of_packed_member.
2467
1edf8866
SB
24682018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2469
2470 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2471 a more specific error message (instead of just falling through).
2472
db4fd626
SB
24732018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2474
2475 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2476 asm qualifier is first seen; use that to give nicer "duplicate asm
2477 qualifier" messages. Delete 'quals" variable, instead pass the
2478 "is_volatile_ flag to build_asm_stmt directly.
2479 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2480 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2481
9c9cfcbb
SB
24822018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2483
2484 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2485 "done" boolean variable.
2486
a14feb3c
DM
24872018-12-19 David Malcolm <dmalcolm@redhat.com>
2488
2489 PR c++/87504
2490 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2491 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2492 (build_binary_op): Use struct op_location_t and
2493 class binary_op_rich_location.
2494
6d939173
JJ
24952018-12-11 Jakub Jelinek <jakub@redhat.com>
2496
2497 PR sanitizer/88426
2498 * c-convert.c (convert): Call c_fully_fold before calling
2499 ubsan_instrument_float_cast.
2500
b7055028
SB
25012018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2502
2503 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2504 setting "quals".
2505
5b76e75f
SB
25062018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2507
2508 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2509 after asm. Pass a flag for it to build_asm_expr.
2510 * c-tree.h (build_asm_expr): Update declaration.
2511 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2512 set ASM_INLINE_P.
2513
30bd42b9
SB
25142018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2515
2516 PR inline-asm/55681
2517 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2518 combination of volatile and goto, in any order, without repetitions.
2519
9df6c0e4
JB
25202018-12-04 James Norris <jnorris@codesourcery.com>
2521 Cesar Philippidis <cesar@codesourcery.com>
2522 Julian Brown <julian@codesourcery.com>
2523
2524 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2525 code.
2526
f44697b7
RB
25272018-11-30 Richard Biener <rguenther@suse.de>
2528
2529 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2530 _Literal (type) { ... } as empty aggregate or vector constructor.
2531
550dfbdc
MS
25322018-11-29 Martin Sebor <msebor@redhat.com>
2533
2534 PR c/88091
2535 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2536 (convert_arguments): Add comments. Pass additional argument to
2537 the function above.
2538
673670da
MS
25392018-11-29 Martin Sebor <msebor@redhat.com>
2540
2541 PR c/88172
2542 PR testsuite/88208
2543 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2544
db1d09b0
MS
25452018-11-23 Martin Sebor <msebor@redhat.com>
2546
2547 PR testsuite/88098
2548 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2549 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2550
98f08eb8
MS
25512018-11-20 Martin Sebor <msebor@redhat.com>
2552
2553 * c-parser.c (c_parser_has_attribute_expression): New function.
2554 (c_parser_attribute): New function.
2555 (c_parser_attributes): Move code into c_parser_attribute.
2556 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2557
cd5da983
MS
25582018-11-15 Martin Sebor <msebor@redhat.com>
2559
2560 PR c/83656
2561 * c-decl.c (header_for_builtin_fn): Declare.
2562 (diagnose_mismatched_decls): Diagnose declarations of built-in
2563 functions without a prototype.
2564 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2565 (convert_argument): Same.
2566 (convert_arguments): Factor code out into convert_argument.
2567 Detect mismatches between built-in formal arguments in calls
2568 to built-in without prototype.
2569 (build_conditional_expr): Same.
2570 (type_or_builtin_type): New function.
2571 (convert_for_assignment): Add argument. Conditionally issue
2572 warnings instead of errors for mismatches.
2573
620e594b
DM
25742018-11-13 David Malcolm <dmalcolm@redhat.com>
2575
2576 * c-decl.c: Replace "source_location" with "location_t".
2577 * c-tree.h: Likewise.
2578 * c-typeck.c: Likewise.
2579 * gimple-parser.c: Likewise.
2580
3179ebae
JJ
25812018-11-09 Jakub Jelinek <jakub@redhat.com>
2582
81a227c6
JJ
2583 * c-parser.c (c_parser_omp_clause_final): Use
2584 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2585 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2586 parsing instead of c_parser_paren_condition.
2587 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2588 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2589 c_fully_fold instead of c_parser_condition.
2590 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2591 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2592 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2593 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2594 c_parser_expr_no_commas instead of c_parser_expression.
2595
98c91c56
JJ
2596 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2597 reduction clause with inscan modifier.
2598
3179ebae
JJ
2599 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2600 clauses other than atomic_default_mem_order.
2601
28567c40
JJ
26022018-11-08 Jakub Jelinek <jakub@redhat.com>
2603
2604 * c-parser.c: Include memmode.h.
2605 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2606 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2607 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2608 task_reduction clauses.
2609 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2610 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2611 section, or lvalue assignment expression.
2612 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2613 (c_parser_omp_clause_lastprivate): Parse optional
2614 conditional: modifier.
2615 (c_parser_omp_clause_hint): Require constant integer expression rather
2616 than just integer expression.
2617 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2618 clause.
2619 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2620 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2621 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2622 functions.
2623 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2624 iterators. Parse mutexinoutset and depobj kinds.
2625 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2626 callers.
2627 (c_parser_omp_all_clauses): Likewise. Handle
2628 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2629 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2630 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2631 default memory order from requires directive if any. Adjust
2632 c_finish_omp_atomic caller.
2633 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2634 (c_parser_omp_flush): Parse flush with memory-order-clause.
2635 (c_parser_omp_for_loop): Allow NE_EXPR even in
2636 OpenMP loops, adjust c_finish_omp_for caller.
2637 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2638 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2639 Allow to be called while parsing combined parallel master.
2640 Parse combined master taskloop{, simd}.
2641 (c_parser_omp_parallel): Parse combined
2642 parallel master{, taskloop{, simd}} constructs.
2643 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2644 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2645 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2646 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2647 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2648 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2649 around teams body. Use SET_EXPR_LOCATION.
2650 (c_parser_omp_target_data): Allow target data
2651 with only use_device_ptr clauses.
2652 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2653 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2654 (c_parser_omp_requires): New function.
2655 (c_finish_taskloop_clauses): New function.
2656 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2657 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2658 declaration. Disallow in_reduction clause when combined with parallel
2659 master.
2660 (c_parser_omp_construct): Adjust c_parser_omp_master and
2661 c_parser_omp_taskgroup callers.
2662 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2663 other than cancel.
2664 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2665 like OMP_CLAUSE_REDUCTION.
2666 (handle_omp_array_sections): Likewise. Call save_expr on array
2667 reductions before calling build_index_type. Handle depend clauses
2668 with iterators.
2669 (struct c_find_omp_var_s): New type.
2670 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2671 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2672 with static, runtime or auto schedule kinds. Call save_expr for whole
2673 array reduction sizes. Diagnose reductions with zero sized elements
2674 or variable length structures. Diagnose nogroup clause used with
2675 reduction clause(s). Handle depend clause with
2676 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2677 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2678 some different type for other kinds. Use build_unary_op with
2679 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2680 Handle depend clauses with iterators. Remove no longer needed special
2681 case that predetermined const qualified vars may be specified in
2682 firstprivate clause. Complain if const qualified vars are mentioned
2683 in data-sharing clauses other than firstprivate or shared. Use
2684 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2685 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2686 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2687 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2688
7e2de6df
DM
26892018-10-29 David Malcolm <dmalcolm@redhat.com>
2690
2691 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2692 logic for change to name_hint::operator bool.
2693 (undeclared_variable): Likewise.
2694 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2695 (c_parser_parameter_declaration): Likewise.
2696
9f936c86
JM
26972018-10-17 Joseph Myers <joseph@codesourcery.com>
2698
2699 * c-errors.c (pedwarn_c11): New function.
2700 * c-parser.c (disable_extension_diagnostics): Save
2701 warn_c11_c2x_compat and set it to 0.
2702 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2703 (c_parser_static_assert_declaration_no_semi): Handle
2704 _Static_assert without string constant.
2705 * c-tree.h (pedwarn_c11): New prototype.
2706
033eb567
DM
27072018-10-17 David Malcolm <dmalcolm@redhat.com>
2708
2709 * Make-lang.in (selftest-c): New.
2710 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2711 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2712 from gcc/Makefile.in.
2713
0edf3afe
RB
27142018-10-02 Richard Biener <rguenther@suse.de>
2715
2716 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2717
8313a764
JM
27182018-09-26 Joseph Myers <joseph@codesourcery.com>
2719
2720 PR c/87390
2721 * c-typeck.c (build_binary_op): Use excess precision for
2722 comparisons of integers and floating-point for C11 and later.
2723
ce6f0888
MJ
27242018-09-26 Martin Jambor <mjambor@suse.cz>
2725
2726 PR c/87347
2727 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2728 comment.
ce6f0888 2729
9c4a4b3c
DM
27302018-09-17 David Malcolm <dmalcolm@redhat.com>
2731
2732 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2733 Update for new param.
2734 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2735 Likewise.
2736
80c6d1f4
MJ
27372018-09-17 Martin Jambor <mjambor@suse.cz>
2738
2739 PR c/63886
2740 * c-parser.c: (warn_for_abs): New function.
2741 (c_parser_postfix_expression_after_primary): Call it.
2742
4a426e36
BE
27432018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2744
2745 * c-typeck.c (digest_init): Shorten overlength strings.
2746
6d900107
BE
27472018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2748
2749 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2750
b5764229
BE
27512018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2752
2753 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2754 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2755
22eea6b2
AM
27562018-08-30 Alexander Monakov <amonakov@ispras.ru>
2757
2758 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2759 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2760
85204e23
DM
27612018-08-27 David Malcolm <dmalcolm@redhat.com>
2762
2763 PR 87091
2764 * c-decl.c (implicitly_declare): Update call to
2765 maybe_add_include_fixit to suggest overriding the location, as it
2766 is for a note.
2767 * c-objc-common.c (c_tree_printer): Update for conversion of
2768 show_caret_p to a tri-state.
2769
3d78e008
ML
27702018-08-27 Martin Liska <mliska@suse.cz>
2771
2772 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2773 fndecl_built_in_p and remove check for FUNCTION_DECL if
2774 possible.
3d78e008
ML
2775 (diagnose_mismatched_decls): Likewise.
2776 (merge_decls): Likewise.
2777 (warn_if_shadowing): Likewise.
2778 (pushdecl): Likewise.
2779 (implicitly_declare): Likewise.
2780 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2781 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2782 * c-typeck.c (build_function_call_vec): Likewise.
2783 (convert_arguments): Likewise.
2784
097f82ec
DM
27852018-08-20 David Malcolm <dmalcolm@redhat.com>
2786
2787 PR other/84889
2788 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2789 (diagnose_mismatched_decls): Likewise, in various places.
2790 (warn_if_shadowing): Likewise.
2791 (implicit_decl_warning): Likewise.
2792 (implicitly_declare): Likewise.
2793 (undeclared_variable): Likewise.
2794 (declare_label): Likewise.
2795 (grokdeclarator): Likewise.
2796 (start_function): Likewise.
2797 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2798 (c_parser_parameter_declaration): Likewise.
2799 (c_parser_binary_expression): Likewise.
2800 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2801 (parser_build_binary_op): Likewise.
2802 (build_unary_op): Likewise.
2803 (error_init): Likewise.
2804 (pedwarn_init): Likewise.
2805 (warning_init): Likewise.
2806 (convert_for_assignment): Likewise.
2807
96e6ae57
DM
28082018-08-15 David Malcolm <dmalcolm@redhat.com>
2809
2810 * c-objc-common.c: Include "gcc-rich-location.h".
2811 (c_tree_printer): Move implemenation of '%T' to...
2812 (print_type): ...this new function.
2813 (range_label_for_type_mismatch::get_text): New function.
2814 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2815 range for the various ic_argpass cases.
2816 (class maybe_range_label_for_tree_type_mismatch): New class.
2817 (build_binary_op): Use it when calling binary_op_error.
2818
0cd020ae 28192018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2820
0cd020ae
PK
2821 * c-decl.c (start_decl): Do not warn if variables is named as main
2822 and is a local variable.
2823
72733314
IS
28242018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2825
2826 PR c/19315
2827 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2828 objects of unknown size.
2829
23aa9f7c
MS
28302018-08-13 Martin Sebor <msebor@redhat.com>
2831
2832 PR tree-optimization/71625
2833 * c-parser.c (c_parser_declaration_or_fndef): Call
2834 braced_list_to_string.
2835
e5e7e50d
BH
28362018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2837
2838 PR c/86690
2839 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2840 errors.
2841
8a45b051
MS
28422018-08-01 Martin Sebor <msebor@redhat.com>
2843
2844 PR tree-optimization/86650
2845 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2846 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2847
5922dcb5
JJ
28482018-08-01 Jakub Jelinek <jakub@redhat.com>
2849
2850 PR c/85704
2851 * c-typeck.c (init_field_decl_cmp): New function.
2852 (output_pending_init_elements): Use it for field comparisons
2853 instead of pure bit_position comparisons.
2854
9b452033
JJ
28552018-07-12 Jakub Jelinek <jakub@redhat.com>
2856
2857 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2858 type here, instead add "omp declare target implicit" attribute.
2859 (finish_decl): Diagnose vars without mappable type here.
2860
ab20d992
JJ
28612018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2862 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2863 Cesar Philippidis <cesar@codesourcery.com>
2864
2865 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2866 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2867 to their non-present_or_* counterparts. Make 'self' an alias to
2868 PRAGMA_OACC_CLAUSE_HOST.
2869 (c_parser_oacc_data_clause): Update GOMP mappings for
2870 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2871 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2872 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2873 Remove support for present_or_* clauses.
2874 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2875 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2876 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2877 (OACC_DATA_CLAUSE_MASK): Likewise.
2878 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2879 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2880 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2881 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2882 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2883
e197e64e
KV
28842018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2885
2886 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2887 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2888 (c_parser_gimple_unary_expression): Likewise.
2889
487f2f61
JJ
28902018-06-15 Jakub Jelinek <jakub@redhat.com>
2891
2892 PR c/86093
2893 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2894 before doing POINTER_DIFF_EXPR.
2895
e4d44a37
MP
28962018-06-07 Marek Polacek <polacek@redhat.com>
2897
2898 PR c/85318
2899 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2900 for loop initial declarations.
2901
b67b9225
DP
29022018-05-30 David Pagan <dave.pagan@oracle.com>
2903
2904 PR c/55976
2905 * c-decl.c (grokdeclarator): Update check for return type warnings.
2906 (start_function): Likewise.
2907 (finish_function): Likewise.
2908 * c-typeck.c (c_finish_return): Update check for return type warnings.
2909 Pass OPT_Wreturn_type to pedwarn when appropriate.
2910
c566cc9f
RS
29112018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2912
2913 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2914 __FMA_EXPR handlng.
2915
e4f81565
RS
29162018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2917
2918 * gimple-parser.c: Include internal-fn.h.
2919 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2920 (c_parser_gimple_call_internal): New function.
2921 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2922 Fix typos in comment.
2923
79e7b1fe
JJ
29242018-05-10 Jakub Jelinek <jakub@redhat.com>
2925
2926 PR c++/85662
2927 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2928 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2929 fold_convert_loc.
2930 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2931 fold_offsetof_1, pass argtype as TYPE to it and drop the
2932 fold_convert_loc.
2933
f7584c81
DP
29342018-05-02 David Pagan <dave.pagan@oracle.com>
2935
2936 PR c/30552
2937 * c-decl.c (old_style_parameter_scope): New function.
2938 * c-parser.c (c_parser_postfix_expression): Check for statement
2939 expressions in old-style function parameter list declarations.
2940 * c-parser.h (old_style_parameter_scope): New extern declaration.
2941
b33a0cb3
JJ
29422018-04-25 Jakub Jelinek <jakub@redhat.com>
2943
2944 PR sanitizer/84307
2945 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2946 it is not TREE_STATIC.
2947 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2948 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2949 its COMPOUND_LITERAL_EXPR_DECL.
2950
c5c5822a
JM
29512018-03-21 Joseph Myers <joseph@codesourcery.com>
2952
2953 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2954 where all functions return the same _FloatN or _FloatNx type,
2955 treat integer types as _Float64 instead of double.
2956
aa1c9429
JJ
29572018-03-21 Jakub Jelinek <jakub@redhat.com>
2958
2959 PR c/84999
2960 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2961 building vector comparison, diagnose it and return error_mark_node.
2962
9bb45a95
JJ
29632018-03-15 Jakub Jelinek <jakub@redhat.com>
2964
2965 PR c/84853
2966 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2967 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2968 INTEGER_TYPE element type.
2969
ada6bad9
DP
29702018-03-13 David Pagan <dave.pagan@oracle.com>
2971
2972 PR c/46921
2973 * c-typeck.c (output_init_element): Ensure field initializer
2974 expression is always evaluated if there are side effects.
2975
849bbdb9
JJ
29762018-03-06 Jakub Jelinek <jakub@redhat.com>
2977
2978 PR c/84721
2979 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2980 !building_stmt_list_p ().
2981
d74641bd
RS
29822018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2983
2984 PR c/84305
2985 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2986 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2987 and include the BIND_EXPR in the list of things that need to be
2988 pre-evaluated.
2989
0444aa9c
NS
29902018-02-09 Nathan Sidwell <nathan@acm.org>
2991
2992 PR c/84293
2993 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2994 to strict_aliasing_warning.
2995
7c30b12a
PC
29962018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2997
2998 * c-typeck.c (really_start_incremental_init, push_init_level,
2999 set_nonincremental_init, output_init_element, process_init_element):
3000 Use DECL_UNNAMED_BIT_FIELD.
3001
2be4dfcb
MP
30022018-01-31 Marek Polacek <polacek@redhat.com>
3003
3004 PR c/81779
3005 * c-parser.c (c_parser_compound_statement_nostart): Call
3006 expansion_point_location_if_in_system_header.
3007
bb9869d5
DM
30082018-01-17 David Malcolm <dmalcolm@redhat.com>
3009
3010 PR c++/83814
3011 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3012 the C part.
3013
b4923738
JJ
30142018-01-13 Jakub Jelinek <jakub@redhat.com>
3015
3016 PR c/83801
3017 * c-tree.h (decl_constant_value_1): Add a bool argument.
3018 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3019 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3020 (decl_constant_value): Adjust caller.
3021 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3022 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3023 decl_constant_value returns initializer that has BLKmode or
3024 array type.
3025 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3026
928686b1
RS
30272018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3028 Alan Hayward <alan.hayward@arm.com>
3029 David Sherwood <david.sherwood@arm.com>
3030
3031 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3032 TYPE_VECTOR_SUBPARTS.
3033
85ec4feb
JJ
30342018-01-03 Jakub Jelinek <jakub@redhat.com>
3035
3036 Update copyright years.
3037
913884f7
JJ
30382018-01-01 Jakub Jelinek <jakub@redhat.com>
3039
3040 PR c/83595
3041 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3042 c_parser_conditional_expression, c_parser_cast_expression,
3043 c_parser_sizeof_expression, c_parser_alignof_expression,
3044 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3045 c_parser_transaction_expression): Use set_error () method instead
3046 of setting value member to error_mark_node.
3047
c6cfa2bf
MM
30482017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3049
3050 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3051 and _Float<N>X built-in functions.
3052
11d29d63
JJ
30532017-12-22 Jakub Jelinek <jakub@redhat.com>
3054
14ec014e
JJ
3055 PR debug/83550
3056 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3057 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3058 incomplete vars rather than after it.
3059
11d29d63
JJ
3060 PR debug/83547
3061 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3062 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3063 and consider empty ones if there are no other stmts. For
3064 -Wunused-value walk all statements before the one only followed by
3065 DEBUG_BEGIN_STMTs.
3066
170a8bd6 30672017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3068 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3069
3070 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3071 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3072 (c_parser_do_statement): Likewise.
3073 (c_parser_for_statement): Likewise.
3074 (c_parser_statement_after_labels): Adjust calls to above.
3075 (c_parse_pragma_ivdep): New static function.
3076 (c_parser_pragma_unroll): Likewise.
3077 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3078 <PRAGMA_UNROLL>: New case.
3079
01512446
JJ
30802017-12-19 Jakub Jelinek <jakub@redhat.com>
3081
3082 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3083 perform_integral_promotions, digest_init): Replace Yoda conditions
3084 with typical order conditions.
3085 * c-decl.c (check_bitfield_type_and_width): Likewise.
3086
c65e18d3
BE
30872017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3088
3089 * c-typeck.c (c_safe_arg_type_equiv_p,
3090 c_safe_function_type_cast_p): New function.
3091 (build_c_cast): Implement -Wcast-function-type.
3092
b7280579
RB
30932017-12-14 Richard Biener <rguenther@suse.de>
3094
3095 PR c/83415
3096 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3097 like REALPART_EXPR for the behavior of whether its operand
3098 is an lvalue.
3099
49e6a6c0
MP
31002017-12-12 Marek Polacek <polacek@redhat.com>
3101
3102 PR c/82679
3103 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3104
ab20d992 31052017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3106
3107 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3108 * c-parser.c (add_debug_begin_stmt): New.
3109 (c_parser_declaration_or_fndef): Call it.
3110 (c_parser_compound_statement_nostart): Likewise.
3111 (c_parser_statement_after_labels): Likewise.
3112 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3113
4b2b493f
JM
31142017-12-07 Joseph Myers <joseph@codesourcery.com>
3115
3116 * c-decl.c (build_compound_literal): Add parameter alignas_align
3117 and set alignment of decl if nonzero.
3118 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3119 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3120 qualifier.
3121 (c_parser_struct_declaration): Update syntax comment.
3122 (c_parser_type_name): Add alignas_ok argument and pass it to
3123 c_parser_declspecs.
3124 (c_parser_cast_expression): Pass true to c_parser_type_name and
3125 give error if a cast used an _Alignas specifier.
3126 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3127 give error if sizeof (type-name) used an _Alignas specifier.
3128 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3129 give error if _Alignof (type-name) used an _Alignas specifier.
3130 (c_parser_postfix_expression_after_paren_type): Check specified
3131 alignment for a compound literal and pass it to
3132 build_compound_literal.
3133 * c-parser.h (c_parser_type_name): Update prototype.
3134 * c-tree.h (build_compound_literal): Update prototype.
3135
5d9ae53d
MS
31362017-12-07 Martin Sebor <msebor@redhat.com>
3137
3138 PR c/81544
3139 * c-decl.c (c_decl_attributes): Look up existing declaration and
3140 pass it to decl_attributes.
3141
c79144f8
DM
31422017-12-06 David Malcolm <dmalcolm@redhat.com>
3143
3144 PR c/83236
3145 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3146 reserved for use by the implementation.
3147
613bc14f
DM
31482017-12-06 David Malcolm <dmalcolm@redhat.com>
3149
3150 * c-decl.c: Include "c-family/c-spellcheck.h".
3151
05abad4c
ML
31522017-12-05 Martin Liska <mliska@suse.cz>
3153 Jakub Jelinek <jakub@redhat.com>
3154
3155 * c-typeck.c (pointer_diff): Add new argument and instrument
3156 pointer subtraction.
3157 (build_binary_op): Similar for pointer comparison.
3158
cc6534d4
JJ
31592017-12-01 Jakub Jelinek <jakub@redhat.com>
3160
65791f42
JJ
3161 PR c/79153
3162 * c-parser.c: Include tree-iterator.h.
3163 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3164 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3165 on it.
3166
cc6534d4
JJ
3167 PR c/83222
3168 * c-tree.h (decl_constant_value_1): Declare.
3169 * c-typeck.c (decl_constant_value_1): New function.
3170 (decl_constant_value): Use it.
3171 * c-fold.c (c_fully_fold_internal): If in_init, use
3172 decl_constant_value_1 instead of decl_constant_value.
3173
5de73c05
JJ
31742017-11-30 Jakub Jelinek <jakub@redhat.com>
3175
3176 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3177
058f0b9e
JJ
31782017-11-28 Jakub Jelinek <jakub@redhat.com>
3179
3180 PR sanitizer/81275
3181 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3182 c_switch_covers_all_cases_p returns true.
3183
5e9d6aa4 31842017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3185 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3186
3187 * Make-lang.in (c/c-array-notation.o): Remove.
3188 * c-array-notation.c: Delete.
3189 * c-decl.c: Remove cilkplus condition.
3190 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3191 c_parser_cilk_verify_simd, c_parser_array_notation,
3192 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3193 c_parser_cilk_simd_fn_vector_attrs,
3194 c_finish_cilk_simd_fn_tokens): Delete.
3195 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3196 (c_parser_direct_declarator_inner): Ditto.
3197 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3198 (c_parser_attributes, c_parser_compound_statement,
3199 c_parser_statement_after_labels, c_parser_if_statement,
3200 c_parser_switch_statement, c_parser_while_statement,
3201 c_parser_do_statement, c_parser_for_statement,
3202 c_parser_unary_expression, c_parser_postfix_expression,
3203 c_parser_postfix_expression_after_primary,
3204 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3205 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3206 support.
3207 * c-typeck.c (build_array_ref, build_function_call_vec,
3208 convert_arguments,
3209 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3210 c_finish_loop, build_binary_op): Remove cilkplus support.
3211
9e851845
JJ
32122017-11-28 Jakub Jelinek <jakub@redhat.com>
3213
3214 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3215 of build3.
3216
ab20d992 32172017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
3218
3219 * Make-lang.in (c.install-plugin): Install backend import library.
3220
41521dee
JJ
32212017-11-23 Jakub Jelinek <jakub@redhat.com>
3222
3223 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3224 pragma_stmt context.
3225
ac9effed
EB
32262017-11-23 Mike Stump <mikestump@comcast.net>
3227 Eric Botcazou <ebotcazou@adacore.com>
3228
3229 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3230 ANNOTATE_EXPR.
3231 (c_parser_do_statement): Likewise.
3232 (c_parser_for_statement): Likewise.
3233
ce95abc4
DM
32342017-11-22 David Malcolm <dmalcolm@redhat.com>
3235
3236 PR c++/62170
3237 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3238 bool to bool *. Within '%T' handling, if showing an "aka", use
3239 "quoted" param to add appropriate quoting.
3240
974aedcc
MP
32412017-11-22 Marek Polacek <polacek@redhat.com>
3242
3243 PR c++/60336
3244 PR middle-end/67239
3245 PR target/68355
3246 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3247
d4300cc6
DM
32482017-11-21 David Malcolm <dmalcolm@redhat.com>
3249
3250 PR c/83056
3251 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3252 earlier failed lookups.
3253
1af4ebf5
MG
32542017-11-21 Marc Glisse <marc.glisse@inria.fr>
3255
3256 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3257 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3258
26edace6
DM
32592017-11-20 David Malcolm <dmalcolm@redhat.com>
3260
3261 PR c/81404
3262 * c-decl.c: Include "c-family/known-headers.h".
3263 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3264 to known-headers.cc.
3265 (class suggest_missing_header): Move to known-header.h.
3266 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3267 than get_c_name_hint.
3268
b1212255
DM
32692017-11-20 David Malcolm <dmalcolm@redhat.com>
3270
3271 * c-decl.c (get_c_name_hint): New function.
3272 (class suggest_missing_header): New class.
3273 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3274 suggest missing headers to the user.
3275
6c7a259b
DM
32762017-11-20 David Malcolm <dmalcolm@redhat.com>
3277
3278 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3279 Include "c-family/name-hint.h"
3280 (implicit_decl_warning): Convert "hint" from
3281 const char * to name_hint. Pass location to
3282 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3283 warning was not printed.
3284 (undeclared_variable): Likewise for "guessed_id".
3285 (lookup_name_fuzzy): Convert return type from const char *
3286 to name_hint. Add location_t param.
3287 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3288 Include "c-family/name-hint.h"
3289 (c_parser_declaration_or_fndef): Convert "hint" from
3290 const char * to name_hint. Pass location to lookup_name_fuzzy.
3291 (c_parser_parameter_declaration): Likewise.
3292
f9c59f7e
JJ
32932017-11-19 Jakub Jelinek <jakub@redhat.com>
3294
3295 PR c/66618
3296 PR c/69960
3297 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3298 where needed.
3299 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3300 handle_omp_array_sections): Likewise.
3301 (digest_init): Don't call decl_constant_value_for_optimization.
3302 * c-tree.h (decl_constant_value_for_optimization): Removed.
3303 * c-fold.c (c_fold_array_ref): New function.
3304 (c_fully_fold_internal): Add LVAL argument, propagate it through
3305 recursive calls. For VAR_P call decl_constant_value and
3306 unshare if not LVAL and either optimizing or IN_INIT. Remove
3307 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3308 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3309 (c_fully_fold): Add LVAL argument, pass it through to
3310 c_fully_fold_internal.
3311 (decl_constant_value_for_optimization): Removed.
3312
3ca0dc60
JM
33132017-11-15 Joseph Myers <joseph@codesourcery.com>
3314
3315 PR c/81156
3316 * c-parser.c (check_tgmath_function): New function.
3317 (enum tgmath_parm_kind): New enum.
3318 (c_parser_postfix_expression): Handle __builtin_tgmath.
3319
64a5912c
DM
33202017-10-31 David Malcolm <dmalcolm@redhat.com>
3321
3322 * c-decl.c (implicit_decl_warning): Update for renaming of
3323 pedwarn_at_rich_loc and warning_at_rich_loc.
3324 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3325 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3326 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3327 (c_parser_struct_or_union_specifier): Likewise for renaming of
3328 pedwarn_at_rich_loc.
3329 (c_parser_parameter_declaration): Likewise for renaming of
3330 error_at_rich_loc.
3331 * c-typeck.c (build_component_ref): Likewise.
3332 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3333 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3334 (set_init_label): Likewise for renaming of error_at_rich_loc.
3335
c1136864
RB
33362017-10-30 Richard Biener <rguenther@suse.de>
3337
3338 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3339 stmts.
3340
ee5fd23a
MM
33412017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3342
3343 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3344 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3345
1a59ccf2
DM
33462017-10-25 David Malcolm <dmalcolm@redhat.com>
3347
3348 PR c/7356
3349 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3350 semicolons.
3351
bc1a75dd
JJ
33522017-10-25 Jakub Jelinek <jakub@redhat.com>
3353
3354 PR libstdc++/81706
3355 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3356 newdecl to corresponding __builtin_ if any.
3357
ff1ff960
PC
33582017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3359
3360 PR c++/82466
3361 * c-decl.c (diagnose_mismatched_decls): Use
3362 OPT_Wbuiltin_declaration_mismatch.
3363
62e1c678
DM
33642017-10-12 David Malcolm <dmalcolm@redhat.com>
3365
3366 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3367 use it to guard calls to maybe_suggest_missing_token_insertion.
3368 (c_parser_parms_list_declarator): Override default value of new
3369 "type_is_unique" param to c_parser_require.
3370 (c_parser_asm_statement): Likewise.
3371 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3372 defaulting to true.
3373
a92f6726
NS
33742017-10-11 Nathan Sidwell <nathan@acm.org>
3375
3376 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3377
8e6cdc90
RS
33782017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3379
3380 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3381 operating on trees as wide_ints.
3382 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3383 (c_tree_equal): Likewise.
3384
8139a48e
DM
33852017-10-04 David Malcolm <dmalcolm@redhat.com>
3386
3387 * c-decl.c (push_parm_decl): Store c_parm's location into the
3388 PARAM_DECL.
3389 (build_c_parm): Add "loc" param and store it within the c_parm.
3390 * c-parser.c (struct c_parser): Add "last_token_location" field.
3391 (c_parser_consume_token): Store location of the token into the
3392 new field.
3393 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3394 when handling a FUNCTION_DECL, if it doesn't already have them.
3395 (c_parser_parameter_declaration): Generate a location for the
3396 parameter, and pass it to the call to build_c_parm.
3397 * c-tree.h (struct c_parm): Add field "loc".
3398 (build_c_parm): Add location_t param.
3399 * c-typeck.c (get_fndecl_argument_location): New function.
3400 (inform_for_arg): New function.
3401 (convert_for_assignment): Use inform_for_arg when dealing with
3402 ic_argpass.
3403
2a389958
JJ
34042017-09-29 Jakub Jelinek <jakub@redhat.com>
3405
7d386d45
JJ
3406 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3407 width is non-NULL.
3408 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3409 don't SET_DECL_C_BIT_FIELD here.
3410
2a389958
JJ
3411 PR c/82340
3412 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3413 instead of trying to set just TREE_READONLY manually.
3414
ebc6a85e
TV
34152017-09-16 Tom de Vries <tom@codesourcery.com>
3416
3417 PR c/81875
3418 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3419 cond itself.
3420
bb75facd
JM
34212017-09-15 Joseph Myers <joseph@codesourcery.com>
3422
3423 PR c/82071
3424 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3425 for C11.
3426 (build_conditional_expr): For C11, generate result with excess
3427 precision when one argument is an integer and the other is of a
3428 type using excess precision.
3429
1d933576
BE
34302017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3431
3432 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3433
267bbb6f
MP
34342017-09-13 Marek Polacek <polacek@redhat.com>
3435
3436 PR c/82167
3437 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3438 than expr.original_type.
3439
6836632e
NS
34402017-09-12 Nathan Sidwell <nathan@acm.org>
3441
3442 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3443 resort_sorted_fields): Moved from c-family/c-common.c.
3444 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3445
e035be33
JM
34462017-09-01 Joseph Myers <joseph@codesourcery.com>
3447
3448 PR c/82071
3449 * c-typeck.c (build_atomic_assign): Handle argument with excess
3450 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3451 argument passed to build_binary_op and convert_for_assignment but
3452 not for call to c_fully_fold.
3453 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3454 Ensure build_binary_op is called with argument with original
3455 semantic type. Avoid calling c_fully_fold with an
3456 EXCESS_PRECISION_EXPR from build_binary_op.
3457
d2e05fcb
JJ
34582017-09-01 Jakub Jelinek <jakub@redhat.com>
3459
3460 PR c/81887
3461 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3462
b397965c
RS
34632017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3464 Alan Hayward <alan.hayward@arm.com>
3465 David Sherwood <david.sherwood@arm.com>
3466
3467 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3468 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3469 m1 and m2 to the signed equivalent of a fixed-point
3470 SCALAR_TYPE_MODE.
3471
14e18d71
DM
34722017-08-24 David Malcolm <dmalcolm@redhat.com>
3473
3474 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3475 than CAN_HAVE_LOCATION_P when determining whether to use the
3476 location_t value within "value".
3477
7f204c0f
DM
34782017-08-21 David Malcolm <dmalcolm@redhat.com>
3479
3480 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3481 rather than peeking the location of the first token.
3482 * c-tree.h (c_expr::get_location): New method.
3483
2f687306
DM
34842017-08-21 David Malcolm <dmalcolm@redhat.com>
3485
3486 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3487 to check_function_arguments.
3488
3e7b80d7
MP
34892017-08-18 Marek Polacek <polacek@redhat.com>
3490
3491 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3492 commentary.
3493
00aa1fa2
L
34942017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3495
3496 PR c/53037
3497 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3498 (check_bitfield_type_and_width): Don't allow bit-field with
3499 warn_if_not_aligned type.
3500
da67acb9
MS
35012017-08-14 Martin Sebor <msebor@redhat.com>
3502
3503 PR c/81117
3504 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3505
bb85aa74
MP
35062017-08-11 Marek Polacek <polacek@redhat.com>
3507
3508 PR c/81795
3509 * c-decl.c (pushtag): Only print inform if the warning was printed.
3510 (grokdeclarator): Likewise.
3511
32129a17
DM
35122017-08-10 David Malcolm <dmalcolm@redhat.com>
3513
3514 * c-parser.c (c_parser_error): Rename to...
3515 (c_parser_error_richloc): ...this, making static, and adding
3516 "richloc" parameter, passing it to the c_parse_error call,
3517 rather than calling c_parser_set_source_position_from_token.
3518 (c_parser_error): Reintroduce, reimplementing in terms of the
3519 above, converting return type from void to bool.
3520 (class token_pair): New class.
3521 (struct matching_paren_traits): New struct.
3522 (matching_parens): New typedef.
3523 (struct matching_brace_traits): New struct.
3524 (matching_braces): New typedef.
3525 (get_matching_symbol): New function.
3526 (c_parser_require): Add param MATCHING_LOCATION, using it to
3527 highlight matching "opening" tokens for missing "closing" tokens.
3528 (c_parser_skip_until_found): Likewise.
3529 (c_parser_static_assert_declaration_no_semi): Convert explicit
3530 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3531 class matching_parens, so that the pertinent open parenthesis is
3532 highlighted when there are problems locating the close
3533 parenthesis.
3534 (c_parser_struct_or_union_specifier): Likewise.
3535 (c_parser_typeof_specifier): Likewise.
3536 (c_parser_alignas_specifier): Likewise.
3537 (c_parser_simple_asm_expr): Likewise.
3538 (c_parser_braced_init): Likewise, for matching_braces.
3539 (c_parser_paren_condition): Likewise, for matching_parens.
3540 (c_parser_switch_statement): Likewise.
3541 (c_parser_for_statement): Likewise.
3542 (c_parser_asm_statement): Likewise.
3543 (c_parser_asm_operands): Likewise.
3544 (c_parser_cast_expression): Likewise.
3545 (c_parser_sizeof_expression): Likewise.
3546 (c_parser_alignof_expression): Likewise.
3547 (c_parser_generic_selection): Likewise.
3548 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3549 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3550 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3551 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3552 c_parser_skip_until_found call.
3553 (c_parser_objc_class_definition): Use class matching_parens as
3554 above.
3555 (c_parser_objc_method_decl): Likewise.
3556 (c_parser_objc_try_catch_finally_statement): Likewise.
3557 (c_parser_objc_synchronized_statement): Likewise.
3558 (c_parser_objc_at_property_declaration): Likewise.
3559 (c_parser_oacc_wait_list): Likewise.
3560 (c_parser_omp_var_list_parens): Likewise.
3561 (c_parser_omp_clause_collapse): Likewise.
3562 (c_parser_omp_clause_default): Likewise.
3563 (c_parser_omp_clause_if): Likewise.
3564 (c_parser_omp_clause_num_threads): Likewise.
3565 (c_parser_omp_clause_num_tasks): Likewise.
3566 (c_parser_omp_clause_grainsize): Likewise.
3567 (c_parser_omp_clause_priority): Likewise.
3568 (c_parser_omp_clause_hint): Likewise.
3569 (c_parser_omp_clause_defaultmap): Likewise.
3570 (c_parser_oacc_single_int_clause): Likewise.
3571 (c_parser_omp_clause_ordered): Likewise.
3572 (c_parser_omp_clause_reduction): Likewise.
3573 (c_parser_omp_clause_schedule): Likewise.
3574 (c_parser_omp_clause_num_teams): Likewise.
3575 (c_parser_omp_clause_thread_limit): Likewise.
3576 (c_parser_omp_clause_aligned): Likewise.
3577 (c_parser_omp_clause_linear): Likewise.
3578 (c_parser_omp_clause_safelen): Likewise.
3579 (c_parser_omp_clause_simdlen): Likewise.
3580 (c_parser_omp_clause_depend): Likewise.
3581 (c_parser_omp_clause_map): Likewise.
3582 (c_parser_omp_clause_device): Likewise.
3583 (c_parser_omp_clause_dist_schedule): Likewise.
3584 (c_parser_omp_clause_proc_bind): Likewise.
3585 (c_parser_omp_clause_uniform): Likewise.
3586 (c_parser_omp_for_loop): Likewise.
3587 (c_parser_cilk_clause_vectorlength): Likewise.
3588 (c_parser_cilk_clause_linear): Likewise.
3589 (c_parser_transaction_expression): Likewise.
3590 * c-parser.h (c_parser_require): Add param matching_location with
3591 default UNKNOWN_LOCATION.
3592 (c_parser_error): Convert return type from void to bool.
3593 (c_parser_skip_until_found): Add param matching_location with
3594 default UNKNOWN_LOCATION.
3595
30af3a2b
MP
35962017-08-09 Marek Polacek <polacek@redhat.com>
3597
3598 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3599 * c-tree.h (build_external_ref): Update declaration.
3600 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3601 (build_external_ref): Change the type of a parameter to bool.
3602 (parser_build_binary_op): Use true/false instead of 1/0.
3603 (pointer_diff): Likewise.
3604 (build_modify_expr): Likewise.
3605 (set_designator): Change the type of a parameter to bool.
3606 (set_init_index): Use true/false instead of 1/0.
3607 (set_init_label): Likewise.
3608 (output_init_element): Change the type of a parameter to bool.
3609 (output_pending_init_elements): Use true/false instead of 1/0.
3610 (process_init_element): Likewise.
3611 (build_binary_op): Change the type of a parameter to bool.
3612
296c53ac
MP
36132017-08-09 Marek Polacek <polacek@redhat.com>
3614
3615 PR c/81233
3616 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3617 Call emit_diagnostic_valist instead of pedwarn.
3618 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3619 Print the relevant types in diagnostics.
3620
a32c8316
MP
36212017-08-09 Marek Polacek <polacek@redhat.com>
3622
3623 PR c/81417
3624 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3625 build_conditional_expr.
a32c8316
MP
3626 * c-parser.c (c_parser_conditional_expression): Create locations for
3627 EXP1 and EXP2 from their source ranges. Pass the locations down to
3628 build_conditional_expr.
3629 * c-tree.h (build_conditional_expr): Update declaration.
3630 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3631 For -Wsign-compare, also print the types.
3632
314e6352
ML
36332017-08-08 Martin Liska <mliska@suse.cz>
3634
3635 * c-convert.c: Include header files.
3636 * c-typeck.c: Likewise.
3637
577eec56
ML
36382017-08-07 Martin Liska <mliska@suse.cz>
3639
3640 * c-parser.c (c_parser_attributes): Canonicalize name of an
3641 attribute.
3642
f7b6353a
MP
36432017-08-02 Marek Polacek <polacek@redhat.com>
3644
3645 PR c/81289
3646 * c-parser.c (c_parser_unary_expression): Use set_error.
3647
8a6eab34
MP
3648 PR c/81448
3649 PR c/81306
3650 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3651 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3652
ab20d992 36532017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3654 Martin Liska <mliska@suse.cz>
3655
3656 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3657 statement.
7fef86d3 3658
f34ebeb2
ML
36592017-07-31 Martin Liska <mliska@suse.cz>
3660
3661 PR sanitize/81530
3662 * c-convert.c (convert): Guard condition with flag_sanitize_p
3663 also with current_function_decl non-null equality.
3664 * c-decl.c (grokdeclarator): Likewise.
3665 * c-typeck.c (build_binary_op): Likewise.
3666
8595f67b
MP
36672017-07-25 Marek Polacek <polacek@redhat.com>
3668
3669 * c-decl.c (grokfield): Remove local variable.
3670
d49718d6
MP
36712017-07-25 Marek Polacek <polacek@redhat.com>
3672
3673 PR c/81364
3674 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3675 macro expansion if the body is in { }.
3676 (c_parser_while_statement): Likewise.
3677 (c_parser_for_statement): Likewise.
3678
ff22eb12
NS
36792017-07-18 Nathan Sidwell <nathan@acm.org>
3680
3681 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3682
eea77d1f
DM
36832017-07-14 David Malcolm <dmalcolm@redhat.com>
3684
3685 * c-decl.c (implicitly_declare): When suggesting a missing
3686 #include, provide a fix-it hint.
3687
b6f43128
DM
36882017-07-06 David Malcolm <dmalcolm@redhat.com>
3689
3690 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3691 and call that instead.
3692 * c-tree.h (selftest::run_c_tests): New decl.
3693
3e2becc4
MP
36942017-06-26 Marek Polacek <polacek@redhat.com>
3695
3696 PR c/80116
3697 * c-parser.c (c_parser_if_body): Set the location of the
3698 body of the conditional after parsing all the labels. Call
3699 warn_for_multistatement_macros.
3700 (c_parser_else_body): Likewise.
3701 (c_parser_switch_statement): Likewise.
3702 (c_parser_while_statement): Likewise.
3703 (c_parser_for_statement): Likewise.
3704 (c_parser_statement): Add a default argument. Save the location
3705 after labels have been parsed.
3706 (c_parser_c99_block_statement): Likewise.
3707
343ae898
RB
37082017-06-19 Richard Biener <rguenther@suse.de>
3709
3710 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3711 negated _Literals to parse _Literal (int) -1.
3712
45b2222a
ML
37132017-06-13 Martin Liska <mliska@suse.cz>
3714
3715 PR sanitize/78204
3716 * c-convert.c (convert): Use sanitize_flags_p.
3717 * c-decl.c (grokdeclarator): Likewise.
3718 * c-typeck.c (convert_for_assignment): Likewise.
3719 (c_finish_return): Likewise.
3720 (build_binary_op): Likewise.
3721
8ab7005b
JJ
37222017-06-08 Jakub Jelinek <jakub@redhat.com>
3723
3724 PR c/81006
3725 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3726 to sizetype before size_binop.
3727
363dc72c
JJ
37282017-06-07 Jakub Jelinek <jakub@redhat.com>
3729
3730 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3731 of TDI_generic.
3732
dc949728
MP
37332017-06-06 Marek Polacek <polacek@redhat.com>
3734
3735 PR c/79983
3736 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3737 ref.
3738 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3739
40ffd95f
BE
37402017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3741
3742 * c-parser.c (c_parser_binary_expression): Implement the
3743 -Wsizeof_pointer_div warning.
3744 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3745 from a parenthesized expression.
3746 (c_parser_expr_list): Use c_last_sizeof_loc.
3747 * c-tree.h (c_last_sizeof_loc): New external.
3748 * c-typeck.c (c_last_sizeof_loc): New variable.
3749 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3750
9fc5e7a4
MM
37512017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3752
3753 PR testsuite/80580
3754 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3755
f012c8ef
DM
37562017-05-30 David Malcolm <dmalcolm@redhat.com>
3757
3758 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3759 parameters.
3760
3cd211af
MS
37612017-05-24 Martin Sebor <msebor@redhat.com>
3762
3763 PR c/80731
3764 * c-fold.c (c_fully_fold_internal): Adjust.
3765 * c-typeck.c (parser_build_unary_op): Adjust.
3766
fd71a9a2
TS
37672017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3768
3769 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3770 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3771 "VECTOR_LENGTH".
3772
92fa0f9e
MP
37732017-05-23 Marek Polacek <polacek@redhat.com>
3774
3775 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3776 quotes.
3777
d11c168a
JJ
37782017-05-22 Jakub Jelinek <jakub@redhat.com>
3779
3780 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3781 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3782 it returned invariant. Call tree_invariant_p unconditionally
3783 afterwards to decide whether to return expr or op0.
3784
58aca9d9
NS
37852017-05-22 Nathan Sidwell <nathan@acm.org>
3786
3787 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3788
7fd549d2
TS
37892017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3790
3791 * c-parser.c (c_parser_omp_clause_default): Handle
3792 "OMP_CLAUSE_DEFAULT_PRESENT".
3793
6ecd2339
BE
37942017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3795
3796 * config-lang.in (gtfiles): Add c-family/c-format.c.
3797
8a57ecff
NS
37982017-05-18 Nathan Sidwell <nathan@acm.org>
3799
3800 * c-decl.c (pushdecl_top_level): Delete unused function.
3801
6574d78e
MP
38022017-05-18 Marek Polacek <polacek@redhat.com>
3803
3804 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3805 (check_earlier_gotos): Likewise.
3806 (define_label): Likewise.
3807 (pending_xref_error): Likewise.
3808 (smallest_type_quals_location): Likewise.
3809 (grokdeclarator): Likewise.
3810 (grokparms): Likewise.
3811 (identifier_global_value): Likewise.
3812 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3813 (find_init_member): Likewise.
3814
e3455240
MP
38152017-05-18 Marek Polacek <polacek@redhat.com>
3816
3817 * c-decl.c (start_decl): Use false/true instead of 0/1.
3818 (grokdeclarator): Likewise.
3819 (finish_struct): Likewise.
3820 (start_function): Change the return type to bool. Use false/true
3821 instead of 0/1.
3822 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3823 * c-tree.h (start_function): Update.
3824 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3825 (set_designator): Change the return type to bool. Use false/true
3826 instead of 0/1.
3827
3fa8871b
MP
38282017-05-17 Marek Polacek <polacek@redhat.com>
3829
3830 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3831 * c-typeck.c: Likewise.
3832
142473df
MP
38332017-05-17 Marek Polacek <polacek@redhat.com>
3834
3835 PR sanitizer/80659
3836 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3837 DECL_IGNORED_P even for non-static compound literals.
3838
1a817418
ML
38392017-05-17 Martin Liska <mliska@suse.cz>
3840
3841 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3842 use it instead of int type.
3843
b2fa0a8b
MP
38442017-05-17 Marek Polacek <polacek@redhat.com>
3845
3846 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3847 call c_fully_fold.
3848 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3849 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3850 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3851 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3852 save_expr.
3853 (c_parser_conditional_expression): Likewise.
3854 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3855 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3856 (process_init_element): Likewise.
3857 (build_binary_op): Likewise.
3858 (handle_omp_array_sections_1): Likewise.
3859
1e47f02b
TS
38602017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3861
3862 * c-parser.c (c_parser_omp_clause_num_gangs)
3863 (c_parser_omp_clause_num_workers)
3864 (c_parser_omp_clause_vector_length): Merge functions into...
3865 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3866 all users.
3867
c24e924f
NS
38682017-05-11 Nathan Sidwell <nathan@acm.org>
3869
3870 * gimple-parser.c: Don't #include tree-dump.h.
3871
c587104e
MM
38722017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3873
3874 PR testsuite/80580
3875 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3876
67ac9a9d
MM
38772017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3878
3879 PR testsuite/80580
3880 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3881 incorrect __MEM syntax.
3882
ac4eb40f
MM
38832017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3884
3885 PR testsuite/80580
3886 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3887 type of unary '*'.
3888
641da50a
NS
38892017-05-09 Nathan Sidwell <nathan@acm.org>
3890
3891 * c-tree.h (pushdecl): Declare.
3892
56d35585
DM
38932017-05-05 David Malcolm <dmalcolm@redhat.com>
3894
3895 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3896 with diagnostic_report_diagnostic.
3897 * c-errors.c (pedwarn_c99): Likewise.
3898 (pedwarn_c90): Likewise.
3899
815d9cc6
XR
39002017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3901
92a285c1 3902 PR c++/80038
815d9cc6
XR
3903 * c-gimplify.c (c_gimplify_expr): Remove calls to
3904 cilk_gimplifY_call_params_in_spawned_fn.
3905
1c4ea66f
DM
39062017-04-25 David Malcolm <dmalcolm@redhat.com>
3907
3908 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3909 hint for removing extra semicolon.
3910
666f7903
JJ
39112017-04-21 Jakub Jelinek <jakub@redhat.com>
3912
3913 PR c/80468
3914 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3915 enabled, set specs->type to integer_type_node.
3916
5764ee3c
JW
39172017-04-03 Jonathan Wakely <jwakely@redhat.com>
3918
3919 * c-array-notation.c: Fix typo in comment.
3920
10fa8dfb
MP
39212017-03-29 Marek Polacek <polacek@redhat.com>
3922
3923 PR c/79730
3924 * c-decl.c (finish_decl): Check VAR_P.
3925
a9e4a1a5
JJ
39262017-03-27 Jakub Jelinek <jakub@redhat.com>
3927
3928 PR middle-end/80162
3929 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3930 * c-typeck.c (c_mark_addressable): Likewise. Look through
3931 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3932 to ARRAY_TYPE.
3933 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3934
ee3ff394
MP
39352017-03-23 Marek Polacek <polacek@redhat.com>
3936
3937 * c-tree.h: Remove a C_RID_YYCODE reference.
3938
4d1b8e70
JJ
39392017-03-21 Jakub Jelinek <jakub@redhat.com>
3940
3941 PR c/80097
3942 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3943 optional COMPOUND_EXPR with ubsan instrumentation.
3944
31dc71a8
MP
39452017-03-17 Marek Polacek <polacek@redhat.com>
3946
3947 * c-parser.c: Add C11 references.
3948
d579c385
MP
39492017-03-15 Marek Polacek <polacek@redhat.com>
3950
3951 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3952
85059a38
MP
39532017-03-11 Marek Polacek <polacek@redhat.com>
3954
3955 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3956
2f6f187a
DM
39572017-03-10 David Malcolm <dmalcolm@redhat.com>
3958
3959 PR translation/79848
3960 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3961 "%qs".
3962 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3963
36618428
MP
39642017-03-09 Marek Polacek <polacek@redhat.com>
3965
3966 PR sanitizer/79757
3967 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3968 parameter declarations with initializers.
3969
01e5af5a
JJ
39702017-03-09 Jakub Jelinek <jakub@redhat.com>
3971
3972 PR c/79969
3973 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3974 TYPE_STUB_DECL.
3975
a71dbc63
JJ
39762017-03-07 Jakub Jelinek <jakub@redhat.com>
3977
3978 PR c/79834
3979 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3980 for "may only be used in compound statements" diagnostics, change it
3981 such that the same translatable string is used for all pragmas. For
3982 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3983 diagnostics.
3984 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3985 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3986 "may only be used in compound statements" diagnostics, such that the
3987 same translatable string is used for all pragmas.
3988
1ff4bae6
MP
39892017-03-04 Marek Polacek <polacek@redhat.com>
3990
3991 PR c/79847
3992 * c-decl.c (implicit_decl_warning): Add missing space.
3993
7f5a7d78
MP
39942017-03-03 Marek Polacek <polacek@redhat.com>
3995
3996 PR c/79758
3997 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3998 current_function_prototype_arg_types is error_mark_node. Fix
3999 formatting. Use TREE_VALUE instead of TREE_TYPE.
4000
883c8f06
JJ
40012017-03-03 Jakub Jelinek <jakub@redhat.com>
4002
79c9b7a8
JJ
4003 PR c/79837
4004 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4005 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4006 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4007 diagnostics.
4008
883c8f06
JJ
4009 PR c/79836
4010 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4011 instead of %<_Generic>.
4012 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4013 (c_parser_omp_target_exit_data): Use %<release%> instead of
4014 %<release>.
4015
324ff1a0
JJ
40162017-02-28 Jakub Jelinek <jakub@redhat.com>
4017
4018 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4019 instead of just cond ? "..." : "...".
4020 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4021 for "enter"/"exit" keyword.
4022 (c_finish_oacc_routine): Don't use %s to supply portions of the
4023 message.
4024
4227c9ad
JJ
40252017-02-24 Jakub Jelinek <jakub@redhat.com>
4026
4027 PR c++/79588
4028 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4029 handle -Wrestrict here.
4030 * c-typeck.c (build_function_call_vec): Adjust
4031 check_function_arguments caller.
4032
5d972e66
RB
40332017-02-23 Richard Biener <rguenther@suse.de>
4034
4035 PR c/79684
4036 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4037 to initialize c_exprs to return.
4038 (c_parser_gimple_binary_expression): Likewise.
4039 (c_parser_gimple_unary_expression): Likewise.
4040 (c_parser_gimple_postfix_expression): Likewise.
4041
61ac5ebe
MP
40422017-02-22 Marek Polacek <polacek@redhat.com>
4043
4044 PR c/79662
4045 * c-typeck.c (convert_arguments): Handle error_mark_node.
4046
41d1b0b1
PK
40472017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4048
4049 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4050 value of c_parser_parse_ssa_name against error_mark_node and emit
4051 error if ssa name is anonymous and written as default definition.
4052
eab1f169
PK
40532017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4054
4055 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4056 FMA_EXPR.
4057
bcac0b4d
JJ
40582017-02-16 Jakub Jelinek <jakub@redhat.com>
4059
4060 PR c++/79512
4061 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4062 ignore #pragma omp target even when not followed by identifier.
4063
1be33173
PK
40642017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4065
4066 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4067 (c_parser_gimple_unary_expression): Likewise.
4068
aa326bfb
JJ
40692017-02-13 Jakub Jelinek <jakub@redhat.com>
4070
4071 * c-parser.c (c_parser_oacc_declare): Add missing space in
4072 diagnostics.
4073
8a398bc5
PK
40742017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4075
4076 PR c/79478
4077 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4078 set_c_expr_source_range when parsing ssa-name.
4079
3dcde5ef 40802017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 4081 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
4082
4083 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4084 building IL when arguments are error_mark_node.
4085 (c_parser_gimple_unary_expression): Likewise.
4086 (c_parser_gimple_if_stmt): Likewise.
4087 (c_parser_gimple_switch_stmt): Likewise.
4088 (c_parser_gimple_return_stmt): Likewise.
4089 (c_parser_parse_ssa_name): When name lookup fails do not build
4090 an SSA name. Use undeclared rather than not declared in error
4091 reporting.
4092
192b048b
MP
40932017-02-09 Marek Polacek <polacek@redhat.com>
4094
4095 PR c/79428
4096 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4097 instead of c_parser_skip_until_found.
4098
56f71478
JJ
40992017-02-09 Jakub Jelinek <jakub@redhat.com>
4100
4101 PR c/79431
4102 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4103 symtab_node::get on automatic variables.
4104
02889d23
CLT
41052016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4106 Chung-Lin Tang <cltang@codesourcery.com>
4107
4108 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4109 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4110 semantic checking.
4111 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4112
7af4b20d
RB
41132017-02-07 Richard Biener <rguenther@suse.de>
4114
4115 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4116 (c_parser_gimple_postfix_expression_after_primary):
4117 Do not use c_build_function_call_vec to avoid folding and promotion.
4118 Simplify.
4119
e5e391d6
MO
41202017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4121
4122 PR lto/79061
4123 * c-decl.c (pop_scope): Pass main_input_filename to
4124 build_translation_unit_decl.
4125
c2e84327
DM
41262017-01-24 David Malcolm <dmalcolm@redhat.com>
4127
4128 * c-parser.c: Include "read-rtl-function.h" and
4129 "run-rtl-passes.h".
4130 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4131 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4132 production. Update for renaming of field "gimple_pass" to
4133 "gimple_or_rtl_pass". If __RTL was seen, call
4134 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4135 to an auto_timevar, to cope with early exit.
4136 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4137 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4138 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4139 Handle RID_RTL.
4140 (c_parser_parse_rtl_body): New function.
4141 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4142 (struct c_declspecs): Rename field "gimple_pass" to
4143 "gimple_or_rtl_pass". Add field "rtl_p".
4144 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4145 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4146 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4147 (c_parser_gimple_or_rtl_pass_list): ...this.
4148
2ebd93e1
MP
41492017-01-20 Marek Polacek <polacek@redhat.com>
4150
4151 PR c/64279
4152 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4153
b1c95bb5
RB
41542017-01-13 Richard Biener <rguenther@suse.de>
4155
4156 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4157 nops.
4158
25329913
RB
41592017-01-13 Richard Biener <rguenther@suse.de>
4160
4161 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4162 _Literal ( type-name ) number.
4163
6bb4ea5c
RB
41642017-01-12 Richard Biener <rguenther@suse.de>
4165
4166 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4167 __MEM.
4168
6b5b4e9c
JJ
41692017-01-11 Jakub Jelinek <jakub@redhat.com>
4170
4171 PR c++/72813
4172 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4173 PCH file.
4174
e3252775
RB
41752017-01-11 Richard Biener <rguenther@suse.de>
4176
4177 PR bootstrap/79052
4178 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4179 returns on parse errors.
4180
a9342885
MP
41812017-01-04 Marek Polacek <polacek@redhat.com>
4182
4183 PR c++/64767
4184 * c-parser.c (c_parser_postfix_expression): Mark zero character
4185 constants by setting original_type in c_expr.
4186 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4187 with a zero character constant.
4188 (char_type_p): New function.
4189
5dd9a9d0
DM
41902017-01-04 David Malcolm <dmalcolm@redhat.com>
4191
4192 * c-parser.c (c_parser_declaration_or_fndef): Create a
4193 rich_location at init_loc and parse it to start_init.
4194 (last_init_list_comma): New global.
4195 (c_parser_braced_init): Update last_init_list_comma when parsing
4196 commas. Pass it to pop_init_level. Pass location of closing
4197 brace to pop_init_level.
4198 (c_parser_postfix_expression_after_paren_type): Create a
4199 rich_location at type_loc and parse it to start_init.
4200 (c_parser_omp_declare_reduction): Likewise for loc.
4201 * c-tree.h (start_init): Add rich_location * param.
4202 (pop_init_level): Add location_t param.
4203 * c-typeck.c (struct initializer_stack): Add field
4204 "missing_brace_richloc".
4205 (start_init): Add richloc param, use it to initialize
4206 the stack node's missing_brace_richloc.
4207 (last_init_list_comma): New decl.
4208 (finish_implicit_inits): Pass last_init_list_comma to
4209 pop_init_level.
4210 (push_init_level): When finding missing open braces, add fix-it
4211 hints to the richloc.
4212 (pop_init_level): Add "insert_before" param and pass it
4213 when calling pop_init_level. Add fixits about missing
4214 close braces to any richloc. Use the richloc for the
4215 -Wmissing-braces warning.
4216 (set_designator): Pass last_init_list_comma to pop_init_level.
4217 (process_init_element): Likewise.
4218
cbe34bb5
JJ
42192017-01-01 Jakub Jelinek <jakub@redhat.com>
4220
4221 Update copyright years.
4222
d17680f3
JJ
42232016-12-21 Jakub Jelinek <jakub@redhat.com>
4224
0dba7960
JJ
4225 PR bootstrap/78817
4226 * c-typeck.c (build_function_call_vec): If check_function_arguments
4227 returns true, set TREE_NO_WARNING on CALL_EXPR.
4228
d17680f3
JJ
4229 PR c/77767
4230 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4231 to *expr instead of overwriting it.
4232
aa90531e
RB
42332016-12-20 Richard Biener <rguenther@suse.de>
4234
4235 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4236 error recovery.
4237 (c_parser_gimple_statement): Only build assigns for non-error
4238 stmts.
4239 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4240
629b3d75
MJ
42412016-12-14 Martin Jambor <mjambor@suse.cz>
4242
4243 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4244 omp-low.h.
4245 (c_finish_oacc_routine): Adjusted call to
4246 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4247 to use their new names.
4248 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4249 use its new name.
4250 (c_parser_oacc_update): Likewise.
4251 (c_parser_omp_simd): Likewise.
4252 (c_parser_omp_target_update): Likewise.
4253 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4254 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4255 name.
4256 (c_finish_omp_cancellation_point): Likewise.
4257 * gimple-parser.c: Do not include omp-low.h
4258
c5af52eb
CP
42592016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4260 James Norris <jnorris@codesourcery.com>
4261
4262 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4263 EXIT_DATA,WAIT} are not used in compound statements.
4264 (c_parser_oacc_enter_exit_data): Update diagnostics.
4265
48330c93
BE
42662016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4267
4268 PR c++/71973
4269 * c-decl.c (diagnose_mismatched_decls): Use
4270 OPT_Wbuiltin_declaration_mismatch here too.
4271
899ca90e 42722016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
4273 Alan Hayward <alan.hayward@arm.com>
4274 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
4275
4276 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4277 (make_label, finish_struct): Likewise.
4278
1ee62b92 42792016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 4280 Richard Biener <rguenther@suse.de>
22b15758 4281
8e745a17
JJ
4282 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4283 * config-lang.in (gtfiles): Add c/c-parser.h.
4284 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4285 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4286 * c-parser.c (enum c_id_kind, struct c_token,
4287 c_parser_next_token_is, c_parser_next_token_is_not,
4288 c_parser_next_token_is_keyword,
4289 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4290 Split out to ...
4291 * c-parser.h: ... new header.
4292 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 4293 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
4294 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4295 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4296 c_parser_error, c_parser_require, c_parser_skip_until_found,
4297 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4298 c_parser_type_name): Export.
4299 (c_parser_tokens_buf): New function.
4300 (c_parser_error): Likewise.
4301 (c_parser_set_error): Likewise.
4302 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
4303 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4304 via c_parser_parse_gimple_body.
8e745a17
JJ
4305 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4306 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4307 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4308 c_parser_error, c_parser_require, c_parser_skip_until_found,
4309 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4310 c_parser_type_name): Declare.
1ee62b92
PG
4311 (struct c_parser): Declare forward.
4312 (c_parser_tokens_buf): Declare.
8e745a17
JJ
4313 (c_parser_error): Likewise.
4314 (c_parser_set_error): Likewise.
4315 * gimple-parser.c: New file.
4316 * gimple-parser.h: Likewise.
1ee62b92 4317
22b15758
UB
43182016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4319
4320 PR c/35503
4321 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4322 warn_for_restrict.
4323
84ff4775
LCW
43242016-09-11 Le-Chun Wu <lcwu@google.com>
4325 Mark Wielaard <mjw@redhat.com>
4326
4327 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4328 to the given -Wshadow= variant.
4329
4d0cdd0c
TP
43302016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4331
4332 * c-typeck.c: Include memmodel.h.
4333
1202f33e
JJ
43342016-10-13 Jakub Jelinek <jakub@redhat.com>
4335
4336 PR target/77957
4337 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4338 instead of lhd_return_null_tree_v.
4339
8a14afd0
BS
43402016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4341
4342 PR c++/69733
4343 * c-decl.c (smallest_type_quals_location): New static function.
4344 (grokdeclarator): Try to find the correct location for an ignored
4345 qualifier.
4346
81fea426
MP
43472016-09-26 Marek Polacek <polacek@redhat.com>
4348
4349 PR c/7652
4350 * c-decl.c (pop_scope): Add gcc_fallthrough.
4351
43522016-09-26 Marek Polacek <polacek@redhat.com>
4353
4354 PR c/7652
4355 * c-parser.c (struct c_token): Add flags field.
4356 (c_lex_one_token): Pass it to c_lex_with_flags.
4357 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4358 into IFN_FALLTHROUGH.
4359 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4360 attribute fallthrough after a case label or default label.
4361 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4362
9a2300e9
MP
43632016-09-24 Marek Polacek <polacek@redhat.com>
4364
4365 PR c/77490
4366 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4367 have boolean value. Warn about ++/-- on booleans.
4368
7de76362
JJ
43692016-09-23 Jakub Jelinek <jakub@redhat.com>
4370
4371 * c-parser.c (incomplete_record_decls): Remove unnecessary
4372 = vNULL initialization of file scope vec.
4373
5b73d2ab
MP
43742016-09-16 Marek Polacek <polacek@redhat.com>
4375
4376 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4377
e51fbec3
MP
43782016-09-14 Marek Polacek <polacek@redhat.com>
4379
4380 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4381 (fix_array_notation_expr): Likewise.
4382 * c-decl.c (finish_decl): Likewise.
4383 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4384 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4385 (function_to_pointer_conversion): Use false instead of 0.
4386 (convert_lvalue_to_rvalue): Likewise.
4387 (parser_build_unary_op): Likewise.
4388 (build_atomic_assign): Likewise.
4389 (build_unary_op): Change nonconvert parameter type to bool, use
4390 true/false instead of 1/0.
4391 (build_binary_op): Use true instead of 1.
4392
254830ba
DM
43932016-09-13 David Malcolm <dmalcolm@redhat.com>
4394
4395 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4396 of add_fixit_insert to add_fixit_insert_before.
4397
4c13ba17
MP
43982016-09-13 Marek Polacek <polacek@redhat.com>
4399
4400 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4401 it.
4402
54dcdb88
BE
44032016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4404
4405 PR c++/77496
4406 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4407 COMPOUND_EXPR to warn_for_omitted_condop.
4408
e5106e27
DM
44092016-09-07 David Malcolm <dmalcolm@redhat.com>
4410
4411 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4412 c_get_substring_location for this new langhook.
4413
9dc5773f
JJ
44142016-09-02 Jakub Jelinek <jakub@redhat.com>
4415
4416 PR c/65467
4417 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4418 flag_openmp.
4419 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4420 instead of mark_exp_read on low_bound/length expression.
4421 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4422 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4423 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4424 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4425 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4426 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4427 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4428 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4429 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4430 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4431 instead of mark_expr_read.
4432 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4433 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4434 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4435 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4436 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4437 array section bases outside of depend clause, for depend clause
4438 use convert_lvalue_to_rvalue on the base.
4439 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4440 linear, aligned, map, to and from clauses.
4441 (c_omp_clause_copy_ctor): New function.
4442
295844f6
MP
44432016-09-01 Marek Polacek <polacek@redhat.com>
4444
4445 PR c/7652
4446 * c-typeck.c (composite_type): Add FALLTHRU comment.
4447
089af25c
DM
44482016-08-31 David Malcolm <dmalcolm@redhat.com>
4449
4450 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4451 to the insertion fixits for "struct", "union", and "enum".
4452
f9087798
DM
44532016-08-30 David Malcolm <dmalcolm@redhat.com>
4454
4455 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4456 rather than add_fixit_misspelled_id.
4457 (undeclared_variable): Likewise.
4458 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4459 now-redundant "here" params from add_fixit_insert method calls.
4460 (c_parser_parameter_declaration): Likewise.
4461 * c-typeck.c (build_component_ref): Remove now-redundant range
4462 param from add_fixit_replace method calls.
4463
ebef225f
MP
44642016-08-25 Marek Polacek <polacek@redhat.com>
4465
4466 * c-typeck.c (parser_build_binary_op): Pass LHS to
4467 warn_logical_not_parentheses.
4468
fe377a48
MP
44692016-08-25 Marek Polacek <polacek@redhat.com>
4470
4471 PR c/77323
4472 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4473 or _FloatN or _FloatNx is not supported.
4474 (finish_declspecs): Set type to integer_type_node when _FloatN or
4475 _FloatNx is not supported.
4476
c65699ef
JM
44772016-08-19 Joseph Myers <joseph@codesourcery.com>
4478
4479 PR c/32187
4480 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4481 (struct c_declspecs): Add field floatn_nx_idx.
4482 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4483 and _FloatNx type specifiers.
4484 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4485 (c_parser_declspecs, c_parser_attribute_any_word)
4486 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4487 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4488 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4489 narrower than double.
4490
2f1364c2
JJ
44912016-08-12 Jakub Jelinek <jakub@redhat.com>
4492 Martin Liska <mliska@suse.cz>
4493
4494 PR c/67410
4495 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4496 % to determine val element to change. Assert that
4497 wchar_bytes * charwidth fits into val array.
4498
191816a3
MP
44992016-08-12 Marek Polacek <polacek@redhat.com>
4500
4501 PR c/7652
4502 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4503 (c_parser_postfix_expression): Likewise.
4504 * c-typeck.c (build_unary_op): Adjust fall through comment.
4505 (c_mark_addressable): Likewise.
4506
b95a64bb
JJ
45072016-08-11 Jakub Jelinek <jakub@redhat.com>
4508
4509 PR c/72816
4510 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4511 array member through typedef, for orig_qual_indirect == 0 clear
4512 orig_qual_type.
4513
895aa8e1
DM
45142016-08-08 David Malcolm <dmalcolm@redhat.com>
4515
4516 PR c/64955
4517 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4518 this up to selftest::run_c_tests.
4519 (selftest::run_c_tests): New function.
4520
0b212d8c
TS
45212016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4522
ae9281fc
TS
4523 * c-parser.c (struct oacc_routine_data): Add error_seen and
4524 fndecl_seen members.
4525 (c_finish_oacc_routine): Use these.
4526 (c_parser_declaration_or_fndef): Adjust.
4527 (c_parser_oacc_routine): Likewise. Support more C language
4528 constructs, and improve diagnostics. Move pragma context
4529 checking...
4530 (c_parser_pragma): ... here.
4531
0b212d8c
TS
4532 * c-parser.c (struct oacc_routine_data): New.
4533 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4534 Simplify code.
4535 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4536 declare target" attribute.
4537
76e2c821
JB
45382016-08-01 Jan Beulich <jbeulich@suse.com>
4539
4540 * c-fold.c (c_fully_fold_internal): Also emit shift count
4541 warnings for vector types.
4542 * c-typeck.c (build_binary_op): Likewise.
4543
f618a472
MP
45442016-07-29 Marek Polacek <polacek@redhat.com>
4545
4546 PR c/71742
4547 * c-decl.c (finish_struct): Rephrase an error message.
4548
efd0786f
MP
4549 PR c/71853
4550 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4551 to error node for invalid code.
4552
e00dceaf
MP
4553 PR c/71573
4554 * c-decl.c (implicitly_declare): Return decl early not only for
4555 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4556
673a107a
JJ
45572016-07-29 Jakub Jelinek <jakub@redhat.com>
4558
4559 PR c/71969
4560 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4561 on GNU extern inline functions.
4562
a5b5c8b6
MP
45632016-07-29 Marek Polacek <polacek@redhat.com>
4564
4565 PR c/71583
4566 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4567 check expr.value.
4568
e3fe09c1
UB
45692016-07-22 Uros Bizjak <ubizjak@gmail.com>
4570
4571 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4572
7c8f7eaa
DM
45732016-07-20 David Malcolm <dmalcolm@redhat.com>
4574
4575 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4576 spellcheck-tree.h
4577 (best_macro_match): Likewise, converting from a typedef to a
4578 subclass.
4579 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4580 (lookup_name_fuzzy): Update for change of best_macro_match to a
4581 subclass with a ctor that calls cpp_forall_identifiers.
4582
de6a69ee
DM
45832016-07-20 David Malcolm <dmalcolm@redhat.com>
4584
4585 * c-decl.c (implicit_decl_warning): Update for conversion of
4586 return type of lookup_name_fuzzy to const char *.
4587 (undeclared_variable): Likewise.
4588 (lookup_name_fuzzy): Convert return type from tree to
4589 const char *.
4590 * c-parser.c (c_parser_declaration_or_fndef): Update for
4591 conversion of return type of lookup_name_fuzzy to const char *.
4592 (c_parser_parameter_declaration): Likewise.
4593
b1c9c068
CP
45942016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4595
4596 * c-parser.c (c_parser_oacc_declare): Don't scan for
4597 GOMP_MAP_POINTER.
4598 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4599 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4600 zero-length subarrays.
4601
ddbbcb19
JJ
46022016-07-15 Jakub Jelinek <jakub@redhat.com>
4603
4604 PR c/71858
4605 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4606 instead of FUZZY_LOOKUP_NAME.
4607 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4608 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4609
dd36b877
JJ
46102016-07-14 Jakub Jelinek <jakub@redhat.com>
4611
4612 PR c/71858
4613 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4614
8c681247
TS
46152016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4616
4617 * c-parser.c (c_parser_generic_selection): Make type of variable
4618 auto_vec.
4619 (c_parser_omp_declare_simd): Likewise.
4620
bf4fa671
TS
46212016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4622
4623 * c-decl.c (struct c_struct_parse_info): Change member types
4624 from vec to auto_vec.
4625 (start_struct): Adjust.
4626 (finish_struct): Likewise.
4627
557e8c49
JJ
46282016-07-02 Jakub Jelinek <jakub@redhat.com>
4629
4630 PR c/71719
4631 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4632
54d19c3b
TS
46332016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4634
4635 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4636 Move pragma context checking into...
4637 (c_parser_omp_cancellation_point): ... here, and improve
4638 diagnostic messages.
4639 * c-typeck.c (c_finish_omp_cancel)
4640 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4641
152ef731
JJ
46422016-06-29 Jakub Jelinek <jakub@redhat.com>
4643
4644 PR c/71685
4645 * c-typeck.c (c_build_qualified_type): Don't clear
4646 C_TYPE_INCOMPLETE_VARS for the main variant.
4647
46482016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4649
4650 PR c/71552
4651 * c-typeck.c (output_init_element): Diagnose incompatible types
4652 before non-constant initializers.
4653
e9ac1f86
JJ
46542016-06-28 Jakub Jelinek <jakub@redhat.com>
4655
4656 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4657
277d7ee0
AK
46582016-06-23 Andi Kleen <ak@linux.intel.com>
4659
4660 * Make-lang.in: Add support for autofdo.
4661
1a4f11c8
DM
46622016-06-22 David Malcolm <dmalcolm@redhat.com>
4663
4664 PR c/70339
4665 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4666 (implicit_decl_warning): When issuing warnings for implicit
4667 declarations, attempt to provide a suggestion via
4668 lookup_name_fuzzy.
4669 (undeclared_variable): Likewise when issuing errors.
4670 (lookup_name_in_scope): Likewise.
4671 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4672 (best_macro_match): New typedef.
4673 (find_closest_macro_cpp_cb): New function.
4674 (lookup_name_fuzzy): New function.
4675 * c-parser.c: Include gcc-rich-location.h.
4676 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4677 (c_keyword_starts_typename): ...this new function.
4678 (c_parser_declaration_or_fndef): When issuing errors about
4679 missing "struct" etc, add a fixit. For other kinds of errors,
4680 attempt to provide a suggestion via lookup_name_fuzzy.
4681 (c_parser_parms_declarator): When looking ahead to detect typos in
4682 type names, also reject CPP_KEYWORD.
4683 (c_parser_parameter_declaration): When issuing errors about
4684 unknown type names, attempt to provide a suggestion via
4685 lookup_name_fuzzy.
4686 * c-tree.h (c_keyword_starts_typename): New prototype.
4687
5a578671
JM
46882016-06-20 Joseph Myers <joseph@codesourcery.com>
4689
4690 PR c/71601
4691 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4692 c_common_type returns error_mark_node.
4693
3f8257db 46942016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4695
4696 PR c/69507
4697 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4698 __alignof__ (expression).
4699
6a3f203c
DM
47002016-06-14 David Malcolm <dmalcolm@redhat.com>
4701
4702 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4703
264757fb
DM
47042016-06-14 David Malcolm <dmalcolm@redhat.com>
4705
4706 * c-typeck.c (build_component_ref): Simplify fixit code by
4707 using gcc_rich_location::add_fixit_misspelled_id.
4708 (set_init_label): Likewise.
4709
f7e4f2e3
DM
47102016-06-13 David Malcolm <dmalcolm@redhat.com>
4711
4712 * c-parser.c (c_parser_initelt): Provide location of name for new
4713 location_t param of set_init_label.
4714 * c-tree.h (set_init_label): Add location_t param.
4715 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4716 param and use it when issuing error messages about unrecognized
4717 field names. Attempt to provide a fixit hint if appropriate,
4718 otherwise update the error message to provide the type name.
4719
4b1ffdb1
TS
47202016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4721
4722 PR c/71381
4723 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4724 Loosen checking.
4725
44a845ca
MS
47262016-06-08 Martin Sebor <msebor@redhat.com>
4727 Jakub Jelinek <jakub@redhat.com>
4728
4729 PR c++/70507
4730 PR c/68120
4731 * c-typeck.c (convert_arguments): Don't promote last argument
4732 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4733
92a5f2ba
MP
47342016-06-08 Marek Polacek <polacek@redhat.com>
4735
4736 PR c/71418
4737 * c-decl.c (grokdeclarator): Check TYPE_P.
4738
08203f73
MP
4739 PR c/71426
4740 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4741 code.
4742
6ffd47b7
DM
47432016-06-07 David Malcolm <dmalcolm@redhat.com>
4744
4745 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4746 and structure element reference, capture the location of the
4747 element name token and pass it to build_component_ref.
4748 (c_parser_postfix_expression_after_primary): Likewise for
4749 structure element dereference.
4750 (c_parser_omp_variable_list): Likewise for
4751 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4752 * c-tree.h (build_component_ref): Add location_t param.
4753 * c-typeck.c (build_component_ref): Add location_t param
4754 COMPONENT_LOC. Use it, if available, when issuing hints about
4755 mispelled member names to provide a fixit replacement hint.
4756
1f40cff3
MP
47572016-06-06 Marek Polacek <polacek@redhat.com>
4758
4759 PR c/71362
4760 * c-parser.c (c_parser_direct_declarator): Set location.
4761
5545a907
MP
47622016-06-06 Marek Polacek <polacek@redhat.com>
4763
4764 * c-typeck.c (comptypes_internal): Handle comparisons of
4765 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4766 TYPE_REF_CAN_ALIAS_ALL.
4767
b605f663
CLT
47682016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4769
4770 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4771 arguments as addressable when async clause exists.
4772
00631022
JJ
47732016-05-30 Jakub Jelinek <jakub@redhat.com>
4774
4775 PR c++/71349
4776 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4777 when combined with target construct.
4778
7211a097
JJ
47792016-05-26 Jakub Jelinek <jakub@redhat.com>
4780
4781 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4782 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4783
95efe6b6
MP
47842016-05-25 Marek Polacek <polacek@redhat.com>
4785
4786 PR c/71265
4787 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4788
a23faf7a
MP
4789 PR c/71266
4790 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4791
e46c7770
CP
47922016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4793
4794 * c-parser.c (c_parser_oacc_declare): Add support for
4795 GOMP_MAP_FIRSTPRIVATE_POINTER.
4796 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4797 argument with enum c_omp_region_type ort.
4798 (handle_omp_array_sections): Likewise. Update call to
4799 handle_omp_array_sections_1.
4800 (c_finish_omp_clauses): Add specific errors and warning messages for
4801 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4802 call to handle_omp_array_sections.
4803
a04e69c0
TS
48042016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4805
4806 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4807
f17a223d
RB
48082016-05-24 Richard Biener <rguenther@suse.de>
4809
4810 PR middle-end/70434
4811 PR c/69504
4812 * c-typeck.c (build_array_ref): Do not complain about indexing
4813 non-lvalue vectors. Adjust for function name change.
4814
79063edd
MS
48152016-05-20 Martin Sebor <msebor@redhat.com>
4816
4817 PR c/71115
4818 * c-typeck.c (error_init): Use
4819 expansion_point_location_if_in_system_header.
4820 (warning_init): Same.
4821
8a40fef3
DM
48222016-05-19 David Malcolm <dmalcolm@redhat.com>
4823
4824 PR c/71171
4825 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4826 in error-handling.
4827 (c_parser_postfix_expression): Likewise.
4828 * c-tree.h (c_expr::set_error): New method.
4829 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4830 that result's range is initialized.
4831
e9892350
JG
48322016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4833
4834 * c-typeck.c (parser_build_unary_op): Fix formatting.
4835
8fad45f5
MW
48362016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4837
4838 * c-decl.c (grokdeclarator): Remove errmsg and use of
4839 targetm.invalid_return_type.
4840 (grokparms): Remove errmsg and use of
4841 targetm.invalid_parameter_type.
4842
aa4b467b
JM
48432016-05-13 Joseph Myers <joseph@codesourcery.com>
4844
4845 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4846 function return type.
4847
4f2e1536
MP
48482016-05-12 Marek Polacek <polacek@redhat.com>
4849
4850 PR c/70756
4851 * c-decl.c (build_compound_literal): Pass LOC down to
4852 c_incomplete_type_error.
4853 * c-tree.h (require_complete_type): Adjust declaration.
4854 (c_incomplete_type_error): Likewise.
4855 * c-typeck.c (require_complete_type): Add location parameter, pass it
4856 down to c_incomplete_type_error.
4857 (c_incomplete_type_error): Add location parameter, pass it down to
4858 error_at.
4859 (build_component_ref): Pass location down to c_incomplete_type_error.
4860 (default_conversion): Pass location down to require_complete_type.
4861 (build_array_ref): Likewise.
4862 (build_function_call_vec): Likewise.
4863 (convert_arguments): Likewise.
4864 (build_unary_op): Likewise.
4865 (build_c_cast): Likewise.
4866 (build_modify_expr): Likewise.
4867 (convert_for_assignment): Likewise.
4868 (c_finish_omp_clauses): Likewise.
4869
d6e83a8d
MM
48702016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4871
4872 PR c/43651
4873 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4874 is enabled.
4875 * c-errors.c (pedwarn_c90): Return true if warned.
4876 * c-tree.h (pedwarn_c90): Change return type to bool.
4877 (enum c_declspec_word): Add new enumerator cdw_atomic.
4878
5c3a10fb
MP
48792016-05-11 Marek Polacek <polacek@redhat.com>
4880
4881 PR c++/71024
4882 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4883 diagnose_mismatched_attributes and call it.
4884
cf68d92c
MP
48852016-05-10 Marek Polacek <polacek@redhat.com>
4886
4887 PR c/70255
4888 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4889 on a declaration following the definition.
4890
351f85c5
JJ
48912016-05-05 Jakub Jelinek <jakub@redhat.com>
4892
4893 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4894 parse it through to c_parser_c99_block_statement.
4895 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4896 caller.
4897
deef7113
MP
48982016-05-04 Marek Polacek <polacek@redhat.com>
4899
4900 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4901 OPT_Wdangling_else.
4902
de55efd5
MP
49032016-05-04 Marek Polacek <polacek@redhat.com>
4904
4905 PR c/48778
4906 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4907 for macro expansions.
4908
79ce98bc
MP
49092016-05-03 Marek Polacek <polacek@redhat.com>
4910
4911 PR c/70859
4912 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4913 check_builtin_function_arguments.
4914
fb2647aa
RB
49152016-05-03 Richard Biener <rguenther@suse.de>
4916
4917 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4918 the checksum from the previous stage.
4919
77886428
CP
49202016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4921
4922 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4923 c_finish_omp_clauses.
4924 (c_parser_omp_all_clauses): Likewise.
4925 (c_parser_oacc_cache): Likewise.
4926 (c_parser_oacc_loop): Likewise.
4927 (omp_split_clauses): Likewise.
4928 (c_parser_omp_declare_target): Likewise.
4929 (c_parser_cilk_all_clauses): Likewise.
4930 (c_parser_cilk_for): Likewise.
4931 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4932 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4933
7176a4a0
MP
49342016-05-02 Marek Polacek <polacek@redhat.com>
4935
4936 PR c/70851
4937 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4938 incomplete type.
4939
e7ff0319
CP
49402016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4941
4942 PR middle-end/70626
4943 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4944 OACC_LOOP_CLAUSE_MASK.
4945 (c_parser_oacc_kernels_parallel): Update call to
4946 c_oacc_split_loop_clauses.
4947
9f405ce1
AM
49482016-04-28 Andrew MacLeod <amacleod@redhat.com>
4949
4950 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4951 argument to build_modify_expr in two cases.
4952
c1e1f433
BS
49532016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4954
4955 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4956 warn_for_memset instead of warning directly here.
4957
2448a956
MP
49582016-04-26 Marek Polacek <polacek@redhat.com>
4959
4960 PR c/67784
4961 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4962 out of ...
4963 (c_parser_for_statement): ... here.
4964 (c_parser_if_statement): Use it.
4965 (c_parser_switch_statement): Use it.
4966 (c_parser_while_statement): Use it.
4967
b02a5e26
MP
4968 PR c/70791
4969 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4970
477d4906
IV
49712016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4972
4973 PR c++/69363
4974 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4975 instead of c_finish_cilk_clauses.
4976 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4977 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4978 floating-point variables in the linear clause for Cilk Plus.
4979
fe37c7af
MM
49802016-04-18 Michael Matz <matz@suse.de>
4981
4982 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4983 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4984
949505a9
MP
49852016-04-15 Marek Polacek <polacek@redhat.com>
4986
4987 PR c/70671
4988 * c-typeck.c (build_unary_op): Pass location down to error and
4989 warning call.
4990
dda1bf61
JJ
49912016-04-15 Jakub Jelinek <jakub@redhat.com>
4992
4993 PR c/70436
4994 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4995 where needed.
4996 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4997 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4998 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4999 Adjust c_parser_pragma callers.
5000 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5001 caller.
5002 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5003 c_parser_statement.
5004 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5005 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5006 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5007 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5008 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5009 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5010 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5011 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5012 down where needed.
5013 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5014 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5015 calls.
5016
99cd9857
MP
50172016-04-13 Marek Polacek <polacek@redhat.com>
5018
5019 PR c/70436
5020 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5021 adjust callers.
5022 (c_parser_statement): Likewise.
5023 (c_parser_c99_block_statement): Likewise.
5024 (c_parser_while_statement): Likewise.
5025 (c_parser_for_statement): Likewise.
5026 (c_parser_if_body): Don't set IF_P here.
5027 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5028 about dangling else here.
5029 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5030 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5031 warn about dangling else here.
5032
f13355da
MP
50332016-04-04 Marek Polacek <polacek@redhat.com>
5034
5035 PR c/70307
5036 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5037
5fde6a45
MP
50382016-03-31 Marek Polacek <polacek@redhat.com>
5039
5040 PR c/70297
5041 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5042
4bbf545b
DM
50432016-03-18 David Malcolm <dmalcolm@redhat.com>
5044
5045 PR c/70281
5046 * c-parser.c (c_parser_postfix_expression): Set the source range
5047 for uses of "__builtin_types_compatible_p".
5048
fcc2b74f
JJ
50492016-03-17 Jakub Jelinek <jakub@redhat.com>
5050
5051 PR c/70280
5052 * c-typeck.c (composite_type): Don't count void_list_node
5053 into len, if the list is terminated by void_list_node, start
5054 with void_list_node instead of NULL for newargs. Stop
5055 at void_list_node.
5056
ab4c578f
MP
50572016-03-16 Marek Polacek <polacek@redhat.com>
5058
5059 PR c/70093
5060 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5061 nested functions returning VM types.
5062
96b3c82d
CP
50632016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5064
5065 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5066 when calling c_finish_omp_clauses.
5067
29b9828f
BS
50682016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5069
5070 PR c/69824
5071 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5072 for later.
5073
7ff6ca38
MP
50742016-03-04 Marek Polacek <polacek@redhat.com>
5075
5076 PR c/69798
5077 * c-parser.c (c_parser_postfix_expression): Call
5078 c_parser_cast_expression rather than c_parser_postfix_expression.
5079
686e2237
JJ
50802016-03-01 Jakub Jelinek <jakub@redhat.com>
5081
5082 PR c/69796
5083 PR c/69974
5084 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5085 of incomplete decls to error_mark_node.
5086
0b05329b
MP
50872016-02-24 Marek Polacek <polacek@redhat.com>
5088
5089 PR c/69819
5090 * c-decl.c (finish_decl): Don't update the copy of the type of a
5091 different decl type.
5092
067fbd8b
JJ
50932016-02-23 Jakub Jelinek <jakub@redhat.com>
5094
5095 PR objc/69844
5096 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5097 in id_kind reclassification.
5098
bf14eba2
JJ
50992016-02-16 Jakub Jelinek <jakub@redhat.com>
5100
5101 PR c/69835
5102 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5103
ba539195
JN
51042016-02-16 James Norris <jnorris@codesourcery.com>
5105
5106 PR c/64748
5107 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5108
16595a1f
BS
51092016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5110
f48dfe98
BS
5111 * c-decl.c (build_null_declspecs): Zero the entire struct.
5112
16595a1f
BS
5113 PR c/69522
5114 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5115 callers changed. If nested_p is true, use it to call
5116 finish_implicit_inits.
5117 * c-tree.h (finish_implicit_inits): Declare.
5118 * c-typeck.c (finish_implicit_inits): New function. Move code
5119 from ...
5120 (push_init_level): ... here.
5121 (set_designator, process_init_element): Call finish_implicit_inits.
5122
66756373
JJ
51232016-02-11 Jakub Jelinek <jakub@redhat.com>
5124
5125 PR c/69768
5126 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5127 arguments for -Waddress warning.
5128
1066e9b5
JJ
51292016-02-04 Jakub Jelinek <jakub@redhat.com>
5130
5131 PR c/69669
5132 * c-decl.c (finish_enum): When honoring mode attribute,
5133 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5134
3a5d2ba4
JJ
51352016-01-29 Jakub Jelinek <jakub@redhat.com>
5136
5137 PR debug/69518
5138 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5139 all type variants, not just TYPE_MAIN_VARIANT.
5140
cbdd8ae0
JJ
51412016-01-27 Jakub Jelinek <jakub@redhat.com>
5142
5143 PR debug/66869
5144 * c-decl.c (c_write_global_declarations_1): Warn with
5145 warn_unused_function if static prototype without definition
5146 is not C_DECL_USED.
5147
fa74a4bc
MP
51482016-01-27 Marek Polacek <polacek@redhat.com>
5149
5150 PR c/68062
5151 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5152 to unsigned, if needed. Add -Wsign-compare warning.
5153
13f92e8d
JJ
51542016-01-26 Jakub Jelinek <jakub@redhat.com>
5155
5156 PR tree-optimization/69483
5157 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5158
cd8e73dc 51592016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
5160
5161 PR c/24293
5162 * c-tree.h (incomplete_record_decls): Declare.
5163 * c-parser.c (incomplete_record_decls): Define.
5164 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5165 report error if any decl has zero size.
5166 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5167 or enum type to incomplete_record_decls.
5168
e6d6ec9e
TV
51692016-01-14 Tom de Vries <tom@codesourcery.com>
5170
5171 PR tree-optimization/68773
5172 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5173 set force_output.
5174
00083992
MP
51752016-01-14 Marek Polacek <polacek@redhat.com>
5176
5177 PR c/69262
5178 * c-decl.c (grokdeclarator): Provide more information for invalid
5179 array declarations.
5180
7443cf13
DM
51812016-01-06 David Malcolm <dmalcolm@redhat.com>
5182
5183 * c-parser.c (c_parser_unary_expression): For dereferences, build
5184 a combined location before calling build_indirect_ref, so that
5185 error reports cover the full range, manually updating the c_expr
5186 src_range.
5187
6b131d5b
MP
51882016-01-06 Marek Polacek <polacek@redhat.com>
5189
5190 PR sanitizer/69099
5191 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5192 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5193 NULL.
5194
818ab71a
JJ
51952016-01-04 Jakub Jelinek <jakub@redhat.com>
5196
5197 Update copyright years.
5198
2fe0a208
MP
51992016-01-04 Marek Polacek <polacek@redhat.com>
5200
5201 PR c/68908
5202 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5203 optimization to use __atomic_fetch_* built-in if possible.
5204
c7b48c8a
TS
52052015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5206
5207 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5208 into...
5209 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5210 all users.
5211
fda5652f
MP
52122015-12-22 Marek Polacek <polacek@redhat.com>
5213
5214 PR c/69002
5215 * c-typeck.c (build_component_ref): Warn when acessing elements of
5216 atomic structures or unions.
5217
745e411d
DM
52182015-12-21 David Malcolm <dmalcolm@redhat.com>
5219
5220 * c-typeck.c: Include "gcc-rich-location.h".
5221 (build_binary_op): In the two places that call binary_op_error,
5222 create a gcc_rich_location and populate it with the location of
5223 the binary op and its two operands.
5224
94c40e19
DM
52252015-12-16 David Malcolm <dmalcolm@redhat.com>
5226
5227 * c-parser.c (c_parser_statement_after_labels): When calling
5228 c_finish_return, Use the return expression's location if it has
5229 one, falling back to the location of the first token within it.
5230 * c-typeck.c (c_finish_return): When issuing warnings about
5231 the incorrect presence/absence of a return value, issue a note
5232 showing the declaration of the function.
5233
de67c4c3
DM
52342015-12-16 David Malcolm <dmalcolm@redhat.com>
5235
5236 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5237 to 4.
5238 (c_parser_peek_nth_token): New function.
5239 (c_parser_peek_conflict_marker): New function.
5240 (c_parser_error): Detect conflict markers and report them as such.
5241
a10704e1
DM
52422015-12-16 David Malcolm <dmalcolm@redhat.com>
5243
5244 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5245 to preserve range information for the primary expression
5246 in the call to c_parser_postfix_expression_after_primary.
5247
8062bca6
DM
52482015-12-16 David Malcolm <dmalcolm@redhat.com>
5249
5250 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5251 expression location, falling back on the first token location,
5252 rather than always using the latter.
5253
d06f8b75
MP
52542015-12-16 Marek Polacek <polacek@redhat.com>
5255
5256 PR c/64637
5257 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5258 available.
5259
2994fb91
MP
52602015-12-15 Marek Polacek <polacek@redhat.com>
5261
5262 PR c/68907
5263 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5264 artificial decl.
5265
a1b93f8d
DM
52662015-12-08 David Malcolm <dmalcolm@redhat.com>
5267
5268 * c-parser.c (c_parser_alignof_expression): Capture location of
5269 closing parenthesis (if any), or of end of unary expression, and
5270 use it to build a src_range for the expression.
5271
46c6e1e2
DM
52722015-12-08 David Malcolm <dmalcolm@redhat.com>
5273
5274 PR c/68757
5275 * c-parser.c (c_parser_get_builtin_args): Add
5276 "out_close_paren_loc" param, and write back to it.
5277 (c_parser_postfix_expression): Capture the closing
5278 parenthesis location for RID_CHOOSE_EXPR,
5279 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5280 RID_BUILTIN_SHUFFLE and use it to set the source range
5281 for such expressions; within RID_BUILTIN_COMPLEX set
5282 the underlying location.
5283
66189108
MP
52842015-12-07 Marek Polacek <polacek@redhat.com>
5285
5286 PR c/68668
5287 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5288 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5289
f187980b
EB
52902015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5291
5292 * c-tree.h (c_build_va_arg): Adjust prototype.
5293 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5294 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5295 parameter, adjust throughout and issue an error if EXPR is a component
5296 with reverse storage order.
5297
4250754e
JM
52982015-12-02 Jason Merrill <jason@redhat.com>
5299
5300 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5301 (c_fully_fold_internal, decl_constant_value_for_optimization):
5302 Move from c-common.c.
5303 * c-tree.h: Declare decl_constant_value_for_optimization.
5304 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5305
e9e32ee6
JM
53062015-12-02 Joseph Myers <joseph@codesourcery.com>
5307
5308 PR c/68162
5309 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5310 following link from declarator to next declarator. Track original
5311 qualified type and pass it to c_build_qualified_type.
5312 * c-typeck.c (c_build_qualified_type): Add arguments
5313 orig_qual_type and orig_qual_indirect.
5314
ff7a55bf
TS
53152015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5316
5317 * c-parser.c (c_parser_omp_clause_name)
5318 (c_parser_oacc_all_clauses): Alphabetical sorting.
5319
657e4e47
JJ
53202015-12-02 Jakub Jelinek <jakub@redhat.com>
5321
5322 PR c/68533
5323 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5324 for diagnostics.
5325
37d5ad46
JB
53262015-12-01 Julian Brown <julian@codesourcery.com>
5327 Cesar Philippidis <cesar@codesourcery.com>
5328 James Norris <James_Norris@mentor.com>
5329
5330 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5331 (c_parser_oacc_clause_use_device): New function.
5332 (c_parser_oacc_all_clauses): Add use_device support.
5333 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5334 (c_parser_oacc_host_data): New function.
5335 (c_parser_omp_construct): Add host_data support.
5336 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5337 * c-typeck.c (c_finish_oacc_host_data): New function.
5338 (c_finish_omp_clauses): Add use_device support.
5339
a4850ce9
JH
53402015-11-29 Jan Hubicka <hubicka@ucw.cz>
5341
5342 PR c/67106
5343 * c-decl.c: Set TYPE_PACKED in variants.
5344
b58d3df2
ML
53452015-11-27 Martin Liska <mliska@suse.cz>
5346
5347 PR c++/68312
5348 * c-array-notation.c (fix_builtin_array_notation_fn):
5349 Use release_vec_vec instead of vec::release.
5350 (build_array_notation_expr): Likewise.
5351 (fix_conditional_array_notations_1): Likewise.
5352 (fix_array_notation_expr): Likewise.
5353 (fix_array_notation_call_expr): Likewise.
5354
aec17bfe
JJ
53552015-11-27 Jakub Jelinek <jakub@redhat.com>
5356
5357 PR c/63326
5358 * c-parser.c (c_parser_compound_statement_nostart): If
5359 last_label is true, use pragma_stmt instead of pragma_compound
5360 as second c_parser_pragma argument.
5361 (c_parser_omp_ordered, c_parser_omp_target_update,
5362 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5363 false as second argument to c_parser_skip_to_pragma_eol after
5364 diagnosing standalone directives used in pragma_stmt context.
5365
688c4de0
IV
53662015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5367
5368 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5369 with "if (ENABLE_OFFLOADING)".
5370
cbd03aee
DM
53712015-11-23 David Malcolm <dmalcolm@redhat.com>
5372
5373 PR objc/68438
5374 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5375 for various Objective-C constructs: Class.name syntax,
5376 @selector(), @protocol(), @encode(), and [] message syntax.
5377
a87a86e1
DM
53782015-11-20 David Malcolm <dmalcolm@redhat.com>
5379
5380 PR 62314
5381 * c-typeck.c (should_suggest_deref_p): New function.
5382 (build_component_ref): Special-case POINTER_TYPE when
5383 generating a "not a structure of union" error message, and
5384 suggest a "->" rather than a ".", providing a fix-it hint.
5385
8ece8dfb
DM
53862015-11-19 David Malcolm <dmalcolm@redhat.com>
5387
5388 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5389 candidate into a new function, find_closest_identifier.
5390
433068cc
MP
53912015-11-19 Marek Polacek <polacek@redhat.com>
5392
5393 PR c/68412
5394 * c-typeck.c (parser_build_binary_op): Properly handle
5395 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5396
bef08b71
DM
53972015-11-17 David Malcolm <dmalcolm@redhat.com>
5398
5399 * c-parser.c (set_c_expr_source_range): Bulletproof both
5400 overloaded implementations against NULL expr->value.
5401 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5402 values.
5403 (c_parser_unary_expression): Likewise when handling addresses of
5404 labels.
5405 (c_parser_postfix_expression): Likewise for statement expressions,
5406 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5407 __builtin_va_arg, and for __builtin_offset_of.
5408 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5409 src_range using the range of the braced initializer.
5410 (c_parser_transaction_expression): Set src_range for "ret" to a
5411 sane pair of values.
5412
fff77217
KY
54132015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5414
5415 * c-parser.c (c_finish_omp_declare_simd): Look for
5416 "simd" attribute as well. Update error message.
5417
1d899da2
TS
54182015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5419
5420 * c-parser.c (c_parser_omp_declare_target): Adjust.
5421
e4606348
JJ
54222015-11-14 Jakub Jelinek <jakub@redhat.com>
5423
5424 * c-typeck.c (c_finish_omp_clauses): Don't mark
5425 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5426
3e636daf
MP
54272015-11-14 Marek Polacek <polacek@redhat.com>
5428
5429 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5430 * c-typeck.c: Likewise.
5431
ebedc9a3
DM
54322015-11-13 David Malcolm <dmalcolm@redhat.com>
5433
5434 * c-decl.c (warn_defaults_to): Pass line_table to
5435 rich_location ctor.
5436 * c-errors.c (pedwarn_c99): Likewise.
5437 (pedwarn_c90): Likewise.
5438 * c-parser.c (set_c_expr_source_range): New functions.
5439 (c_token::get_range): New method.
5440 (c_token::get_finish): New method.
5441 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5442 based on the range from the start of the LHS to the end of the
5443 RHS.
5444 (c_parser_conditional_expression): Likewise, based on the range
5445 from the start of the cond.value to the end of exp2.value.
5446 (c_parser_binary_expression): Call set_c_expr_source_range on
5447 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5448 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5449 based on the cast_loc through to the end of the expr.
5450 (c_parser_unary_expression): Likewise, based on the
5451 op_loc through to the end of op.
5452 (c_parser_sizeof_expression) Likewise, based on the start of the
5453 sizeof token through to either the closing paren or the end of
5454 expr.
5455 (c_parser_postfix_expression): Likewise, using the token range,
5456 or from the open paren through to the close paren for
5457 parenthesized expressions.
5458 (c_parser_postfix_expression_after_primary): Likewise, for
5459 various kinds of expression.
5460 * c-tree.h (struct c_expr): Add field "src_range".
5461 (c_expr::get_start): New method.
5462 (c_expr::get_finish): New method.
5463 (set_c_expr_source_range): New decls.
5464 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5465 on ret for prefix unary ops.
5466 (parser_build_binary_op): Likewise, running from the start of
5467 arg1.value through to the end of arg2.value.
5468
ec8b536f
MP
54692015-11-13 Marek Polacek <polacek@redhat.com>
5470
5471 PR c/68320
5472 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5473
277fe616
DM
54742015-11-13 David Malcolm <dmalcolm@redhat.com>
5475
5476 * c-typeck.c: Include spellcheck.h.
5477 (lookup_field_fuzzy_find_candidates): New function.
5478 (lookup_field_fuzzy): New function.
5479 (build_component_ref): If the field was not found, try using
5480 lookup_field_fuzzy and potentially offer a suggestion.
5481
6e232ba4
JN
54822015-11-12 James Norris <jnorris@codesourcery.com>
5483 Joseph Myers <joseph@codesourcery.com>
5484
5485 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5486 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5487 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5488 and PRAGMA_OMP_CLAUSE_LINK.
5489 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5490 and PRAGMA_OACC_CLAUSE_LINK.
5491 (OACC_DECLARE_CLAUSE_MASK): New definition.
5492 (c_parser_oacc_declare): New function.
5493
9be4f715
MP
54942015-11-12 Marek Polacek <polacek@redhat.com>
5495
5496 PR c/67784
5497 * c-parser.c (c_parser_for_statement): Reclassify the token in
5498 a correct scope.
5499
e78bede6
MP
55002015-11-11 Marek Polacek <polacek@redhat.com>
5501
5502 PR c/68107
5503 PR c++/68266
5504 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5505 checking the size of an array.
5506
69f293c9
AM
55072015-11-11 Andrew MacLeod <amacleod@redhat.com>
5508
5509 * c-array-notation.c: Remove unused header files.
5510 * c-aux-info.c: Likewise.
5511 * c-convert.c: Likewise.
5512 * c-decl.c: Likewise.
5513 * c-errors.c: Likewise.
5514 * c-lang.c: Likewise.
5515 * c-objc-common.c: Likewise.
5516 * c-parser.c: Likewise.
5517 * c-typeck.c: Likewise.
5518 * gccspec.c: Likewise.
5519
3a40d81d
NS
55202015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5521 Cesar Philippidis <cesar@codesourcery.com>
5522 James Norris <jnorris@codesourcery.com>
5523 Julian Brown <julian@codesourcery.com>
5524 Nathan Sidwell <nathan@codesourcery.com>
5525
3a40d81d
NS
5526 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5527 routine arg.
5528 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5529 (c_parser_pragma): Parse 'acc routine'.
5530 (OACC_ROUTINE_CLAUSE_MARK): Define.
5531 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5532
fc402eec
AA
55332015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5534
5535 PR debug/67192
5536 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5537 location of the backward-goto to the start of the loop body.
5538
f6b0b3db
AA
55392015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5540
5541 PR debug/67192
5542 * c-parser.c (c_parser_while_statement): Finish the loop before
5543 parsing ahead for misleading indentation.
5544 (c_parser_for_statement): Likewise.
5545
ee45a32d
EB
55462015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5547
5548 * c-decl.c (finish_struct): If the structure has reverse storage
5549 order, rewrite the type of array fields with scalar component. Call
5550 maybe_apply_pragma_scalar_storage_order on entry.
5551 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5552 errors on bit-fields and reverse SSO here and not...
5553 (c_mark_addressable): ...here.
5554 (output_init_element): Adjust call to initializer_constant_valid_p.
5555 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5556
8a645150
DM
55572015-11-06 David Malcolm <dmalcolm@redhat.com>
5558
5559 * c-decl.c (warn_defaults_to): Update for change in signature
5560 of diagnostic_set_info.
5561 * c-errors.c (pedwarn_c99): Likewise.
5562 (pedwarn_c90): Likewise.
5563 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5564 for textinfo::set_location.
5565
7a5e4956
CP
55662015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5567 Thomas Schwinge <thomas@codesourcery.com>
5568 James Norris <jnorris@codesourcery.com>
5569
5570 * c-parser.c (c_parser_omp_clause_name): Add support for
5571 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5572 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5573 default(none) in OpenACC.
5574 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5575 arguments.
5576 (c_parser_oacc_clause_tile): New function.
5577 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5578 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5579 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5580 TILE}.
5581 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5582 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5583 FIRSTPRIVATE}.
5584 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5585 (c_parser_oacc_update): Update the error message for missing clauses.
5586 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5587 and OMP_CLAUSE_INDEPENDENT.
5588
bfcfbfa0
MP
55892015-11-05 Marek Polacek <polacek@redhat.com>
5590
5591 PR c/68090
5592 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5593 deal with pre-evaluation on invalid types.
5594
e01d41e5
JJ
55952015-11-05 Jakub Jelinek <jakub@redhat.com>
5596 Ilya Verbin <ilya.verbin@intel.com>
5597
5598 * c-parser.c: Include context.h and gimple-expr.h.
5599 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5600 monotonic together with nonmonotonic.
5601 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5602 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5603 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5604 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5605 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5606 expressions on combined target teams before the target.
5607 (c_parser_omp_declare_target): If decl has "omp declare target" or
5608 "omp declare target link" attribute, and cgraph or varpool node already
5609 exists, then set corresponding flags. Call c_finish_omp_clauses
5610 in the parenthesized extended-list syntax case.
5611 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5612 declare target.
5613 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5614 on OMP_CLAUSE_REDUCTION array sections.
5615 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5616 into the constant offset, or for variable low-bound using
5617 POINTER_PLUS_EXPR. For structure element based array sections use
5618 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5619 (c_finish_omp_clauses): Drop generic_field_head, structure
5620 elements are now always mapped even as array section bases,
5621 diagnose same var in data sharing and mapping clauses. Diagnose if
5622 linear step on declare simd is neither a constant nor a uniform
5623 parameter. Look through POINTER_PLUS_EXPR for array section
5624 reductions. Diagnose the same var or function appearing multiple
5625 times on the same directive. Fix up wording for the to clause if t
5626 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5627 modifier on kinds other than dynamic or guided or nonmonotonic
5628 modifier together with ordered clause.
5629
4bf9e5a8
TS
56302015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5631 Chung-Lin Tang <cltang@codesourcery.com>
5632
5633 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5634
2adfab87
AM
56352015-10-29 Andrew MacLeod <amacleod@redhat.com>
5636
5637 * c-array-notation.c: Reorder #include's and remove duplicates.
5638 * c-aux-info.c: Likewise.
5639 * c-convert.c: Likewise.
5640 * c-decl.c: Likewise.
5641 * c-errors.c: Likewise.
5642 * c-lang.c: Likewise.
5643 * c-objc-common.c: Likewise.
5644 * c-parser.c: Likewise.
5645 * c-typeck.c: Likewise.
5646
e922069e
JW
56472015-10-26 Jim Wilson <jim.wilson@linaro.org>
5648
5649 PR debug/66068
5650 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5651 after calling build_qualified_type.
5652
765dd391
CP
56532015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5654 Thomas Schwinge <thomas@codesourcery.com>
5655 James Norris <jnorris@codesourcery.com>
5656 Joseph Myers <joseph@codesourcery.com>
5657 Julian Brown <julian@codesourcery.com>
5658 Bernd Schmidt <bschmidt@redhat.com>
5659
5660 * c-parser.c (c_parser_oacc_shape_clause): New.
5661 (c_parser_oacc_simple_clause): New.
5662 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5663 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5664
88bae6f4
TS
56652015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5666 James Norris <jnorris@codesourcery.com>
5667 Cesar Philippidis <cesar@codesourcery.com>
5668
5669 PR c/64765
5670 PR c/64880
5671 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5672 parameters, and handle these. Adjust all users.
5673 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5674 into...
5675 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5676 all users.
5677 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5678 declare functions.
5679 (c_finish_omp_construct): Declare function.
5680 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5681 Merge functions into...
5682 (c_finish_omp_construct): ... this new function.
5683
a8fc2579
RB
56842015-10-22 Richard Biener <rguenther@suse.de>
5685
5686 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5687 before folding a MINUS_EXPR.
5688
e9122ef6
MP
56892015-10-21 Marek Polacek <polacek@redhat.com>
5690
5691 PR c/68024
5692 * c-decl.c (start_function): Warn about vararg functions without
5693 a prototype.
5694
9f47c7e5
IE
56952015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5696
5697 * c-typeck.c (build_conditional_expr): Use boolean vector
5698 type for vector comparison.
5699 (build_vec_cmp): New.
5700 (build_binary_op): Use build_vec_cmp for comparison.
5701
fa60eeb9
MP
57022015-10-20 Marek Polacek <polacek@redhat.com>
5703
5704 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5705
2c7020eb
MP
57062015-10-20 Marek Polacek <polacek@redhat.com>
5707
5708 PR c/67964
5709 * c-parser.c (c_parser_attributes): Break out of the loop if the
5710 token after an attribute isn't a comma.
5711
d9a6bd32
JJ
57122015-10-13 Jakub Jelinek <jakub@redhat.com>
5713 Aldy Hernandez <aldyh@redhat.com>
5714
5715 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5716 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5717 (c_parser_omp_variable_list): Handle structure elements for
5718 map, to and from clauses. Handle array sections in reduction
5719 clause. Formatting fixes.
5720 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5721 if clause modifiers.
5722 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5723 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5724 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5725 c_parser_omp_clause_is_device_ptr): New functions.
5726 (c_parser_omp_clause_ordered): Parse optional parameter.
5727 (c_parser_omp_clause_reduction): Handle array reductions.
5728 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5729 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5730 functions.
5731 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5732 (c_parser_omp_clause_depend_sink): New function.
5733 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5734 (c_parser_omp_clause_map): Parse release/delete map kinds and
5735 optional always modifier.
5736 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5737 and c_finish_omp_clauses callers.
5738 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5739 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5740 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5741 (OMP_CRITICAL_CLAUSE_MASK): Define.
5742 (c_parser_omp_critical): Parse critical clauses.
5743 (c_parser_omp_for_loop): Handle doacross loops, adjust
5744 c_finish_omp_for and c_finish_omp_clauses callers.
5745 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5746 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5747 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5748 (c_parser_omp_for): Disallow ordered clause when combined with
5749 distribute. Disallow linear clause when combined with distribute
5750 and not combined with simd.
5751 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5752 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5753 parse clauses and if depend clause is found, don't parse a body.
5754 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5755 Allow target parallel without for after it.
5756 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5757 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5758 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5759 invalid kinds.
5760 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5761 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5762 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5763 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5764 functions.
5765 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5766 defaultmap and is_device_ptr clauses.
5767 (c_parser_omp_target): Parse target parallel and target simd. Set
5768 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5769 and target exit data. Diagnose invalid map kinds.
5770 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5771 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5772 construct.
5773 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5774 &omp_priv.
5775 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5776 (c_parser_omp_taskloop): New function.
5777 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5778 handle PRAGMA_OMP_TASKLOOP.
5779 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5780 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5781 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5782 Add IS_OMP argument, handle structure element bases, diagnose
5783 bitfields, pass IS_OMP recursively, diagnose known zero length
5784 array sections in depend clauses, handle array sections in reduction
5785 clause, diagnose negative length even for pointers.
5786 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5787 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5788 array sections in reduction clause, set
5789 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5790 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5791 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5792 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5793
21ba0cea
MP
57942015-10-06 Marek Polacek <polacek@redhat.com>
5795
5796 * c-parser.c (c_parser_statement_after_labels): Use
5797 protected_set_expr_location.
5798 (c_parser_omp_clause_num_gangs): Likewise.
5799 (c_parser_omp_clause_num_threads): Likewise.
5800 (c_parser_omp_clause_num_workers): Likewise.
5801 (c_parser_omp_clause_vector_length): Likewise.
5802 (c_parser_omp_clause_num_teams): Likewise.
5803 (c_parser_omp_clause_thread_limit): Likewise.
5804 * c-typeck.c (build_c_cast): Likewise.
5805 (c_cast_expr): Likewise.
5806
624d31fe
RS
58072015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5808
5809 * c-typeck.c (c_tree_equal): Use real_equal instead of
5810 REAL_VALUES_EQUAL.
5811
b8fd7909
JM
58122015-10-04 Jason Merrill <jason@redhat.com>
5813
5814 * c-parser.c (c_lex_one_token): Handle @synchronized.
5815 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5816 can change whether the function is transaction_safe.
5817
1c7485af
MP
58182015-10-02 Marek Polacek <polacek@redhat.com>
5819
5820 PR c/67730
5821 * c-typeck.c (convert_for_assignment): Use the expansion point
5822 location throughout.
5823
3e3b8d63
MP
58242015-10-02 Marek Polacek <polacek@redhat.com>
5825
5826 PR c/64249
5827 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5828 and pass it down to c_parser_if_statement.
5829 (c_parser_else_body): Add CHAIN parameter and pass it down to
5830 c_parser_statement_after_labels.
5831 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5832 duplicated if-else-if conditions.
5833
aabef2de
MP
58342015-10-01 Marek Polacek <polacek@redhat.com>
5835
5836 * c-typeck.c (convert_for_assignment): Improve commentary.
5837
de8ddd5f
MP
58382015-09-30 Marek Polacek <polacek@redhat.com>
5839
5840 PR c/67730
5841 * c-typeck.c (c_finish_return): Use the expansion point location for
5842 certain "return with value" warnings.
5843
c4914de6
MLI
58442015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5845
5846 * c-parser.c (pragma_lex): Add loc argument.
5847
0e36f5c7
MP
58482015-09-15 Marek Polacek <polacek@redhat.com>
5849
5850 PR c/67580
5851 * c-decl.c (tag_exists_p): New function.
5852 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5853 struct/union/enum keywords are missing.
5854 * c-tree.h (tag_exists_p): Declare.
5855
2f3bb934
MP
58562015-09-15 Marek Polacek <polacek@redhat.com>
5857
5858 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5859 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5860 Return NULL_TREE instead of 0.
5861 (lookup_name): Return NULL_TREE instead of 0.
5862 (lookup_name_in_scope): Likewise.
5863 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5864 (parser_xref_tag): Use false instead of 0.
5865 (start_struct): Use true instead of 1.
5866 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5867
aa256c4a
MP
58682015-09-14 Marek Polacek <polacek@redhat.com>
5869
5870 * c-typeck.c (set_nonincremental_init_from_string): Use
5871 HOST_WIDE_INT_M1U when shifting a negative value.
5872
dbb68221
MW
58732015-09-09 Mark Wielaard <mjw@redhat.com>
5874
5875 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5876 parm against NULL.
5877
a8a098ac
JJ
58782015-09-10 Jakub Jelinek <jakub@redhat.com>
5879
5880 PR c/67502
5881 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5882 into OMP_FOR_PRE_BODY rather than before the loop.
5883
f4b189d5
JJ
58842015-09-09 Jakub Jelinek <jakub@redhat.com>
5885
0bb99c11
JJ
5886 PR c/67501
5887 * c-parser.c (c_parser_oacc_all_clauses,
5888 c_parser_omp_all_clauses): Remove invalid clause from
5889 list of clauses even if parser->error is set.
5890
fce5e5e3
JJ
5891 PR c/67500
5892 * c-parser.c (c_parser_omp_clause_aligned,
5893 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5894 test for errors.
5895 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5896 error_mark_node.
5897
f4b189d5
JJ
5898 PR c/67495
5899 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5900 instead of c_parser_unary_expression. If the result is !lvalue_p,
5901 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5902
b2aaf235
MP
59032015-09-04 Marek Polacek <polacek@redhat.com>
5904
5905 PR sanitizer/67279
5906 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5907
1807ffc1
MS
59082015-09-03 Martin Sebor <msebor@redhat.com>
5909
5910 PR c/66516
8b652e65
JJ
5911 * c-typeck.c (convert_arguments, parser_build_unary_op,
5912 build_conditional_expr, c_cast_expr, convert_for_assignment,
5913 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5914 reject_gcc_builtin.
5915 (c_decl_implicit): Define.
5916
d04ff417
MP
59172015-09-02 Marek Polacek <polacek@redhat.com>
5918
5919 PR c/67432
5920 * c-parser.c (c_parser_enum_specifier): Give a better error for
5921 an empty enum.
5922
a79683d5
TS
59232015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5924
5925 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5926
191a6b94
MP
59272015-08-12 Marek Polacek <polacek@redhat.com>
5928
5929 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5930 LOC to it.
5931
420a9d9b
MP
59322015-08-03 Marek Polacek <polacek@redhat.com>
5933
5934 PR c/67088
5935 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5936 Use it.
5937 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5938
992118a1
PP
59392015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5940
5941 * c-parser.c (c_parser_if_body): Take token_indent_info
5942 argument. Call warn_for_misleading_indentation even when the
5943 body is a semicolon. Extract token_indent_infos corresponding
5944 to the guard, body and next tokens. Adjust call to
5945 warn_for_misleading_indentation accordingly.
5946 (c_parser_else_body): Likewise.
5947 (c_parser_if_statement): Likewise.
5948 (c_parser_while_statement): Likewise.
5949 (c_parser_for_statement): Likewise.
5950
46308474
LFSM
59512015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5952 Manuel López-Ibáñez <manu@gcc.gnu.org>
5953
5954 * c-decl.c (get_parm_info): Remove static var. Update warning
5955 message.
5956
05b28fd6
MP
59572015-07-27 Marek Polacek <polacek@redhat.com>
5958
5959 PR c++/66555
5960 PR c/54979
5961 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5962
451b5e48
MP
59632015-07-20 Marek Polacek <polacek@redhat.com>
5964
5965 PR c++/55095
5966 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5967 (build_binary_op): Warn about left shift overflows.
5968
1916bcb5
AM
59692015-07-09 Andrew MacLeod <amacleod@redhat.com>
5970
5971 * c-array-notation.c: Adjust includes for flags.h changes.
5972 * c-objc-common.c: Likewise.
5973
c7131fb2
AM
59742015-07-07 Andrew MacLeod <amacleod@redhat.com>
5975
5976 * c-array-notation.c: Adjust includes.
5977 * c-aux-info.c: Likewise.
5978 * c-convert.c: Likewise.
5979 * c-decl.c: Likewise.
5980 * c-errors.c: Likewise.
5981 * c-lang.c: Likewise.
5982 * c-objc-common.c: Likewise.
5983 * c-parser.c: Likewise.
5984 * c-typeck.c: Likewise.
5985
da2e71c9
MLI
59862015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5987
5988 PR fortran/66605
5989 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5990
b155cfd9
MP
59912015-06-29 Marek Polacek <polacek@redhat.com>
5992
5993 PR c/66322
5994 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5995 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5996 about -Wswitch-bool here.
5997 (do_case): Update c_add_case_label call.
5998 (c_finish_case): Update c_do_switch_warnings call.
5999
31521951
MP
60002015-06-27 Marek Polacek <polacek@redhat.com>
6001
6002 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6003
22d03525
MP
60042015-06-26 Marek Polacek <polacek@redhat.com>
6005
6006 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6007 INDIRECT_REF_P.
6008 * c-typeck.c (array_to_pointer_conversion): Likewise.
6009 (build_unary_op): Likewise.
6010 (c_finish_return): Likewise.
6011
f0889939
AM
60122015-06-25 Andrew MacLeod <amacleod@redhat.com>
6013
6014 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6015 * c-parser.c: Likewise.
6016
8d67ee55
RS
60172015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6018
6019 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6020 instead of pointer_hash.
6021 (detect_field_duplicates): Likewise.
6022
0ae9bd27
MP
60232015-06-25 Marek Polacek <polacek@redhat.com>
6024
6025 * c-array-notation.c: Use VAR_P throughout.
6026 * c-decl.c: Likewise.
6027 * c-objc-common.c: Likewise.
6028 * c-parser.c: Likewise.
6029 * c-typeck.c: Likewise.
6030
62f9079a
MP
60312015-06-25 Marek Polacek <polacek@redhat.com>
6032
6033 * c-decl.c: Use is_global_var throughout.
6034 * c-parser.c: Likewise.
6035 * c-typeck.c: Likewise.
6036
abb226c9
AM
60372015-06-17 Andrew MacLeod <amacleod@redhat.com>
6038
6039 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6040 * c-aux-info.c: Likewise.
6041 * c-convert.c: Likewise.
6042 * c-decl.c: Likewise.
6043 * c-errors.c: Likewise.
6044 * c-lang.c: Likewise.
6045 * c-objc-common.c: Likewise.
6046 * c-parser.c: Likewise.
6047 * c-typeck.c: Likewise.
6048
8cbababc
JH
60492015-06-11 Jan Hubicka <hubicka@ucw.cz>
6050
6051 PR middle-end/66325
6052 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6053 variants.
6054
a0349665
PMR
60552015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6056
6057 * c-decl.c (pop_scope): Register the main translation unit
6058 through the new debug hook.
6059
13fdf2e2
AM
60602015-06-08 Andrew MacLeod <amacleod@redhat.com>
6061
6062 * c-array-notation.c : Adjust include files.
6063 * c-aux-info.c : Likewise.
6064 * c-convert.c : Likewise.
6065 * c-decl.c : Likewise.
6066 * c-errors.c : Likewise.
6067 * c-lang.c : Likewise.
6068 * c-lang.h : Likewise.
6069 * c-objc-common.c : Likewise.
6070 * c-parser.c : Likewise.
6071 * c-typeck.c : Likewise.
6072
d7438551
AH
60732015-06-05 Aldy Hernandez <aldyh@redhat.com>
6074
6075 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6076 immediately clobber it.
6077 (c_write_global_declarations_1): Remove call to
6078 check_global_declaration_1.
6079 (c_write_global_declarations_2): Remove.
6080 (c_write_final_cleanups): Rename from c_write_global_declarations.
6081 Remove call to finalize_compilation_unit.
6082 Remove calls to debugging hooks.
6083 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6084 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6085 * c-tree.h: Remove c_write_global_declarations.
6086
ecb9f223
AM
60872015-06-04 Andrew MacLeod <amacleod@redhat.com>
6088
6089 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6090 * c-aux-info.c: Likewise.
6091 * c-convert.c: Likewise.
6092 * c-decl.c: Likewise.
6093 * c-errors.c: Likewise.
6094 * c-lang.c: Likewise.
6095 * c-objc-common.c: Likewise.
6096 * c-parser.c: Likewise.
6097 * c-typeck.c: Likewise.
6098
9482b620
MP
60992015-06-04 Marek Polacek <polacek@redhat.com>
6100
6101 PR c/66341
6102 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6103 it is a lvalue.
6104
bc51ace3
PK
61052015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6106
6107 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6108 Warn for empty struct.
6109 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6110
ea5b45b6
AT
61112015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6112
6113 * c-decl.c (start_function): Call plugin before parsing.
6114 (finish_function): Call plugin after parsing.
6115
c2d47482
PK
61162015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6117
6118 PR c/49551
6119 * c-decl.c (merge_decls): Merge DECL_COMMON.
6120
a95492ab
JW
61212015-05-22 Jim Wilson <jim.wilson@linaro.org>
6122
6123 * Make-lang.in (check_gcc_pallelize): Define.
6124
fd5c817a
MP
61252015-05-22 Marek Polacek <polacek@redhat.com>
6126
6127 PR c/47043
6128 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6129 attributes.
6130
c7b70a3c
MP
61312015-05-21 Marek Polacek <polacek@redhat.com>
6132
6133 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6134 DECL_BUILT_IN.
6135
21b634ae
MP
61362015-05-20 Marek Polacek <polacek@redhat.com>
6137
6138 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6139 * c-typeck.c: Likewise.
6140
296a8c2f
MP
61412015-05-19 Marek Polacek <polacek@redhat.com>
6142
6143 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6144
41b37d5e
JJ
61452015-05-19 Jakub Jelinek <jakub@redhat.com>
6146
6147 PR middle-end/66199
6148 * c-parser.c (c_parser_omp_for_loop): Don't add
6149 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6150 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6151 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6152 constructs.
6153
fab27f52
MM
61542015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6155
6156 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 6157 swaps.
fab27f52 6158
40de31cf
MLI
61592015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6160
6161 PR fortran/44054
6162 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6163 accessor function.
6164
3aa3c9fc
MP
61652015-05-14 Marek Polacek <polacek@redhat.com>
6166
6167 PR c/66066
6168 PR c/66127
6169 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6170 rather than with 0.
6171
c3388e62
DM
61722015-05-12 David Malcolm <dmalcolm@redhat.com>
6173
6174 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6175 to add a call to warn_for_misleading_indentation.
6176 (c_parser_else_body): Likewise, adding param "else_loc".
6177 (c_parser_if_statement): Check for misleading indentation.
6178 (c_parser_while_statement): Likewise.
6179 (c_parser_for_statement): Likewise.
6180
755e528f
MP
61812015-05-08 Marek Polacek <polacek@redhat.com>
6182
6183 PR c/64918
6184 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6185 (output_init_element): Likewise.
6186
0173bd2a
MP
61872015-05-07 Marek Polacek <polacek@redhat.com>
6188
6189 PR c/65179
6190 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6191 value.
6192
9babc352
MP
61932015-04-30 Marek Polacek <polacek@redhat.com>
6194
6195 * c-typeck.c (set_init_label): Call error_at instead of error and
6196 pass LOC to it.
6197
ac9f18db
MP
6198 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6199 the type of a decl.
6200
ec3fba51
MP
6201 * c-typeck.c (c_build_va_arg): Clarify the error message.
6202
b811915d
TS
62032015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6204
6205 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6206 OMP_STANDALONE_CLAUSES.
6207
f3075008
MP
62082015-04-28 Marek Polacek <polacek@redhat.com>
6209
6210 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6211
4e81b788
MP
62122015-04-28 Marek Polacek <polacek@redhat.com>
6213
6214 PR c/65901
6215 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6216
6c1db78e
MP
62172015-04-25 Marek Polacek <polacek@redhat.com>
6218
6219 PR c/52085
6220 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6221 attribute.
6222
5c4abbb8
MP
62232015-04-23 Marek Polacek <polacek@redhat.com>
6224
6225 PR c/65345
6226 * c-decl.c (set_labels_context_r): New function.
6227 (store_parm_decls): Call it via walk_tree_without_duplicates.
6228 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6229 instead of create_tmp_var. Build TARGET_EXPR instead of
6230 COMPOUND_EXPR.
6231 (build_atomic_assign): Use create_tmp_var_raw instead of
6232 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6233
06aca1d5
IV
62342015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6235
6236 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6237 (c_parser_omp_target_update): Add missed %> to error_at ().
6238
8fba1830
BRF
62392015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6240
6241 PR target/55143
6242 * c-decl.c (c_default_pointer_mode): Remove definition.
6243 * c-tree.h (c_default_pointer_mode): Remove declaration.
6244
62021f64
TB
62452015-03-27 Tobias Burnus <burnus@net-b.de>
6246
6247 PR c/65586
6248 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6249 error out.
6250 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6251 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6252 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6253
9b65e171
JJ
62542015-03-19 Jakub Jelinek <jakub@redhat.com>
6255
6256 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6257 attribute for DECL_EXTERNAL VAR_DECLs.
6258
17958621
JJ
62592015-03-11 Jakub Jelinek <jakub@redhat.com>
6260
6261 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6262 argument.
6263
7ccb1a11
JJ
62642015-03-10 Jakub Jelinek <jakub@redhat.com>
6265
6266 PR c/65120
6267 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6268 before preparing arguments to warn_logical_not_parentheses.
6269
01177669
JJ
62702015-03-09 Jakub Jelinek <jakub@redhat.com>
6271
6272 PR c/65120
6273 * c-typeck.c (parser_build_binary_op): Don't warn for
6274 !!x == y or !b == y where b is _Bool.
6275
802ac282
MP
62762015-03-09 Marek Polacek <polacek@redhat.com>
6277
6278 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6279 * c-decl.c (grokdeclarator): Likewise.
6280 * c-typeck.c (build_binary_op): Likewise.
6281
e5165b60
MP
62822015-02-27 Marek Polacek <polacek@redhat.com>
6283
6284 PR c/65228
6285 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6286
065d214c
MP
62872015-02-14 Marek Polacek <polacek@redhat.com>
6288
6289 PR c/64768
6290 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6291 declared through a typedef name.
6292
e5d9235b
MP
62932015-02-13 Marek Polacek <polacek@redhat.com>
6294
6295 PR c/65050
6296 * c-decl.c (grokdeclarator): Print also the type when giving
6297 the error message about array's incomplete element type.
6298
fa01ffcc
JJ
62992015-02-11 Jakub Jelinek <jakub@redhat.com>
6300
6301 PR c/64824
6302 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6303 check in the POP macro.
6304
c3e38a03
MP
63052015-02-09 Marek Polacek <polacek@redhat.com>
6306
6307 PR c/64856
6308 * c-typeck.c (process_init_element): Don't always wrap
6309 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6310 initializing a range of elements.
6311
4886ec8e
JJ
63122015-02-04 Jakub Jelinek <jakub@redhat.com>
6313
6314 PR c/64824
6315 PR c/64868
6316 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6317
c3e38a03 63182015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
6319
6320 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6321 processing enum declaration.
6322
7b33f0c8
MP
63232015-01-29 Marek Polacek <polacek@redhat.com>
6324
6325 PR c/64709
6326 * c-typeck.c (pop_init_level): If constructor_elements has
6327 exactly one element with integer_zerop value, set constructor_zeroinit
6328 to 1. Remove braces around warning_init call.
6329
dea63e49
JJ
63302015-01-27 Jakub Jelinek <jakub@redhat.com>
6331
6332 PR c/64766
6333 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6334 of FUNCTION_DECLs with error_mark_node.
6335
d38f7dce
JJ
63362015-01-26 Jakub Jelinek <jakub@redhat.com>
6337
6338 PR c/64778
6339 * c-typeck.c (convert_arguments): Return -1 if there are
6340 error_args, even if we've diagnosed too many arguments.
6341
cbf5d0e7
RB
63422015-01-21 Richard Biener <rguenther@suse.de>
6343
6344 PR middle-end/64313
6345 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6346 for builtins the user declared correctly.
6347
41dbbb37
TS
63482015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6349 Bernd Schmidt <bernds@codesourcery.com>
6350 Cesar Philippidis <cesar@codesourcery.com>
6351 James Norris <jnorris@codesourcery.com>
6352 Jakub Jelinek <jakub@redhat.com>
6353 Ilmir Usmanov <i.usmanov@samsung.com>
6354
6355 * c-parser.c: Include "gomp-constants.h".
6356 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6357 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6358 Use OMP_CLAUSE_SET_MAP_KIND.
6359 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6360 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6361 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6362 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6363 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6364 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6365 "copyout", "create", "delete", "deviceptr", "gang", "host",
6366 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6367 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6368 "present_or_create", "pcreate", "seq", "self", "vector",
6369 "vector_length", "wait", "worker".
6370 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6371 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6372 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6373 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6374 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6375 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6376 (c_parser_oacc_data_clause_deviceptr)
6377 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6378 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6379 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6380 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6381 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6382 (c_parser_oacc_parallel, c_parser_oacc_update)
6383 (c_parser_oacc_wait): New functions.
6384 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6385 (c_finish_oacc_data): New prototypes.
6386 * c-typeck.c: Include "gomp-constants.h".
6387 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6388 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6389 OMP_CLAUSE_SET_MAP_KIND.
6390 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6391 (c_finish_oacc_data): New functions.
6392 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6393 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6394 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6395 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6396 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6397 GOMP_MAP_FORCE_DEVICEPTR.
6398
adfac8df
JJ
63992015-01-09 Michael Collison <michael.collison@linaro.org>
6400
6401 * c-array-notation.c: Include hash-set.h, machmode.h,
6402 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6403 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6404 * c-aux-info.c: Ditto.
6405 * c-convert.c: Ditto.
6406 * c-decl.c: Ditto.
6407 * c-errors.c: Ditto.
6408 * c-lang.c: Dittoxs.
6409 * c-objc-common.c: Ditto.
6410 * c-parser.c: Ditto.
6411 * c-typeck.c: Include hash-set.h, machmode.h,
6412 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6413 fold-const.h, wide-int.h, inchash.h, real.h and
6414 fixed-value.h due to flattening of tree.h.
6415
2cc901dc
MP
64162015-01-07 Marek Polacek <polacek@redhat.com>
6417
6418 PR c/64417
6419 * c-typeck.c (process_init_element): Disallow initialization of
6420 a flexible array member with a string constant if the structure
6421 is in an array.
6422
5624e564
JJ
64232015-01-05 Jakub Jelinek <jakub@redhat.com>
6424
e5341100
JJ
6425 PR sanitizer/64344
6426 * c-typeck.c (convert_for_assignment, c_finish_return): For
6427 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6428 types also set in_late_binary_op around convert call.
6429 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6430 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6431 result on expr as last argument to ubsan_instrument_float_cast,
6432 if in_late_binary_op, don't use c_save_expr but save_expr.
6433
5624e564
JJ
6434 Update copyright years.
6435
5bd012f8
MP
64362015-01-05 Marek Polacek <polacek@redhat.com>
6437
6438 PR c/64423
6439 * c-typeck.c (build_array_ref): Pass loc down to
6440 warn_array_subscript_with_type_char.
6441
3f8257db 64422014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6443
6444 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6445 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6446 element type.
8e745a17 6447 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6448 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6449 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6450 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6451 to PEDWARN_FOR_QUALIFIERS.
768952be 6452
8f94a8c4
JJ
64532014-12-17 Jakub Jelinek <jakub@redhat.com>
6454
6455 PR sanitizer/64289
6456 * c-convert.c: Include ubsan.h.
6457 (convert): For real -> integral casts and
6458 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6459 instead instrument the float cast directly.
6460
b731b390
JJ
64612014-11-29 Jakub Jelinek <jakub@redhat.com>
6462
6463 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6464 c_finish_stmt_expr): Remove NULL last argument from
6465 create_tmp_var_raw and create_tmp_var calls.
6466 * c-array-notation.c (fix_builtin_array_notation_fn,
6467 build_array_notation_expr, fix_conditional_array_notations_1,
6468 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6469
541e35a6
MP
64702014-11-28 Marek Polacek <polacek@redhat.com>
6471
6472 PR c/63862
6473 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6474 convert the right operand to integer type.
6475
b286be94
MP
64762014-11-25 Marek Polacek <polacek@redhat.com>
6477
6478 PR c/63877
6479 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6480 for inline functions.
6481
aa7da51a
JJ
64822014-11-21 Jakub Jelinek <jakub@redhat.com>
6483
6484 PR target/63764
6485 * c-typeck.c (build_array_ref): Adjust
6486 convert_vector_to_pointer_for_subscript caller. If it returns true,
6487 call non_lvalue_loc on the result.
6488
d876207f
RB
64892014-11-11 Richard Biener <rguenther@suse.de>
6490
6491 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6492 to true.
6493
e5e44252
AK
64942014-11-10 Andi Kleen <ak@linux.intel.com>
6495
6496 PR c/60804
6497 * c-parser.c (c_parser_statement_after_labels): Call
6498 check_no_cilk.
6499 (c_parser_if_statement): Dito.
6500 (c_parser_switch_statement): Dito.
6501 (c_parser_while_statement): Dito.
6502 (c_parser_do_statement): Dito.
6503 (c_parser_for_statement): Dito.
6504 * c-typeck.c (c_finish_loop): Dito.
6505
13c21655
PC
65062014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6507
6508 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6509 OPT_Wshift_count_overflow in the warnings.
6510
2d51fcef
MP
65112014-10-30 Marek Polacek <polacek@redhat.com>
6512
6513 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6514 print the stripped version as well, if they're not the same.
6515
ef4bddc2
RS
65162014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6517
6518 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6519 machine_mode.
6520
c582198b
AM
65212014-10-28 Andrew MacLeod <amacleod@redhat.com>
6522
6523 * c-decl.c: Adjust include files.
6524 * c-parser.c: Ditto.
6525
ddc8de03
PM
65262014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6527 Tom Tromey <tromey@redhat.com>
6528
6529 * c-tree.h (enum c_oracle_request): New.
6530 (c_binding_oracle_function): New typedef.
6531 (c_binding_oracle, c_pushtag, c_bind): Declare.
6532 * c-decl.c (c_binding_oracle): New global.
6533 (I_SYMBOL_CHECKED): New macro.
6534 (i_symbol_binding): New function.
6535 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6536 (I_TAG_CHECKED): New macro.
6537 (i_tag_binding): New function.
6538 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6539 (I_LABEL_CHECKED): New macro.
6540 (i_label_binding): New function.
6541 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6542 (c_print_identifier): Save and restore c_binding_oracle.
6543 (c_pushtag, c_bind): New functions.
6544
60393bbc
AM
65452014-10-27 Andrew MacLeod <amacleod@redhat.com>
6546
6547 * c-typeck.c: Adjust include files.
6548
d723bb7c
MLI
65492014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6550
6551 PR c++/53061
6552 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6553 initialization here...
6554 (c_initialize_diagnostics): ... but here. Set defaults after
6555 building pretty-printer.
6556
1bc5a451
MP
65572014-10-23 Marek Polacek <polacek@redhat.com>
6558
6559 PR c/63626
6560 * c-decl.c (pop_scope): Don't print warning in external_scope.
6561
4435bb92
MP
65622014-10-19 Marek Polacek <polacek@redhat.com>
6563
6564 PR c/63567
6565 * c-typeck.c (output_init_element): Allow initializing objects with
6566 static storage duration with compound literals even in C99 and add
6567 pedwarn for it.
6568
7278465e
MP
65692014-10-17 Marek Polacek <polacek@redhat.com>
6570
6571 PR c/63567
6572 * c-typeck.c (digest_init): Allow initializing objects with static
6573 storage duration with compound literals even in C99 and add pedwarn
6574 for it.
6575
d9b7be2e
MP
65762014-10-17 Marek Polacek <polacek@redhat.com>
6577
6578 PR c/63543
6579 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6580 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6581 error multiple times. Print the type.
6582
f406ae1f
MP
65832014-10-17 Marek Polacek <polacek@redhat.com>
6584
6585 PR c/63549
6586 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6587 type.
6588
92574c7c
MP
65892014-10-17 Marek Polacek <polacek@redhat.com>
6590
6591 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6592 (start_function): Use OPT_Wimplicit_int instead of 0.
6593 (store_parm_decls_oldstyle): Likewise.
6594
1bc4a978
MT
65952014-10-17 Alan Modra <amodra@gmail.com>
6596
6597 PR middle-end/61848
6598 * c-decl.c (merge_decls): Don't merge section name or tls model
6599 to newdecl symtab node, instead merge to olddecl. Override
6600 existing olddecl section name. Set tls_model for all thread-local
6601 vars, not just OMP thread-private ones. Remove incorrect comment.
6602
83685514
AM
66032014-10-16 Andrew MacLeod <amacleod@redhat.com>
6604
6605 * c-decl.c: Adjust include files.
6606
78a7c317
DD
66072014-10-14 DJ Delorie <dj@redhat.com>
6608
6609 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6610 (c_token_starts_typename): Check all __intN, not just __int128.
6611 (c_token_starts_declspecs): Likewise.
6612 (c_parser_declspecs): Likewise.
6613 (c_parser_attribute_any_word): Likewise.
6614 (c_parser_objc_selector): Likewise.
6615 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6616 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6617 is specified.
6618 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6619 __int128.
6620 (finish_declspecs): Likewise.
6621
74d98c1e
AB
66222014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6623
8e745a17 6624 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6625 the duplicate code.
8e745a17 6626 (c_parser_statement): Call the new function.
74d98c1e 6627
84937de2
MP
66282014-10-09 Marek Polacek <polacek@redhat.com>
6629
6630 PR c/63480
6631 * c-typeck.c (pop_init_level): Don't warn about initializing
6632 with { }.
6633
0382aaa0
MP
66342014-10-07 Marek Polacek <polacek@redhat.com>
6635
6636 PR c/59717
6637 * c-decl.c (header_for_builtin_fn): New function.
6638 (implicitly_declare): Suggest which header to include.
6639
7a0ca710
MP
66402014-10-07 Marek Polacek <polacek@redhat.com>
6641
6642 * c-convert.c (convert): Use error_operand_p.
6643 * c-typeck.c (require_complete_type): Likewise.
6644 (really_atomic_lvalue): Likewise.
6645 (digest_init): Likewise.
6646 (handle_omp_array_sections_1): Likewise.
6647
6bc8a126
MP
66482014-10-03 Marek Polacek <polacek@redhat.com>
6649
6650 PR c/63453
6651 * c-decl.c (pop_scope): Don't warn about "inline function declared
6652 but never defined" for functions marked with gnu_inline attribute.
6653
d90c0a59
JJ
66542014-09-25 Jakub Jelinek <jakub@redhat.com>
6655
6656 PR c++/63249
6657 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6658 on low_bound and length.
6659
083e891e
MP
66602014-09-24 Marek Polacek <polacek@redhat.com>
6661
6662 PR c/61405
6663 PR c/53874
6664 * c-parser.c: Don't define CPP_KEYWORD.
6665 (c_parser_switch_statement): Pass original type to c_finish_case.
6666 * c-tree.h (c_finish_case): Update declaration.
6667 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6668 conditionally to c_do_switch_warnings.
6669
8d95fe25
MP
66702014-09-03 Marek Polacek <polacek@redhat.com>
6671
6672 PR c/62024
6673 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6674 conversions.
6675
9a771876
JJ
66762014-09-02 Jakub Jelinek <jakub@redhat.com>
6677 Balaji V. Iyer <balaji.v.iyer@intel.com>
6678 Igor Zamyatin <igor.zamyatin@intel.com>
6679
6680 * c-parser.c (c_parser_cilk_for): New function.
6681 (c_parser_cilk_grainsize): Likewise.
6682 (c_get_temp_regvar): Likewise.
6683 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6684 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6685 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6686 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6687 case.
6688
b7679d96
CG
66892014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6690
6691 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6692 with using HOST_WIDE_INT without truncation to 'int'
6693
59ea0364
MP
66942014-08-22 Marek Polacek <polacek@redhat.com>
6695
6696 PR c++/62199
6697 * c-typeck.c (parser_build_binary_op): Adjust call to
6698 warn_logical_not_parentheses.
6699
671a475e
IZ
67002014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6701
6702 PR other/62008
6703 * c-parser.c (c_parser_array_notation): Check for correct
6704 type of an array added.
6705
04159acf
MP
67062014-08-19 Marek Polacek <polacek@redhat.com>
6707
6708 PR c++/62153
6709 * c-typeck.c (build_binary_op): If either operand of a comparison
6710 is a boolean expression, call maybe_warn_bool_compare.
6711
c77935ee
PP
67122014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6713
6714 PR c/45584
6715 * c-typeck.c (build_c_cast): Do a conversion even when the
6716 TYPE_MAIN_VARIANTs are the same.
6717
35aff4fb
MP
67182014-08-19 Marek Polacek <polacek@redhat.com>
6719
6720 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6721 pedwarn_c99 instead of pedwarn.
6722 (grokfield): Likewise.
6723 (warn_defaults_to): New function.
6724 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6725 Unconditionally call pedwarn_c99 instead of pedwarn.
6726 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6727 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6728 check flag_isoc11 before.
6729 * c-errors.c (pedwarn_c99): Change the return type to bool.
6730 Handle -Wc99-c11-compat.
6731 * c-parser.c (disable_extension_diagnostics): Handle
6732 warn_c99_c11_compat.
6733 (restore_extension_diagnostics): Likewise.
6734 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6735 instead of pedwarn, don't check flag_isoc11 before.
6736 (c_parser_declspecs): Likewise.
6737 (c_parser_alignas_specifier): Likewise.
6738 (c_parser_alignof_expression): Likewise.
6739 (c_parser_generic_selection): Likewise.
6740 * c-tree.h (pedwarn_c99): Update declaration.
6741 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6742 of pedwarn_c99.
6743
177cce46
MP
67442014-08-19 Marek Polacek <polacek@redhat.com>
6745
6746 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6747 to pedwarn_c90.
6748 * c-errors.c: Include "opts.h".
6749 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6750 * c-parser.c (disable_extension_diagnostics): Handle negative value
6751 of warn_c90_c99_compat, too.
6752 (restore_extension_diagnostics): Likewise.
6753 (c_parser_compound_statement_nostart): Pass
6754 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6755
6dc99c33
MP
67562014-08-12 Marek Polacek <polacek@redhat.com>
6757
6758 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6759 Add pedwarn.
6760 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6761 Likewise.
6762 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6763
3f8257db 67642014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6765
6766 PR c/51849
6767 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6768 Call pedwarn_c90 instead of pedwarn.
6769 (check_bitfield_type_and_width): Likewise.
6770 (declspecs_add_qual): Likewise.
6771 (declspecs_add_type): Likewise.
6772 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6773 Adjust to only call pedwarn_c90.
6774 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6775 pedwarn_c90 instead of pedwarn.
6776 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6777 * c-parser.c (disable_extension_diagnostics): Handle
6778 warn_c90_c99_compat.
6779 (restore_extension_diagnostics): Likewise.
6780 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6781 pedwarn_c90 instead of pedwarn.
6782 (c_parser_initelt): Likewise.
6783 (c_parser_postfix_expression): Likewise.
6784 (c_parser_postfix_expression_after_paren_type): Likewise.
6785 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6786 * c-tree.h: Fix formatting.
6787 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6788 pedwarn_c90 instead of pedwarn.
6789
9f25a338
TS
67902014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6791
6792 * c-typeck.c: Remove include of pointer-set.h.
6793
044331a8
MP
67942014-08-07 Marek Polacek <polacek@redhat.com>
6795
6796 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6797
b787e7a2
TS
67982014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6799
6800 * c-typeck.c: Use hash_map instead of pointer_map.
6801
6e2830c3
TS
68022014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6803
6804 * c-decl.c: Use hash_set instead of pointer_set.
6805
a7ee52fb
IZ
68062014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6807
6808 PR middle-end/61455
6809 * c-array-notation.c (expand_array_notations): Handling
6810 of DECL_EXPR added.
6811
b4dfdc11
MG
68122014-07-31 Marc Glisse <marc.glisse@inria.fr>
6813
6814 PR c++/60517
6815 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6816 a local variable.
6817
976d5a22
TT
68182014-07-30 Tom Tromey <tromey@redhat.com>
6819
6820 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6821 field.
6822 (really_start_incremental_init, push_init_level): Initialize
6823 designator_depth.
6824 (pop_init_level): Set global designator_depth.
6825 (process_init_element): Check for designated_init attribute.
6826
30281de2
MP
68272014-07-20 Marek Polacek <polacek@redhat.com>
6828
6829 PR c/61852
6830 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6831 (implicitly_declare): Pass location to implicit_decl_warning.
6832
b108f48f
JJ
68332014-07-14 Jakub Jelinek <jakub@redhat.com>
6834
6835 PR middle-end/61294
6836 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6837 If non-NULL, call c_parser_check_literal_zero.
6838 (c_parser_check_literal_zero): New function.
6839 (c_parser_postfix_expression_after_primary): Adjust
6840 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6841
773ec47f
MP
68422014-07-06 Marek Polacek <polacek@redhat.com>
6843
6844 PR c/6940
6845 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6846 * c-tree.h (C_ARRAY_PARAMETER): Define.
6847 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6848 function parameter.
6849
22e1cf1c 68502014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6851 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6852
6853 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6854 releasing symbol.
6855
52ec0ea3
MP
68562014-07-01 Marek Polacek <polacek@redhat.com>
6857
6858 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6859 instead of 0 to WARN_FOR_ASSIGNMENT.
6860
d5c3d343
MP
68612014-07-01 Marek Polacek <polacek@redhat.com>
6862
6863 PR c/58286
6864 * c-typeck.c (convert_for_assignment): Pass
6865 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6866
6a7253a4
MP
68672014-06-30 Marek Polacek <polacek@redhat.com>
6868
6869 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6870 has no_sanitize_undefined attribute.
6871
5e88a8f4
IZ
68722014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6873
6874 PR middle-end/57541
6875 * c-array-notation.c (fix_builtin_array_notation_fn):
6876 Check for 0 arguments in builtin call. Check that bultin argument is
6877 correct.
6878 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6879 index.
6880
9698b078
SH
68812014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6882
6883 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6884 qualifiers in __auto_type for atomic types.
6885 (c_parser_typeof_specifier): Discard all type qualifiers in
6886 __typeof__ for atomic types.
6887
6e07c515
MP
68882014-06-25 Marek Polacek <polacek@redhat.com>
6889
6890 PR c/61162
6891 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6892 the return expression to c_finish_return.
6893
da6f124d
JJ
68942014-06-25 Jakub Jelinek <jakub@redhat.com>
6895
6896 * c-typeck.c (c_finish_omp_clauses): Make sure
6897 OMP_CLAUSE_LINEAR_STEP has correct type.
6898
c203e8a7
TS
68992014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6900
6901 * c-decl.c: Adjust.
6902
56ad0e38
JJ
69032014-06-24 Jakub Jelinek <jakub@redhat.com>
6904
6905 * c-parser.c (c_parser_omp_for_loop): For
6906 #pragma omp parallel for simd move lastprivate clause from parallel
6907 to for rather than simd.
6908
47c2554f
MP
69092014-06-23 Marek Polacek <polacek@redhat.com>
6910
6911 * c-typeck.c (parser_build_binary_op): Don't call
6912 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6913
56363ffd
JH
69142014-06-15 Jan Hubicka <hubicka@ucw.cz>
6915
6916 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6917 * c-decl.c (merge_decls): Likewise.
6918
d7ff7ae5
MP
69192014-06-09 Marek Polacek <polacek@redhat.com>
6920
6921 PR c/36446
6922 * c-typeck.c (error_init): Call inform instead of error_at.
6923 (pedwarn_init): Call inform instead of pedwarn.
6924 (warning_init): Call inform instead of warning_at.
6925
24d047a3
JH
69262014-06-07 Jan Hubicka <hubicka@ucw.cz>
6927
6928 * c-decl.c (merge_decls): Use set_decl_section_name.
6929 (duplicate_decls): Remove node if it exists.
6930
9bac5cbb
G
69312014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6932
6933 PR c/53119
6934 * c-typeck.c (push_init_level, process_init_element,
6935 pop_init_level): Correct check for zero initialization, move
6936 missing brace warning to respect zero initialization.
6937
8ffcdea8
MP
69382014-06-05 Marek Polacek <polacek@redhat.com>
6939
6940 PR c/56724
6941 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6942
742938c9
MP
69432014-06-05 Marek Polacek <polacek@redhat.com>
6944
6945 PR c/49706
6946 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6947 on the left hand side operand of a comparison.
742938c9 6948
6447c55d
MP
69492014-06-05 Marek Polacek <polacek@redhat.com>
6950
6951 PR c/48062
6952 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6953 Print note only if the warning was printed.
6954
9dc7743c
IZ
69552014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6956
6957 PR c/58942
6958 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6959 with a pointer.
6960
fedfecef
MP
69612014-06-03 Marek Polacek <polacek@redhat.com>
6962
6963 PR c/60439
6964 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6965 c_start_case.
6966 * c-tree.h (c_start_case): Update.
6967 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6968 switch condition has boolean value.
6969
9b2b7279
AM
69702014-06-02 Andrew MacLeod <amacleod@redhat.com>
6971
6972 * c-decl.c: Include builtins.h.
6973 * c-parser.c: Likewise.
6974
5c1bc275
MP
69752014-05-27 Marek Polacek <polacek@redhat.com>
6976
6977 PR c/56724
6978 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6979 error and warning calls to error_at and warning_at. Pass location of
6980 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6981 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6982 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6983
97563bc8
IZ
69842014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6985
6986 PR c/61191
6987 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6988 function parameters.
6989
aede2c10
JH
69902014-05-23 Jan Hubicka <hubicka@ucw.cz>
6991
6992 * c-decl.c (merge_decls): Preserve symtab node pointers.
6993 (duplicate_decls): Free new decl.
6994
edbba2ce
TS
69952014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6996
f3316c6d
TS
6997 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6998 initialization.
6999
edbba2ce
TS
7000 * c-parser.c (c_parser_omp_target): Return bool values.
7001
68c81f24
TS
70022014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7003
7004 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7005 num_teams_loc variable to num_thread_limit_loc.
7006
632f2871
RS
70072014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7008
7009 * c-array-notation.c (expand_array_notations): Use void_node
7010 instead of void_zero_node.
7011
766090c2
TS
70122014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7013
7014 * c-decl.c (finish_struct): Adjust.
7015 (finish_enum): Likewise.
7016 (bind): Adjust.
7017 (record_inline_static): Likewise.
7018 (push_scope): Likewise.
7019 (make_label): Likewise.
7020 (lookup_label_for_goto): Likewise.
7021 (finish_struct): Likewise.
7022 (finish_enum): Likewise.
7023 (store_parm_decls): Likewise.
7024 (c_push_function_context): Likewise.
7025 * c-lang.h: Remove usage of variable_size gty attribute.
7026 * c-parser.c (c_parse_init): Adjust.
7027 (c_parse_file): Likewise.
7028
2b107f6b
MP
70292014-05-13 Marek Polacek <polacek@redhat.com>
7030
7031 PR c/61162
7032 * c-typeck.c (convert_for_assignment): Pass location to
7033 WARN_FOR_ASSIGNMENT instead of input_location.
7034
d033409e
MP
70352014-05-10 Marek Polacek <polacek@redhat.com>
7036
7037 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7038 maybe_warn_string_init.
7039 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7040 maybe_warn_string_init.
7041 * c-tree.h (maybe_warn_string_init): Update declaration.
7042 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7043 Call pedwarn_init with loc instead of with input_location.
7044 (digest_init): Pass init_loc to maybe_warn_string_init.
7045 (pop_init_level): Call pedwarn_init with loc instead of with
7046 input_location.
7047 (set_init_index): Likewise.
7048 (process_init_element): Likewise.
7049
ea58ef42
MP
70502014-05-09 Marek Polacek <polacek@redhat.com>
7051
7052 PR c/61096
7053 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7054 (c_parser_initelt): Pass location to set_init_label. Pass array index
7055 location to set_init_index.
7056 * c-tree.h (push_init_level): Update declaration.
7057 (pop_init_level): Likewise.
7058 (set_init_index): Likewise.
7059 (set_init_label): Likewise.
7060 * c-typeck.c (error_init): Add location parameter. Call error_at
7061 instead of error.
7062 (digest_init): Pass init_loc to error_init.
7063 (really_start_incremental_init):
7064 (push_init_level): Add location parameter. Pass loc to pop_init_level
7065 and error_init.
7066 (pop_init_level): Likewise.
7067 (set_designator): Add location parameter. Pass loc to pop_init_level,
7068 push_init_level, and error_init.
7069 (set_init_index): Add location parameter. Pass loc to error_init and
7070 set_designator.
7071 (set_init_label): Likewise.
7072 (output_init_element): Pass loc to error_init.
7073 (process_init_element): Pass loc to error_init, pop_init_level,
7074 pedwarn_init, and push_init_level.
7075
661a0813
MP
70762014-05-09 Marek Polacek <polacek@redhat.com>
7077
7078 PR c/50459
7079 * c-parser.c (c_parser_attributes): Parse the arguments as an
7080 expression-list if the attribute takes identifier.
7081
2793eeab
MP
70822014-05-08 Marek Polacek <polacek@redhat.com>
7083
7084 PR c/61053
7085 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7086 TYPE_ALIGN_UNIT.
7087
f827930a
MP
70882014-05-08 Marek Polacek <polacek@redhat.com>
7089
7090 PR c/61077
7091 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7092 of main.
7093
1d60af08
KZ
70942014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7095 Mike Stump <mikestump@comcast.net>
7096 Richard Sandiford <rdsandiford@googlemail.com>
7097
7098 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7099 (finish_enum): Use wide-int interfaces.
7100 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7101 * c-typeck.c (build_c_cast): Likewise.
7102 (set_nonincremental_init_from_string): Likewise.
7103 (c_tree_equal): Likewise.
7104
a0e24419
MP
71052014-05-02 Marek Polacek <polacek@redhat.com>
7106
7107 PR c/25801
7108 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7109 Return size_one_node when the type is not complete.
7110 (pointer_diff): Remove comment.
7111 (build_unary_op): Improve error messages.
7112
19fc9faa
MP
71132014-05-02 Marek Polacek <polacek@redhat.com>
7114
7115 * c-typeck.c (c_finish_return): Separate warning_at calls.
7116
63bc4e87
MP
71172014-05-02 Marek Polacek <polacek@redhat.com>
7118
7119 * c-tree.h (error_init): Remove declaration.
7120 (pedwarn_init): Likewise.
7121 * c-typeck.c (error_init): Make static and move above.
7122 (pedwarn_init): Likewise.
7123 (warning_init): Move above.
7124 (maybe_warn_string_init): Likewise.
7125
4bd2511b
JL
71262014-05-01 Jeff Law <law@redhat.com>
7127
7128 Revert:
7129
7130 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7131 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7132 avoid goto.
7133
6a358dcb
MP
71342014-05-02 Marek Polacek <polacek@redhat.com>
7135
7136 PR c/60784
7137 * c-typeck.c (push_init_level): Set constructor_designated to
7138 p->designated for structures.
7139
ae5ebda4
MP
71402014-05-01 Marek Polacek <polacek@redhat.com>
7141
7142 PR c/60915
7143 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7144 function-definition has an attribute after the declarator.
7145
96b40f8d
MP
71462014-05-01 Marek Polacek <polacek@redhat.com>
7147
7148 PR c/60257
7149 * c-typeck.c (warning_init): Add location_t parameter. Call
7150 warning_at instead of warning.
7151 (push_init_level): Pass input_location to warning_init.
7152 (add_pending_init): Add location_t parameter. Pass loc to
7153 warning_init.
7154 (set_nonincremental_init): Pass input_location to add_pending_init.
7155 (set_nonincremental_init_from_string): Likewise.
7156 (output_init_element): Pass loc to warning_init and to
7157 add_pending_init.
7158
32e00768
MP
71592014-05-01 Marek Polacek <polacek@redhat.com>
7160
7161 PR c/43395
7162 * c-typeck.c (c_finish_return): Distinguish between label and variable
7163 when warning about returning local address.
7164
c9379ce2
MP
71652014-05-01 Marek Polacek <polacek@redhat.com>
7166
7167 PR c/29467
7168 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7169 in C89 mode.
7170
d00887e8
MP
71712014-05-01 Marek Polacek <polacek@redhat.com>
7172
7173 PR c/43245
7174 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7175 instead of 0 to WARN_FOR_QUALIFIERS.
7176
5436fa2e
MP
71772014-05-01 Marek Polacek <polacek@redhat.com>
7178
7179 PR c/56989
7180 * c-typeck.c (default_conversion): Use better location for
7181 error call.
7182
f8ed5150
MP
71832014-04-30 Marek Polacek <polacek@redhat.com>
7184
7185 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7186 also when SANITIZE_FLOAT_DIVIDE is on.
7187
8337d1db
MP
71882014-04-30 Marek Polacek <polacek@redhat.com>
7189
7190 PR c/60139
7191 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7192 and pedwarn_init. Use loc insted of input_location.
7193
c4bdc42f
MP
71942014-04-30 Marek Polacek <polacek@redhat.com>
7195
7196 PR c/60351
7197 * c-typeck.c (build_binary_op): Use location when warning about
7198 shift count.
7199
45484dcf
MP
72002014-04-25 Marek Polacek <polacek@redhat.com>
7201
7202 PR c/18079
7203 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7204 always_inline/noinline and hot/cold attributes.
7205
34cf811f
MP
72062014-04-25 Marek Polacek <polacek@redhat.com>
7207
7208 PR c/60114
7209 * c-parser.c (c_parser_initelt): Pass input_location to
7210 process_init_element.
7211 (c_parser_initval): Pass loc to process_init_element.
7212 * c-tree.h (process_init_element): Adjust declaration.
7213 * c-typeck.c (push_init_level): Pass input_location to
7214 process_init_element.
7215 (pop_init_level): Likewise.
7216 (set_designator): Likewise.
7217 (output_init_element): Add location_t parameter. Pass loc to
7218 digest_init.
7219 (output_pending_init_elements): Pass input_location to
7220 output_init_element.
7221 (process_init_element): Add location_t parameter. Pass loc to
7222 output_init_element.
7223
42056eac
JJ
72242014-04-24 Jakub Jelinek <jakub@redhat.com>
7225
7226 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7227 atomic-clause, allow comma in between atomic-clause and
7228 seq_cst.
7229
e162a134
JJ
72302014-04-22 Jakub Jelinek <jakub@redhat.com>
7231
7232 PR c/59073
7233 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7234 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7235
2f6babac
IZ
72362014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7237
7238 PR middle-end/60469
7239 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7240 create_tmp_var instead build_decl for creating temps.
7241 (build_array_notation_expr): Likewise.
7242 (fix_conditional_array_notations_1): Likewise.
7243 (fix_array_notation_expr): Likewise.
7244 (fix_array_notation_call_expr): Likewise.
7245
8edbfaa6
JJ
72462014-03-28 Jakub Jelinek <jakub@redhat.com>
7247
7248 PR c++/60689
7249 * c-tree.h (c_build_function_call_vec): New prototype.
7250 * c-typeck.c (build_function_call_vec): Don't call
7251 resolve_overloaded_builtin here.
7252 (c_build_function_call_vec): New wrapper function around
7253 build_function_call_vec. Call resolve_overloaded_builtin here.
7254 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7255 Call c_build_function_call_vec instead of build_function_call_vec.
7256 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7257 * c-decl.c (finish_decl): Likewise.
7258
7485aeea
MLI
72592014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7260
7261 PR c/55383
7262 * c-typeck.c: Use correct format string in cast-qual warning
7263
b17a8b07
TS
72642014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7265
7266 * c-decl.c (c_decl_attributes): Use
7267 lang_hooks.types.omp_mappable_type.
7268 * c-typeck.c (c_finish_omp_clauses): Likewise.
7269
3af9c5e9
MP
72702014-03-06 Marek Polacek <polacek@redhat.com>
7271
7272 PR c/60197
7273 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7274 of checking tree code.
7275
1c9f5f33
PK
72762014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7277
7278 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7279 (c_parser_parameter_declaration): Likewise.
7280
cc28fc7f
MP
72812014-02-19 Marek Polacek <polacek@redhat.com>
7282
7283 PR c/60195
7284 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7285 Call mark_exp_read on exp.value.
7286 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7287 TREE_ADDRESSABLE on old instead of val.
7288 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7289
b581c05c
PK
72902014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7291
7292 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7293 C_EXPR_APPEND by vec_safe_push.
7294 * c-tree.h (C_EXPR_APPEND): Remove.
7295
81e5eca8
MP
72962014-01-31 Marek Polacek <polacek@redhat.com>
7297
7298 PR c/59963
7299 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7300 build_function_call_vec.
7301 (build_function_call): Likewise.
7302 (build_atomic_assign): Likewise.
7303 (build_function_call_vec): Add arg_loc parameter. Use it.
7304 (convert_arguments): Likewise.
7305 (convert_for_assignment): Rename rhs_loc to expr_loc.
7306 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7307 (c_parser_objc_keywordexpr): Likewise.
7308 (c_parser_postfix_expression_after_primary): Call
7309 build_function_call_vec with expr_loc rather than op_loc.
7310 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7311 build_function_call_vec.
7312 (c_parser_expr_list): Add locations parameter. Fill it with locations
7313 of function arguments.
7314 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7315
68fca595
MP
73162014-01-30 Marek Polacek <polacek@redhat.com>
7317
7318 PR c/59940
7319 * c-typeck.c (build_function_call_vec): Use loc parameter.
7320 (convert_arguments): Add location parameter. Use it.
7321 (ep_convert_and_check): Likewise.
7322 (build_atomic_assign): Adjust convert_for_assignment call.
7323 (build_modify_expr): Likewise.
7324 (digest_init): Likewise.
7325 (c_finish_return): Likewise.
7326 (build_conditional_expr): Adjust ep_convert_and_check calls.
7327 (convert_for_assignment): Add rhs_loc parameter. Use it.
7328 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7329 calls.
7330
fa337f3a
RB
73312014-01-30 Richard Biener <rguenther@suse.de>
7332
7333 PR c/59905
7334 * c-typeck.c (build_function_call_vec): Do not replace calls
7335 to a function via an incompatible type with a runtime abort.
7336
b72271b9
BI
73372014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7338
7339 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7340 flag_enable_cilkplus with flag_cilkplus.
7341 (c_parser_direct_declarator_inner): Likewise.
7342 (c_parser_attribute_any_word): Likewise.
7343 (c_parser_attributes): Likewise.
7344 (c_parser_compound_statement): Likewise.
7345 (c_parser_statement_after_labels): Likewise.
7346 (c_parser_if_statement): Likewise.
7347 (c_parser_switch_statement): Likewise.
7348 (c_parser_do_statement): Likewise.
7349 (c_parser_for_statement): Likewise.
7350 (c_parser_unary_expression): Likewise.
7351 (c_parser_postfix_expression): Likewise.
7352 (c_parser_postfix_expression_after_primary): Likewise.
7353 (c_parser_postfix_expression_after_primary): Likewise.
7354 (c_parser_omp_clause_name): Likewise.
7355 (c_finish_omp_declare_simd): Likewise.
7356 (c_parser_cilk_verify_simd): Likewise.
7357 * c-typeck.c (build_array_ref): Likewise.
7358 (build_function_call_vec): Likewise.
7359 (convert_arguments): Likewise.
7360 (build_compound_expr): Likewise.
7361 (c_finish_return): Likewise.
7362 (c_finish_if_stmt): Likewise.
7363 (c_finish_loop): Likewise.
7364 (build_binary_op): Likewise.
7365
393e8e8b
MP
73662014-01-23 Marek Polacek <polacek@redhat.com>
7367
7368 PR c/59846
7369 * c-typeck.c (parser_build_binary_op): Use location instead of
7370 input_location.
7371 (build_binary_op): Pass location to shorten_compare.
7372
f04dda30
MP
73732014-01-23 Marek Polacek <polacek@redhat.com>
7374
7375 PR c/58346
7376 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7377 an empty aggregate.
7378
789eadcd
MP
73792014-01-23 Marek Polacek <polacek@redhat.com>
7380
7381 PR c/59871
7382 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7383 of a comma expression.
7384 (emit_side_effect_warnings): Likewise.
7385
40f14e9f
BI
73862014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7387
7388 PR c/59825
7389 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7390 function to use walk_tree and moved a lot of its functionality to
7391 expand_array_notations.
7392 (expand_array_notations): New function.
7393
74558dd9
BI
73942014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7395
7396 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7397 attribute an attribute without value.
7398
652fea39
JJ
73992014-01-23 Jakub Jelinek <jakub@redhat.com>
7400
7401 PR middle-end/58809
7402 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7403 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7404
f34f1c87
MP
74052014-01-22 Marek Polacek <polacek@redhat.com>
7406
7407 PR c/59891
7408 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7409 of remove_c_maybe_const_expr on op1 and op2.
7410
241f845a
JJ
74112014-01-15 Jakub Jelinek <jakub@redhat.com>
7412
7413 PR c/58943
7414 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7415 effects, preevaluate rhs using SAVE_EXPR first.
7416
9a74f20c
BI
74172014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7418
7419 PR c++/59631
7420 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7421 statements with if-elseif statements.
7422
96066ce1
MP
74232014-01-06 Marek Polacek <polacek@redhat.com>
7424
7425 PR c/57773
7426 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7427 defined bit-field types only in ISO C.
7428
23a5b65a
RS
74292014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7430
7431 Update copyright years
7432
f9030485
RS
74332014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7434
7435 * c-array-notation.c: Use the standard form for the copyright notice.
7436
41958c28
BI
74372013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7438
7439 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7440 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7441 field in parser is not empty. If not-empty, call the function
7442 c_parser_finish_omp_declare_simd.
7443 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7444 between SIMD-enabled functions and #pragma simd. Added new parameter.
7445 (c_parser_cilk_all_clauses): Modified the usage of the function
7446 c_parser_cilk_clause_vectorlength as mentioned above.
7447 (c_parser_cilk_simd_fn_vector_attrs): New function.
7448 (c_finish_cilk_simd_fn_tokens): Likewise.
7449 (is_cilkplus_vector_p): Likewise.
7450 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7451 "nomask," and "mask" strings in clause name.
7452 (c_parser_omp_all_clauses): Added 3 new case statements:
7453 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7454 PRAGMA_CILK_CLAUSE_NOMASK.
7455 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7456 check for vector attribute and if so call the function
7457 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7458 called the function c_finish_cilk_simd_fn_tokens.
7459 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7460 parser field is non-empty. If so, parse them as you would parse
7461 the omp declare simd pragma.
7462 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7463 Added a check when step is a parameter and flag it as error.
7464 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7465 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7466 pragma_omp_clause.
7467
cef0fd0e
TS
74682013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7469
7470 * c-parser.c (c_parser_omp_parallel): Fix description.
7471
12893402
BI
74722013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7473
7474 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7475 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7476 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7477 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7478
296674db
JM
74792013-12-04 Joseph Myers <joseph@codesourcery.com>
7480
7481 PR c/52023
7482 * c-parser.c (c_parser_alignas_specifier): Use
7483 c_sizeof_or_alignof_type instead of c_alignof.
7484 (c_parser_alignof_expression): Likewise, with min_alignof
7485 parameter depending on alignof spelling used.
7486
edd28054
MP
74872013-12-04 Marek Polacek <polacek@redhat.com>
7488
7489 PR c/54113
7490 * c-decl.c (start_function): Don't warn for missing prototype for
7491 inline functions.
7492
da0fc454
MP
74932013-12-03 Marek Polacek <polacek@redhat.com>
7494
7495 PR c/59351
7496 * c-decl.c (build_compound_literal): Allow compound literals with
7497 empty initial value.
7498
4c2ecab0
JM
74992013-12-02 Joseph Myers <joseph@codesourcery.com>
7500
7501 PR c/58235
7502 * c-typeck.c (build_modify_expr): Diagnose assignment to
7503 expression with array type.
7504
340baef7
JM
75052013-11-29 Joseph Myers <joseph@codesourcery.com>
7506
7507 PR c/42262
7508 * c-typeck.c (process_init_element): Do not treat a string as
7509 initializing a whole array when used with a designator for an
7510 individual element.
7511
6763b9f7
JM
75122013-11-29 Joseph Myers <joseph@codesourcery.com>
7513
7514 PR c/57574
7515 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7516 an inline function following a static declaration.
7517
e7bd1de1
JJ
75182013-11-28 Jakub Jelinek <jakub@redhat.com>
7519
7520 PR c/59310
7521 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7522 to p_name before calling c_parser_omp_teams instead of after.
7523 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7524 argument. Remove unused p_name variable.
7525
0136f8f0
AH
75262013-11-27 Aldy Hernandez <aldyh@redhat.com>
7527 Jakub Jelinek <jakub@redhat.com>
7528
7529 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7530 external_scope is NULL.
7531
241b71bb
TV
75322013-11-27 Tom de Vries <tom@codesourcery.com>
7533 Marc Glisse <marc.glisse@inria.fr>
7534
7535 PR c++/59032
7536 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7537
2fb9a547
AM
75382013-11-22 Andrew MacLeod <amacleod@redhat.com>
7539
7540 * c-typeck.c: Add required include files from gimple.h.
7541
8400e75e
DM
75422013-11-22 David Malcolm <dmalcolm@redhat.com>
7543
7544 * c-decl.c (define_label, shadow_tag_warned)
7545 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7546 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7547 (declspecs_add_type): Remove use of in_system_header macro.
7548 * c-parser.c (c_parser_unary_expression): Likewise.
7549 * c-typeck.c (store_init_value, process_init_element)
7550 (c_start_case): Likewise.
7551
7552 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7553 macro.
7554
7555 * c-parser.c (c_parser_set_source_position_from_token): Remove
7556 reference to in_system_header from comment.
7557
386b1f1f
RS
75582013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7559
7560 * c-decl.c (grokdeclarator): Update comment to refer to
7561 tree_to_[su]hwi rather than tree_low_cst.
7562
ae7e9ddd
RS
75632013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7564
7565 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7566 tree_to_uhwi throughout.
7567
9439e9a1
RS
75682013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7569
7570 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7571 throughout.
7572
9541ffee
RS
75732013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7574
7575 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7576 throughout.
7577
c02065fc
AH
75782013-11-15 Aldy Hernandez <aldyh@redhat.com>
7579
7580 * c-parser.c (c_parser_cilk_simd): New.
7581 (c_parser_cilk_verify_simd): New.
7582 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7583 (c_parser_omp_for_loop): Add case for NE_EXPR.
7584 Set c_break_label for CILK_SIMD.
7585 (c_parser_cilk_clause_vectorlength): New.
7586 (c_parser_cilk_clause_linear): New.
7587 (c_parser_cilk_clause_name): New.
7588 (c_parser_cilk_all_clauses): New.
7589 * c-typeck.c (build_unary_op): Pass location argument to
7590 readonly_error.
7591 (build_modify_expr): Same.
7592 (build_asm_expr): Same.
7593 (c_finish_bc_stmt): Error on break/continue in loops.
7594
18f429e2
AM
75952013-11-14 Andrew MacLeod <amacleod@redhat.com>
7596
7597 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7598
d8a2d370
DN
75992013-11-14 Diego Novillo <dnovillo@google.com>
7600
7601 * c-decl.c: Include print-tree.h.
7602 Include stor-layout.h.
7603 Include varasm.h.
7604 Include attribs.h.
7605 Include stringpool.h.
7606 * c-lang.c: Include fold-const.h.
7607 * c-parser.c: Include stringpool.h.
7608 Include attribs.h.
7609 Include stor-layout.h.
7610 Include varasm.h.
7611 Include trans-mem.h.
7612 * c-typeck.c: Include stor-layout.h.
7613 Include trans-mem.h.
7614 Include varasm.h.
7615 Include stmt.h.
7616
38b7bc7f
JM
76172013-11-13 Joseph Myers <joseph@codesourcery.com>
7618
7619 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7620 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7621 __auto_type.
7622 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7623 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7624 RID_AUTO_TYPE.
7625 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7626 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7627 (c_parser_declarator, c_parser_direct_declarator_inner)
7628 (c_parser_parameter_declaration, c_parser_type_name): All callers
7629 changed.
7630 (c_parser_declaration_or_fndef): Handle declarations with type
7631 determined from the initializer.
7632
45b0be94
AM
76332013-11-12 Andrew MacLeod <amacleod@redhat.com>
7634
18f429e2 7635 * c-typeck.c: Include gimplify.h.
45b0be94 7636
582d9b50
JM
76372013-11-12 Joseph Myers <joseph@codesourcery.com>
7638
7639 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7640 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7641 comment.
7642 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7643 or _Thread_local as appropriate in diagnostics.
7644 (build_null_declspecs): Initialize ret->thread_gnu_p.
7645 (declspecs_add_scspec): Handle either __thread or _Thread_local
7646 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7647 pedantic. Do not disallow _Thread_local extern and _Thread_local
7648 static.
7649
267bac10
JM
76502013-11-07 Joseph Myers <joseph@codesourcery.com>
7651 Andrew MacLeod <amacleod@redhat.com>
7652
7653 * c-aux-info.c (gen_type): Handle atomic qualifier.
7654 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7655 qualifiers when compating types.
7656 (shadow_tag_warned): Handle atomic_p in declspecs.
7657 (quals_from_declspecs): Likewise.
7658 (start_decl): Use c_type_promotes_to when promoting argument
7659 types.
7660 (grokdeclarator): Handle _Atomic.
7661 (get_parm_info): Diagnose any qualifier on "void" as only
7662 parameter.
7663 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7664 comparing types. Use c_type_promotes_to when promoting argument
7665 types.
7666 (finish_function): Use c_type_promotes_to when promoting argument
7667 types.
7668 (build_null_declspecs): Handle atomic_p in declspecs.
7669 (declspecs_add_qual): Handle RID_ATOMIC.
7670 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7671 (c_token_starts_declspecs): Handle RID_ATOMIC.
7672 (c_parser_declspecs): Handle atomic type specifiers and
7673 qualifiers.
7674 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7675 from types of expressions with atomic type.
7676 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7677 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7678 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7679 (c_parser_statement_after_labels, c_parser_switch_statement)
7680 (c_parser_for_statement, c_parser_expr_no_commas)
7681 (c_parser_conditional_expression, c_parser_binary_expression)
7682 (c_parser_cast_expression, c_parser_unary_expression)
7683 (c_parser_postfix_expression)
7684 (c_parser_postfix_expression_after_primary, c_parser_expression):
7685 Use convert_lvalue_to_rvalue.
7686 (c_parser_expression_conv, c_parser_expr_list): Document
7687 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7688 (c_parser_objc_synchronized_statement): Use
7689 convert_lvalue_to_rvalue.
7690 (c_parser_objc_selector): Handle RID_ATOMIC.
7691 (c_parser_objc_receiver, c_parser_array_notation): Use
7692 convert_lvalue_to_rvalue.
7693 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7694 _Atomic (type-name).
7695 (struct c_declspecs): Add atomic_p field.
7696 (convert_lvalue_to_rvalue): Declare.
7697 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7698 corresponding atomic types.
7699 (qualify_type): Don't add _Atomic qualifiers from second argument.
7700 (comp_target_types): Do not allow _Atomic mismatches.
7701 (type_lists_compatible_p): Do not remove atomic qualifiers when
7702 comparing types.
7703 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7704 (build_atomic_assign): New functions.
7705 (build_unary_op): Use build_atomic_assign for atomic increment and
7706 decrement.
7707 (build_conditional_expr): Do not treat _Atomic void as a qualified
7708 version of void.
7709 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7710 (find_anonymous_field_with_type, convert_to_anonymous_field)
7711 (convert_for_assignment): Do not remove atomic qualifiers when
7712 comparing types.
7713 (digest_init): Do not accept initialization of arrays of atomic
7714 elements by string constants.
7715 (build_asm_expr): Use convert_lvalue_to_rvalue.
7716 (build_binary_op): Do not treat _Atomic void as a qualified
7717 version of void.
7718
0c249d4b
DD
77192013-11-06 DJ Delorie <dj@redhat.com>
7720
7721 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7722 both explicit and builtin, print the location of the explicit one.
7723
6d7f7e0a
TB
77242013-11-05 Tobias Burnus <burnus@net-b.de>
7725
7726 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7727 c_parser_omp_distribute, c_parser_omp_teams,
7728 c_parser_omp_target, c_parser_omp_declare): Handle
7729 -fopenmp-simd.
7730
b906f4ca
MP
77312013-11-03 Marek Polacek <polacek@redhat.com>
7732
7733 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7734
ee1d5a02
JJ
77352013-11-01 Jakub Jelinek <jakub@redhat.com>
7736
7737 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7738 check_dup_generic at the end, unless remove is true.
7739 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7740 remove = true;.
7741 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7742
5a9785fb
JJ
77432013-10-31 Jakub Jelinek <jakub@redhat.com>
7744
7745 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7746 with decl that is not pointer nor array.
7747
939b37da
BI
77482013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7749
7750 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7751 a spawning function is found.
7752 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7753 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7754 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7755 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7756 case.
7757 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7758 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7759 expr.
7760 (c_finish_return): Added a check to reject _Cilk_spawn in return
7761 expression.
7762 (build_cilk_spawn): New function.
7763 (build_cilk_sync): Likewise.
7764 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7765
d4af74d4
TB
77662013-10-27 Tobias Burnus <burnus@net-b.de>
7767
7768 PR other/33426
7769 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7770 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7771 (c_parser_statement_after_labels): Update calls.
7772
d73749df 77732013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7774
7775 PR other/33426
7776 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7777 Handle PRAGMA_IVDEP.
7778 (c_parser_statement_after_labels): Update call.
7779
f28aa681
MP
77802013-10-24 Marek Polacek <polacek@redhat.com>
7781
7782 * c-parser.c (c_parser_struct_declaration): Add a comment.
7783 (c_parser_declarator): Don't allow _Alignas here.
7784
0645c1a2
AM
77852013-10-17 Andrew MacLeod <amacleod@redhat.com>
7786
7787 * c-parser.c: Include omp-low.h.
7788 * c-typeck.c: Likewise.
7789
568a31f2
MP
77902013-10-17 Marek Polacek <polacek@redhat.com>
7791
7792 PR c/58267
7793 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7794 Document syntax of the array-declarator.
7795 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7796 are not permitted.
7797 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7798 (c_parser_struct_declaration): Likewise.
7799 (c_parser_declarator): Likewise.
7800 (c_parser_direct_declarator_inner): Likewise.
7801 (c_parser_parameter_declaration): Likewise.
7802 (c_parser_type_name): Likewise.
7803
acf0174b
JJ
78042013-10-11 Jakub Jelinek <jakub@redhat.com>
7805
7806 * c-lang.h (current_omp_declare_target_attribute): New extern
7807 decl.
7808 * c-parser.c: Include c-lang.h.
7809 (struct c_parser): Change tokens to c_token *.
7810 Add tokens_buf field. Change tokens_avail type to unsigned int.
7811 (c_parser_consume_token): If parser->tokens isn't
7812 &parser->tokens_buf[0], increment parser->tokens.
7813 (c_parser_consume_pragma): Likewise.
7814 (enum pragma_context): Add pragma_struct and pragma_param.
7815 (c_parser_external_declaration): Adjust
7816 c_parser_declaration_or_fndef caller.
7817 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7818 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7819 Adjust recursive call.
7820 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7821 of pragma_external.
7822 (c_parser_parameter_declaration): Use pragma_param instead of
7823 pragma_external.
7824 (c_parser_compound_statement_nostart, c_parser_label,
7825 c_parser_for_statement): Adjust
7826 c_parser_declaration_or_fndef callers.
7827 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7828 it through to c_parser_conditional_expression.
7829 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7830 pass it through to c_parser_binary_expression. Adjust recursive
7831 call.
7832 (c_parser_binary_expression): Remove prec argument, add
7833 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7834 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7835 binop matches it, use build2 instead of parser_build_binary_op.
7836 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7837 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7838 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7839 Handle pragma_struct and pragma_param the same as pragma_external.
7840 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7841 (c_parser_omp_variable_list): Parse array sections for
7842 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7843 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7844 (c_parser_omp_clause_reduction): Handle user defined reductions.
7845 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7846 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7847 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7848 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7849 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7850 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7851 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7852 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7853 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7854 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7855 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7856 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7857 (c_parser_omp_for_loop): Add CODE argument, pass it through
7858 to c_finish_omp_for. Change last argument to cclauses,
7859 and adjust uses to grab parallel clauses from the array of all
7860 the split clauses. Adjust c_parser_binary_expression,
7861 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7862 (omp_split_clauses): New function.
7863 (c_parser_omp_simd): New function.
7864 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7865 Allow the function to be called also when parsing combined constructs,
7866 and call c_parser_omp_simd when parsing for simd.
7867 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7868 #pragma omp section, require exactly one structured-block instead of
7869 sequence of statements.
7870 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7871 Allow the function to be called also when parsing combined constructs.
7872 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7873 Allow the function to be called also when parsing combined
7874 constructs.
7875 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7876 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7877 c_parser_omp_teams, c_parser_omp_target_data,
7878 c_parser_omp_target_update, c_parser_omp_target,
7879 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7880 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7881 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7882 (c_parser_omp_construct): Add p_name and mask vars. Handle
7883 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7884 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7885 and c_parser_omp_sections callers.
7886 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7887 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7888 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7889 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7890 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7891 OMP_CLAUSE_DEPEND.
7892 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7893 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7894 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7895 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7896 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7897 * c-typeck.c: Include tree-inline.h.
7898 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7899 handle_omp_array_sections_1, handle_omp_array_sections,
7900 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7901 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7902 user defined reductions.
7903 (c_tree_equal): New function.
7904 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7905 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7906 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7907 c_check_omp_declare_reduction_r): New prototypes.
7908 * c-decl.c (current_omp_declare_target_attribute): New variable.
7909 (c_decl_attributes): New function.
7910 (start_decl, start_function): Use it instead of decl_attributes.
7911 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7912 c_omp_reduction_decl, c_omp_reduction_lookup,
7913 c_check_omp_declare_reduction_r): New functions.
7914
0a6c2227
TT
79152013-09-25 Tom Tromey <tromey@redhat.com>
7916
7917 * Make-lang.in (c/gccspec.o): Remove.
7918 (CFLAGS-c/gccspec.o): New variable.
7919 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7920 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7921 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7922
f3bc55f0
TT
79232013-09-25 Tom Tromey <tromey@redhat.com>
7924
7925 * Make-lang.in (c/gccspec.o): Don't use subshell.
7926
a24d975c
MP
79272013-09-18 Marek Polacek <polacek@redhat.com>
7928
7929 PR sanitize/58443
7930 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7931 Remove unnecessary check.
7932
ce6923c5
MP
79332013-09-18 Marek Polacek <polacek@redhat.com>
7934
7935 PR sanitizer/58411
7936 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7937 no_sanitize_undefined attribute.
7938
a1e51df9
KT
79392013-09-13 Kai Tietz <ktietz@redhat.com>
7940
7941 PR target/57848
7942 * c-decl.c (c_builtin_function_ext_scope): Remove
7943 wrong assumption that it is never called on prexisting
7944 symbol.
7945
0af94e6f
JR
79462013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7947
7948 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7949
20059c8b
GDR
79502013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7951
7952 * c-objc-common.c (c_tree_printer): Tidy.
7953
de5a5fa1
MP
79542013-08-30 Marek Polacek <polacek@redhat.com>
7955
7956 * c-typeck.c (build_binary_op): Add division by zero and shift
7957 instrumentation.
7958
2531a1d9 79592013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7960 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7961
6e2bcc98 7962 PR c/35649
2531a1d9
JR
7963 * c-typeck.c (c_common_type): Prefer double_type_node over
7964 other REAL_TYPE types with the same precision.
7965 (convert_arguments): Likewise.
7966
025311c4
GDR
79672013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7968
7969 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7970 (c_initialize_diagnostics): Call a destructor for the early printer.
7971
da6ca2b5
GDR
79722013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7973
7974 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7975 printer initialization.
7976
318cda85 79772013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7978
318cda85
BI
7979 PR c/57490
7980 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7981 check for truth values.
7982 (expand_array_notation_exprs): Added truth values case. Removed an
7983 unwanted else. Added for-loop to walk through subtrees in default
7984 case.
7985
b066401f
GDR
79862013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7987
7988 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7989
fb48aadc
JM
79902013-07-23 Joseph Myers <joseph@codesourcery.com>
7991
7992 * c-parser.c (struct c_generic_association): Fix typo.
7993
433cc7b0
TT
79942013-07-23 Tom Tromey <tromey@redhat.com>
7995 Joseph Myers <joseph@codesourcery.com>
7996
7997 * c-parser.c (struct c_generic_association): New.
7998 (c_generic_association_d): New typedef.
7999 (c_parser_generic_selection): New function.
8000 (c_parser_postfix_expression): Handle RID_GENERIC.
8001
26d40c3d
JM
80022013-07-13 Jason Merrill <jason@redhat.com>
8003
8004 PR c++/57793
8005 * c-decl.c (finish_struct): Check for too-large class.
8006
ecdbd01a 80072013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8008
8009 PR c/57821
8010 * c-typeck.c (set_init_index): When folding, check for index overflow.
8011
1141ed3f
BI
80122013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8013
8014 * c-parser.c (c_parser_array_notation): Removed rejection of array
8015 notations in an array of function pointers.
8016
713b46fa
BI
80172013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8018
8019 * c-array-notation.c (make_triplet_val_inv): New function.
8020 (create_cmp_incr): Likewise.
8021 (create_array_refs): Likewise.
8022 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8023 Also modularized common parts between functions and called the function.
8024 (build_array_notation_expr): Likewise.
8025 (fix_conditional_array_notations_1): Likewise.
8026 (fix_array_notation_expr): Likewise.
8027 (fix_array_notation_call_expr): Likewise.
8028
92f20202
MP
80292013-06-18 Marek Polacek <polacek@redhat.com>
8030
8031 PR c/57630
8032 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8033
73a23b06
BI
80342013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8035
8036 * c-array-notation.c (build_array_notation_expr): Reject array notation
8037 mismatch between LHS and RHS even inside a call_expr. Also, removed
8038 a couple while statements that were dead code.
8039
00b8517d
BI
80402013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8041
8042 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8043 excessive precision expressions in function parameters. Also removed
8044 couple unwanted while statements.
8045
1509bdda
BI
80462013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8047
8048 * c-array-notation.c (expand_array_notation_exprs): Added
8049 ARRAY_NOTATION_REF case.
ab20d992 8050
d60f1706
BI
80512013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8052
8053 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8054 function to c-family/array-notation-common.c.
8055 (is_cilkplus_reduce_builtin): Likewise.
8056 (find_rank): Likewise.
8057 (extract_array_notation_exprs): Likewise.
8058 (replace_array_notations): Likewise.
8059 (find_inv_trees): Likewise.
8060 (replace_inv_trees): Likewise.
8061 (contains_array_notation_expr): Likewise.
8062 (find_correct_array_notation_type): Likewise.
8063 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8064 (struct inv_list): Moved this to c-family/array-notation-common.c.
8065 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 8066
6d6efbb3
BI
80672013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8068
8069 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8070 reduction functions outside the for-loop. Added a check if the fundecl
8071 is non-NULL. Finally, removed an unwanted if-statement, and made the
8072 body unconditional.
8073
25c22937
BI
80742013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8075
8076 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8077 condition of the if-statement matches the rank of else-block and then-
8078 block when array notations are used.
8079 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8080 expression after the entire function body is parsed.
8081 (c_parser_expr_no_commas): Delayed creating array notation expressions
8082 to the end of function parsing.
8083 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8084 whole if-statement instead of just the condition.
ab20d992 8085 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 8086
edd25645
BI
80872013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8088
8089 PR c/57474
8090 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8091 array to NULL_TREE if they are unused. Also added a check for the
8092 field to be NULL before its fields are used in future.
ab20d992 8093
065ce7f1
RO
80942013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8095
8096 PR bootstrap/57450
8097 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8098 (build_array_notation_expr): Likewise.
8099
36536d79
BI
81002013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8101
8102 * c-typeck.c (build_array_ref): Added a check to see if array's
8103 index is greater than one. If true, then emit an error.
8104 (build_function_call_vec): Exclude error reporting and checking
8105 for builtin array-notation functions.
8106 (convert_arguments): Likewise.
8107 (c_finish_return): Added a check for array notations as a return
8108 expression. If true, then emit an error.
8109 (c_finish_loop): Added a check for array notations in a loop
8110 condition. If true then emit an error.
8111 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8112 (build_binary_op): Added a check for array notation expr inside
8113 op1 and op0. If present, we call another function to find correct
8114 type.
8115 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8116 * c-parser.c (c_parser_compound_statement): Check if array
8117 notation code is used in tree, if so, then transform them into
8118 appropriate C code.
8119 (c_parser_expr_no_commas): Check if array notation is used in LHS
8120 or RHS, if so, then build array notation expression instead of
8121 regular modify.
8122 (c_parser_postfix_expression_after_primary): Added a check for
8123 colon(s) after square braces, if so then handle it like an array
8124 notation. Also, break up array notations in unary op if found.
8125 (c_parser_direct_declarator_inner): Added a check for array
8126 notation.
8127 (c_parser_compound_statement): Added a check for array notation in
8128 a stmt. If one is present, then expand array notation expr.
8129 (c_parser_if_statement): Likewise.
8130 (c_parser_switch_statement): Added a check for array notations in
8131 a switch statement's condition. If true, then output an error.
8132 (c_parser_while_statement): Similarly, but for a while.
8133 (c_parser_do_statement): Similarly, but for a do-while.
8134 (c_parser_for_statement): Similarly, but for a for-loop.
8135 (c_parser_unary_expression): Check if array notation is used in a
8136 pre-increment or pre-decrement expression. If true, then expand
8137 them.
8138 (c_parser_array_notation): New function.
8139 * c-array-notation.c: New file.
8140 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 8141
cd192ccc
MS
81422013-05-23 Mike Stump <mikestump@comcast.net>
8143
8144 * c-typeck.c (convert_for_assignment): Handle references to memory
8145 spaces better.
8146
427b248d
JM
81472013-05-16 Jason Merrill <jason@redhat.com>
8148
8149 * Make-lang.in (cc1$(exeext)): Use link mutex.
8150
44d90fe1
PC
81512013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8152
8153 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8154 to simply use OPT_Wpointer_arith.
8155 (build_unary_op): Likewise.
8156
4e7d7b3d
JJ
81572013-04-03 Jakub Jelinek <jakub@redhat.com>
8158
8159 PR c/19449
8160 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8161 argument. If set, or it temporarily for parsing of the first
8162 argument into force_folding_builtin_constant_p.
8163 (c_parser_postfix_expression): Adjust callers.
8164
839b422f
RB
81652013-03-21 Richard Biener <rguenther@suse.de>
8166
8167 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8168 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8169
2ee028f1
MP
81702013-02-12 Marek Polacek <polacek@redhat.com>
8171
8172 PR c/44938
8173 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8174 origtypes to NULL.
8175
8824edff
JJ
81762013-01-24 Jakub Jelinek <jakub@redhat.com>
8177
8178 PR c/56078
8179 * c-typeck.c (set_nonincremental_init_from_string): If
8180 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8181 returned false.
8182 (process_init_element): Likewise.
8183
eadd3d0d
JJ
81842012-12-20 Jakub Jelinek <jakub@redhat.com>
8185
8186 PR c++/55619
8187 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8188 argument, don't call default_function_array_conversion
8189 nor c_fully_fold here.
8190 (c_parser_asm_statement): Adjust callers.
8191 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8192 and outputs here, and call default_function_array_conversion
8193 on inputs that don't need to be addressable.
8194
f8a93a2e
JJ
81952012-12-18 Jakub Jelinek <jakub@redhat.com>
8196
8197 PR c/39464
8198 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8199 warning require that both c_common_unsigned_type as well as
8200 c_common_signed_type is the same for both mvl and mvr types.
8201
9771b263
DN
82022012-11-16 Diego Novillo <dnovillo@google.com>
8203
8204 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8205
8206 * c-common.c: Use new vec API in vec.h.
8207 * c-common.h: Likewise.
8208 * c-gimplify.c: Likewise.
8209 * c-pragma.c: Likewise.
8210 * c-pretty-print.c: Likewise.
8211 * c-pretty-print.h: Likewise.
8212 * c-semantics.c: Likewise.
8213 * c-decl.c: Likewise.
8214 * c-parser.c: Likewise.
8215 * c-tree.h: Likewise.
8216 * c-typeck.c: Likewise.
8217
880661a4
JW
82182012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8219
8220 PR c++/54930
8221 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8222
077d1abe
MLI
82232012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8224
8225 PR c/53066
8226 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8227 shadows a function, unless the variable is a function or a
8228 pointer-to-function.
8229
3a785c97
JJ
82302012-10-12 Jakub Jelinek <jakub@redhat.com>
8231
8232 PR c/54381
8233 * c-parser.c (struct c_tree_loc_pair): Removed.
8234 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8235 add location_t * and tree * arguments, fill in array of 3
8236 sizeof_arg trees and corresponding locs.
8237 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8238 c_parser_expr_list callers.
8239 (c_parser_postfix_expression_after_primary): Likewise. Pass
8240 array of 3 sizeof_arg trees and locs (corresponding to first
8241 3 arguments) to sizeof_pointer_memaccess_warning.
8242
703c8606
LC
82432012-10-09 Lawrence Crowl <crowl@google.com>
8244
8245 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8246 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8247 hash table.
8248
5d9de0d0
PC
82492012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8250
8251 PR c++/54194
8252 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8253 call.
8254
a212e43f
MG
82552012-10-09 Marc Glisse <marc.glisse@inria.fr>
8256
8257 PR c++/54427
8258 * c-typeck.c: Include c-common.h.
8259 (enum stv_conv): Moved to c-common.h.
8260 (scalar_to_vector): Moved to c-common.c.
8261 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8262 * Make-lang.in: c-typeck.c depends on c-common.h.
8263
3b78de56
AC
82642012-10-04 Arnaud Charlet <charlet@adacore.com>
8265
8266 * c-decl.c (c_write_global_declarations): Fix handling of
8267 -fdump-ada-spec*.
8268
78c60e3d
SS
82692012-09-30 Sharad Singhai <singhai@google.com>
8270
8271 * c-decl.c (c_write_global_declarations): Use a different method
8272 to determine if the dump has ben initialized.
8273
9f33203d
JM
82742012-09-14 Joseph Myers <joseph@codesourcery.com>
8275
8276 PR c/54552
8277 * c-typeck.c (c_cast_expr): When casting to a type requiring
8278 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8279 c_fully_fold first.
8280
a27d595d
JM
82812012-09-14 Joseph Myers <joseph@codesourcery.com>
8282
8283 PR c/54103
8284 * c-typeck.c (build_unary_op): Pass original argument of
8285 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8286 any C_MAYBE_CONST_EXPR, if it has integer operands.
8287 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8288 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8289 to c_objc_common_truthvalue_conversion, then remove any
8290 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8291 c_objc_common_truthvalue_conversion not
8292 c_common_truthvalue_conversion.
8293 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8294 call note_integer_operands for arguments with integer operands
8295 that are not integer constants.
8296
9feb29df
JJ
82972012-09-13 Jakub Jelinek <jakub@redhat.com>
8298
8299 PR c/54559
8300 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8301 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8302
d409320c
JJ
83032012-08-31 Jakub Jelinek <jakub@redhat.com>
8304
8305 PR c/54428
8306 * c-convert.c (convert): Don't call fold_convert_loc if
8307 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8308 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8309 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8310
6265d07c
JJ
83112012-08-24 Jakub Jelinek <jakub@redhat.com>
8312
8313 PR c/54355
8314 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8315 for nested and empty_ok arguments in the call to
8316 c_parser_declaration_or_fndef.
8317
1a4049e7
JJ
83182012-08-17 Jakub Jelinek <jakub@redhat.com>
8319
8320 * c-tree.h (c_last_sizeof_arg): Declare.
8321 * c-parser.c (struct c_tree_loc_pair): New type.
8322 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8323 non-NULL.
8324 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8325 (c_parser_postfix_expression_after_primary): Likewise. Call
8326 sizeof_pointer_memaccess_warning if needed.
8327 (sizeof_ptr_memacc_comptypes): New function.
8328 * c-typeck.c (c_last_sizeof_arg): New global variable.
8329 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8330
0229aee9
UB
83312012-07-24 Uros Bizjak <ubizjak@gmail.com>
8332
8333 * c-lang.h (lang_decl): Add variable_size GTY option.
8334
7ee2468b
SB
83352012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8336
8337 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8338 * Make-lang.in: Fix dependencies.
8339
d4a10d0a
SB
83402012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8341
8342 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8343 and add language Makefile hooks.
8344 * config-lang.in: New file.
8345 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8346 add the required "normal" config-lang.in rules.
8347 * c-lang.h: Moved from gcc/ to here.
8348 * c-tree.h: Likewise.
8349 * c-objc-common.c: Likewise.
8350 * c-objc-common.h: Likewise.
8351 * c-typeck.c: Likewise.
8352 * c-convert.c: Likewise.
8353 * c-lang.c: Likewise.
8354 * c-aux-info.c: Likewise.
8355 * c-errors.c: Likewise.
8356 * gccspec.c: Likewise.
8357 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8358 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8359\f
877e3c2a 8360Copyright (C) 2012-2022 Free Software Foundation, Inc.
d4a10d0a
SB
8361
8362Copying and distribution of this file, with or without modification,
8363are permitted in any medium without royalty provided the copyright
8364notice and this notice are preserved.