]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
attribs: fix typedefs in generic code [PR105492]
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
49ace834
GA
12022-05-12 Jakub Jelinek <jakub@redhat.com>
2
3 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
4 if flag_openmp.
5 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
6 in postfix expressions.
7 (c_parser_omp_variable_list): Handle omp_all_memory in depend
8 clause.
9 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
10 keyword in depend clause as null_pointer_node, diagnose invalid
11 uses.
12
bd022ff9
GA
132022-05-09 Martin Liska <mliska@suse.cz>
14
15 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
16 macros.
17 (c_parser_binary_expression): Likewise.
18
a1947c92
GA
192022-05-07 Marek Polacek <polacek@redhat.com>
20
21 PR c++/101833
22 PR c++/47634
23 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
24
405eda0d
GA
252022-04-08 Jakub Jelinek <jakub@redhat.com>
26
27 PR c/105149
28 * c-typeck.cc (c_build_va_arg): Reject function types.
29
a2287813
GA
302022-03-22 Marek Polacek <polacek@redhat.com>
31
32 PR c/82283
33 PR c/84685
34 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
35 (start_init): Set it.
36 (finish_init): Restore constructor_designated.
37 (push_init_level): Set constructor_designated to the value of
38 constructor_designated in the upper constructor_stack.
39
57eeedda
GA
402022-03-12 Thomas Schwinge <thomas@codesourcery.com>
41
42 PR other/65095
43 * c-typeck.cc (handle_omp_array_sections_1)
44 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
45 instead of 'c_omp_map_clause_name'.
46
8cc4f9cd
GA
472022-03-09 Joseph Myers <joseph@codesourcery.com>
48
49 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
50 differently from earlier standards for unprototyped function type
51 compatibility.
52
532022-03-09 Jakub Jelinek <jakub@redhat.com>
54
55 PR c/104711
56 * c-fold.cc (c_fully_fold_internal): Don't emit
57 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
58 * c-typeck.cc (build_binary_op): Likewise.
59
e6533e2e
GA
602022-03-07 Jakub Jelinek <jakub@redhat.com>
61
62 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
63 literal.
64
4bf3bac1
GA
652022-02-23 Richard Biener <rguenther@suse.de>
66
67 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
68 SSA names without definition.
69 (c_parser_gimple_declaration): Handle pointer typed SSA names.
70
0bdb0498
GA
712022-02-17 Jakub Jelinek <jakub@redhat.com>
72
73 PR c/104532
74 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
75 convert_lvalue_to_rvalue and build_indirect_ref instead of
76 build_simple_mem_ref.
77
e8d68f0a
GA
782022-02-11 Richard Biener <rguenther@suse.de>
79
80 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
81 VEC_COND_EXPRs.
82
a645583d
GA
832022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
84
85 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
86 clause.
87 (c_parser_omp_variable_list): Handle array sections.
88 (c_parser_omp_clause_has_device_addr): Added.
89 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
90 case.
91 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
92 OMP_CLAUSE_MASK.
93 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
94 (c_finish_omp_clauses): Handle array sections.
95
3adf509f
GA
962022-02-09 Jakub Jelinek <jakub@redhat.com>
97
98 PR c/104427
99 * c-parser.cc (c_parser_postfix_expression)
100 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
101 instead of build1_loc to build PAREN_EXPR.
102 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
103 * c-fold.cc (c_fully_fold_internal): Likewise.
104
fc829782
GA
1052022-01-17 Martin Liska <mliska@suse.cz>
106
107 * Make-lang.in: Rename .c names to .cc.
108 * c-convert.cc: Likewise.
109 * c-decl.cc (struct lang_identifier): Likewise.
110 (pop_scope): Likewise.
111 (finish_decl): Likewise.
112 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
113 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
114 * c-parser.h (GCC_C_PARSER_H): Likewise.
115 * c-tree.h (c_keyword_starts_typename): Likewise.
116 (finish_declspecs): Likewise.
117 (c_get_alias_set): Likewise.
118 (enum c_oracle_request): Likewise.
119 (tag_exists_p): Likewise.
120 (set_c_expr_source_range): Likewise.
121 * c-typeck.cc (c_common_type): Likewise.
122 (c_finish_omp_clauses): Likewise.
123 * config-lang.in: Likewise.
124
1252022-01-17 Martin Liska <mliska@suse.cz>
126
127 * c-aux-info.c: Moved to...
128 * c-aux-info.cc: ...here.
129 * c-convert.c: Moved to...
130 * c-convert.cc: ...here.
131 * c-decl.c: Moved to...
132 * c-decl.cc: ...here.
133 * c-errors.c: Moved to...
134 * c-errors.cc: ...here.
135 * c-fold.c: Moved to...
136 * c-fold.cc: ...here.
137 * c-lang.c: Moved to...
138 * c-lang.cc: ...here.
139 * c-objc-common.c: Moved to...
140 * c-objc-common.cc: ...here.
141 * c-parser.c: Moved to...
142 * c-parser.cc: ...here.
143 * c-typeck.c: Moved to...
144 * c-typeck.cc: ...here.
145 * gccspec.c: Moved to...
146 * gccspec.cc: ...here.
147 * gimple-parser.c: Moved to...
148 * gimple-parser.cc: ...here.
149
1502022-01-17 Andrew Stubbs <ams@codesourcery.com>
151
152 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
153
617db51d
GA
1542022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
155
156 PR c++/103705
157 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
158 outer node for ARRAY_REFs.
159
62eb5308
GA
1602022-01-01 Jakub Jelinek <jakub@redhat.com>
161
162 PR objc/103639
163 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
164 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
165
2554e2da
GA
1662021-12-17 Marek Polacek <polacek@redhat.com>
167
168 PR c/103649
169 * c-decl.c (c_warn_unused_attributes): Don't warn for
170 attribute_ignored_p.
171 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
172 arguments when the attribute is ignored.
173
9c6586bc
GA
1742021-12-14 Jakub Jelinek <jakub@redhat.com>
175
176 PR c/103587
177 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
178 consume the pragma and silently skip to the pragma eol.
179
c8dcf64b
GA
1802021-12-12 Jonathan Wakely <jwakely@redhat.com>
181
182 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
183 * c-parser.c: Likewise.
184
4b4839e3
GA
1852021-12-09 Jakub Jelinek <jakub@redhat.com>
186
187 PR pch/71934
188 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
189 to resort_data.new_value.
190
641ff219
GA
1912021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
192
193 * c-parser.c (struct omp_dim): New struct type for use inside
194 c_parser_omp_variable_list.
195 (c_parser_omp_variable_list): Allow multiple levels of array and
196 component accesses in array section base-pointer expression.
197 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
198 c_parser_omp_var_list_parens.
199 (c_parser_omp_clause_from): Likewise.
200 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
201 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
202 POINTER_PLUS_EXPR.
203 (c_finish_omp_clauses): Extend allowed ranged of expressions
204 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
205
2062021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
207
208 PR middle-end/92120
209 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
210 call to c_parser_omp_variable_list to 'true'.
211 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
212 array base handling.
213 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
214
c177e806
GA
2152021-11-30 Thomas Schwinge <thomas@codesourcery.com>
216
217 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
218 orphan loop" checking.
219
2202021-11-30 Cesar Philippidis <cesar@codesourcery.com>
221 Thomas Schwinge <thomas@codesourcery.com>
222
223 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
224 OpenACC gang reductions.
225
2262021-11-30 Richard Biener <rguenther@suse.de>
227
228 * gimple-parser.c (c_parser_gimple_postfix_expression):
229 avoid unreachable code after break.
230
87cd82c8
GA
2312021-11-29 Eric Gallager <egallager@gcc.gnu.org>
232
233 PR other/103021
234 * Make-lang.in: Use ETAGS variable in TAGS target.
235
2362021-11-29 Richard Biener <rguenther@suse.de>
237
238 * c-typeck.c (c_tree_equal): Remove unreachable return.
239 * c-parser.c (get_matching_symbol): Likewise.
240
e1d43592
GA
2412021-11-23 Jakub Jelinek <jakub@redhat.com>
242
243 * c-typeck.c (c_clone_omp_udr): Don't initialize
244 id.transform_lang_insert_block.
245
9c077398
GA
2462021-11-19 Martin Sebor <msebor@redhat.com>
247
248 PR c++/33925
249 PR c/102867
250 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
251 code resulting from macro expansion.
252
2532021-11-19 Martin Liska <mliska@suse.cz>
254
255 Revert:
256 2021-11-19 Martin Liska <mliska@suse.cz>
257
258 * c-parser.c (add_debug_begin_stmt): Use option directly.
259
483092d3
GA
2602021-11-18 Matthias Kretz <m.kretz@gsi.de>
261
262 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
263 * c-parser.c (c_parser_postfix_expression): Likewise.
264
2652021-11-18 Martin Liska <mliska@suse.cz>
266
267 * c-parser.c (add_debug_begin_stmt): Use option directly.
268
280d2838
GA
2692021-11-17 Martin Sebor <msebor@redhat.com>
270
271 PR c/101702
272 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
273 bounds before deciding if they're constant.
274
e2b57363
GA
2752021-11-15 Jakub Jelinek <jakub@redhat.com>
276
277 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
278 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
279
b39265d4
GA
2802021-11-11 Jakub Jelinek <jakub@redhat.com>
281
282 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
283 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
284 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
285 OMP_CLAUSE_NUM_TEAMS_EXPR.
286 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
287 combined target teams even lower-bound expression.
288
2892021-11-11 Richard Biener <rguenther@suse.de>
290
291 * gimple-parser.c: Shuffle bitmap.h include.
292
18ae471f
GA
2932021-11-03 Joseph Myers <joseph@codesourcery.com>
294
295 PR c/103031
296 * c-convert.c (c_convert): New function, based on convert.
297 (convert): Make into wrapper of c_convert.
298 (convert_init): New function.
299 * c-typeck.c (enum impl_conv): Add ic_init_const.
300 (convert_for_assignment): Handle ic_init_const like ic_init. Add
301 new argument to convert_and_check call.
302 (digest_init): Pass ic_init_const to convert_for_assignment for
303 initializers required to be constant.
304
b4df2dd3
GA
3052021-11-02 Richard Sandiford <richard.sandiford@arm.com>
306
307 * c-tree.h (c_simulate_record_decl): Declare.
308 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
309 * c-decl.c (c_simulate_record_decl): New function.
310
c2bd5d8a
GA
3112021-10-22 Eric Gallager <egallager@gcc.gnu.org>
312
313 PR other/102663
314 * Make-lang.in: Add dummy c.install-dvi target.
315
93d183a5
GA
3162021-10-15 Richard Biener <rguenther@suse.de>
317
318 PR c/102763
319 * gimple-parser.c
320 (c_parser_gimple_postfix_expression_after_primary): Check
321 for a pointer do be dereferenced by ->.
322
5d5885c9
GA
3232021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
324
325 * c-parser.c (c_finish_omp_declare_variant): Change call from
326 c_omp_check_context_selector to omp_check_context_selector. Change
327 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
328
c9db17b8
GA
3292021-10-09 Jakub Jelinek <jakub@redhat.com>
330
331 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
332 (c_parser_omp_scan_loop_body): Use it.
333 (c_parser_omp_sections_scope): Likewise.
334
50e20ee6
GA
3352021-10-07 Richard Biener <rguenther@suse.de>
336
337 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
338
bb6194e0
GA
3392021-10-05 Richard Biener <rguenther@suse.de>
340
341 PR c/102605
342 * gimple-parser.c (c_parser_gimple_postfix_expression):
343 Accept more address _Literals.
344
da9c5f78
GA
3452021-10-04 Marek Polacek <polacek@redhat.com>
346
347 PR c++/97573
348 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
349
9d116bcc
GA
3502021-10-01 Martin Sebor <msebor@redhat.com>
351
352 PR c/102103
353 * c-typeck.c (maybe_warn_for_null_address): New function.
354 (build_binary_op): Call it.
355
3562021-10-01 Jakub Jelinek <jakub@redhat.com>
357 Richard Biener <rguenther@suse.de>
358
359 PR sanitizer/102515
360 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
361 for division even for SANITIZE_SI_OVERFLOW.
362
3632021-10-01 Jakub Jelinek <jakub@redhat.com>
364
365 * c-parser.c (c_parser_omp_clause_order): Set
366 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
367
fd133479
GA
3682021-09-28 Andrew Pinski <apinski@marvell.com>
369
370 PR c/32122
371 * c-parser.c (c_parser_statement_after_labels): Pass
372 the c_expr instead of the tree to c_finish_goto_ptr.
373 * c-typeck.c (c_finish_goto_ptr): Change the second
374 argument type to c_expr.
375 * c-tree.h (c_finish_goto_ptr): Likewise.
376 Error out if the expression was not of a pointer type.
377
e4777439
GA
3782021-09-22 Jakub Jelinek <jakub@redhat.com>
379
380 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
381 modifiers.
382
cf74e7b5
GA
3832021-09-18 Jakub Jelinek <jakub@redhat.com>
384
385 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
386 and reproducible modifiers.
387 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
388
3892021-09-18 Jakub Jelinek <jakub@redhat.com>
390
391 * c-parser.c (c_parser_omp_clause_default): Handle private and
392 firstprivate arguments, adjust diagnostics on unknown argument.
393
0a4cb439
GA
3942021-09-17 Jakub Jelinek <jakub@redhat.com>
395
396 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
397 is true.
398
a26206ec
GA
3992021-09-10 Jakub Jelinek <jakub@redhat.com>
400
401 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
402 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
403 don't call build_conditional_expr, instead build a COND_EXPR directly.
404 (c_parser_binary_expression): Avoid calling parser_build_binary_op
405 if omp_atomic_lhs even in more cases for >, < or ==.
406 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
407 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
408 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
409 * c-typeck.c (build_binary_op): For flag_openmp only handle
410 MIN_EXPR/MAX_EXPR.
411
b2748138
GA
4122021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
413
414 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
415 directive.
416
e11c6046
GA
4172021-09-01 Iain Sandoe <iain@sandoe.co.uk>
418
419 * c-decl.c (enum deprecated_states): Add unavailable state.
420 (merge_decls): Copy unavailability.
421 (quals_from_declspecs): Handle unavailable case.
422 (start_decl): Amend the logic handling suppression of nested
423 deprecation states to include unavailability.
424 (smallest_type_quals_location): Amend comment.
425 (grokdeclarator): Handle the unavailable deprecation state.
426 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
427 * c-tree.h (struct c_declspecs): Add unavailable_p.
428 * c-typeck.c (build_component_ref): Handle unavailability.
429 (build_external_ref): Likewise.
430
4312021-09-01 Roger Sayle <roger@nextmovesoftware.com>
432 Joseph Myers <joseph@codesourcery.com>
433
434 PR c/79412
435 * c-decl.c (duplicate_decls): On significant mismatches, mark the
436 types of both (non-function) decls as error_mark_node, so that the
437 middle-end can see the code is malformed.
438 (free_attr_access_data): Don't process if the type has been set to
439 error_mark_node.
440
6d51ee43
GA
4412021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
442
443 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
444 and 'ancestor' in 'target device' clauses.
445
38b19c5b
GA
4462021-08-23 Jakub Jelinek <jakub@redhat.com>
447
448 * c-parser.c (c_parser_omp_clause_num_tasks,
449 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
450
5b2876f9
GA
4512021-08-22 Martin Uecker <muecker@gwdg.de>
452
453 PR c/98397
454 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
455 for pointers to arrays with qualifiers.
456 (build_conditional_expr): For C23 don't lose qualifiers for pointers
457 to arrays when the other pointer is a void pointer. Update warnings.
458 (convert_for_assignment): Update warnings for C2X when converting from
459 void* with qualifiers to a pointer to array with the same qualifiers.
460
7c9e1645
GA
4612021-08-20 Jakub Jelinek <jakub@redhat.com>
462
463 * c-parser.c (c_parser_omp_error): New function.
464 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
465
4662021-08-20 Jakub Jelinek <jakub@redhat.com>
467
468 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
469 comma at the end of list.
470 (c_parser_omp_requires): Likewise.
471
b57fba5e
GA
4722021-08-19 Jakub Jelinek <jakub@redhat.com>
473
474 * c-parser.c (c_parser_omp_requires): Don't call
475 c_parser_peek_2nd_token and optionally consume token if current
476 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
477
6e529985
GA
4782021-08-18 Jakub Jelinek <jakub@redhat.com>
479
480 * c-parser.c (c_parser_omp_nothing): New function.
481 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
482
4832021-08-18 Jakub Jelinek <jakub@redhat.com>
484
485 * c-parser.c (c_parser_statement_after_labels): Add restart label
486 near the start of the function. If c_parser_pragma returns false,
487 goto restart.
488 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
489 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
490 return what c_parser_omp_declare returned. Return true instead of
491 false after emitting errors that the directive is not allowed in
492 pragma_stmt context.
493 (c_parser_omp_ordered): Return true instead of
494 false after emitting errors that the directive is not allowed in
495 pragma_stmt context.
496 (c_parser_omp_target_update): Likewise.
497 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
498 Change return type from tree to bool, return false if the
499 directive should be ignored in pragma_stmt contexts.
500 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
501 return their result directly.
502 (c_parser_omp_cancellation_point): Change return type from void to
503 bool, return false if the directive should be ignored in pragma_stmt
504 contexts.
505 (c_parser_omp_declare): Likewise.
506
2d14d64b
GA
5072021-08-17 Jakub Jelinek <jakub@redhat.com>
508
509 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
510 (c_parser_omp_scope): New function.
511 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
512
72be20e2
GA
5132021-08-12 Jakub Jelinek <jakub@redhat.com>
514
515 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
516 (c_parser_omp_clause_filter): New function.
517 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
518 (OMP_MASKED_CLAUSE_MASK): Define.
519 (c_parser_omp_masked): New function.
520 (c_parser_omp_parallel): Handle parallel masked.
521 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
522 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
523
5242021-08-12 Martin Uecker <muecker@gwdg.de>
525
526 PR c/101838
527 PR c/29970
528 * c-typeck.c (c_expr_sizeof_type): Evaluate
529 size expressions for structs of variable size.
530
5312021-08-12 Tobias Burnus <tobias@codesourcery.com>
532
533 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
534 'primary' as alias for 'master'.
535
3ae564ea
GA
5362021-08-10 Martin Uecker <muecker@gwdg.de>
537
538 PR c/29970
539 * c-typeck.c (c_expr_sizeof_expr): Evaluate
540 size expressions for structs of variable size.
541
f92f4778
GA
5422021-08-06 Tamar Christina <tamar.christina@arm.com>
543
544 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
545 * c-tree.h (c_simulate_enum_decl): Likewise.
546
5472021-08-06 Martin Sebor <msebor@redhat.com>
548
549 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
550 vec arguments to by-reference.
551 (c_finish_omp_declare_simd): Same.
552 (c_parser_compound_statement_nostart): Same.
553 (c_parser_for_statement): Same.
554 (c_parser_objc_methodprotolist): Same.
555 (c_parser_oacc_routine): Same.
556 (c_parser_omp_for_loop): Same.
557 (c_parser_omp_declare_simd): Same.
558
419c6c68
GA
5592021-07-21 Thomas Schwinge <thomas@codesourcery.com>
560 Joseph Myers <joseph@codesourcery.com>
561 Cesar Philippidis <cesar@codesourcery.com>
562
563 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
564 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
565 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
566 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
567
92d45509
GA
5682021-07-20 Martin Sebor <msebor@redhat.com>
569
570 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
571 by-const-reference.
572 * c-typeck.c (c_build_function_call_vec): Same.
573
d97d71a1
GA
5742021-07-15 Martin Sebor <msebor@redhat.com>
575
576 PR c/101289
577 PR c/97548
578 * c-decl.c (get_parm_array_spec): Strip nops.
579
6fba0eea
GA
5802021-07-06 Martin Sebor <msebor@redhat.com>
581
582 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
583
7a60a6e8
GA
5842021-07-02 Jakub Jelinek <jakub@redhat.com>
585
586 PR c/101297
587 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
588 appears before a CPP_NAME.
589
90708f87
GA
5902021-06-25 Martin Sebor <msebor@redhat.com>
591
592 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
593 warning_suppressed_p, suppress_warning, and copy_no_warning.
594 (diagnose_mismatched_decls): Same.
595 (duplicate_decls): Same.
596 (grokdeclarator): Same.
597 (finish_function): Same.
598 (c_write_global_declarations_1): Same.
599 * c-fold.c (c_fully_fold_internal): Same.
600 * c-parser.c (c_parser_expr_no_commas): Same.
601 (c_parser_postfix_expression): Same.
602 * c-typeck.c (array_to_pointer_conversion): Same.
603 (function_to_pointer_conversion): Same.
604 (default_function_array_conversion): Same.
605 (convert_lvalue_to_rvalue): Same.
606 (default_conversion): Same.
607 (build_indirect_ref): Same.
608 (build_function_call_vec): Same.
609 (build_atomic_assign): Same.
610 (build_unary_op): Same.
611 (c_finish_return): Same.
612 (emit_side_effect_warnings): Same.
613 (c_finish_stmt_expr): Same.
614 (c_omp_clause_copy_ctor): Same.
615
9aa8327e
GA
6162021-06-24 Jakub Jelinek <jakub@redhat.com>
617
618 PR c/101176
619 * c-parser.c (c_parser_has_attribute_expression): Set source range for
620 the result.
621
6222021-06-24 Jakub Jelinek <jakub@redhat.com>
623
624 PR c/101171
625 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
626 error_mark_node.
627
6282021-06-24 Jakub Jelinek <jakub@redhat.com>
629
630 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
631 C_ORT_OMP for clauses on target construct.
632 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
633 (c_parser_omp_target): For non-combined target add
634 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
635 C_ORT_OMP_TARGET to c_finish_omp_clauses.
636 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
637 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
638 never present on C_ORT_*DECLARE_SIMD.
639 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
640 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
641 corresponding map clauses.
642
2f080224
GA
6432021-06-21 Jakub Jelinek <jakub@redhat.com>
644
645 PR inline-asm/100785
646 * c-typeck.c (c_mark_addressable): Diagnose trying to make
647 bit-fields addressable.
648
ede6c356
GA
6492021-06-15 Robin Dapp <rdapp@linux.ibm.com>
650
651 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
652 similar.
653
8dc48181
GA
6542021-06-14 Tobias Burnus <tobias@codesourcery.com>
655
656 PR c/100913
657 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
658 var in the error case.
659
438aac59
GA
6602021-06-07 Eric Botcazou <ebotcazou@adacore.com>
661
662 PR c/100920
663 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
664 spot built-in functions.
665
7d6987e9
GA
6662021-06-06 Jakub Jelinek <jakub@redhat.com>
667
668 PR c/100902
669 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
670 even when target is combined with other constructs.
671
6722021-06-06 Eric Botcazou <ebotcazou@adacore.com>
673
674 PR c/100920
675 * c-decl.c (finish_struct): Fix thinko in previous change.
676 * c-typeck.c (convert_for_assignment): Do not warn on pointer
677 assignment and initialization for storage order purposes if the
678 RHS is a call to a DECL_IS_MALLOC function.
679
600f90cb
GA
6802021-06-04 Martin Sebor <msebor@redhat.com>
681
682 PR c/100783
683 * c-objc-common.c (print_type): Handle erroneous types.
684
440c8a0a
GA
6852021-06-03 Jakub Jelinek <jakub@redhat.com>
686
687 PR c++/100859
688 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
689 after depend only cases.
690
ee682192
GA
6912021-05-31 Richard Biener <rguenther@suse.de>
692
693 PR c++/88601
694 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
695 * c-parser.c (c_parser_postfix_expression): Likewise.
696
48166757
GA
6972021-05-28 Richard Biener <rguenther@suse.de>
698
699 PR c/100803
700 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
701 invalid if conditions.
702
7032021-05-28 Jakub Jelinek <jakub@redhat.com>
704
705 PR middle-end/99928
706 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
707 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
708 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
709 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
710 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
711 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
712 if present in map_head, map_field_head or map_firstprivate_head
713 bitmaps.
714
7152021-05-28 Tobias Burnus <tobias@codesourcery.com>
716
717 * c-parser.c (c_parser_omp_clause_affinity): New.
718 (c_parser_omp_clause_name, c_parser_omp_variable_list,
719 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
720 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
721 c_finish_omp_clauses): Likewise.
722
01c59ef2
GA
7232021-05-26 Eric Botcazou <ebotcazou@adacore.com>
724
725 PR c/100653
726 * c-decl.c (finish_struct): Warn for a union containing an aggregate
727 field with a differing scalar storage order.
728
2832d51b
GA
7292021-05-21 Jakub Jelinek <jakub@redhat.com>
730
731 PR middle-end/99928
732 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
733 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
734 if a decl is mentioned both in map clause and in such firstprivate
735 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
736
65f32e5d
GA
7372021-05-19 Jakub Jelinek <jakub@redhat.com>
738
739 PR middle-end/99928
740 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
741 master when combined with taskloop.
742 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
743 parallel master when not combined with taskloop.
744
a8daf9a1
GA
7452021-05-18 Richard Biener <rguenther@suse.de>
746
747 PR c/100522
748 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
749 Diagnose calls to non-functions.
750 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
751
a7ffc1ef
GA
7522021-05-17 Richard Biener <rguenther@suse.de>
753
754 PR c/100625
755 * gimple-parser.c (c_parser_gimple_label): Avoid building
756 a GIMPLE label with NULL label decl.
757
f9af11c7
GA
7582021-05-13 Martin Sebor <msebor@redhat.com>
759
760 PR c/100550
761 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
762
0ff3a0f2
GA
7632021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
764
765 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
766 'close'.
767
aa891c56
GA
7682021-05-10 Martin Liska <mliska@suse.cz>
769
770 * c-aux-info.c (affix_data_type): Use startswith
771 function instead of strncmp.
772 * c-typeck.c (build_function_call_vec): Likewise.
773 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
774
62d87a32
GA
7752021-05-07 Eric Botcazou <ebotcazou@adacore.com>
776
777 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
778 on the address of a pointer field in a record with reverse SSO.
779
99e8df7a
GA
7802021-05-04 Tobias Burnus <tobias@codesourcery.com>
781
782 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
783 for || and && reductions.
784
3c8e539d
GA
7852021-04-29 Joseph Myers <joseph@codesourcery.com>
786
787 * c-typeck.c (function_types_compatible_p): For C2X, treat
788 unprototyped function as compatible with non-variadic prototyped
789 function even if some argument types are changed by the default
790 argument promotions.
791
ee351f7f
GA
7922021-04-15 Martin Sebor <msebor@redhat.com>
793
794 PR c/99420
795 PR c/99972
796 * c-decl.c (pushdecl): Always propagate type attribute.
797
7982021-04-15 Richard Sandiford <richard.sandiford@arm.com>
799
800 PR c/98852
801 * c-typeck.c (c_common_type): Do not drop attributes that
802 affect type identity.
803
1d54b138
GA
8042021-04-10 Jakub Jelinek <jakub@redhat.com>
805
806 PR c/99990
807 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
808 error_mark_node.
809
4493b1c1
GA
8102021-03-25 Jakub Jelinek <jakub@redhat.com>
811
812 PR c++/99565
813 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
814 to operand_equal_p.
815
5f256a70
GA
8162021-03-19 Jakub Jelinek <jakub@redhat.com>
817
818 PR c/99588
819 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
820 with modifycode NOP_EXPR produces and mark the _Atomic var as read
821 if found.
822 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
823 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
824 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
825
3c5b6d24
GA
8262021-03-15 Tobias Burnus <tobias@codesourcery.com>
827
828 PR c++/99509
829 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
830 ensure that the varpool node is marked as offloadable.
831
ceae9533
GA
8322021-03-05 Tobias Burnus <tobias@codesourcery.com>
833
834 PR c/99137
835 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
836
4028d01a
GA
8372021-02-24 Martin Sebor <msebor@redhat.com>
838
839 PR middle-end/97172
840 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
841
bf81237e
GA
8422021-02-18 Jakub Jelinek <jakub@redhat.com>
843
844 PR c/99136
845 * c-typeck.c (c_finish_return): Don't wrap retval into
846 EXCESS_PRECISION_EXPR in functions that return void.
847
0c5cdb31
GA
8482021-02-11 Marek Polacek <polacek@redhat.com>
849
850 * c-parser.c (c_parser_if_statement): Use vec_free.
851
a19dd5e6
GA
8522021-02-04 Martin Sebor <msebor@redhat.com>
853
854 PR c/97882
855 * c-decl.c (locate_old_decl): Add type to diagnostic output.
856 (diagnose_mismatched_decls): Same.
857 (start_function): Introduce temporaries for better readability.
858 * c-typeck.c (comptypes_internal): Only consider complete enum
859 types in comparisons with integers.
860
f7884fb1
GA
8612021-02-01 Martin Sebor <msebor@redhat.com>
862
863 PR middle-end/97172
864 * c-decl.c (free_attr_access_data): New function.
865 (c_parse_final_cleanups): Call free_attr_access_data.
866
59cf67d1
GA
8672021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
868
869 * c-parser.c (c_parser_omp_clause_detach): New.
870 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
871 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
872 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
873 clause. Prevent use of detach with mergeable and overriding the
874 data sharing mode of the event handle.
875
2f7f0d32
GA
8762021-01-15 Jakub Jelinek <jakub@redhat.com>
877
878 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
879 unqualified element type and then call c_build_qualified_type on the
880 ARRAY_TYPE.
881
7d187e4f
GA
8822021-01-07 Richard Biener <rguenther@suse.de>
883
884 * gimple-parser.c (c_parser_gimple_compound_statement): Only
885 reallocate loop array if it is too small.
886
eefe499f
GA
8872020-12-16 Martin Uecker <muecker@gwdg.de>
888
889 PR c/98047
890 * c-typeck.c (build_modify_expr): Drop qualifiers.
891
8922020-12-16 Martin Uecker <muecker@gwdg.de>
893
894 PR c/98260
895 * c-parser.c (c_parser_expression): Look into
896 nop expression when marking expressions as read.
897
d52945ce
GA
8982020-12-14 Martin Liska <mliska@suse.cz>
899
900 PR sanitizer/98204
901 * c-typeck.c (pointer_diff): Do not emit a top-level
902 sanitization.
903 (build_binary_op): Likewise.
904
ca2bd949
GA
9052020-12-09 Tobias Burnus <tobias@codesourcery.com>
906
907 * c-parser.c (c_parser_omp_allocate): New.
908 (c_parser_omp_construct): Call it.
909
9102020-12-09 Richard Biener <rguenther@suse.de>
911
912 PR c/98200
913 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
914 early on error.
915
bc8a7013
GA
9162020-12-07 Martin Uecker <muecker@gwdg.de>
917
918 PR c/97981
919 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
920 that drops qualifiers to the end of the function.
921
d48df6f2
GA
9222020-11-26 Martin Uecker <muecker@gwdg.de>
923
924 PR c/65455
925 PR c/92935
926 * c-parser.c (c_parser_declaration_or_fndef): Remove
927 redundant code to drop qualifiers of _Atomic types for __auto_type.
928 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
929 types for __typeof__.
930
1e2c9a27
GA
9312020-11-24 Jakub Jelinek <jakub@redhat.com>
932
933 PR c/97958
934 * c-parser.c (c_parser_binary_expression): For omp atomic binary
935 expressions, use make_node instead of build2 to avoid checking build2
936 performs.
937
8e6198d0
GA
9382020-11-23 Joseph Myers <joseph@codesourcery.com>
939
940 PR c/95630
941 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
942 for comparisons of complete and incomplete pointers.
943
7a97e2fc
GA
9442020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
945
946 * c-aux-info.c (gen_type): Support opaque types.
947
82e5048e
GA
9482020-11-20 Martin Sebor <msebor@redhat.com>
949
950 PR middle-end/97879
951 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
952
9532020-11-20 Jakub Jelinek <jakub@redhat.com>
954
955 PR other/97911
956 * Make-lang.in (c.serial): Change from goal to a variable.
957 (.PHONY): Drop c.serial.
958
9592020-11-20 Martin Uecker <muecker@gwdg.de>
960
961 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
962
d62586ee
GA
9632020-11-19 Jakub Jelinek <jakub@redhat.com>
964
965 PR c/97860
966 * c-decl.c (get_parm_array_spec): Bail out of nelts is
967 error_operand_p.
968
25bb75f8
GA
9692020-11-18 Jakub Jelinek <jakub@redhat.com>
970
971 * Make-lang.in (c.serial): New goal.
972 (.PHONY): Add c.serial c.prev.
973 (cc1$(exeext)): Call LINK_PROGRESS.
974
77f67db2
GA
9752020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
976
977 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
978 goto too.
979 * c-typeck.c (build_asm_expr): Remove an assert checking output
980 absence for asm goto.
981
9822020-11-13 Jakub Jelinek <jakub@redhat.com>
983
984 * c-typeck.c (c_finish_omp_clauses): Don't clear
985 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
986
9872020-11-13 Iain Sandoe <iain@sandoe.co.uk>
988
989 PR objc/77404
990 * c-parser.c (c_parser_objc_class_definition): Pass the
991 location of the class name to the interface declaration.
992
bb622641
GA
9932020-11-10 Strager Neds <strager.nds@gmail.com>
994
995 * c-decl.c (merge_decls): Use new overload of
996 set_decl_section_name.
997
9982020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
999
1000 * c-parser.c (c_parser_omp_target_data): Add use of
1001 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1002 handled map clause kind.
1003 (c_parser_omp_target_enter_data): Likewise.
1004 (c_parser_omp_target_exit_data): Likewise.
1005 (c_parser_omp_target): Likewise.
1006 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1007 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1008 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1009 same struct field access to co-exist on OpenMP construct.
1010
2da7ee05
GA
10112020-11-07 Martin Uecker <muecker@gwdg.de>
1012
1013 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1014 (c_parser_all_labels): Likewise.
1015
44cab2d8
GA
10162020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1017
1018 * c-parser.c (c_parser_objc_at_property_declaration):
1019 Improve parsing fidelity. Associate better location info
1020 with @property attributes. Clean up the interface to
1021 objc_add_property_declaration ().
1022
10232020-11-06 Nathan Sidwell <nathan@acm.org>
1024
1025 * c-decl.c (diagnose_mismatched_decls): Rename
1026 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1027 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1028 (collect_source_refs): Likewise.
1029 * c-typeck.c (inform_declaration, inform_for_arg)
1030 (convert_for_assignment): Likewise.
1031
10322020-11-06 Tobias Burnus <tobias@codesourcery.com>
1033
1034 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1035 OpenACC matching.
1036 (c_parser_omp_construct): Update call.
1037
35c125cb
GA
10382020-11-04 Jakub Jelinek <jakub@redhat.com>
1039
1040 PR c++/97670
1041 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1042 find underlying decl to clear in the aligned_head bitmap.
1043
10442020-11-04 Joseph Myers <joseph@codesourcery.com>
1045
1046 * c-decl.c (handle_nodiscard_attribute): New.
1047 (std_attribute_table): Add nodiscard.
1048 * c-parser.c (c_parser_std_attribute): Expect argument to
1049 nodiscard attribute to be a string. Do not special-case ignoring
1050 nodiscard.
1051 * c-typeck.c (maybe_warn_nodiscard): New.
1052 (build_compound_expr, emit_side_effect_warnings): Call
1053 maybe_warn_nodiscard.
1054 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1055 emit_side_effect_warnings if warn_unused_result.
1056
4f0606fe
GA
10572020-10-29 Asher Gordon <AsDaGo@posteo.net>
1058
1059 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1060 with XDELETE.
1061 (finish_init): Likewise.
1062 (pop_init_level): Likewise.
1063
e93aae4a
GA
10642020-10-28 Joseph Myers <joseph@codesourcery.com>
1065
1066 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1067 error_at for omitted parameter name.
1068
10692020-10-28 Jakub Jelinek <jakub@redhat.com>
1070
1071 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1072 (c_parser_omp_clause_allocate): New function.
1073 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1074 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1075 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1076 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1077 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1078 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1079 PRAGMA_OMP_CLAUSE_ALLOCATE.
1080 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1081
89bb01e7
GA
10822020-10-27 Joseph Myers <joseph@codesourcery.com>
1083
1084 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1085 standard attributes.
1086
efe71fcc
GA
10872020-10-23 Marek Polacek <polacek@redhat.com>
1088
1089 PR c++/91741
1090 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1091 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1092 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1093 * c-tree.h (char_type_p): Declare.
1094 * c-typeck.c (char_type_p): No longer static.
1095
10962020-10-23 Martin Sebor <msebor@redhat.com>
1097
1098 PR middle-end/97552
1099 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1100
2fe5b7d1
GA
11012020-09-19 Martin Sebor <msebor@redhat.com>
1102
1103 PR c/50584
1104 * c-decl.c (lookup_last_decl): Define new function.
1105 (c_decl_attributes): Call it.
1106 (start_decl): Add argument and use it.
1107 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1108 (get_parm_array_spec): Define new function.
1109 (push_parm_decl): Call get_parm_array_spec.
1110 (start_function): Call warn_parm_array_mismatch. Build attribute
1111 access and add it to current function.
1112 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1113 in forms of array parameters.
1114 * c-tree.h (start_decl): Add argument.
1115
11162020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1117
1118 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1119 with...
1120 (in_statement): New.
1121 (start_function): Adjust for above change.
1122 (c_push_function_context, c_pop_function_context): Likewise.
1123 * c-lang.h (struct language_function): Likewise.
1124 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1125 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1126 New.
1127 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1128 (c_parser_switch_statement): Adjust break/switch context handling
1129 and calls to renamed functions.
1130 (c_parser_while_statement): Adjust break/switch context handling and
1131 build a WHILE_STMT.
1132 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1133 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1134 (c_parser_omp_for_loop): Adjust break/switch context handling.
1135 * c-tree.h (c_break_label, c_cont_label): Delete.
1136 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1137 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1138 (in_statement, switch_statement_break_seen_p): Declare.
1139 (c_start_case, c_finish_case): Renamed to...
1140 (c_start_switch, c_finish_switch).
1141 (c_finish_bc_stmt): Adjust arguments.
1142 * c-typeck.c (build_function_call_vec): Don't try to print
1143 statements with %qE format.
1144 (struct c_switch): Rename switch_expr field to switch_stmt.
1145 Add break_stmt_seen_p field.
1146 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1147 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1148 (do_case): Update for changes to struct c_switch.
1149 (c_finish_case): Rename to c_finish_switch. Update for changes to
1150 struct c_switch and change of representation from SWITCH_EXPR to
1151 SWITCH_STMT.
1152 (c_finish_loop): Delete.
1153 (c_finish_bc_stmt): Update to reflect changes to break/continue
1154 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1155 of a GOTO_EXPR except for objc foreach loops.
1156
e1a4a8a0
GA
11572020-09-01 Jakub Jelinek <jakub@redhat.com>
1158
1159 PR c++/96867
1160 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1161 only on PARM_DECLs.
1162
8f7ea26a
GA
11632020-08-28 Martin Sebor <msebor@redhat.com>
1164
1165 PR c/96596
1166 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1167 argument type.
1168
8b394f01
GA
11692020-08-27 Martin Liska <mliska@suse.cz>
1170
1171 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1172 growth function to true.
1173
db0f6efe
GA
11742020-08-25 Tobias Burnus <tobias@codesourcery.com>
1175
1176 PR c/96678
1177 * c-typeck.c (handle_omp_array_sections_1): Talk about
1178 array function parameter in the error message.
1179
5c265693
GA
11802020-08-18 Jakub Jelinek <jakub@redhat.com>
1181
1182 PR c/96571
1183 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1184 to int, holding index of the match. Call mark_exp_read on the selector
1185 expression and on expressions other than the selected one.
1186
4967ca2f
GA
11872020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1188
1189 PR c/96377
1190 * c-typeck.c (process_init_element): Split test for whether to
1191 recurse into a record, union or array into...
1192 (initialize_elementwise_p): ...this new function. Don't recurse
1193 into a vector type if the initialization value is also a vector.
1194
48cc2e46
GA
11952020-07-31 Richard Biener <rguenther@suse.de>
1196
1197 PR debug/96383
1198 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1199 Define to c_common_finalize_early_debug.
1200
3ea9abca
GA
12012020-07-22 Tobias Burnus <tobias@codesourcery.com>
1202
1203 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1204 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1205 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1206
30430061
GA
12072020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1208
1209 PR target/95237
1210 * c-decl.c (finish_decl): Call target hook
1211 lower_local_decl_alignment to lower local decl alignment.
1212
3f8ca9cb
GA
12132020-07-09 Julian Brown <julian@codesourcery.com>
1214 Thomas Schwinge <thomas@codesourcery.com>
1215
1216 PR middle-end/95270
1217 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1218 for standalone attach/detach clauses.
1219
a82c4c4c 12202020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1221
1222 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1223 set, warn for conversion between pointers that point to incompatible
1224 scalar storage orders.
1225
f60ee68d
GA
12262020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1227
1228 * c-parser.c (c_parser_statement_after_labels): Pass correct
1229 parameters to c_parser_do_statement.
1230
56638b9b
GA
12312020-06-16 Jakub Jelinek <jakub@redhat.com>
1232
1233 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1234 c_in_omp_for.
1235 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1236 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1237 c_finish_omp_for.
1238 * c-tree.h (c_in_omp_for): Declare.
1239 * c-typeck.c (c_in_omp_for): Define.
1240 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1241 (digest_init): Likewise.
1242 (build_binary_op): Likewise.
1243
12442020-06-16 Jakub Jelinek <jakub@redhat.com>
1245
1246 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1247 from kind by comma rather than colon.
1248
1a59f3db
GA
12492020-06-05 Mark Wielaard <mark@klomp.org>
1250
1251 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1252 an undeclared builtin, then add a fixit header hint, if found.
1253 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1254 warning_at about implicit builtin declaration type mismatch.
1255
9a5b7438
GA
12562020-06-03 Mark Wielaard <mark@klomp.org>
1257
1258 * c-parser.c (struct c_parser): Add seen_string_literal
1259 bitfield.
1260 (c_parser_consume_token): Reset seen_string_literal.
1261 (c_parser_error_richloc): Add name_hint if seen_string_literal
1262 and next token is a CPP_NAME and we have a missing header
1263 suggestion for the name.
1264 (c_parser_string_literal): Set seen_string_literal.
1265
12662020-06-03 Mark Wielaard <mark@klomp.org>
1267
1268 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1269 scope with matching_parens after CPP_OPEN_PAREN.
1270
12712020-06-03 Tobias Burnus <tobias@codesourcery.com>
1272
1273 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1274
53ffb43a
GA
12752020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1276
1277 * Make-lang.in: Remove extra slash.
1278
8f66f175
ML
12792020-05-19 Martin Liska <mliska@suse.cz>
1280
1281 * c-parser.c: Fix typo.
1282
49ddde69
JJ
12832020-05-14 Jakub Jelinek <jakub@redhat.com>
1284
1285 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1286
eb72dc66
RB
12872020-05-07 Richard Biener <rguenther@suse.de>
1288
1289 PR middle-end/94703
1290 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1291 DECL_GIMPLE_REG_P.
1292
bf915591
JJ
12932020-04-30 Jakub Jelinek <jakub@redhat.com>
1294
1295 PR c/94842
1296 * c-decl.c (set_labels_context_r): In addition to context-less
1297 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1298 parent function if any.
1299 (store_parm_decls): Adjust comment.
1300
e1113ffb
JJ
13012020-04-19 Jakub Jelinek <jakub@redhat.com>
1302
1303 PR objc/94637
1304 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1305 two CPP_COLON tokens.
1306
2e389749
JJ
13072020-04-17 Jakub Jelinek <jakub@redhat.com>
1308
1309 PR other/94629
1310 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1311 to data.clauses.
1312
2dc9294c
JJ
13132020-04-15 Jakub Jelinek <jakub@redhat.com>
1314
1315 PR c/94593
1316 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1317 requires directive when not at file scope.
1318
13e41d8b
TB
13192020-04-08 Tobias Burnus <tobias@codesourcery.com>
1320
1321 PR middle-end/94120
1322 * c-decl.c (c_check_in_current_scope): New function.
1323 * c-tree.h (c_check_in_current_scope): Declare it.
1324 * c-parser.c (c_parser_oacc_declare): Add check that variables
1325 are declared in the same scope as the directive. Fix handling
1326 of namespace vars.
1327
4df50a05
JJ
13282020-04-07 Jakub Jelinek <jakub@redhat.com>
1329
1330 PR c++/94512
1331 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1332 if c_parser_omp_master succeeded.
1333
5db9e893
JJ
13342020-03-23 Jakub Jelinek <jakub@redhat.com>
1335
1336 PR gcov-profile/94029
1337 PR c/94239
1338 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1339 the function_start_locus location. Don't do that afterwards for the
1340 __GIMPLE body parsing.
1341
9def91e9
JJ
13422020-03-19 Jakub Jelinek <jakub@redhat.com>
1343
1344 PR gcov-profile/94029
1345 * c-tree.h (finish_function): Add location_t argument defaulted to
1346 input_location.
1347 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1348 set it to the locus of closing } if non-NULL.
1349 (c_parser_compound_statement_nostart): Return locus of closing }.
1350 (c_parser_parse_rtl_body): Likewise.
1351 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1352 finish_function.
1353 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1354 input_location to set function_end_locus.
1355
046c5890
JJ
13562020-03-17 Jakub Jelinek <jakub@redhat.com>
1357
1358 PR c/94172
1359 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1360 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1361 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1362 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1363 ENUMERAL_TYPEs.
1364 (finish_incomplete_vars): New function, moved from finish_struct. Use
1365 relayout_decl instead of layout_decl.
1366 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1367 being TYPE_VFIELD. Use finish_incomplete_vars.
1368 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1369 finish_incomplete_vars.
1370 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1371 also on ENUMERAL_TYPEs.
1372
c015ff8c
JJ
13732020-03-16 Jakub Jelinek <jakub@redhat.com>
1374
1375 PR c/94179
1376 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1377
f2e9fe5f
MS
13782020-03-13 Martin Sebor <msebor@redhat.com>
1379
1380 PR c/94040
1381 * c-decl.c (builtin_structptr_type_count): New constant.
1382 (match_builtin_function_types): Reject decls that are incompatible
1383 in types pointed to by pointers.
1384 (diagnose_mismatched_decls): Adjust comments.
1385
c9d70946
JM
13862020-03-05 Joseph Myers <joseph@codesourcery.com>
1387
1388 PR c/93577
1389 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1390 empty when initialized type is error_mark_node.
1391 (set_designator, process_init_element): Ignore initializers for
1392 elements of a variable-size type or of error_mark_node.
1393
726e292d
MS
13942020-03-01 Martin Sebor <msebor@redhat.com>
1395
1396 PR middle-end/93926
1397 * c-decl.c (types_close_enough_to_match): New function.
1398 (match_builtin_function_types):
1399 (diagnose_mismatched_decls): Add missing inform call to a warning.
1400
a499c2f8
MS
14012020-03-01 Martin Sebor <msebor@redhat.com>
1402
1403 PR c/93812
1404 * c-typeck.c (build_functype_attribute_variant): New function.
1405 (composite_type): Call it.
1406
9c3da8cc
JJ
14072020-02-25 Jakub Jelinek <jakub@redhat.com>
1408
1409 PR other/93912
1410 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1411 Rename last argument from probablity to probability.
1412
bacdd5e9
JJ
14132020-02-13 Jakub Jelinek <jakub@redhat.com>
1414
1415 PR c/93576
1416 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1417 *expr if it has side effects.
1418
f9eb0973
JL
14192020-01-30 Jeff Law <law@redhat.com>
1420
1421 PR c/88660
1422 * c-parser.c (c_parser_switch_statement): Make sure to request
1423 marking the switch expr as used.
1424
ac68e287
JM
14252020-01-22 Joseph Myers <joseph@codesourcery.com>
1426
1427 PR c/93348
1428 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1429 argument with integer operands.
1430
852f0ae8
KK
14312020-01-16 Kerem Kat <keremkat@gmail.com>
1432
1433 PR c/92833
1434 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1435 to support 4 available tokens.
1436
e2346a33
JM
14372020-01-15 Joseph Myers <joseph@codesourcery.com>
1438
1439 PR c/93072
1440 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1441 determine whether to set DECL_CONTEXT.
1442
3d77686d
JM
14432020-01-13 Joseph Myers <joseph@codesourcery.com>
1444
1445 PR c/93241
1446 * c-typeck.c (build_c_cast): Check for expressions with integer
1447 operands that can occur in an unevaluated part of an integer
1448 constant expression and call note_integer_operands as needed.
1449
f74c4b2c
RB
14502019-01-08 Richard Biener <rguenther@suse.de>
1451
1452 PR middle-end/93199
1453 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1454 permanently.
1455
8d9254fc
JJ
14562020-01-01 Jakub Jelinek <jakub@redhat.com>
1457
1458 Update copyright years.
1459
39292e25
EB
14602019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1461
1462 * c-decl.c (collect_source_ref_cb): Delete.
1463 (for_each_global_decl): Rename into...
1464 (collect_source_refs): ...this. Call collect_source_ref directly.
1465 (c_parse_final_cleanups): Always call collect_source_ref on the main
1466 input filename.
1467
519d7496
JB
14682019-12-19 Julian Brown <julian@codesourcery.com>
1469 Cesar Philippidis <cesar@codesourcery.com>
1470
1471 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1472 detach clauses.
1473 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1474 Allow deref (->) in variable lists if true.
1475 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1476 Pass to c_parser_omp_variable_list.
1477 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1478 call to c_parser_omp_variable_list.
1479 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1480 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1481 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1482 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1483 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1484 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1485 and detach. Support deref.
1486 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1487 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1488 (c_oacc_check_attachments): New function.
1489 (c_finish_omp_clauses): Check attach/detach arguments for being
1490 pointers using above. Support deref.
1491
a6163563
JB
14922019-12-19 Julian Brown <julian@codesourcery.com>
1493 Maciej W. Rozycki <macro@codesourcery.com>
1494 Tobias Burnus <tobias@codesourcery.com>
1495 Thomas Schwinge <thomas@codesourcery.com>
1496
1497 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1498 (c_parser_oacc_data_clause): Likewise.
1499 (c_parser_oacc_all_clauses): Likewise.
1500 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1501 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1502 PRAGMA_OACC_CLAUSE_NO_CREATE.
1503 * c-typeck.c (handle_omp_array_sections): Support
1504 GOMP_MAP_NO_ALLOC.
1505
d68f5d45
DM
15062019-12-09 David Malcolm <dmalcolm@redhat.com>
1507
1508 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1509 Replace label_text ctor calls.
1510
4691bf46
JM
15112019-12-04 Joseph Myers <joseph@codesourcery.com>
1512
1513 PR c/36941
1514 PR c/88827
1515 * c-typeck.c (convert_lvalue_to_rvalue): Call
1516 require_complete_type for arguments not of void types.
1517 (build_indirect_ref): Do not diagnose dereferencing pointers to
1518 incomplete types.
1519 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1520
85d11957
JM
15212019-12-03 Joseph Myers <joseph@codesourcery.com>
1522
1523 PR c/88704
1524 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1525 old-style parameter definitions.
1526
4569f8b3
SL
15272019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1528
1529 PR target/92499
1530
1531 * c-decl.c (flexible_array_type_p): Move to common code.
1532
65ef05d0
RS
15332019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1534
1535 * c-decl.c (start_decl): Allow initialization of variables whose
1536 size is a POLY_INT_CST.
1537 (finish_decl): Use verify_type_context to check whether the target
1538 allows variables with a particular type to have static or thread-local
1539 storage duration. Don't raise a second error if such variables do
1540 not have a constant size.
1541 (grokdeclarator): Use verify_type_context to check whether the
1542 target allows fields or array elements to have a particular type.
1543 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1544 the target allows pointer difference for the types involved.
1545 (build_unary_op): Likewise for pointer increment and decrement.
1546
34b43828
JM
15472019-11-29 Joseph Myers <joseph@codesourcery.com>
1548
1549 * c-parser.c (struct c_parser): Add members raw_tokens and
1550 raw_tokens_used.
1551 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1552 using previously-lexed raw tokens.
1553 (c_parser_peek_nth_token_raw)
1554 (c_parser_check_balanced_raw_token_sequence): New functions.
1555 (c_parser_nth_token_starts_std_attributes): Use
1556 c_parser_check_balanced_raw_token_sequence for Objective-C.
1557
5b8d9367
JM
15582019-11-25 Joseph Myers <joseph@codesourcery.com>
1559
1560 PR c/91985
1561 * c-decl.c (finish_declspecs): Use int instead of decimal
1562 floating-point types if decimal floating-point not supported.
1563
1723e1be
JM
15642019-11-25 Joseph Myers <joseph@codesourcery.com>
1565
1566 * c-tree.h (struct c_declarator): Use a structure for id member.
1567 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1568 declarators at the start, not when handling individual declarators
1569 later. Use u.id.id instead of u.id.
1570 (grokfield): Use u.id.id instead of u.id.
1571 (build_id_declarator): Set u.id.id and u.id.attrs.
1572 (finish_declspecs): Handle postfix attributes in case of typedef
1573 name or typeof used.
1574 * c-parser.c (c_parser_direct_declarator)
1575 (c_parser_direct_declarator_inner): Place declarator for
1576 attributes inside that for function or array, not outside. Set
1577 u.id.attrs for identifiers.
1578 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1579 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1580 instead of u.id.
1581
bdaf8be1
JJ
15822019-11-22 Jakub Jelinek <jakub@redhat.com>
1583
1584 PR c/90677
1585 * c-decl.c (identifier_global_tag): Define.
1586
3e00ba47
RB
15872019-11-20 Richard Biener <rguenther@suse.de>
1588
1589 PR c/92088
1590 * c-decl.c (grokdeclarator): Prevent inlining of nested
1591 function with VLA arguments.
1592
8c5b727a
JM
15932019-11-20 Joseph Myers <joseph@codesourcery.com>
1594
1595 * c-decl.c (c_warn_type_attributes): New function.
1596 (groktypename, grokdeclarator, finish_declspecs): Call
1597 c_warn_type_attributes before applying attributes to types.
1598 * c-tree.h (c_warn_type_attributes): Declare.
1599
192961ff
JM
16002019-11-19 Joseph Myers <joseph@codesourcery.com>
1601
1602 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1603 standard attributes.
1604 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1605 pedwarn for unknown standard attributes and return error_mark_node
1606 for them.
1607
20a38017
MM
16082019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1609
1610 * c-parser.c (c_parser_parse_rtl_body): Always call
1611 run_rtl_passes, even if startwith pass is not provided.
1612
d5fbe5e0
JM
16132019-11-15 Joseph Myers <joseph@codesourcery.com>
1614
1615 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1616 duplicate standard attributes.
1617
97cc1187
JM
16182019-11-15 Joseph Myers <joseph@codesourcery.com>
1619
1620 * c-decl.c (std_attribute_table): Add maybe_unused.
1621
f8aea5e3
JM
16222019-11-15 Joseph Myers <joseph@codesourcery.com>
1623
1624 * c-decl.c (std_attribute_table): Add fallthrough.
1625 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1626 attribute at top level.
1627
2cc94aa8
JM
16282019-11-15 Joseph Myers <joseph@codesourcery.com>
1629
1630 * c-decl.c (std_attribute_table): New.
1631 (c_init_decl_processing): Register attributes from
1632 std_attribute_table.
1633 * c-parser.c (c_parser_attribute_arguments): Add arguments
1634 require_string and allow_empty_args. All callers changed.
1635 (c_parser_std_attribute): Set require_string argument for
1636 "deprecated" attribute.
1637
7c5890cc
JM
16382019-11-14 Joseph Myers <joseph@codesourcery.com>
1639
1640 * c-parser.c (c_parser_postfix_expression)
1641 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1642 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1643
e8738f4e
RS
16442019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1645
1646 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1647 of build_same_sized_truth_vector_type.
1648 (build_vec_cmp): Likewise.
1649
b2417b59
JJ
16502019-11-14 Jakub Jelinek <jakub@redhat.com>
1651
bedb7f04
JJ
1652 * c-parser.c (c_parser_omp_context_selector): Don't require score
1653 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1654 negative score.
1655
b2417b59
JJ
1656 * c-parser.c (c_parser_omp_context_selector): Rename
1657 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1658 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1659 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1660 and string literals.
1661
4e03c3a7
JM
16622019-11-14 Joseph Myers <joseph@codesourcery.com>
1663
1664 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1665 ctsk_tagfirstref_attrs.
1666 (struct c_declspecs): Update description of attrs. Add
1667 postfix_attrs and non_std_attrs_seen_p. Increase size of
1668 typespec_kind bit-field.
1669 (c_warn_unused_attributes): New declaration.
1670 (parser_xref_tag): Update prototype.
1671 * c-decl.c (c_warn_unused_attributes): New function.
1672 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1673 ctsk_tagref_attrs. Handle attribute declarations.
1674 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1675 (grokdeclarator): Handle standard attributes.
1676 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1677 attributes to incomplete type reference.
1678 (xref_tag): Update call to parser_xref_tag.
1679 (declspecs_add_addrspace, declspecs_add_type)
1680 (declspecs_add_scspec, declspecs_add_attrs): Set
1681 non_std_attrs_seen_p.
1682 (finish_declspecs): Apply postfix standard attributes to type.
1683 * c-parser.c (c_token_starts_declspecs)
1684 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1685 (c_parser_next_tokens_start_declaration): Update comments.
1686 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1687 parser->tokens[2] to parser->tokens[1].
1688 (c_parser_nth_token_starts_std_attributes)
1689 (c_parser_std_attribute_specifier_sequence): New functions.
1690 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1691 attrs. All callers changed. Handle standard attributes.
1692 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1693 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1694 All callers changed.
1695 (c_parser_declspecs): Add arguments start_std_attr_ok and
1696 end_std_attr_ok. All callers changed. Handle standard
1697 attributes.
1698 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1699 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1700 (c_parser_compound_statement_nostart, c_parser_all_labels)
1701 (c_parser_label, c_parser_statement, c_parser_for_statement):
1702 Handle standard attributes.
1703 * c-parser.h (c_parser_declspecs): Update prototype.
1704 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1705 c_parser_declspecs.
1706
0c29cac4
ML
17072019-11-12 Martin Liska <mliska@suse.cz>
1708
1709 * gimple-parser.c: Do not include params.h.
1710
028d4092
ML
17112019-11-12 Martin Liska <mliska@suse.cz>
1712
1713 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1714 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1715 macro.
1716
62aee289
MR
17172019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1718 Frederik Harwath <frederik@codesourcery.com>
1719
1720 gcc/c/
1721 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1722 (c_parser_oacc_kernels_parallel): Rename function to...
1723 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1724 (c_parser_omp_construct): Update accordingly.
1725
1726
7cec9588
JJ
17272019-11-11 Jakub Jelinek <jakub@redhat.com>
1728
1729 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1730 without corresponding end declare target.
1731
f486280c
RS
17322019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1733
1734 * c-convert.c (convert): Only handle vector conversions if one of
1735 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1736 allows it.
1737 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1738 vectors satisfy gnu_vector_type_p.
1739 (build_unary_op): Only allow unary operators to be applied to
1740 vectors if they satisfy gnu_vector_type_p.
1741 (digest_init): Only allow by-element initialization of vectors
1742 if they satisfy gnu_vector_type_p.
1743 (really_start_incremental_init): Likewise.
1744 (push_init_level): Likewise.
1745 (pop_init_level): Likewise.
1746 (process_init_element): Likewise.
1747 (build_binary_op): Only allow binary operators to be applied to
1748 vectors if they satisfy gnu_vector_type_p.
1749
017c6491
JM
17502019-11-08 Joseph Myers <joseph@codesourcery.com>
1751
1752 * c-decl.c (grokparms): Convert () in a function definition to
1753 (void) for C2x.
1754 (store_parm_decls_oldstyle): Pedwarn for C2x.
1755 (store_parm_decls): Update comment about () not generating a
1756 prototype.
1757
c01bd174
JM
17582019-11-07 Joseph Myers <joseph@codesourcery.com>
1759
1760 * c-parser.c (c_parser_attribute_arguments): New function.
1761 Factored out of c_parser_gnu_attribute.
1762 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1763 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1764 (c_parser_std_attribute_specifier): New functions.
1765 (c_parser_transaction_attributes): Use
1766 c_parser_std_attribute_specifier.
1767
471c5330
JM
17682019-11-07 Joseph Myers <joseph@codesourcery.com>
1769
1770 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1771 lex_joined_string and translate_strings_p.
1772 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1773 c_lex_with_flags.
1774 (c_parser_string_literal): New function.
1775 (c_parser_static_assert_declaration_no_semi): Use
1776 c_parser_string_literal. Do not set lex_untranslated_string.
1777 (c_parser_asm_string_literal): Use c_parser_string_literal.
1778 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1779 (c_parser_gnu_attributes): Set and restore translate_strings_p
1780 instead of lex_untranslated_string.
1781 (c_parser_asm_statement): Do not set lex_untranslated_string.
1782 (c_parser_asm_operands): Likewise.
1783 (c_parser_has_attribute_expression): Set and restore
1784 translate_strings_p instead of lex_untranslated_string.
1785 (c_parser_postfix_expression): Use c_parser_string_literal.
1786 (pragma_lex): Likewise.
1787 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1788 (c_parse_file): Set translate_strings_p.
1789 * gimple-parser.c (c_parser_gimple_postfix_expression)
1790 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1791 * c-parser.c (c_parser_string_literal): Declare function.
1792
d0c464d2
JJ
17932019-11-02 Jakub Jelinek <jakub@redhat.com>
1794
1795 * c-parser.c (c_finish_omp_declare_variant): Use
1796 omp_get_context_selector instead of c_omp_get_context_selector.
1797
ac2cfa6c
RS
17982019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1799
1800 * c-tree.h (c_simulate_enum_decl): Declare.
1801 * c-decl.c (c_simulate_enum_decl): New function.
1802 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1803
74078538
RS
18042019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1805
1806 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1807 * c-decl.c (c_simulate_builtin_function_decl): New function.
1808 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1809 to the above.
1810
ad1539d5
MS
18112019-10-28 Martin Sebor <msebor@redhat.com>
1812
1813 PR c/66970
1814 * c-decl.c (names_builtin_p): Define a new function.
1815
cb73e4e7
RB
18162019-10-28 Richard Biener <rguenther@suse.de>
1817
1818 PR c/92249
1819 * gimple-parser.c (c_parser_parse_gimple_body): Make
1820 current_bb the entry block initially to easier recover
1821 from errors.
1822 (c_parser_gimple_compound_statement): Adjust.
1823
135df52c
JJ
18242019-10-24 Jakub Jelinek <jakub@redhat.com>
1825
1826 * c-parser.c (c_finish_omp_declare_variant): Use
1827 omp_context_selector_matches instead of
1828 c_omp_context_selector_matches.
1829 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1830 attribute in between declare target and end declare target
1831 pragmas.
1832
783bfe5e
JM
18332019-10-15 Joseph Myers <joseph@codesourcery.com>
1834
1835 * c-parser.c (c_parser_attribute_any_word): Rename to
1836 c_parser_gnu_attribute_any_word. All callers changed.
1837 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1838 callers changed.
1839 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1840 callers changed.
1841 (c_parser_declaration_or_fndef, c_parser_declspecs)
1842 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1843 (c_parser_struct_declaration, c_parser_declarator)
1844 (c_parser_gnu_attribute, c_parser_compound_statement)
1845 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1846 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1847 attribute-related syntax productions.
1848
56898e43
RS
18492019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1850
1851 * c-objc-common.c (useful_aka_type_p): Replace with...
1852 (get_aka_type): ...this new function. Given the original type,
1853 decide which aka type to print (if any). Only look through typedefs
1854 if user_facing_original_type_p.
1855 (print_type): Update accordingly.
1856
b9424661
JJ
18572019-10-14 Jakub Jelinek <jakub@redhat.com>
1858
1859 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1860 into int NESTED, if it is 2, diagnose missing commas in between
1861 clauses.
1862 (c_parser_omp_context_selector): Pass 2 as last argument to
1863 c_parser_omp_all_clauses.
1864
20de9568
JJ
18652019-10-12 Jakub Jelinek <jakub@redhat.com>
1866
1867 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1868 For simd properties, put them directly into TREE_VALUE.
1869 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1870 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1871 add "omp declare variant base" attribute rather than
1872 "omp declare variant".
1873
fe2bc27c
JM
18742019-10-11 Joseph Myers <joseph@codesourcery.com>
1875
1876 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1877
94e7f906
JJ
18782019-10-10 Jakub Jelinek <jakub@redhat.com>
1879
1880 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1881 true, terminate processing on closing paren and don't skip to end of
1882 pragma line.
1883 (c_parser_omp_declare_simd): Handle also declare variant.
1884 (omp_construct_selectors, omp_device_selectors,
1885 omp_implementation_selectors, omp_user_selectors): New variables.
1886 (c_parser_omp_context_selector,
1887 c_parser_omp_context_selector_specification,
1888 c_finish_omp_declare_variant): New functions.
1889 (c_finish_omp_declare_simd): Handle both declare simd and
1890 declare variant.
1891 (c_parser_omp_declare): Handle declare variant.
1892
93313b94
JM
18932019-10-02 Joseph Myers <joseph@codesourcery.com>
1894
1895 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1896 CPP_COLON tokens.
1897
55879815
RS
18982019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1899
1900 * c-objc-common.c (useful_aka_type_p): New function.
1901 (print_type): Use it to decide whether an aka type is worth printing.
1902
59bc434a
JJ
19032019-09-27 Jakub Jelinek <jakub@redhat.com>
1904
1905 PR c++/88203
1906 * c-parser.c (c_parser_predefined_identifier): New function.
1907 (c_parser_postfix_expression): Use it.
1908 (c_parser_omp_variable_list): Parse predefined identifiers.
1909 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1910 in shared and firstprivate clauses, even when they are predetermined
1911 shared.
1912
c6447c20
RS
19132019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1914
1915 * c-typeck.c (build_function_call_vec): Take the original function
1916 decl as an optional final parameter. Pass all built-in calls to
1917 check_builtin_function_arguments.
1918
522da4c2
EB
19192019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1920
1921 PR c/91815
1922 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1923 of identifiers in the external scope only for variables and functions.
1924
68e2c199
PK
19252019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1926
1927 PR c/78736
1928 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1929
22f8849d
IS
19302019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1931
1932 PR pch/61250
1933 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1934 after determining that the first token is not
1935 PRAGMA_GCC_PCH_PREPROCESS.
1936
db376f45
EB
19372019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1938
1939 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1940 FUNCTION_DECL to the right value in the presence of nested declarators.
1941
4d732405
RS
19422019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1943
1944 PR middle-end/91421
1945 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1946
cb1180d5
RS
19472019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1948
1949 PR middle-end/91421
1950 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1951 of a built_in_function.
1952 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1953
77eb117f
JJ
19542019-08-10 Jakub Jelinek <jakub@redhat.com>
1955
1956 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1957 (c_parser_omp_clause_device_type): New function.
1958 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1959 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1960 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1961 diagnostics for declare target with clauses nested in clause-less
1962 declare target declaration-definition-seq.
1963 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1964
2c3b8bad
JJ
19652019-08-09 Jakub Jelinek <jakub@redhat.com>
1966
bb522e2e
JJ
1967 * c-parser.c (check_no_duplicate_clause): Simplify using
1968 omp_find_clause.
1969 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1970 directive name modifiers.
1971 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1972
2c3b8bad
JJ
1973 PR c/91401
1974 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1975 check_no_duplicate_clause call. Comment it out, instead emit a
1976 warning for duplicate dist_schedule clauses.
1977
99769e7f
RS
19782019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1979
1980 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1981
8860d270
JJ
19822019-08-08 Jakub Jelinek <jakub@redhat.com>
1983
1984 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1985 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1986 instead of generic_head to track duplicates.
1987
398e3feb
JJ
19882019-08-07 Jakub Jelinek <jakub@redhat.com>
1989
1990 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1991 (c_parser_omp_clause_use_device_addr): New function.
1992 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1993 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1994 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1995 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1996 map or use_device_* clauses.
1997 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1998 in OpenMP, require pointer type rather than pointer or array type.
1999 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2000
a28351e7
JJ
20012019-07-31 Jakub Jelinek <jakub@redhat.com>
2002
2003 PR c/91192
2004 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2005 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2006 case.
2007
6343b6bf
ML
20082019-07-25 Martin Liska <mliska@suse.cz>
2009 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2010
2011 PR c++/23383
2012 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2013
cb50701e
ML
20142019-07-25 Martin Liska <mliska@suse.cz>
2015
2016 * c-decl.c (merge_decls): Use new macros
2017 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2018
62e3e66f
RB
20192019-07-23 Richard Biener <rguenther@suse.de>
2020
2021 PR tree-optimization/83518
2022 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2023 a CFG also rebuild cgraph edges.
2024
554a530f
JJ
20252019-07-20 Jakub Jelinek <jakub@redhat.com>
2026
2027 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2028 (c_parser_omp_clause_bind): New function.
2029 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2030 (OMP_LOOP_CLAUSE_MASK): Define.
2031 (c_parser_omp_loop): New function.
2032 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2033 loop combined with parallel or teams.
2034 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2035 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2036
d119bf79
RS
20372019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2038
2039 PR c/53633
2040 * c-decl.c (finish_function): Check targetm.warn_func_return
2041 before issuing a -Wreturn-type warning.
2042
ab20d992 20432019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
2044
2045 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2046 (c_parser_compound_statement): Call it.
2047
1fdd6f04
JJ
20482019-07-12 Jakub Jelinek <jakub@redhat.com>
2049
2050 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2051 (c_parser_omp_clause_order): New function.
2052 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2053 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2054 PRAGMA_OMP_CLAUSE_ORDER.
2055 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2056
8389386c
RB
20572019-07-10 Richard Biener <rguenther@suse.de>
2058
2059 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2060 _Literal (int *) &x for address literals.
2061
99b1c316
MS
20622019-07-09 Martin Sebor <msebor@redhat.com>
2063
2064 PR c++/61339
2065 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2066 to class.
2067 (field_decl_cmp): Same.
2068 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2069 * c-tree.h: Same.
2070 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2071
6c1dae73
MS
20722019-07-09 Martin Sebor <msebor@redhat.com>
2073
2074 PR c++/61339
2075 * c-decl.c: Change class-key from class to struct and vice versa
2076 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2077 * gimple-parser.c: Same.
2078
69b5279e
RB
20792019-07-01 Richard Biener <rguenther@suse.de>
2080
2081 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2082 _Literal (char *) &"foo" for address literals pointing to
2083 STRING_CSTs.
2084
ab20d992
JJ
20852019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2086
2087 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2088 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2089 C incompatibility if alternate "__intN__" form is used.
2090
1e3d475e
MS
20912019-06-24 Martin Sebor <msebor@redhat.com>
2092
2093 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2094
bf38f7e9
JJ
20952019-06-10 Jakub Jelinek <jakub@redhat.com>
2096
2097 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2098 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2099 (c_parser_omp_scan_loop_body): New function.
2100 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2101 inscan reduction clauses.
2102 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2103 non-inscan reductions on the same construct, or inscan reductions with
2104 ordered or schedule clauses, or inscan array reductions.
2105
65985d78
MS
21062019-06-05 Martin Sebor <msebor@redhat.com>
2107
2108 PR c/90737
2109 * c-typeck.c (c_finish_return): Only consider functions returning
2110 pointers as candidates for -Wreturn-local-addr.
2111
0ecf545c
MS
21122019-06-05 Martin Sebor <msebor@redhat.com>
2113
2114 * c-decl.c (start_decl): Adjust quoting and hyphenation
2115 in diagnostics.
2116 (finish_decl): Same.
2117 (finish_enum): Same.
2118 (start_function): Same.
2119 (declspecs_add_type): Same.
2120 * c-parser.c (warn_for_abs): Same.
2121 * c-typeck.c (build_binary_op): Same.
2122
e03436e7
TS
21232019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2124
b48f44bf
TS
2125 PR c/89433
2126 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2127 marked with an OpenACC 'routine' directive.
2128
5bf04509
TS
2129 PR c/89433
2130 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2131 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2132
e03436e7
TS
2133 PR c/89433
2134 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2135 clauses from "omp declare target" attribute.
2136
a9c697b8
MS
21372019-05-16 Martin Sebor <msebor@redhat.com>
2138
ab20d992
JJ
2139 * c-decl.c (start_decl): Quote keywords, operators, and
2140 types in diagnostics.
2141 (finish_decl): Same.
2142 * c-parser.c (c_parser_asm_statement): Same.
2143 (c_parser_conditional_expression): Same.
2144 (c_parser_transaction_cancel): Same.
2145 * c-typeck.c (c_common_type): Same.
2146 (build_conditional_expr): Same.
2147 (digest_init): Same.
2148 (process_init_element): Same.
2149 (build_binary_op): Same.
a9c697b8 2150
c4499192
RB
21512019-05-17 Richard Biener <rguenther@suse.de>
2152
2153 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2154 (c_parser_gimple_unary_expression): Likewise.
2155 (c_parser_gimple_parentized_ternary_expression): New function.
2156
adfe6e4b
RB
21572019-05-16 Richard Biener <rguenther@suse.de>
2158
2159 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2160 (c_parser_gimple_unary_expression): Likewise.
2161
186dabf2
RB
21622019-05-15 Richard Biener <rguenther@suse.de>
2163
2164 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2165 __BIT_FIELD_REF.
2166
1158c5b4
RB
21672019-05-14 Richard Biener <rguenther@suse.de>
2168
2169 * gimple-parser.c (c_parser_gimple_statement): Remove
2170 questionable auto-promotion to VIEW_CONVERT_EXPR.
2171 (c_parser_gimple_typespec): Split out from __MEM parsing.
2172 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2173 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2174 as __VIEW_CONVERT with -gimple.
2175
fd4485aa
ML
21762019-05-09 Martin Liska <mliska@suse.cz>
2177
2178 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2179 __MAX.
2180 (c_parser_gimple_unary_expression): Parse also binary expression
2181 __MIN and __MAX.
2182 (c_parser_gimple_parentized_binary_expression): New function.
2183
d276406a
ML
21842019-05-09 Martin Liska <mliska@suse.cz>
2185
2186 * gimple-parser.c (struct gimple_parser): Add probability.
2187 for gimple_parser_edge.
2188 (gimple_parser::push_edge): Add new argument probability.
2189 (c_parser_gimple_parse_bb_spec): Parse also probability
2190 if present.
2191 (c_parser_parse_gimple_body): Set edge probability.
2192 (c_parser_gimple_compound_statement): Consume token
2193 before calling c_parser_gimple_goto_stmt.
2194 Parse BB counts.
2195 (c_parser_gimple_statement): Pass new argument.
2196 (c_parser_gimple_goto_stmt): Likewise.
2197 (c_parser_gimple_if_stmt): Likewise.
2198 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2199 * c-parser.c (c_parser_declaration_or_fndef): Pass
2200 hot_bb_threshold argument.
2201 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2202 field.
2203 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2204
f179b64e
JJ
22052019-04-26 Jakub Jelinek <jakub@redhat.com>
2206
2207 PR debug/90197
2208 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2209 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2210 (c_parser_do_statement): Likewise.
2211 (c_parser_for_statement): Likewise. Formatting fixes.
2212 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2213 emit DEBUG_BEGIN_STMTs if needed.
2214
e7178413
JJ
22152019-04-19 Jakub Jelinek <jakub@redhat.com>
2216
c280b7ee
JJ
2217 PR c/89888
2218 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2219 (c_start_case): Don't clear it.
2220 (do_case): Adjust c_add_case_label caller.
2221 (c_finish_case): Adjust c_do_switch_warnings caller.
2222
e7178413
JJ
2223 PR c++/90108
2224 * c-decl.c (merge_decls): If remove is main variant and
2225 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2226 variant that has newdecl as TYPE_NAME if any.
2227
60a2c645
JJ
22282019-04-12 Jakub Jelinek <jakub@redhat.com>
2229
2230 PR c/89933
2231 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2232 don't try to remove it from the variant list, but instead assert
2233 it has no variants.
2234
2a82beaa
RB
22352019-04-01 Richard Biener <rguenther@suse.de>
2236
2237 PR c/71598
2238 * c-tree.h (c_get_alias_set): Declare.
2239 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2240 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2241 as the underlying integer type.
2242
bec1da64
MS
22432019-03-19 Martin Sebor <msebor@redhat.com>
2244
2245 PR tree-optimization/89688
2246 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2247 kinds of initializers.
2248
855cd9b1
JJ
22492019-03-19 Jakub Jelinek <jakub@redhat.com>
2250
2251 PR c/89734
2252 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2253 return type even if quals_used is 0. Formatting fixes.
2254
baa09dc5
RB
22552019-03-14 Richard Biener <rguenther@suse.de>
2256
2257 * c-tree.h (enum c_declspec_il): New.
2258 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2259 enum bitfield.
2260 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2261 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2262 (c_parser_declspecs): Adjust.
2263 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2264 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2265 and bitmap.h.
2266 (struct gimple_parser): New.
2267 (gimple_parser::push_edge): New method.
2268 (c_parser_gimple_parse_bb_spec): New helper.
2269 (c_parser_parse_gimple_body): Get start pass and IL specification.
2270 Initialize SSA and CFG.
2271 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2272 Build a gimple_parser parsing state and pass it along.
2273 (c_parser_gimple_statement): Change intermittend __PHI internal
2274 function argument for the edge.
2275 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2276 (c_parser_gimple_goto_stmt): Record edges to build.
2277 (c_parser_gimple_if_stmt): Likewise.
2278 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2279 (c_parser_gimple_or_rtl_pass_list): Likewise.
2280
a3f9f006
ML
22812019-03-11 Martin Liska <mliska@suse.cz>
2282
2283 * c-decl.c (check_for_loop_decls): Wrap an option name
2284 in a string format message and fix GNU coding style.
2285 * c-parser.c (c_parser_declspecs): Likewise.
2286
1db01ff9
JJ
22872019-03-08 Jakub Jelinek <jakub@redhat.com>
2288
2289 PR tree-optimization/89550
2290 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2291 returned true.
2292 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2293 or warning returned true.
2294
66dcb747
JJ
22952019-02-28 Jakub Jelinek <jakub@redhat.com>
2296
2297 PR c/89525
2298 * c-typeck.c (convert_arguments): Call inform_declaration only if
2299 the previous warning_at call returned true.
2300
2263c9f2
TS
23012019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2302
2303 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2304 parameter. Adjust all users.
2305 (c_parser_oacc_simple_clause): Replace parser with loc formal
2306 parameter. Adjust all users.
2307
ab20d992 23082019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2309
2310 PR c/87924
2311 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2312 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2313
5f88ba10
JJ
23142019-02-15 Jakub Jelinek <jakub@redhat.com>
2315
2316 PR c/89340
2317 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2318 before c_decl_attributes rather than after it.
2319
cfc30fd1
JJ
23202019-02-06 Jakub Jelinek <jakub@redhat.com>
2321
2322 PR c/89211
2323 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2324 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2325 instead of 3 nested ifs.
2326
fbe83e6b
JM
23272019-02-06 Joseph Myers <joseph@codesourcery.com>
2328
2329 PR c/88584
2330 * c-decl.c (finish_decl): Do not complete array types for arrays
2331 with external linkage not at file scope.
2332
f461f938
RB
23332019-02-05 Richard Biener <rguenther@suse.de>
2334
2335 PR c/88606
2336 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2337 all type variants when not supported.
2338
fe509359
JJ
23392019-01-30 Jakub Jelinek <jakub@redhat.com>
2340
2341 PR c/89061
2342 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2343 * c-decl.c (decl_jump_unsafe): Return false for
2344 C_DECL_COMPOUND_LITERAL_P decls.
2345 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2346
6a335b96
JJ
23472019-01-29 Jakub Jelinek <jakub@redhat.com>
2348
f4b7e754
JJ
2349 PR c/89045
2350 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2351 scope.
2352
6a335b96
JJ
2353 PR c/86125
2354 * c-decl.c (last_fileptr_type): Remove.
2355 (last_structptr_types): New variable.
2356 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2357 {old,new}rettype instead of the types themselves. Assert
2358 last_structptr_types array has the same number of elements
2359 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2360 argument oldtype and newtype. Instead of handling
2361 just fileptr_type_node specially, handle all builtin_structptr_types
2362 pointer nodes. Formatting fix.
2363
d8b5a1a0
MS
23642019-01-24 Martin Sebor <msebor@redhat.com>
2365
2366 PR c/86125
2367 PR c/88886
2368 PR middle-end/86308
2369 * c-decl.c (match_builtin_function_types): Add arguments.
2370 (diagnose_mismatched_decls): Diagnose mismatched declarations
2371 of built-ins more strictly.
2372
e21c4491
JJ
23732019-01-24 Jakub Jelinek <jakub@redhat.com>
2374
2375 PR c++/88976
2376 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2377 on #pragma omp cancel with different modifiers.
2378
420183d9
L
23792019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2380
2381 PR c/51628
2382 PR c/88664
2383 * c-typeck.c (convert_for_assignment): Upate the
2384 warn_for_address_or_pointer_of_packed_member call.
2385
17ad43dd
TH
23862019-01-16 Tom Honermann <tom@honermann.net>
2387 Jason Merrill <jason@redhat.com>
2388
2389 * c-typeck.c (digest_init): Revised the error message produced for
2390 ill-formed cases of array initialization with a string literal.
2391 (error_init): Make variadic.
2392
5f07d78a
JJ
23932019-01-12 Jakub Jelinek <jakub@redhat.com>
2394
2395 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2396
c4581bbf
JJ
23972019-01-07 Jakub Jelinek <jakub@redhat.com>
2398
2399 PR c/88701
2400 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2401 if current_function_decl is non-NULL.
2402
65c5b1eb
JM
24032019-01-07 Joseph Myers <joseph@codesourcery.com>
2404
2405 PR c/88720
2406 PR c/88726
2407 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2408 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2409 functions declared but never defined only for external scope, not
2410 for other scopes.
2411
d8fcab68
JJ
24122019-01-07 Jakub Jelinek <jakub@redhat.com>
2413
2414 PR c++/85052
2415 * c-parser.c (c_parser_postfix_expression): Parse
2416 __builtin_convertvector.
2417
a5544970
JJ
24182019-01-01 Jakub Jelinek <jakub@redhat.com>
2419
2420 Update copyright years.
2421
da77eace
L
24222018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2423
2424 PR c/51628
2425 * c-typeck.c (convert_for_assignment): Call
2426 warn_for_address_or_pointer_of_packed_member.
2427
1edf8866
SB
24282018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2429
2430 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2431 a more specific error message (instead of just falling through).
2432
db4fd626
SB
24332018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2434
2435 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2436 asm qualifier is first seen; use that to give nicer "duplicate asm
2437 qualifier" messages. Delete 'quals" variable, instead pass the
2438 "is_volatile_ flag to build_asm_stmt directly.
2439 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2440 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2441
9c9cfcbb
SB
24422018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2443
2444 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2445 "done" boolean variable.
2446
a14feb3c
DM
24472018-12-19 David Malcolm <dmalcolm@redhat.com>
2448
2449 PR c++/87504
2450 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2451 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2452 (build_binary_op): Use struct op_location_t and
2453 class binary_op_rich_location.
2454
6d939173
JJ
24552018-12-11 Jakub Jelinek <jakub@redhat.com>
2456
2457 PR sanitizer/88426
2458 * c-convert.c (convert): Call c_fully_fold before calling
2459 ubsan_instrument_float_cast.
2460
b7055028
SB
24612018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2462
2463 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2464 setting "quals".
2465
5b76e75f
SB
24662018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2467
2468 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2469 after asm. Pass a flag for it to build_asm_expr.
2470 * c-tree.h (build_asm_expr): Update declaration.
2471 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2472 set ASM_INLINE_P.
2473
30bd42b9
SB
24742018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2475
2476 PR inline-asm/55681
2477 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2478 combination of volatile and goto, in any order, without repetitions.
2479
9df6c0e4
JB
24802018-12-04 James Norris <jnorris@codesourcery.com>
2481 Cesar Philippidis <cesar@codesourcery.com>
2482 Julian Brown <julian@codesourcery.com>
2483
2484 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2485 code.
2486
f44697b7
RB
24872018-11-30 Richard Biener <rguenther@suse.de>
2488
2489 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2490 _Literal (type) { ... } as empty aggregate or vector constructor.
2491
550dfbdc
MS
24922018-11-29 Martin Sebor <msebor@redhat.com>
2493
2494 PR c/88091
2495 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2496 (convert_arguments): Add comments. Pass additional argument to
2497 the function above.
2498
673670da
MS
24992018-11-29 Martin Sebor <msebor@redhat.com>
2500
2501 PR c/88172
2502 PR testsuite/88208
2503 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2504
db1d09b0
MS
25052018-11-23 Martin Sebor <msebor@redhat.com>
2506
2507 PR testsuite/88098
2508 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2509 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2510
98f08eb8
MS
25112018-11-20 Martin Sebor <msebor@redhat.com>
2512
2513 * c-parser.c (c_parser_has_attribute_expression): New function.
2514 (c_parser_attribute): New function.
2515 (c_parser_attributes): Move code into c_parser_attribute.
2516 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2517
cd5da983
MS
25182018-11-15 Martin Sebor <msebor@redhat.com>
2519
2520 PR c/83656
2521 * c-decl.c (header_for_builtin_fn): Declare.
2522 (diagnose_mismatched_decls): Diagnose declarations of built-in
2523 functions without a prototype.
2524 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2525 (convert_argument): Same.
2526 (convert_arguments): Factor code out into convert_argument.
2527 Detect mismatches between built-in formal arguments in calls
2528 to built-in without prototype.
2529 (build_conditional_expr): Same.
2530 (type_or_builtin_type): New function.
2531 (convert_for_assignment): Add argument. Conditionally issue
2532 warnings instead of errors for mismatches.
2533
620e594b
DM
25342018-11-13 David Malcolm <dmalcolm@redhat.com>
2535
2536 * c-decl.c: Replace "source_location" with "location_t".
2537 * c-tree.h: Likewise.
2538 * c-typeck.c: Likewise.
2539 * gimple-parser.c: Likewise.
2540
3179ebae
JJ
25412018-11-09 Jakub Jelinek <jakub@redhat.com>
2542
81a227c6
JJ
2543 * c-parser.c (c_parser_omp_clause_final): Use
2544 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2545 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2546 parsing instead of c_parser_paren_condition.
2547 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2548 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2549 c_fully_fold instead of c_parser_condition.
2550 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2551 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2552 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2553 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2554 c_parser_expr_no_commas instead of c_parser_expression.
2555
98c91c56
JJ
2556 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2557 reduction clause with inscan modifier.
2558
3179ebae
JJ
2559 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2560 clauses other than atomic_default_mem_order.
2561
28567c40
JJ
25622018-11-08 Jakub Jelinek <jakub@redhat.com>
2563
2564 * c-parser.c: Include memmode.h.
2565 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2566 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2567 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2568 task_reduction clauses.
2569 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2570 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2571 section, or lvalue assignment expression.
2572 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2573 (c_parser_omp_clause_lastprivate): Parse optional
2574 conditional: modifier.
2575 (c_parser_omp_clause_hint): Require constant integer expression rather
2576 than just integer expression.
2577 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2578 clause.
2579 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2580 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2581 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2582 functions.
2583 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2584 iterators. Parse mutexinoutset and depobj kinds.
2585 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2586 callers.
2587 (c_parser_omp_all_clauses): Likewise. Handle
2588 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2589 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2590 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2591 default memory order from requires directive if any. Adjust
2592 c_finish_omp_atomic caller.
2593 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2594 (c_parser_omp_flush): Parse flush with memory-order-clause.
2595 (c_parser_omp_for_loop): Allow NE_EXPR even in
2596 OpenMP loops, adjust c_finish_omp_for caller.
2597 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2598 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2599 Allow to be called while parsing combined parallel master.
2600 Parse combined master taskloop{, simd}.
2601 (c_parser_omp_parallel): Parse combined
2602 parallel master{, taskloop{, simd}} constructs.
2603 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2604 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2605 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2606 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2607 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2608 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2609 around teams body. Use SET_EXPR_LOCATION.
2610 (c_parser_omp_target_data): Allow target data
2611 with only use_device_ptr clauses.
2612 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2613 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2614 (c_parser_omp_requires): New function.
2615 (c_finish_taskloop_clauses): New function.
2616 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2617 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2618 declaration. Disallow in_reduction clause when combined with parallel
2619 master.
2620 (c_parser_omp_construct): Adjust c_parser_omp_master and
2621 c_parser_omp_taskgroup callers.
2622 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2623 other than cancel.
2624 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2625 like OMP_CLAUSE_REDUCTION.
2626 (handle_omp_array_sections): Likewise. Call save_expr on array
2627 reductions before calling build_index_type. Handle depend clauses
2628 with iterators.
2629 (struct c_find_omp_var_s): New type.
2630 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2631 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2632 with static, runtime or auto schedule kinds. Call save_expr for whole
2633 array reduction sizes. Diagnose reductions with zero sized elements
2634 or variable length structures. Diagnose nogroup clause used with
2635 reduction clause(s). Handle depend clause with
2636 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2637 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2638 some different type for other kinds. Use build_unary_op with
2639 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2640 Handle depend clauses with iterators. Remove no longer needed special
2641 case that predetermined const qualified vars may be specified in
2642 firstprivate clause. Complain if const qualified vars are mentioned
2643 in data-sharing clauses other than firstprivate or shared. Use
2644 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2645 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2646 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2647 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2648
7e2de6df
DM
26492018-10-29 David Malcolm <dmalcolm@redhat.com>
2650
2651 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2652 logic for change to name_hint::operator bool.
2653 (undeclared_variable): Likewise.
2654 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2655 (c_parser_parameter_declaration): Likewise.
2656
9f936c86
JM
26572018-10-17 Joseph Myers <joseph@codesourcery.com>
2658
2659 * c-errors.c (pedwarn_c11): New function.
2660 * c-parser.c (disable_extension_diagnostics): Save
2661 warn_c11_c2x_compat and set it to 0.
2662 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2663 (c_parser_static_assert_declaration_no_semi): Handle
2664 _Static_assert without string constant.
2665 * c-tree.h (pedwarn_c11): New prototype.
2666
033eb567
DM
26672018-10-17 David Malcolm <dmalcolm@redhat.com>
2668
2669 * Make-lang.in (selftest-c): New.
2670 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2671 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2672 from gcc/Makefile.in.
2673
0edf3afe
RB
26742018-10-02 Richard Biener <rguenther@suse.de>
2675
2676 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2677
8313a764
JM
26782018-09-26 Joseph Myers <joseph@codesourcery.com>
2679
2680 PR c/87390
2681 * c-typeck.c (build_binary_op): Use excess precision for
2682 comparisons of integers and floating-point for C11 and later.
2683
ce6f0888
MJ
26842018-09-26 Martin Jambor <mjambor@suse.cz>
2685
2686 PR c/87347
2687 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2688 comment.
ce6f0888 2689
9c4a4b3c
DM
26902018-09-17 David Malcolm <dmalcolm@redhat.com>
2691
2692 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2693 Update for new param.
2694 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2695 Likewise.
2696
80c6d1f4
MJ
26972018-09-17 Martin Jambor <mjambor@suse.cz>
2698
2699 PR c/63886
2700 * c-parser.c: (warn_for_abs): New function.
2701 (c_parser_postfix_expression_after_primary): Call it.
2702
4a426e36
BE
27032018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2704
2705 * c-typeck.c (digest_init): Shorten overlength strings.
2706
6d900107
BE
27072018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2708
2709 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2710
b5764229
BE
27112018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2712
2713 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2714 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2715
22eea6b2
AM
27162018-08-30 Alexander Monakov <amonakov@ispras.ru>
2717
2718 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2719 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2720
85204e23
DM
27212018-08-27 David Malcolm <dmalcolm@redhat.com>
2722
2723 PR 87091
2724 * c-decl.c (implicitly_declare): Update call to
2725 maybe_add_include_fixit to suggest overriding the location, as it
2726 is for a note.
2727 * c-objc-common.c (c_tree_printer): Update for conversion of
2728 show_caret_p to a tri-state.
2729
3d78e008
ML
27302018-08-27 Martin Liska <mliska@suse.cz>
2731
2732 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2733 fndecl_built_in_p and remove check for FUNCTION_DECL if
2734 possible.
3d78e008
ML
2735 (diagnose_mismatched_decls): Likewise.
2736 (merge_decls): Likewise.
2737 (warn_if_shadowing): Likewise.
2738 (pushdecl): Likewise.
2739 (implicitly_declare): Likewise.
2740 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2741 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2742 * c-typeck.c (build_function_call_vec): Likewise.
2743 (convert_arguments): Likewise.
2744
097f82ec
DM
27452018-08-20 David Malcolm <dmalcolm@redhat.com>
2746
2747 PR other/84889
2748 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2749 (diagnose_mismatched_decls): Likewise, in various places.
2750 (warn_if_shadowing): Likewise.
2751 (implicit_decl_warning): Likewise.
2752 (implicitly_declare): Likewise.
2753 (undeclared_variable): Likewise.
2754 (declare_label): Likewise.
2755 (grokdeclarator): Likewise.
2756 (start_function): Likewise.
2757 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2758 (c_parser_parameter_declaration): Likewise.
2759 (c_parser_binary_expression): Likewise.
2760 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2761 (parser_build_binary_op): Likewise.
2762 (build_unary_op): Likewise.
2763 (error_init): Likewise.
2764 (pedwarn_init): Likewise.
2765 (warning_init): Likewise.
2766 (convert_for_assignment): Likewise.
2767
96e6ae57
DM
27682018-08-15 David Malcolm <dmalcolm@redhat.com>
2769
2770 * c-objc-common.c: Include "gcc-rich-location.h".
2771 (c_tree_printer): Move implemenation of '%T' to...
2772 (print_type): ...this new function.
2773 (range_label_for_type_mismatch::get_text): New function.
2774 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2775 range for the various ic_argpass cases.
2776 (class maybe_range_label_for_tree_type_mismatch): New class.
2777 (build_binary_op): Use it when calling binary_op_error.
2778
0cd020ae 27792018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2780
0cd020ae
PK
2781 * c-decl.c (start_decl): Do not warn if variables is named as main
2782 and is a local variable.
2783
72733314
IS
27842018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2785
2786 PR c/19315
2787 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2788 objects of unknown size.
2789
23aa9f7c
MS
27902018-08-13 Martin Sebor <msebor@redhat.com>
2791
2792 PR tree-optimization/71625
2793 * c-parser.c (c_parser_declaration_or_fndef): Call
2794 braced_list_to_string.
2795
e5e7e50d
BH
27962018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2797
2798 PR c/86690
2799 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2800 errors.
2801
8a45b051
MS
28022018-08-01 Martin Sebor <msebor@redhat.com>
2803
2804 PR tree-optimization/86650
2805 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2806 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2807
5922dcb5
JJ
28082018-08-01 Jakub Jelinek <jakub@redhat.com>
2809
2810 PR c/85704
2811 * c-typeck.c (init_field_decl_cmp): New function.
2812 (output_pending_init_elements): Use it for field comparisons
2813 instead of pure bit_position comparisons.
2814
9b452033
JJ
28152018-07-12 Jakub Jelinek <jakub@redhat.com>
2816
2817 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2818 type here, instead add "omp declare target implicit" attribute.
2819 (finish_decl): Diagnose vars without mappable type here.
2820
ab20d992
JJ
28212018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2822 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2823 Cesar Philippidis <cesar@codesourcery.com>
2824
2825 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2826 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2827 to their non-present_or_* counterparts. Make 'self' an alias to
2828 PRAGMA_OACC_CLAUSE_HOST.
2829 (c_parser_oacc_data_clause): Update GOMP mappings for
2830 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2831 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2832 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2833 Remove support for present_or_* clauses.
2834 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2835 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2836 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2837 (OACC_DATA_CLAUSE_MASK): Likewise.
2838 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2839 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2840 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2841 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2842 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2843
e197e64e
KV
28442018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2845
2846 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2847 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2848 (c_parser_gimple_unary_expression): Likewise.
2849
487f2f61
JJ
28502018-06-15 Jakub Jelinek <jakub@redhat.com>
2851
2852 PR c/86093
2853 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2854 before doing POINTER_DIFF_EXPR.
2855
e4d44a37
MP
28562018-06-07 Marek Polacek <polacek@redhat.com>
2857
2858 PR c/85318
2859 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2860 for loop initial declarations.
2861
b67b9225
DP
28622018-05-30 David Pagan <dave.pagan@oracle.com>
2863
2864 PR c/55976
2865 * c-decl.c (grokdeclarator): Update check for return type warnings.
2866 (start_function): Likewise.
2867 (finish_function): Likewise.
2868 * c-typeck.c (c_finish_return): Update check for return type warnings.
2869 Pass OPT_Wreturn_type to pedwarn when appropriate.
2870
c566cc9f
RS
28712018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2872
2873 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2874 __FMA_EXPR handlng.
2875
e4f81565
RS
28762018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2877
2878 * gimple-parser.c: Include internal-fn.h.
2879 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2880 (c_parser_gimple_call_internal): New function.
2881 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2882 Fix typos in comment.
2883
79e7b1fe
JJ
28842018-05-10 Jakub Jelinek <jakub@redhat.com>
2885
2886 PR c++/85662
2887 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2888 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2889 fold_convert_loc.
2890 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2891 fold_offsetof_1, pass argtype as TYPE to it and drop the
2892 fold_convert_loc.
2893
f7584c81
DP
28942018-05-02 David Pagan <dave.pagan@oracle.com>
2895
2896 PR c/30552
2897 * c-decl.c (old_style_parameter_scope): New function.
2898 * c-parser.c (c_parser_postfix_expression): Check for statement
2899 expressions in old-style function parameter list declarations.
2900 * c-parser.h (old_style_parameter_scope): New extern declaration.
2901
b33a0cb3
JJ
29022018-04-25 Jakub Jelinek <jakub@redhat.com>
2903
2904 PR sanitizer/84307
2905 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2906 it is not TREE_STATIC.
2907 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2908 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2909 its COMPOUND_LITERAL_EXPR_DECL.
2910
c5c5822a
JM
29112018-03-21 Joseph Myers <joseph@codesourcery.com>
2912
2913 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2914 where all functions return the same _FloatN or _FloatNx type,
2915 treat integer types as _Float64 instead of double.
2916
aa1c9429
JJ
29172018-03-21 Jakub Jelinek <jakub@redhat.com>
2918
2919 PR c/84999
2920 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2921 building vector comparison, diagnose it and return error_mark_node.
2922
9bb45a95
JJ
29232018-03-15 Jakub Jelinek <jakub@redhat.com>
2924
2925 PR c/84853
2926 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2927 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2928 INTEGER_TYPE element type.
2929
ada6bad9
DP
29302018-03-13 David Pagan <dave.pagan@oracle.com>
2931
2932 PR c/46921
2933 * c-typeck.c (output_init_element): Ensure field initializer
2934 expression is always evaluated if there are side effects.
2935
849bbdb9
JJ
29362018-03-06 Jakub Jelinek <jakub@redhat.com>
2937
2938 PR c/84721
2939 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2940 !building_stmt_list_p ().
2941
d74641bd
RS
29422018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2943
2944 PR c/84305
2945 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2946 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2947 and include the BIND_EXPR in the list of things that need to be
2948 pre-evaluated.
2949
0444aa9c
NS
29502018-02-09 Nathan Sidwell <nathan@acm.org>
2951
2952 PR c/84293
2953 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2954 to strict_aliasing_warning.
2955
7c30b12a
PC
29562018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2957
2958 * c-typeck.c (really_start_incremental_init, push_init_level,
2959 set_nonincremental_init, output_init_element, process_init_element):
2960 Use DECL_UNNAMED_BIT_FIELD.
2961
2be4dfcb
MP
29622018-01-31 Marek Polacek <polacek@redhat.com>
2963
2964 PR c/81779
2965 * c-parser.c (c_parser_compound_statement_nostart): Call
2966 expansion_point_location_if_in_system_header.
2967
bb9869d5
DM
29682018-01-17 David Malcolm <dmalcolm@redhat.com>
2969
2970 PR c++/83814
2971 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2972 the C part.
2973
b4923738
JJ
29742018-01-13 Jakub Jelinek <jakub@redhat.com>
2975
2976 PR c/83801
2977 * c-tree.h (decl_constant_value_1): Add a bool argument.
2978 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2979 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2980 (decl_constant_value): Adjust caller.
2981 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2982 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2983 decl_constant_value returns initializer that has BLKmode or
2984 array type.
2985 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2986
928686b1
RS
29872018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2988 Alan Hayward <alan.hayward@arm.com>
2989 David Sherwood <david.sherwood@arm.com>
2990
2991 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2992 TYPE_VECTOR_SUBPARTS.
2993
85ec4feb
JJ
29942018-01-03 Jakub Jelinek <jakub@redhat.com>
2995
2996 Update copyright years.
2997
913884f7
JJ
29982018-01-01 Jakub Jelinek <jakub@redhat.com>
2999
3000 PR c/83595
3001 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3002 c_parser_conditional_expression, c_parser_cast_expression,
3003 c_parser_sizeof_expression, c_parser_alignof_expression,
3004 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3005 c_parser_transaction_expression): Use set_error () method instead
3006 of setting value member to error_mark_node.
3007
c6cfa2bf
MM
30082017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3009
3010 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3011 and _Float<N>X built-in functions.
3012
11d29d63
JJ
30132017-12-22 Jakub Jelinek <jakub@redhat.com>
3014
14ec014e
JJ
3015 PR debug/83550
3016 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3017 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3018 incomplete vars rather than after it.
3019
11d29d63
JJ
3020 PR debug/83547
3021 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3022 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3023 and consider empty ones if there are no other stmts. For
3024 -Wunused-value walk all statements before the one only followed by
3025 DEBUG_BEGIN_STMTs.
3026
170a8bd6 30272017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3028 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3029
3030 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3031 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3032 (c_parser_do_statement): Likewise.
3033 (c_parser_for_statement): Likewise.
3034 (c_parser_statement_after_labels): Adjust calls to above.
3035 (c_parse_pragma_ivdep): New static function.
3036 (c_parser_pragma_unroll): Likewise.
3037 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3038 <PRAGMA_UNROLL>: New case.
3039
01512446
JJ
30402017-12-19 Jakub Jelinek <jakub@redhat.com>
3041
3042 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3043 perform_integral_promotions, digest_init): Replace Yoda conditions
3044 with typical order conditions.
3045 * c-decl.c (check_bitfield_type_and_width): Likewise.
3046
c65e18d3
BE
30472017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3048
3049 * c-typeck.c (c_safe_arg_type_equiv_p,
3050 c_safe_function_type_cast_p): New function.
3051 (build_c_cast): Implement -Wcast-function-type.
3052
b7280579
RB
30532017-12-14 Richard Biener <rguenther@suse.de>
3054
3055 PR c/83415
3056 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3057 like REALPART_EXPR for the behavior of whether its operand
3058 is an lvalue.
3059
49e6a6c0
MP
30602017-12-12 Marek Polacek <polacek@redhat.com>
3061
3062 PR c/82679
3063 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3064
ab20d992 30652017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3066
3067 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3068 * c-parser.c (add_debug_begin_stmt): New.
3069 (c_parser_declaration_or_fndef): Call it.
3070 (c_parser_compound_statement_nostart): Likewise.
3071 (c_parser_statement_after_labels): Likewise.
3072 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3073
4b2b493f
JM
30742017-12-07 Joseph Myers <joseph@codesourcery.com>
3075
3076 * c-decl.c (build_compound_literal): Add parameter alignas_align
3077 and set alignment of decl if nonzero.
3078 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3079 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3080 qualifier.
3081 (c_parser_struct_declaration): Update syntax comment.
3082 (c_parser_type_name): Add alignas_ok argument and pass it to
3083 c_parser_declspecs.
3084 (c_parser_cast_expression): Pass true to c_parser_type_name and
3085 give error if a cast used an _Alignas specifier.
3086 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3087 give error if sizeof (type-name) used an _Alignas specifier.
3088 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3089 give error if _Alignof (type-name) used an _Alignas specifier.
3090 (c_parser_postfix_expression_after_paren_type): Check specified
3091 alignment for a compound literal and pass it to
3092 build_compound_literal.
3093 * c-parser.h (c_parser_type_name): Update prototype.
3094 * c-tree.h (build_compound_literal): Update prototype.
3095
5d9ae53d
MS
30962017-12-07 Martin Sebor <msebor@redhat.com>
3097
3098 PR c/81544
3099 * c-decl.c (c_decl_attributes): Look up existing declaration and
3100 pass it to decl_attributes.
3101
c79144f8
DM
31022017-12-06 David Malcolm <dmalcolm@redhat.com>
3103
3104 PR c/83236
3105 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3106 reserved for use by the implementation.
3107
613bc14f
DM
31082017-12-06 David Malcolm <dmalcolm@redhat.com>
3109
3110 * c-decl.c: Include "c-family/c-spellcheck.h".
3111
05abad4c
ML
31122017-12-05 Martin Liska <mliska@suse.cz>
3113 Jakub Jelinek <jakub@redhat.com>
3114
3115 * c-typeck.c (pointer_diff): Add new argument and instrument
3116 pointer subtraction.
3117 (build_binary_op): Similar for pointer comparison.
3118
cc6534d4
JJ
31192017-12-01 Jakub Jelinek <jakub@redhat.com>
3120
65791f42
JJ
3121 PR c/79153
3122 * c-parser.c: Include tree-iterator.h.
3123 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3124 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3125 on it.
3126
cc6534d4
JJ
3127 PR c/83222
3128 * c-tree.h (decl_constant_value_1): Declare.
3129 * c-typeck.c (decl_constant_value_1): New function.
3130 (decl_constant_value): Use it.
3131 * c-fold.c (c_fully_fold_internal): If in_init, use
3132 decl_constant_value_1 instead of decl_constant_value.
3133
5de73c05
JJ
31342017-11-30 Jakub Jelinek <jakub@redhat.com>
3135
3136 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3137
058f0b9e
JJ
31382017-11-28 Jakub Jelinek <jakub@redhat.com>
3139
3140 PR sanitizer/81275
3141 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3142 c_switch_covers_all_cases_p returns true.
3143
5e9d6aa4 31442017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3145 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3146
3147 * Make-lang.in (c/c-array-notation.o): Remove.
3148 * c-array-notation.c: Delete.
3149 * c-decl.c: Remove cilkplus condition.
3150 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3151 c_parser_cilk_verify_simd, c_parser_array_notation,
3152 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3153 c_parser_cilk_simd_fn_vector_attrs,
3154 c_finish_cilk_simd_fn_tokens): Delete.
3155 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3156 (c_parser_direct_declarator_inner): Ditto.
3157 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3158 (c_parser_attributes, c_parser_compound_statement,
3159 c_parser_statement_after_labels, c_parser_if_statement,
3160 c_parser_switch_statement, c_parser_while_statement,
3161 c_parser_do_statement, c_parser_for_statement,
3162 c_parser_unary_expression, c_parser_postfix_expression,
3163 c_parser_postfix_expression_after_primary,
3164 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3165 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3166 support.
3167 * c-typeck.c (build_array_ref, build_function_call_vec,
3168 convert_arguments,
3169 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3170 c_finish_loop, build_binary_op): Remove cilkplus support.
3171
9e851845
JJ
31722017-11-28 Jakub Jelinek <jakub@redhat.com>
3173
3174 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3175 of build3.
3176
ab20d992 31772017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
3178
3179 * Make-lang.in (c.install-plugin): Install backend import library.
3180
41521dee
JJ
31812017-11-23 Jakub Jelinek <jakub@redhat.com>
3182
3183 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3184 pragma_stmt context.
3185
ac9effed
EB
31862017-11-23 Mike Stump <mikestump@comcast.net>
3187 Eric Botcazou <ebotcazou@adacore.com>
3188
3189 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3190 ANNOTATE_EXPR.
3191 (c_parser_do_statement): Likewise.
3192 (c_parser_for_statement): Likewise.
3193
ce95abc4
DM
31942017-11-22 David Malcolm <dmalcolm@redhat.com>
3195
3196 PR c++/62170
3197 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3198 bool to bool *. Within '%T' handling, if showing an "aka", use
3199 "quoted" param to add appropriate quoting.
3200
974aedcc
MP
32012017-11-22 Marek Polacek <polacek@redhat.com>
3202
3203 PR c++/60336
3204 PR middle-end/67239
3205 PR target/68355
3206 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3207
d4300cc6
DM
32082017-11-21 David Malcolm <dmalcolm@redhat.com>
3209
3210 PR c/83056
3211 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3212 earlier failed lookups.
3213
1af4ebf5
MG
32142017-11-21 Marc Glisse <marc.glisse@inria.fr>
3215
3216 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3217 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3218
26edace6
DM
32192017-11-20 David Malcolm <dmalcolm@redhat.com>
3220
3221 PR c/81404
3222 * c-decl.c: Include "c-family/known-headers.h".
3223 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3224 to known-headers.cc.
3225 (class suggest_missing_header): Move to known-header.h.
3226 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3227 than get_c_name_hint.
3228
b1212255
DM
32292017-11-20 David Malcolm <dmalcolm@redhat.com>
3230
3231 * c-decl.c (get_c_name_hint): New function.
3232 (class suggest_missing_header): New class.
3233 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3234 suggest missing headers to the user.
3235
6c7a259b
DM
32362017-11-20 David Malcolm <dmalcolm@redhat.com>
3237
3238 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3239 Include "c-family/name-hint.h"
3240 (implicit_decl_warning): Convert "hint" from
3241 const char * to name_hint. Pass location to
3242 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3243 warning was not printed.
3244 (undeclared_variable): Likewise for "guessed_id".
3245 (lookup_name_fuzzy): Convert return type from const char *
3246 to name_hint. Add location_t param.
3247 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3248 Include "c-family/name-hint.h"
3249 (c_parser_declaration_or_fndef): Convert "hint" from
3250 const char * to name_hint. Pass location to lookup_name_fuzzy.
3251 (c_parser_parameter_declaration): Likewise.
3252
f9c59f7e
JJ
32532017-11-19 Jakub Jelinek <jakub@redhat.com>
3254
3255 PR c/66618
3256 PR c/69960
3257 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3258 where needed.
3259 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3260 handle_omp_array_sections): Likewise.
3261 (digest_init): Don't call decl_constant_value_for_optimization.
3262 * c-tree.h (decl_constant_value_for_optimization): Removed.
3263 * c-fold.c (c_fold_array_ref): New function.
3264 (c_fully_fold_internal): Add LVAL argument, propagate it through
3265 recursive calls. For VAR_P call decl_constant_value and
3266 unshare if not LVAL and either optimizing or IN_INIT. Remove
3267 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3268 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3269 (c_fully_fold): Add LVAL argument, pass it through to
3270 c_fully_fold_internal.
3271 (decl_constant_value_for_optimization): Removed.
3272
3ca0dc60
JM
32732017-11-15 Joseph Myers <joseph@codesourcery.com>
3274
3275 PR c/81156
3276 * c-parser.c (check_tgmath_function): New function.
3277 (enum tgmath_parm_kind): New enum.
3278 (c_parser_postfix_expression): Handle __builtin_tgmath.
3279
64a5912c
DM
32802017-10-31 David Malcolm <dmalcolm@redhat.com>
3281
3282 * c-decl.c (implicit_decl_warning): Update for renaming of
3283 pedwarn_at_rich_loc and warning_at_rich_loc.
3284 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3285 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3286 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3287 (c_parser_struct_or_union_specifier): Likewise for renaming of
3288 pedwarn_at_rich_loc.
3289 (c_parser_parameter_declaration): Likewise for renaming of
3290 error_at_rich_loc.
3291 * c-typeck.c (build_component_ref): Likewise.
3292 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3293 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3294 (set_init_label): Likewise for renaming of error_at_rich_loc.
3295
c1136864
RB
32962017-10-30 Richard Biener <rguenther@suse.de>
3297
3298 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3299 stmts.
3300
ee5fd23a
MM
33012017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3302
3303 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3304 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3305
1a59ccf2
DM
33062017-10-25 David Malcolm <dmalcolm@redhat.com>
3307
3308 PR c/7356
3309 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3310 semicolons.
3311
bc1a75dd
JJ
33122017-10-25 Jakub Jelinek <jakub@redhat.com>
3313
3314 PR libstdc++/81706
3315 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3316 newdecl to corresponding __builtin_ if any.
3317
ff1ff960
PC
33182017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3319
3320 PR c++/82466
3321 * c-decl.c (diagnose_mismatched_decls): Use
3322 OPT_Wbuiltin_declaration_mismatch.
3323
62e1c678
DM
33242017-10-12 David Malcolm <dmalcolm@redhat.com>
3325
3326 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3327 use it to guard calls to maybe_suggest_missing_token_insertion.
3328 (c_parser_parms_list_declarator): Override default value of new
3329 "type_is_unique" param to c_parser_require.
3330 (c_parser_asm_statement): Likewise.
3331 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3332 defaulting to true.
3333
a92f6726
NS
33342017-10-11 Nathan Sidwell <nathan@acm.org>
3335
3336 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3337
8e6cdc90
RS
33382017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3339
3340 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3341 operating on trees as wide_ints.
3342 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3343 (c_tree_equal): Likewise.
3344
8139a48e
DM
33452017-10-04 David Malcolm <dmalcolm@redhat.com>
3346
3347 * c-decl.c (push_parm_decl): Store c_parm's location into the
3348 PARAM_DECL.
3349 (build_c_parm): Add "loc" param and store it within the c_parm.
3350 * c-parser.c (struct c_parser): Add "last_token_location" field.
3351 (c_parser_consume_token): Store location of the token into the
3352 new field.
3353 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3354 when handling a FUNCTION_DECL, if it doesn't already have them.
3355 (c_parser_parameter_declaration): Generate a location for the
3356 parameter, and pass it to the call to build_c_parm.
3357 * c-tree.h (struct c_parm): Add field "loc".
3358 (build_c_parm): Add location_t param.
3359 * c-typeck.c (get_fndecl_argument_location): New function.
3360 (inform_for_arg): New function.
3361 (convert_for_assignment): Use inform_for_arg when dealing with
3362 ic_argpass.
3363
2a389958
JJ
33642017-09-29 Jakub Jelinek <jakub@redhat.com>
3365
7d386d45
JJ
3366 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3367 width is non-NULL.
3368 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3369 don't SET_DECL_C_BIT_FIELD here.
3370
2a389958
JJ
3371 PR c/82340
3372 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3373 instead of trying to set just TREE_READONLY manually.
3374
ebc6a85e
TV
33752017-09-16 Tom de Vries <tom@codesourcery.com>
3376
3377 PR c/81875
3378 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3379 cond itself.
3380
bb75facd
JM
33812017-09-15 Joseph Myers <joseph@codesourcery.com>
3382
3383 PR c/82071
3384 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3385 for C11.
3386 (build_conditional_expr): For C11, generate result with excess
3387 precision when one argument is an integer and the other is of a
3388 type using excess precision.
3389
1d933576
BE
33902017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3391
3392 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3393
267bbb6f
MP
33942017-09-13 Marek Polacek <polacek@redhat.com>
3395
3396 PR c/82167
3397 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3398 than expr.original_type.
3399
6836632e
NS
34002017-09-12 Nathan Sidwell <nathan@acm.org>
3401
3402 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3403 resort_sorted_fields): Moved from c-family/c-common.c.
3404 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3405
e035be33
JM
34062017-09-01 Joseph Myers <joseph@codesourcery.com>
3407
3408 PR c/82071
3409 * c-typeck.c (build_atomic_assign): Handle argument with excess
3410 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3411 argument passed to build_binary_op and convert_for_assignment but
3412 not for call to c_fully_fold.
3413 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3414 Ensure build_binary_op is called with argument with original
3415 semantic type. Avoid calling c_fully_fold with an
3416 EXCESS_PRECISION_EXPR from build_binary_op.
3417
d2e05fcb
JJ
34182017-09-01 Jakub Jelinek <jakub@redhat.com>
3419
3420 PR c/81887
3421 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3422
b397965c
RS
34232017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3424 Alan Hayward <alan.hayward@arm.com>
3425 David Sherwood <david.sherwood@arm.com>
3426
3427 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3428 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3429 m1 and m2 to the signed equivalent of a fixed-point
3430 SCALAR_TYPE_MODE.
3431
14e18d71
DM
34322017-08-24 David Malcolm <dmalcolm@redhat.com>
3433
3434 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3435 than CAN_HAVE_LOCATION_P when determining whether to use the
3436 location_t value within "value".
3437
7f204c0f
DM
34382017-08-21 David Malcolm <dmalcolm@redhat.com>
3439
3440 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3441 rather than peeking the location of the first token.
3442 * c-tree.h (c_expr::get_location): New method.
3443
2f687306
DM
34442017-08-21 David Malcolm <dmalcolm@redhat.com>
3445
3446 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3447 to check_function_arguments.
3448
3e7b80d7
MP
34492017-08-18 Marek Polacek <polacek@redhat.com>
3450
3451 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3452 commentary.
3453
00aa1fa2
L
34542017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3455
3456 PR c/53037
3457 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3458 (check_bitfield_type_and_width): Don't allow bit-field with
3459 warn_if_not_aligned type.
3460
da67acb9
MS
34612017-08-14 Martin Sebor <msebor@redhat.com>
3462
3463 PR c/81117
3464 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3465
bb85aa74
MP
34662017-08-11 Marek Polacek <polacek@redhat.com>
3467
3468 PR c/81795
3469 * c-decl.c (pushtag): Only print inform if the warning was printed.
3470 (grokdeclarator): Likewise.
3471
32129a17
DM
34722017-08-10 David Malcolm <dmalcolm@redhat.com>
3473
3474 * c-parser.c (c_parser_error): Rename to...
3475 (c_parser_error_richloc): ...this, making static, and adding
3476 "richloc" parameter, passing it to the c_parse_error call,
3477 rather than calling c_parser_set_source_position_from_token.
3478 (c_parser_error): Reintroduce, reimplementing in terms of the
3479 above, converting return type from void to bool.
3480 (class token_pair): New class.
3481 (struct matching_paren_traits): New struct.
3482 (matching_parens): New typedef.
3483 (struct matching_brace_traits): New struct.
3484 (matching_braces): New typedef.
3485 (get_matching_symbol): New function.
3486 (c_parser_require): Add param MATCHING_LOCATION, using it to
3487 highlight matching "opening" tokens for missing "closing" tokens.
3488 (c_parser_skip_until_found): Likewise.
3489 (c_parser_static_assert_declaration_no_semi): Convert explicit
3490 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3491 class matching_parens, so that the pertinent open parenthesis is
3492 highlighted when there are problems locating the close
3493 parenthesis.
3494 (c_parser_struct_or_union_specifier): Likewise.
3495 (c_parser_typeof_specifier): Likewise.
3496 (c_parser_alignas_specifier): Likewise.
3497 (c_parser_simple_asm_expr): Likewise.
3498 (c_parser_braced_init): Likewise, for matching_braces.
3499 (c_parser_paren_condition): Likewise, for matching_parens.
3500 (c_parser_switch_statement): Likewise.
3501 (c_parser_for_statement): Likewise.
3502 (c_parser_asm_statement): Likewise.
3503 (c_parser_asm_operands): Likewise.
3504 (c_parser_cast_expression): Likewise.
3505 (c_parser_sizeof_expression): Likewise.
3506 (c_parser_alignof_expression): Likewise.
3507 (c_parser_generic_selection): Likewise.
3508 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3509 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3510 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3511 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3512 c_parser_skip_until_found call.
3513 (c_parser_objc_class_definition): Use class matching_parens as
3514 above.
3515 (c_parser_objc_method_decl): Likewise.
3516 (c_parser_objc_try_catch_finally_statement): Likewise.
3517 (c_parser_objc_synchronized_statement): Likewise.
3518 (c_parser_objc_at_property_declaration): Likewise.
3519 (c_parser_oacc_wait_list): Likewise.
3520 (c_parser_omp_var_list_parens): Likewise.
3521 (c_parser_omp_clause_collapse): Likewise.
3522 (c_parser_omp_clause_default): Likewise.
3523 (c_parser_omp_clause_if): Likewise.
3524 (c_parser_omp_clause_num_threads): Likewise.
3525 (c_parser_omp_clause_num_tasks): Likewise.
3526 (c_parser_omp_clause_grainsize): Likewise.
3527 (c_parser_omp_clause_priority): Likewise.
3528 (c_parser_omp_clause_hint): Likewise.
3529 (c_parser_omp_clause_defaultmap): Likewise.
3530 (c_parser_oacc_single_int_clause): Likewise.
3531 (c_parser_omp_clause_ordered): Likewise.
3532 (c_parser_omp_clause_reduction): Likewise.
3533 (c_parser_omp_clause_schedule): Likewise.
3534 (c_parser_omp_clause_num_teams): Likewise.
3535 (c_parser_omp_clause_thread_limit): Likewise.
3536 (c_parser_omp_clause_aligned): Likewise.
3537 (c_parser_omp_clause_linear): Likewise.
3538 (c_parser_omp_clause_safelen): Likewise.
3539 (c_parser_omp_clause_simdlen): Likewise.
3540 (c_parser_omp_clause_depend): Likewise.
3541 (c_parser_omp_clause_map): Likewise.
3542 (c_parser_omp_clause_device): Likewise.
3543 (c_parser_omp_clause_dist_schedule): Likewise.
3544 (c_parser_omp_clause_proc_bind): Likewise.
3545 (c_parser_omp_clause_uniform): Likewise.
3546 (c_parser_omp_for_loop): Likewise.
3547 (c_parser_cilk_clause_vectorlength): Likewise.
3548 (c_parser_cilk_clause_linear): Likewise.
3549 (c_parser_transaction_expression): Likewise.
3550 * c-parser.h (c_parser_require): Add param matching_location with
3551 default UNKNOWN_LOCATION.
3552 (c_parser_error): Convert return type from void to bool.
3553 (c_parser_skip_until_found): Add param matching_location with
3554 default UNKNOWN_LOCATION.
3555
30af3a2b
MP
35562017-08-09 Marek Polacek <polacek@redhat.com>
3557
3558 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3559 * c-tree.h (build_external_ref): Update declaration.
3560 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3561 (build_external_ref): Change the type of a parameter to bool.
3562 (parser_build_binary_op): Use true/false instead of 1/0.
3563 (pointer_diff): Likewise.
3564 (build_modify_expr): Likewise.
3565 (set_designator): Change the type of a parameter to bool.
3566 (set_init_index): Use true/false instead of 1/0.
3567 (set_init_label): Likewise.
3568 (output_init_element): Change the type of a parameter to bool.
3569 (output_pending_init_elements): Use true/false instead of 1/0.
3570 (process_init_element): Likewise.
3571 (build_binary_op): Change the type of a parameter to bool.
3572
296c53ac
MP
35732017-08-09 Marek Polacek <polacek@redhat.com>
3574
3575 PR c/81233
3576 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3577 Call emit_diagnostic_valist instead of pedwarn.
3578 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3579 Print the relevant types in diagnostics.
3580
a32c8316
MP
35812017-08-09 Marek Polacek <polacek@redhat.com>
3582
3583 PR c/81417
3584 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3585 build_conditional_expr.
a32c8316
MP
3586 * c-parser.c (c_parser_conditional_expression): Create locations for
3587 EXP1 and EXP2 from their source ranges. Pass the locations down to
3588 build_conditional_expr.
3589 * c-tree.h (build_conditional_expr): Update declaration.
3590 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3591 For -Wsign-compare, also print the types.
3592
314e6352
ML
35932017-08-08 Martin Liska <mliska@suse.cz>
3594
3595 * c-convert.c: Include header files.
3596 * c-typeck.c: Likewise.
3597
577eec56
ML
35982017-08-07 Martin Liska <mliska@suse.cz>
3599
3600 * c-parser.c (c_parser_attributes): Canonicalize name of an
3601 attribute.
3602
f7b6353a
MP
36032017-08-02 Marek Polacek <polacek@redhat.com>
3604
3605 PR c/81289
3606 * c-parser.c (c_parser_unary_expression): Use set_error.
3607
8a6eab34
MP
3608 PR c/81448
3609 PR c/81306
3610 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3611 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3612
ab20d992 36132017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3614 Martin Liska <mliska@suse.cz>
3615
3616 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3617 statement.
7fef86d3 3618
f34ebeb2
ML
36192017-07-31 Martin Liska <mliska@suse.cz>
3620
3621 PR sanitize/81530
3622 * c-convert.c (convert): Guard condition with flag_sanitize_p
3623 also with current_function_decl non-null equality.
3624 * c-decl.c (grokdeclarator): Likewise.
3625 * c-typeck.c (build_binary_op): Likewise.
3626
8595f67b
MP
36272017-07-25 Marek Polacek <polacek@redhat.com>
3628
3629 * c-decl.c (grokfield): Remove local variable.
3630
d49718d6
MP
36312017-07-25 Marek Polacek <polacek@redhat.com>
3632
3633 PR c/81364
3634 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3635 macro expansion if the body is in { }.
3636 (c_parser_while_statement): Likewise.
3637 (c_parser_for_statement): Likewise.
3638
ff22eb12
NS
36392017-07-18 Nathan Sidwell <nathan@acm.org>
3640
3641 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3642
eea77d1f
DM
36432017-07-14 David Malcolm <dmalcolm@redhat.com>
3644
3645 * c-decl.c (implicitly_declare): When suggesting a missing
3646 #include, provide a fix-it hint.
3647
b6f43128
DM
36482017-07-06 David Malcolm <dmalcolm@redhat.com>
3649
3650 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3651 and call that instead.
3652 * c-tree.h (selftest::run_c_tests): New decl.
3653
3e2becc4
MP
36542017-06-26 Marek Polacek <polacek@redhat.com>
3655
3656 PR c/80116
3657 * c-parser.c (c_parser_if_body): Set the location of the
3658 body of the conditional after parsing all the labels. Call
3659 warn_for_multistatement_macros.
3660 (c_parser_else_body): Likewise.
3661 (c_parser_switch_statement): Likewise.
3662 (c_parser_while_statement): Likewise.
3663 (c_parser_for_statement): Likewise.
3664 (c_parser_statement): Add a default argument. Save the location
3665 after labels have been parsed.
3666 (c_parser_c99_block_statement): Likewise.
3667
343ae898
RB
36682017-06-19 Richard Biener <rguenther@suse.de>
3669
3670 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3671 negated _Literals to parse _Literal (int) -1.
3672
45b2222a
ML
36732017-06-13 Martin Liska <mliska@suse.cz>
3674
3675 PR sanitize/78204
3676 * c-convert.c (convert): Use sanitize_flags_p.
3677 * c-decl.c (grokdeclarator): Likewise.
3678 * c-typeck.c (convert_for_assignment): Likewise.
3679 (c_finish_return): Likewise.
3680 (build_binary_op): Likewise.
3681
8ab7005b
JJ
36822017-06-08 Jakub Jelinek <jakub@redhat.com>
3683
3684 PR c/81006
3685 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3686 to sizetype before size_binop.
3687
363dc72c
JJ
36882017-06-07 Jakub Jelinek <jakub@redhat.com>
3689
3690 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3691 of TDI_generic.
3692
dc949728
MP
36932017-06-06 Marek Polacek <polacek@redhat.com>
3694
3695 PR c/79983
3696 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3697 ref.
3698 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3699
40ffd95f
BE
37002017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3701
3702 * c-parser.c (c_parser_binary_expression): Implement the
3703 -Wsizeof_pointer_div warning.
3704 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3705 from a parenthesized expression.
3706 (c_parser_expr_list): Use c_last_sizeof_loc.
3707 * c-tree.h (c_last_sizeof_loc): New external.
3708 * c-typeck.c (c_last_sizeof_loc): New variable.
3709 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3710
9fc5e7a4
MM
37112017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3712
3713 PR testsuite/80580
3714 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3715
f012c8ef
DM
37162017-05-30 David Malcolm <dmalcolm@redhat.com>
3717
3718 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3719 parameters.
3720
3cd211af
MS
37212017-05-24 Martin Sebor <msebor@redhat.com>
3722
3723 PR c/80731
3724 * c-fold.c (c_fully_fold_internal): Adjust.
3725 * c-typeck.c (parser_build_unary_op): Adjust.
3726
fd71a9a2
TS
37272017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3728
3729 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3730 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3731 "VECTOR_LENGTH".
3732
92fa0f9e
MP
37332017-05-23 Marek Polacek <polacek@redhat.com>
3734
3735 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3736 quotes.
3737
d11c168a
JJ
37382017-05-22 Jakub Jelinek <jakub@redhat.com>
3739
3740 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3741 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3742 it returned invariant. Call tree_invariant_p unconditionally
3743 afterwards to decide whether to return expr or op0.
3744
58aca9d9
NS
37452017-05-22 Nathan Sidwell <nathan@acm.org>
3746
3747 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3748
7fd549d2
TS
37492017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3750
3751 * c-parser.c (c_parser_omp_clause_default): Handle
3752 "OMP_CLAUSE_DEFAULT_PRESENT".
3753
6ecd2339
BE
37542017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3755
3756 * config-lang.in (gtfiles): Add c-family/c-format.c.
3757
8a57ecff
NS
37582017-05-18 Nathan Sidwell <nathan@acm.org>
3759
3760 * c-decl.c (pushdecl_top_level): Delete unused function.
3761
6574d78e
MP
37622017-05-18 Marek Polacek <polacek@redhat.com>
3763
3764 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3765 (check_earlier_gotos): Likewise.
3766 (define_label): Likewise.
3767 (pending_xref_error): Likewise.
3768 (smallest_type_quals_location): Likewise.
3769 (grokdeclarator): Likewise.
3770 (grokparms): Likewise.
3771 (identifier_global_value): Likewise.
3772 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3773 (find_init_member): Likewise.
3774
e3455240
MP
37752017-05-18 Marek Polacek <polacek@redhat.com>
3776
3777 * c-decl.c (start_decl): Use false/true instead of 0/1.
3778 (grokdeclarator): Likewise.
3779 (finish_struct): Likewise.
3780 (start_function): Change the return type to bool. Use false/true
3781 instead of 0/1.
3782 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3783 * c-tree.h (start_function): Update.
3784 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3785 (set_designator): Change the return type to bool. Use false/true
3786 instead of 0/1.
3787
3fa8871b
MP
37882017-05-17 Marek Polacek <polacek@redhat.com>
3789
3790 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3791 * c-typeck.c: Likewise.
3792
142473df
MP
37932017-05-17 Marek Polacek <polacek@redhat.com>
3794
3795 PR sanitizer/80659
3796 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3797 DECL_IGNORED_P even for non-static compound literals.
3798
1a817418
ML
37992017-05-17 Martin Liska <mliska@suse.cz>
3800
3801 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3802 use it instead of int type.
3803
b2fa0a8b
MP
38042017-05-17 Marek Polacek <polacek@redhat.com>
3805
3806 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3807 call c_fully_fold.
3808 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3809 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3810 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3811 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3812 save_expr.
3813 (c_parser_conditional_expression): Likewise.
3814 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3815 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3816 (process_init_element): Likewise.
3817 (build_binary_op): Likewise.
3818 (handle_omp_array_sections_1): Likewise.
3819
1e47f02b
TS
38202017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3821
3822 * c-parser.c (c_parser_omp_clause_num_gangs)
3823 (c_parser_omp_clause_num_workers)
3824 (c_parser_omp_clause_vector_length): Merge functions into...
3825 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3826 all users.
3827
c24e924f
NS
38282017-05-11 Nathan Sidwell <nathan@acm.org>
3829
3830 * gimple-parser.c: Don't #include tree-dump.h.
3831
c587104e
MM
38322017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3833
3834 PR testsuite/80580
3835 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3836
67ac9a9d
MM
38372017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3838
3839 PR testsuite/80580
3840 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3841 incorrect __MEM syntax.
3842
ac4eb40f
MM
38432017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3844
3845 PR testsuite/80580
3846 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3847 type of unary '*'.
3848
641da50a
NS
38492017-05-09 Nathan Sidwell <nathan@acm.org>
3850
3851 * c-tree.h (pushdecl): Declare.
3852
56d35585
DM
38532017-05-05 David Malcolm <dmalcolm@redhat.com>
3854
3855 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3856 with diagnostic_report_diagnostic.
3857 * c-errors.c (pedwarn_c99): Likewise.
3858 (pedwarn_c90): Likewise.
3859
815d9cc6
XR
38602017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3861
92a285c1 3862 PR c++/80038
815d9cc6
XR
3863 * c-gimplify.c (c_gimplify_expr): Remove calls to
3864 cilk_gimplifY_call_params_in_spawned_fn.
3865
1c4ea66f
DM
38662017-04-25 David Malcolm <dmalcolm@redhat.com>
3867
3868 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3869 hint for removing extra semicolon.
3870
666f7903
JJ
38712017-04-21 Jakub Jelinek <jakub@redhat.com>
3872
3873 PR c/80468
3874 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3875 enabled, set specs->type to integer_type_node.
3876
5764ee3c
JW
38772017-04-03 Jonathan Wakely <jwakely@redhat.com>
3878
3879 * c-array-notation.c: Fix typo in comment.
3880
10fa8dfb
MP
38812017-03-29 Marek Polacek <polacek@redhat.com>
3882
3883 PR c/79730
3884 * c-decl.c (finish_decl): Check VAR_P.
3885
a9e4a1a5
JJ
38862017-03-27 Jakub Jelinek <jakub@redhat.com>
3887
3888 PR middle-end/80162
3889 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3890 * c-typeck.c (c_mark_addressable): Likewise. Look through
3891 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3892 to ARRAY_TYPE.
3893 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3894
ee3ff394
MP
38952017-03-23 Marek Polacek <polacek@redhat.com>
3896
3897 * c-tree.h: Remove a C_RID_YYCODE reference.
3898
4d1b8e70
JJ
38992017-03-21 Jakub Jelinek <jakub@redhat.com>
3900
3901 PR c/80097
3902 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3903 optional COMPOUND_EXPR with ubsan instrumentation.
3904
31dc71a8
MP
39052017-03-17 Marek Polacek <polacek@redhat.com>
3906
3907 * c-parser.c: Add C11 references.
3908
d579c385
MP
39092017-03-15 Marek Polacek <polacek@redhat.com>
3910
3911 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3912
85059a38
MP
39132017-03-11 Marek Polacek <polacek@redhat.com>
3914
3915 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3916
2f6f187a
DM
39172017-03-10 David Malcolm <dmalcolm@redhat.com>
3918
3919 PR translation/79848
3920 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3921 "%qs".
3922 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3923
36618428
MP
39242017-03-09 Marek Polacek <polacek@redhat.com>
3925
3926 PR sanitizer/79757
3927 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3928 parameter declarations with initializers.
3929
01e5af5a
JJ
39302017-03-09 Jakub Jelinek <jakub@redhat.com>
3931
3932 PR c/79969
3933 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3934 TYPE_STUB_DECL.
3935
a71dbc63
JJ
39362017-03-07 Jakub Jelinek <jakub@redhat.com>
3937
3938 PR c/79834
3939 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3940 for "may only be used in compound statements" diagnostics, change it
3941 such that the same translatable string is used for all pragmas. For
3942 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3943 diagnostics.
3944 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3945 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3946 "may only be used in compound statements" diagnostics, such that the
3947 same translatable string is used for all pragmas.
3948
1ff4bae6
MP
39492017-03-04 Marek Polacek <polacek@redhat.com>
3950
3951 PR c/79847
3952 * c-decl.c (implicit_decl_warning): Add missing space.
3953
7f5a7d78
MP
39542017-03-03 Marek Polacek <polacek@redhat.com>
3955
3956 PR c/79758
3957 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3958 current_function_prototype_arg_types is error_mark_node. Fix
3959 formatting. Use TREE_VALUE instead of TREE_TYPE.
3960
883c8f06
JJ
39612017-03-03 Jakub Jelinek <jakub@redhat.com>
3962
79c9b7a8
JJ
3963 PR c/79837
3964 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3965 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3966 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3967 diagnostics.
3968
883c8f06
JJ
3969 PR c/79836
3970 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3971 instead of %<_Generic>.
3972 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3973 (c_parser_omp_target_exit_data): Use %<release%> instead of
3974 %<release>.
3975
324ff1a0
JJ
39762017-02-28 Jakub Jelinek <jakub@redhat.com>
3977
3978 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3979 instead of just cond ? "..." : "...".
3980 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3981 for "enter"/"exit" keyword.
3982 (c_finish_oacc_routine): Don't use %s to supply portions of the
3983 message.
3984
4227c9ad
JJ
39852017-02-24 Jakub Jelinek <jakub@redhat.com>
3986
3987 PR c++/79588
3988 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3989 handle -Wrestrict here.
3990 * c-typeck.c (build_function_call_vec): Adjust
3991 check_function_arguments caller.
3992
5d972e66
RB
39932017-02-23 Richard Biener <rguenther@suse.de>
3994
3995 PR c/79684
3996 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3997 to initialize c_exprs to return.
3998 (c_parser_gimple_binary_expression): Likewise.
3999 (c_parser_gimple_unary_expression): Likewise.
4000 (c_parser_gimple_postfix_expression): Likewise.
4001
61ac5ebe
MP
40022017-02-22 Marek Polacek <polacek@redhat.com>
4003
4004 PR c/79662
4005 * c-typeck.c (convert_arguments): Handle error_mark_node.
4006
41d1b0b1
PK
40072017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4008
4009 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4010 value of c_parser_parse_ssa_name against error_mark_node and emit
4011 error if ssa name is anonymous and written as default definition.
4012
eab1f169
PK
40132017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4014
4015 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4016 FMA_EXPR.
4017
bcac0b4d
JJ
40182017-02-16 Jakub Jelinek <jakub@redhat.com>
4019
4020 PR c++/79512
4021 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4022 ignore #pragma omp target even when not followed by identifier.
4023
1be33173
PK
40242017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4025
4026 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4027 (c_parser_gimple_unary_expression): Likewise.
4028
aa326bfb
JJ
40292017-02-13 Jakub Jelinek <jakub@redhat.com>
4030
4031 * c-parser.c (c_parser_oacc_declare): Add missing space in
4032 diagnostics.
4033
8a398bc5
PK
40342017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4035
4036 PR c/79478
4037 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4038 set_c_expr_source_range when parsing ssa-name.
4039
3dcde5ef 40402017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 4041 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
4042
4043 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4044 building IL when arguments are error_mark_node.
4045 (c_parser_gimple_unary_expression): Likewise.
4046 (c_parser_gimple_if_stmt): Likewise.
4047 (c_parser_gimple_switch_stmt): Likewise.
4048 (c_parser_gimple_return_stmt): Likewise.
4049 (c_parser_parse_ssa_name): When name lookup fails do not build
4050 an SSA name. Use undeclared rather than not declared in error
4051 reporting.
4052
192b048b
MP
40532017-02-09 Marek Polacek <polacek@redhat.com>
4054
4055 PR c/79428
4056 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4057 instead of c_parser_skip_until_found.
4058
56f71478
JJ
40592017-02-09 Jakub Jelinek <jakub@redhat.com>
4060
4061 PR c/79431
4062 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4063 symtab_node::get on automatic variables.
4064
02889d23
CLT
40652016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4066 Chung-Lin Tang <cltang@codesourcery.com>
4067
4068 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4069 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4070 semantic checking.
4071 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4072
7af4b20d
RB
40732017-02-07 Richard Biener <rguenther@suse.de>
4074
4075 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4076 (c_parser_gimple_postfix_expression_after_primary):
4077 Do not use c_build_function_call_vec to avoid folding and promotion.
4078 Simplify.
4079
e5e391d6
MO
40802017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4081
4082 PR lto/79061
4083 * c-decl.c (pop_scope): Pass main_input_filename to
4084 build_translation_unit_decl.
4085
c2e84327
DM
40862017-01-24 David Malcolm <dmalcolm@redhat.com>
4087
4088 * c-parser.c: Include "read-rtl-function.h" and
4089 "run-rtl-passes.h".
4090 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4091 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4092 production. Update for renaming of field "gimple_pass" to
4093 "gimple_or_rtl_pass". If __RTL was seen, call
4094 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4095 to an auto_timevar, to cope with early exit.
4096 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4097 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4098 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4099 Handle RID_RTL.
4100 (c_parser_parse_rtl_body): New function.
4101 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4102 (struct c_declspecs): Rename field "gimple_pass" to
4103 "gimple_or_rtl_pass". Add field "rtl_p".
4104 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4105 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4106 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4107 (c_parser_gimple_or_rtl_pass_list): ...this.
4108
2ebd93e1
MP
41092017-01-20 Marek Polacek <polacek@redhat.com>
4110
4111 PR c/64279
4112 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4113
b1c95bb5
RB
41142017-01-13 Richard Biener <rguenther@suse.de>
4115
4116 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4117 nops.
4118
25329913
RB
41192017-01-13 Richard Biener <rguenther@suse.de>
4120
4121 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4122 _Literal ( type-name ) number.
4123
6bb4ea5c
RB
41242017-01-12 Richard Biener <rguenther@suse.de>
4125
4126 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4127 __MEM.
4128
6b5b4e9c
JJ
41292017-01-11 Jakub Jelinek <jakub@redhat.com>
4130
4131 PR c++/72813
4132 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4133 PCH file.
4134
e3252775
RB
41352017-01-11 Richard Biener <rguenther@suse.de>
4136
4137 PR bootstrap/79052
4138 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4139 returns on parse errors.
4140
a9342885
MP
41412017-01-04 Marek Polacek <polacek@redhat.com>
4142
4143 PR c++/64767
4144 * c-parser.c (c_parser_postfix_expression): Mark zero character
4145 constants by setting original_type in c_expr.
4146 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4147 with a zero character constant.
4148 (char_type_p): New function.
4149
5dd9a9d0
DM
41502017-01-04 David Malcolm <dmalcolm@redhat.com>
4151
4152 * c-parser.c (c_parser_declaration_or_fndef): Create a
4153 rich_location at init_loc and parse it to start_init.
4154 (last_init_list_comma): New global.
4155 (c_parser_braced_init): Update last_init_list_comma when parsing
4156 commas. Pass it to pop_init_level. Pass location of closing
4157 brace to pop_init_level.
4158 (c_parser_postfix_expression_after_paren_type): Create a
4159 rich_location at type_loc and parse it to start_init.
4160 (c_parser_omp_declare_reduction): Likewise for loc.
4161 * c-tree.h (start_init): Add rich_location * param.
4162 (pop_init_level): Add location_t param.
4163 * c-typeck.c (struct initializer_stack): Add field
4164 "missing_brace_richloc".
4165 (start_init): Add richloc param, use it to initialize
4166 the stack node's missing_brace_richloc.
4167 (last_init_list_comma): New decl.
4168 (finish_implicit_inits): Pass last_init_list_comma to
4169 pop_init_level.
4170 (push_init_level): When finding missing open braces, add fix-it
4171 hints to the richloc.
4172 (pop_init_level): Add "insert_before" param and pass it
4173 when calling pop_init_level. Add fixits about missing
4174 close braces to any richloc. Use the richloc for the
4175 -Wmissing-braces warning.
4176 (set_designator): Pass last_init_list_comma to pop_init_level.
4177 (process_init_element): Likewise.
4178
cbe34bb5
JJ
41792017-01-01 Jakub Jelinek <jakub@redhat.com>
4180
4181 Update copyright years.
4182
d17680f3
JJ
41832016-12-21 Jakub Jelinek <jakub@redhat.com>
4184
0dba7960
JJ
4185 PR bootstrap/78817
4186 * c-typeck.c (build_function_call_vec): If check_function_arguments
4187 returns true, set TREE_NO_WARNING on CALL_EXPR.
4188
d17680f3
JJ
4189 PR c/77767
4190 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4191 to *expr instead of overwriting it.
4192
aa90531e
RB
41932016-12-20 Richard Biener <rguenther@suse.de>
4194
4195 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4196 error recovery.
4197 (c_parser_gimple_statement): Only build assigns for non-error
4198 stmts.
4199 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4200
629b3d75
MJ
42012016-12-14 Martin Jambor <mjambor@suse.cz>
4202
4203 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4204 omp-low.h.
4205 (c_finish_oacc_routine): Adjusted call to
4206 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4207 to use their new names.
4208 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4209 use its new name.
4210 (c_parser_oacc_update): Likewise.
4211 (c_parser_omp_simd): Likewise.
4212 (c_parser_omp_target_update): Likewise.
4213 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4214 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4215 name.
4216 (c_finish_omp_cancellation_point): Likewise.
4217 * gimple-parser.c: Do not include omp-low.h
4218
c5af52eb
CP
42192016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4220 James Norris <jnorris@codesourcery.com>
4221
4222 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4223 EXIT_DATA,WAIT} are not used in compound statements.
4224 (c_parser_oacc_enter_exit_data): Update diagnostics.
4225
48330c93
BE
42262016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4227
4228 PR c++/71973
4229 * c-decl.c (diagnose_mismatched_decls): Use
4230 OPT_Wbuiltin_declaration_mismatch here too.
4231
899ca90e 42322016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
4233 Alan Hayward <alan.hayward@arm.com>
4234 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
4235
4236 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4237 (make_label, finish_struct): Likewise.
4238
1ee62b92 42392016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 4240 Richard Biener <rguenther@suse.de>
22b15758 4241
8e745a17
JJ
4242 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4243 * config-lang.in (gtfiles): Add c/c-parser.h.
4244 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4245 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4246 * c-parser.c (enum c_id_kind, struct c_token,
4247 c_parser_next_token_is, c_parser_next_token_is_not,
4248 c_parser_next_token_is_keyword,
4249 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4250 Split out to ...
4251 * c-parser.h: ... new header.
4252 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 4253 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
4254 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4255 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4256 c_parser_error, c_parser_require, c_parser_skip_until_found,
4257 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4258 c_parser_type_name): Export.
4259 (c_parser_tokens_buf): New function.
4260 (c_parser_error): Likewise.
4261 (c_parser_set_error): Likewise.
4262 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
4263 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4264 via c_parser_parse_gimple_body.
8e745a17
JJ
4265 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4266 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4267 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4268 c_parser_error, c_parser_require, c_parser_skip_until_found,
4269 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4270 c_parser_type_name): Declare.
1ee62b92
PG
4271 (struct c_parser): Declare forward.
4272 (c_parser_tokens_buf): Declare.
8e745a17
JJ
4273 (c_parser_error): Likewise.
4274 (c_parser_set_error): Likewise.
4275 * gimple-parser.c: New file.
4276 * gimple-parser.h: Likewise.
1ee62b92 4277
22b15758
UB
42782016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4279
4280 PR c/35503
4281 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4282 warn_for_restrict.
4283
84ff4775
LCW
42842016-09-11 Le-Chun Wu <lcwu@google.com>
4285 Mark Wielaard <mjw@redhat.com>
4286
4287 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4288 to the given -Wshadow= variant.
4289
4d0cdd0c
TP
42902016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4291
4292 * c-typeck.c: Include memmodel.h.
4293
1202f33e
JJ
42942016-10-13 Jakub Jelinek <jakub@redhat.com>
4295
4296 PR target/77957
4297 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4298 instead of lhd_return_null_tree_v.
4299
8a14afd0
BS
43002016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4301
4302 PR c++/69733
4303 * c-decl.c (smallest_type_quals_location): New static function.
4304 (grokdeclarator): Try to find the correct location for an ignored
4305 qualifier.
4306
81fea426
MP
43072016-09-26 Marek Polacek <polacek@redhat.com>
4308
4309 PR c/7652
4310 * c-decl.c (pop_scope): Add gcc_fallthrough.
4311
43122016-09-26 Marek Polacek <polacek@redhat.com>
4313
4314 PR c/7652
4315 * c-parser.c (struct c_token): Add flags field.
4316 (c_lex_one_token): Pass it to c_lex_with_flags.
4317 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4318 into IFN_FALLTHROUGH.
4319 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4320 attribute fallthrough after a case label or default label.
4321 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4322
9a2300e9
MP
43232016-09-24 Marek Polacek <polacek@redhat.com>
4324
4325 PR c/77490
4326 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4327 have boolean value. Warn about ++/-- on booleans.
4328
7de76362
JJ
43292016-09-23 Jakub Jelinek <jakub@redhat.com>
4330
4331 * c-parser.c (incomplete_record_decls): Remove unnecessary
4332 = vNULL initialization of file scope vec.
4333
5b73d2ab
MP
43342016-09-16 Marek Polacek <polacek@redhat.com>
4335
4336 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4337
e51fbec3
MP
43382016-09-14 Marek Polacek <polacek@redhat.com>
4339
4340 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4341 (fix_array_notation_expr): Likewise.
4342 * c-decl.c (finish_decl): Likewise.
4343 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4344 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4345 (function_to_pointer_conversion): Use false instead of 0.
4346 (convert_lvalue_to_rvalue): Likewise.
4347 (parser_build_unary_op): Likewise.
4348 (build_atomic_assign): Likewise.
4349 (build_unary_op): Change nonconvert parameter type to bool, use
4350 true/false instead of 1/0.
4351 (build_binary_op): Use true instead of 1.
4352
254830ba
DM
43532016-09-13 David Malcolm <dmalcolm@redhat.com>
4354
4355 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4356 of add_fixit_insert to add_fixit_insert_before.
4357
4c13ba17
MP
43582016-09-13 Marek Polacek <polacek@redhat.com>
4359
4360 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4361 it.
4362
54dcdb88
BE
43632016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4364
4365 PR c++/77496
4366 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4367 COMPOUND_EXPR to warn_for_omitted_condop.
4368
e5106e27
DM
43692016-09-07 David Malcolm <dmalcolm@redhat.com>
4370
4371 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4372 c_get_substring_location for this new langhook.
4373
9dc5773f
JJ
43742016-09-02 Jakub Jelinek <jakub@redhat.com>
4375
4376 PR c/65467
4377 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4378 flag_openmp.
4379 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4380 instead of mark_exp_read on low_bound/length expression.
4381 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4382 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4383 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4384 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4385 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4386 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4387 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4388 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4389 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4390 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4391 instead of mark_expr_read.
4392 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4393 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4394 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4395 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4396 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4397 array section bases outside of depend clause, for depend clause
4398 use convert_lvalue_to_rvalue on the base.
4399 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4400 linear, aligned, map, to and from clauses.
4401 (c_omp_clause_copy_ctor): New function.
4402
295844f6
MP
44032016-09-01 Marek Polacek <polacek@redhat.com>
4404
4405 PR c/7652
4406 * c-typeck.c (composite_type): Add FALLTHRU comment.
4407
089af25c
DM
44082016-08-31 David Malcolm <dmalcolm@redhat.com>
4409
4410 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4411 to the insertion fixits for "struct", "union", and "enum".
4412
f9087798
DM
44132016-08-30 David Malcolm <dmalcolm@redhat.com>
4414
4415 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4416 rather than add_fixit_misspelled_id.
4417 (undeclared_variable): Likewise.
4418 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4419 now-redundant "here" params from add_fixit_insert method calls.
4420 (c_parser_parameter_declaration): Likewise.
4421 * c-typeck.c (build_component_ref): Remove now-redundant range
4422 param from add_fixit_replace method calls.
4423
ebef225f
MP
44242016-08-25 Marek Polacek <polacek@redhat.com>
4425
4426 * c-typeck.c (parser_build_binary_op): Pass LHS to
4427 warn_logical_not_parentheses.
4428
fe377a48
MP
44292016-08-25 Marek Polacek <polacek@redhat.com>
4430
4431 PR c/77323
4432 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4433 or _FloatN or _FloatNx is not supported.
4434 (finish_declspecs): Set type to integer_type_node when _FloatN or
4435 _FloatNx is not supported.
4436
c65699ef
JM
44372016-08-19 Joseph Myers <joseph@codesourcery.com>
4438
4439 PR c/32187
4440 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4441 (struct c_declspecs): Add field floatn_nx_idx.
4442 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4443 and _FloatNx type specifiers.
4444 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4445 (c_parser_declspecs, c_parser_attribute_any_word)
4446 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4447 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4448 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4449 narrower than double.
4450
2f1364c2
JJ
44512016-08-12 Jakub Jelinek <jakub@redhat.com>
4452 Martin Liska <mliska@suse.cz>
4453
4454 PR c/67410
4455 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4456 % to determine val element to change. Assert that
4457 wchar_bytes * charwidth fits into val array.
4458
191816a3
MP
44592016-08-12 Marek Polacek <polacek@redhat.com>
4460
4461 PR c/7652
4462 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4463 (c_parser_postfix_expression): Likewise.
4464 * c-typeck.c (build_unary_op): Adjust fall through comment.
4465 (c_mark_addressable): Likewise.
4466
b95a64bb
JJ
44672016-08-11 Jakub Jelinek <jakub@redhat.com>
4468
4469 PR c/72816
4470 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4471 array member through typedef, for orig_qual_indirect == 0 clear
4472 orig_qual_type.
4473
895aa8e1
DM
44742016-08-08 David Malcolm <dmalcolm@redhat.com>
4475
4476 PR c/64955
4477 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4478 this up to selftest::run_c_tests.
4479 (selftest::run_c_tests): New function.
4480
0b212d8c
TS
44812016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4482
ae9281fc
TS
4483 * c-parser.c (struct oacc_routine_data): Add error_seen and
4484 fndecl_seen members.
4485 (c_finish_oacc_routine): Use these.
4486 (c_parser_declaration_or_fndef): Adjust.
4487 (c_parser_oacc_routine): Likewise. Support more C language
4488 constructs, and improve diagnostics. Move pragma context
4489 checking...
4490 (c_parser_pragma): ... here.
4491
0b212d8c
TS
4492 * c-parser.c (struct oacc_routine_data): New.
4493 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4494 Simplify code.
4495 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4496 declare target" attribute.
4497
76e2c821
JB
44982016-08-01 Jan Beulich <jbeulich@suse.com>
4499
4500 * c-fold.c (c_fully_fold_internal): Also emit shift count
4501 warnings for vector types.
4502 * c-typeck.c (build_binary_op): Likewise.
4503
f618a472
MP
45042016-07-29 Marek Polacek <polacek@redhat.com>
4505
4506 PR c/71742
4507 * c-decl.c (finish_struct): Rephrase an error message.
4508
efd0786f
MP
4509 PR c/71853
4510 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4511 to error node for invalid code.
4512
e00dceaf
MP
4513 PR c/71573
4514 * c-decl.c (implicitly_declare): Return decl early not only for
4515 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4516
673a107a
JJ
45172016-07-29 Jakub Jelinek <jakub@redhat.com>
4518
4519 PR c/71969
4520 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4521 on GNU extern inline functions.
4522
a5b5c8b6
MP
45232016-07-29 Marek Polacek <polacek@redhat.com>
4524
4525 PR c/71583
4526 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4527 check expr.value.
4528
e3fe09c1
UB
45292016-07-22 Uros Bizjak <ubizjak@gmail.com>
4530
4531 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4532
7c8f7eaa
DM
45332016-07-20 David Malcolm <dmalcolm@redhat.com>
4534
4535 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4536 spellcheck-tree.h
4537 (best_macro_match): Likewise, converting from a typedef to a
4538 subclass.
4539 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4540 (lookup_name_fuzzy): Update for change of best_macro_match to a
4541 subclass with a ctor that calls cpp_forall_identifiers.
4542
de6a69ee
DM
45432016-07-20 David Malcolm <dmalcolm@redhat.com>
4544
4545 * c-decl.c (implicit_decl_warning): Update for conversion of
4546 return type of lookup_name_fuzzy to const char *.
4547 (undeclared_variable): Likewise.
4548 (lookup_name_fuzzy): Convert return type from tree to
4549 const char *.
4550 * c-parser.c (c_parser_declaration_or_fndef): Update for
4551 conversion of return type of lookup_name_fuzzy to const char *.
4552 (c_parser_parameter_declaration): Likewise.
4553
b1c9c068
CP
45542016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4555
4556 * c-parser.c (c_parser_oacc_declare): Don't scan for
4557 GOMP_MAP_POINTER.
4558 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4559 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4560 zero-length subarrays.
4561
ddbbcb19
JJ
45622016-07-15 Jakub Jelinek <jakub@redhat.com>
4563
4564 PR c/71858
4565 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4566 instead of FUZZY_LOOKUP_NAME.
4567 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4568 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4569
dd36b877
JJ
45702016-07-14 Jakub Jelinek <jakub@redhat.com>
4571
4572 PR c/71858
4573 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4574
8c681247
TS
45752016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4576
4577 * c-parser.c (c_parser_generic_selection): Make type of variable
4578 auto_vec.
4579 (c_parser_omp_declare_simd): Likewise.
4580
bf4fa671
TS
45812016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4582
4583 * c-decl.c (struct c_struct_parse_info): Change member types
4584 from vec to auto_vec.
4585 (start_struct): Adjust.
4586 (finish_struct): Likewise.
4587
557e8c49
JJ
45882016-07-02 Jakub Jelinek <jakub@redhat.com>
4589
4590 PR c/71719
4591 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4592
54d19c3b
TS
45932016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4594
4595 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4596 Move pragma context checking into...
4597 (c_parser_omp_cancellation_point): ... here, and improve
4598 diagnostic messages.
4599 * c-typeck.c (c_finish_omp_cancel)
4600 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4601
152ef731
JJ
46022016-06-29 Jakub Jelinek <jakub@redhat.com>
4603
4604 PR c/71685
4605 * c-typeck.c (c_build_qualified_type): Don't clear
4606 C_TYPE_INCOMPLETE_VARS for the main variant.
4607
46082016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4609
4610 PR c/71552
4611 * c-typeck.c (output_init_element): Diagnose incompatible types
4612 before non-constant initializers.
4613
e9ac1f86
JJ
46142016-06-28 Jakub Jelinek <jakub@redhat.com>
4615
4616 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4617
277d7ee0
AK
46182016-06-23 Andi Kleen <ak@linux.intel.com>
4619
4620 * Make-lang.in: Add support for autofdo.
4621
1a4f11c8
DM
46222016-06-22 David Malcolm <dmalcolm@redhat.com>
4623
4624 PR c/70339
4625 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4626 (implicit_decl_warning): When issuing warnings for implicit
4627 declarations, attempt to provide a suggestion via
4628 lookup_name_fuzzy.
4629 (undeclared_variable): Likewise when issuing errors.
4630 (lookup_name_in_scope): Likewise.
4631 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4632 (best_macro_match): New typedef.
4633 (find_closest_macro_cpp_cb): New function.
4634 (lookup_name_fuzzy): New function.
4635 * c-parser.c: Include gcc-rich-location.h.
4636 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4637 (c_keyword_starts_typename): ...this new function.
4638 (c_parser_declaration_or_fndef): When issuing errors about
4639 missing "struct" etc, add a fixit. For other kinds of errors,
4640 attempt to provide a suggestion via lookup_name_fuzzy.
4641 (c_parser_parms_declarator): When looking ahead to detect typos in
4642 type names, also reject CPP_KEYWORD.
4643 (c_parser_parameter_declaration): When issuing errors about
4644 unknown type names, attempt to provide a suggestion via
4645 lookup_name_fuzzy.
4646 * c-tree.h (c_keyword_starts_typename): New prototype.
4647
5a578671
JM
46482016-06-20 Joseph Myers <joseph@codesourcery.com>
4649
4650 PR c/71601
4651 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4652 c_common_type returns error_mark_node.
4653
3f8257db 46542016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4655
4656 PR c/69507
4657 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4658 __alignof__ (expression).
4659
6a3f203c
DM
46602016-06-14 David Malcolm <dmalcolm@redhat.com>
4661
4662 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4663
264757fb
DM
46642016-06-14 David Malcolm <dmalcolm@redhat.com>
4665
4666 * c-typeck.c (build_component_ref): Simplify fixit code by
4667 using gcc_rich_location::add_fixit_misspelled_id.
4668 (set_init_label): Likewise.
4669
f7e4f2e3
DM
46702016-06-13 David Malcolm <dmalcolm@redhat.com>
4671
4672 * c-parser.c (c_parser_initelt): Provide location of name for new
4673 location_t param of set_init_label.
4674 * c-tree.h (set_init_label): Add location_t param.
4675 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4676 param and use it when issuing error messages about unrecognized
4677 field names. Attempt to provide a fixit hint if appropriate,
4678 otherwise update the error message to provide the type name.
4679
4b1ffdb1
TS
46802016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4681
4682 PR c/71381
4683 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4684 Loosen checking.
4685
44a845ca
MS
46862016-06-08 Martin Sebor <msebor@redhat.com>
4687 Jakub Jelinek <jakub@redhat.com>
4688
4689 PR c++/70507
4690 PR c/68120
4691 * c-typeck.c (convert_arguments): Don't promote last argument
4692 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4693
92a5f2ba
MP
46942016-06-08 Marek Polacek <polacek@redhat.com>
4695
4696 PR c/71418
4697 * c-decl.c (grokdeclarator): Check TYPE_P.
4698
08203f73
MP
4699 PR c/71426
4700 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4701 code.
4702
6ffd47b7
DM
47032016-06-07 David Malcolm <dmalcolm@redhat.com>
4704
4705 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4706 and structure element reference, capture the location of the
4707 element name token and pass it to build_component_ref.
4708 (c_parser_postfix_expression_after_primary): Likewise for
4709 structure element dereference.
4710 (c_parser_omp_variable_list): Likewise for
4711 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4712 * c-tree.h (build_component_ref): Add location_t param.
4713 * c-typeck.c (build_component_ref): Add location_t param
4714 COMPONENT_LOC. Use it, if available, when issuing hints about
4715 mispelled member names to provide a fixit replacement hint.
4716
1f40cff3
MP
47172016-06-06 Marek Polacek <polacek@redhat.com>
4718
4719 PR c/71362
4720 * c-parser.c (c_parser_direct_declarator): Set location.
4721
5545a907
MP
47222016-06-06 Marek Polacek <polacek@redhat.com>
4723
4724 * c-typeck.c (comptypes_internal): Handle comparisons of
4725 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4726 TYPE_REF_CAN_ALIAS_ALL.
4727
b605f663
CLT
47282016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4729
4730 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4731 arguments as addressable when async clause exists.
4732
00631022
JJ
47332016-05-30 Jakub Jelinek <jakub@redhat.com>
4734
4735 PR c++/71349
4736 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4737 when combined with target construct.
4738
7211a097
JJ
47392016-05-26 Jakub Jelinek <jakub@redhat.com>
4740
4741 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4742 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4743
95efe6b6
MP
47442016-05-25 Marek Polacek <polacek@redhat.com>
4745
4746 PR c/71265
4747 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4748
a23faf7a
MP
4749 PR c/71266
4750 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4751
e46c7770
CP
47522016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4753
4754 * c-parser.c (c_parser_oacc_declare): Add support for
4755 GOMP_MAP_FIRSTPRIVATE_POINTER.
4756 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4757 argument with enum c_omp_region_type ort.
4758 (handle_omp_array_sections): Likewise. Update call to
4759 handle_omp_array_sections_1.
4760 (c_finish_omp_clauses): Add specific errors and warning messages for
4761 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4762 call to handle_omp_array_sections.
4763
a04e69c0
TS
47642016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4765
4766 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4767
f17a223d
RB
47682016-05-24 Richard Biener <rguenther@suse.de>
4769
4770 PR middle-end/70434
4771 PR c/69504
4772 * c-typeck.c (build_array_ref): Do not complain about indexing
4773 non-lvalue vectors. Adjust for function name change.
4774
79063edd
MS
47752016-05-20 Martin Sebor <msebor@redhat.com>
4776
4777 PR c/71115
4778 * c-typeck.c (error_init): Use
4779 expansion_point_location_if_in_system_header.
4780 (warning_init): Same.
4781
8a40fef3
DM
47822016-05-19 David Malcolm <dmalcolm@redhat.com>
4783
4784 PR c/71171
4785 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4786 in error-handling.
4787 (c_parser_postfix_expression): Likewise.
4788 * c-tree.h (c_expr::set_error): New method.
4789 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4790 that result's range is initialized.
4791
e9892350
JG
47922016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4793
4794 * c-typeck.c (parser_build_unary_op): Fix formatting.
4795
8fad45f5
MW
47962016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4797
4798 * c-decl.c (grokdeclarator): Remove errmsg and use of
4799 targetm.invalid_return_type.
4800 (grokparms): Remove errmsg and use of
4801 targetm.invalid_parameter_type.
4802
aa4b467b
JM
48032016-05-13 Joseph Myers <joseph@codesourcery.com>
4804
4805 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4806 function return type.
4807
4f2e1536
MP
48082016-05-12 Marek Polacek <polacek@redhat.com>
4809
4810 PR c/70756
4811 * c-decl.c (build_compound_literal): Pass LOC down to
4812 c_incomplete_type_error.
4813 * c-tree.h (require_complete_type): Adjust declaration.
4814 (c_incomplete_type_error): Likewise.
4815 * c-typeck.c (require_complete_type): Add location parameter, pass it
4816 down to c_incomplete_type_error.
4817 (c_incomplete_type_error): Add location parameter, pass it down to
4818 error_at.
4819 (build_component_ref): Pass location down to c_incomplete_type_error.
4820 (default_conversion): Pass location down to require_complete_type.
4821 (build_array_ref): Likewise.
4822 (build_function_call_vec): Likewise.
4823 (convert_arguments): Likewise.
4824 (build_unary_op): Likewise.
4825 (build_c_cast): Likewise.
4826 (build_modify_expr): Likewise.
4827 (convert_for_assignment): Likewise.
4828 (c_finish_omp_clauses): Likewise.
4829
d6e83a8d
MM
48302016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4831
4832 PR c/43651
4833 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4834 is enabled.
4835 * c-errors.c (pedwarn_c90): Return true if warned.
4836 * c-tree.h (pedwarn_c90): Change return type to bool.
4837 (enum c_declspec_word): Add new enumerator cdw_atomic.
4838
5c3a10fb
MP
48392016-05-11 Marek Polacek <polacek@redhat.com>
4840
4841 PR c++/71024
4842 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4843 diagnose_mismatched_attributes and call it.
4844
cf68d92c
MP
48452016-05-10 Marek Polacek <polacek@redhat.com>
4846
4847 PR c/70255
4848 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4849 on a declaration following the definition.
4850
351f85c5
JJ
48512016-05-05 Jakub Jelinek <jakub@redhat.com>
4852
4853 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4854 parse it through to c_parser_c99_block_statement.
4855 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4856 caller.
4857
deef7113
MP
48582016-05-04 Marek Polacek <polacek@redhat.com>
4859
4860 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4861 OPT_Wdangling_else.
4862
de55efd5
MP
48632016-05-04 Marek Polacek <polacek@redhat.com>
4864
4865 PR c/48778
4866 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4867 for macro expansions.
4868
79ce98bc
MP
48692016-05-03 Marek Polacek <polacek@redhat.com>
4870
4871 PR c/70859
4872 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4873 check_builtin_function_arguments.
4874
fb2647aa
RB
48752016-05-03 Richard Biener <rguenther@suse.de>
4876
4877 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4878 the checksum from the previous stage.
4879
77886428
CP
48802016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4881
4882 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4883 c_finish_omp_clauses.
4884 (c_parser_omp_all_clauses): Likewise.
4885 (c_parser_oacc_cache): Likewise.
4886 (c_parser_oacc_loop): Likewise.
4887 (omp_split_clauses): Likewise.
4888 (c_parser_omp_declare_target): Likewise.
4889 (c_parser_cilk_all_clauses): Likewise.
4890 (c_parser_cilk_for): Likewise.
4891 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4892 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4893
7176a4a0
MP
48942016-05-02 Marek Polacek <polacek@redhat.com>
4895
4896 PR c/70851
4897 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4898 incomplete type.
4899
e7ff0319
CP
49002016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4901
4902 PR middle-end/70626
4903 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4904 OACC_LOOP_CLAUSE_MASK.
4905 (c_parser_oacc_kernels_parallel): Update call to
4906 c_oacc_split_loop_clauses.
4907
9f405ce1
AM
49082016-04-28 Andrew MacLeod <amacleod@redhat.com>
4909
4910 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4911 argument to build_modify_expr in two cases.
4912
c1e1f433
BS
49132016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4914
4915 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4916 warn_for_memset instead of warning directly here.
4917
2448a956
MP
49182016-04-26 Marek Polacek <polacek@redhat.com>
4919
4920 PR c/67784
4921 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4922 out of ...
4923 (c_parser_for_statement): ... here.
4924 (c_parser_if_statement): Use it.
4925 (c_parser_switch_statement): Use it.
4926 (c_parser_while_statement): Use it.
4927
b02a5e26
MP
4928 PR c/70791
4929 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4930
477d4906
IV
49312016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4932
4933 PR c++/69363
4934 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4935 instead of c_finish_cilk_clauses.
4936 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4937 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4938 floating-point variables in the linear clause for Cilk Plus.
4939
fe37c7af
MM
49402016-04-18 Michael Matz <matz@suse.de>
4941
4942 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4943 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4944
949505a9
MP
49452016-04-15 Marek Polacek <polacek@redhat.com>
4946
4947 PR c/70671
4948 * c-typeck.c (build_unary_op): Pass location down to error and
4949 warning call.
4950
dda1bf61
JJ
49512016-04-15 Jakub Jelinek <jakub@redhat.com>
4952
4953 PR c/70436
4954 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4955 where needed.
4956 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4957 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4958 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4959 Adjust c_parser_pragma callers.
4960 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4961 caller.
4962 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4963 c_parser_statement.
4964 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4965 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4966 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4967 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4968 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4969 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4970 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4971 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4972 down where needed.
4973 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4974 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4975 calls.
4976
99cd9857
MP
49772016-04-13 Marek Polacek <polacek@redhat.com>
4978
4979 PR c/70436
4980 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4981 adjust callers.
4982 (c_parser_statement): Likewise.
4983 (c_parser_c99_block_statement): Likewise.
4984 (c_parser_while_statement): Likewise.
4985 (c_parser_for_statement): Likewise.
4986 (c_parser_if_body): Don't set IF_P here.
4987 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4988 about dangling else here.
4989 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4990 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4991 warn about dangling else here.
4992
f13355da
MP
49932016-04-04 Marek Polacek <polacek@redhat.com>
4994
4995 PR c/70307
4996 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4997
5fde6a45
MP
49982016-03-31 Marek Polacek <polacek@redhat.com>
4999
5000 PR c/70297
5001 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5002
4bbf545b
DM
50032016-03-18 David Malcolm <dmalcolm@redhat.com>
5004
5005 PR c/70281
5006 * c-parser.c (c_parser_postfix_expression): Set the source range
5007 for uses of "__builtin_types_compatible_p".
5008
fcc2b74f
JJ
50092016-03-17 Jakub Jelinek <jakub@redhat.com>
5010
5011 PR c/70280
5012 * c-typeck.c (composite_type): Don't count void_list_node
5013 into len, if the list is terminated by void_list_node, start
5014 with void_list_node instead of NULL for newargs. Stop
5015 at void_list_node.
5016
ab4c578f
MP
50172016-03-16 Marek Polacek <polacek@redhat.com>
5018
5019 PR c/70093
5020 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5021 nested functions returning VM types.
5022
96b3c82d
CP
50232016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5024
5025 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5026 when calling c_finish_omp_clauses.
5027
29b9828f
BS
50282016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5029
5030 PR c/69824
5031 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5032 for later.
5033
7ff6ca38
MP
50342016-03-04 Marek Polacek <polacek@redhat.com>
5035
5036 PR c/69798
5037 * c-parser.c (c_parser_postfix_expression): Call
5038 c_parser_cast_expression rather than c_parser_postfix_expression.
5039
686e2237
JJ
50402016-03-01 Jakub Jelinek <jakub@redhat.com>
5041
5042 PR c/69796
5043 PR c/69974
5044 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5045 of incomplete decls to error_mark_node.
5046
0b05329b
MP
50472016-02-24 Marek Polacek <polacek@redhat.com>
5048
5049 PR c/69819
5050 * c-decl.c (finish_decl): Don't update the copy of the type of a
5051 different decl type.
5052
067fbd8b
JJ
50532016-02-23 Jakub Jelinek <jakub@redhat.com>
5054
5055 PR objc/69844
5056 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5057 in id_kind reclassification.
5058
bf14eba2
JJ
50592016-02-16 Jakub Jelinek <jakub@redhat.com>
5060
5061 PR c/69835
5062 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5063
ba539195
JN
50642016-02-16 James Norris <jnorris@codesourcery.com>
5065
5066 PR c/64748
5067 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5068
16595a1f
BS
50692016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5070
f48dfe98
BS
5071 * c-decl.c (build_null_declspecs): Zero the entire struct.
5072
16595a1f
BS
5073 PR c/69522
5074 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5075 callers changed. If nested_p is true, use it to call
5076 finish_implicit_inits.
5077 * c-tree.h (finish_implicit_inits): Declare.
5078 * c-typeck.c (finish_implicit_inits): New function. Move code
5079 from ...
5080 (push_init_level): ... here.
5081 (set_designator, process_init_element): Call finish_implicit_inits.
5082
66756373
JJ
50832016-02-11 Jakub Jelinek <jakub@redhat.com>
5084
5085 PR c/69768
5086 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5087 arguments for -Waddress warning.
5088
1066e9b5
JJ
50892016-02-04 Jakub Jelinek <jakub@redhat.com>
5090
5091 PR c/69669
5092 * c-decl.c (finish_enum): When honoring mode attribute,
5093 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5094
3a5d2ba4
JJ
50952016-01-29 Jakub Jelinek <jakub@redhat.com>
5096
5097 PR debug/69518
5098 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5099 all type variants, not just TYPE_MAIN_VARIANT.
5100
cbdd8ae0
JJ
51012016-01-27 Jakub Jelinek <jakub@redhat.com>
5102
5103 PR debug/66869
5104 * c-decl.c (c_write_global_declarations_1): Warn with
5105 warn_unused_function if static prototype without definition
5106 is not C_DECL_USED.
5107
fa74a4bc
MP
51082016-01-27 Marek Polacek <polacek@redhat.com>
5109
5110 PR c/68062
5111 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5112 to unsigned, if needed. Add -Wsign-compare warning.
5113
13f92e8d
JJ
51142016-01-26 Jakub Jelinek <jakub@redhat.com>
5115
5116 PR tree-optimization/69483
5117 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5118
cd8e73dc 51192016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
5120
5121 PR c/24293
5122 * c-tree.h (incomplete_record_decls): Declare.
5123 * c-parser.c (incomplete_record_decls): Define.
5124 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5125 report error if any decl has zero size.
5126 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5127 or enum type to incomplete_record_decls.
5128
e6d6ec9e
TV
51292016-01-14 Tom de Vries <tom@codesourcery.com>
5130
5131 PR tree-optimization/68773
5132 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5133 set force_output.
5134
00083992
MP
51352016-01-14 Marek Polacek <polacek@redhat.com>
5136
5137 PR c/69262
5138 * c-decl.c (grokdeclarator): Provide more information for invalid
5139 array declarations.
5140
7443cf13
DM
51412016-01-06 David Malcolm <dmalcolm@redhat.com>
5142
5143 * c-parser.c (c_parser_unary_expression): For dereferences, build
5144 a combined location before calling build_indirect_ref, so that
5145 error reports cover the full range, manually updating the c_expr
5146 src_range.
5147
6b131d5b
MP
51482016-01-06 Marek Polacek <polacek@redhat.com>
5149
5150 PR sanitizer/69099
5151 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5152 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5153 NULL.
5154
818ab71a
JJ
51552016-01-04 Jakub Jelinek <jakub@redhat.com>
5156
5157 Update copyright years.
5158
2fe0a208
MP
51592016-01-04 Marek Polacek <polacek@redhat.com>
5160
5161 PR c/68908
5162 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5163 optimization to use __atomic_fetch_* built-in if possible.
5164
c7b48c8a
TS
51652015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5166
5167 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5168 into...
5169 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5170 all users.
5171
fda5652f
MP
51722015-12-22 Marek Polacek <polacek@redhat.com>
5173
5174 PR c/69002
5175 * c-typeck.c (build_component_ref): Warn when acessing elements of
5176 atomic structures or unions.
5177
745e411d
DM
51782015-12-21 David Malcolm <dmalcolm@redhat.com>
5179
5180 * c-typeck.c: Include "gcc-rich-location.h".
5181 (build_binary_op): In the two places that call binary_op_error,
5182 create a gcc_rich_location and populate it with the location of
5183 the binary op and its two operands.
5184
94c40e19
DM
51852015-12-16 David Malcolm <dmalcolm@redhat.com>
5186
5187 * c-parser.c (c_parser_statement_after_labels): When calling
5188 c_finish_return, Use the return expression's location if it has
5189 one, falling back to the location of the first token within it.
5190 * c-typeck.c (c_finish_return): When issuing warnings about
5191 the incorrect presence/absence of a return value, issue a note
5192 showing the declaration of the function.
5193
de67c4c3
DM
51942015-12-16 David Malcolm <dmalcolm@redhat.com>
5195
5196 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5197 to 4.
5198 (c_parser_peek_nth_token): New function.
5199 (c_parser_peek_conflict_marker): New function.
5200 (c_parser_error): Detect conflict markers and report them as such.
5201
a10704e1
DM
52022015-12-16 David Malcolm <dmalcolm@redhat.com>
5203
5204 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5205 to preserve range information for the primary expression
5206 in the call to c_parser_postfix_expression_after_primary.
5207
8062bca6
DM
52082015-12-16 David Malcolm <dmalcolm@redhat.com>
5209
5210 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5211 expression location, falling back on the first token location,
5212 rather than always using the latter.
5213
d06f8b75
MP
52142015-12-16 Marek Polacek <polacek@redhat.com>
5215
5216 PR c/64637
5217 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5218 available.
5219
2994fb91
MP
52202015-12-15 Marek Polacek <polacek@redhat.com>
5221
5222 PR c/68907
5223 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5224 artificial decl.
5225
a1b93f8d
DM
52262015-12-08 David Malcolm <dmalcolm@redhat.com>
5227
5228 * c-parser.c (c_parser_alignof_expression): Capture location of
5229 closing parenthesis (if any), or of end of unary expression, and
5230 use it to build a src_range for the expression.
5231
46c6e1e2
DM
52322015-12-08 David Malcolm <dmalcolm@redhat.com>
5233
5234 PR c/68757
5235 * c-parser.c (c_parser_get_builtin_args): Add
5236 "out_close_paren_loc" param, and write back to it.
5237 (c_parser_postfix_expression): Capture the closing
5238 parenthesis location for RID_CHOOSE_EXPR,
5239 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5240 RID_BUILTIN_SHUFFLE and use it to set the source range
5241 for such expressions; within RID_BUILTIN_COMPLEX set
5242 the underlying location.
5243
66189108
MP
52442015-12-07 Marek Polacek <polacek@redhat.com>
5245
5246 PR c/68668
5247 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5248 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5249
f187980b
EB
52502015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5251
5252 * c-tree.h (c_build_va_arg): Adjust prototype.
5253 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5254 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5255 parameter, adjust throughout and issue an error if EXPR is a component
5256 with reverse storage order.
5257
4250754e
JM
52582015-12-02 Jason Merrill <jason@redhat.com>
5259
5260 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5261 (c_fully_fold_internal, decl_constant_value_for_optimization):
5262 Move from c-common.c.
5263 * c-tree.h: Declare decl_constant_value_for_optimization.
5264 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5265
e9e32ee6
JM
52662015-12-02 Joseph Myers <joseph@codesourcery.com>
5267
5268 PR c/68162
5269 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5270 following link from declarator to next declarator. Track original
5271 qualified type and pass it to c_build_qualified_type.
5272 * c-typeck.c (c_build_qualified_type): Add arguments
5273 orig_qual_type and orig_qual_indirect.
5274
ff7a55bf
TS
52752015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5276
5277 * c-parser.c (c_parser_omp_clause_name)
5278 (c_parser_oacc_all_clauses): Alphabetical sorting.
5279
657e4e47
JJ
52802015-12-02 Jakub Jelinek <jakub@redhat.com>
5281
5282 PR c/68533
5283 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5284 for diagnostics.
5285
37d5ad46
JB
52862015-12-01 Julian Brown <julian@codesourcery.com>
5287 Cesar Philippidis <cesar@codesourcery.com>
5288 James Norris <James_Norris@mentor.com>
5289
5290 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5291 (c_parser_oacc_clause_use_device): New function.
5292 (c_parser_oacc_all_clauses): Add use_device support.
5293 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5294 (c_parser_oacc_host_data): New function.
5295 (c_parser_omp_construct): Add host_data support.
5296 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5297 * c-typeck.c (c_finish_oacc_host_data): New function.
5298 (c_finish_omp_clauses): Add use_device support.
5299
a4850ce9
JH
53002015-11-29 Jan Hubicka <hubicka@ucw.cz>
5301
5302 PR c/67106
5303 * c-decl.c: Set TYPE_PACKED in variants.
5304
b58d3df2
ML
53052015-11-27 Martin Liska <mliska@suse.cz>
5306
5307 PR c++/68312
5308 * c-array-notation.c (fix_builtin_array_notation_fn):
5309 Use release_vec_vec instead of vec::release.
5310 (build_array_notation_expr): Likewise.
5311 (fix_conditional_array_notations_1): Likewise.
5312 (fix_array_notation_expr): Likewise.
5313 (fix_array_notation_call_expr): Likewise.
5314
aec17bfe
JJ
53152015-11-27 Jakub Jelinek <jakub@redhat.com>
5316
5317 PR c/63326
5318 * c-parser.c (c_parser_compound_statement_nostart): If
5319 last_label is true, use pragma_stmt instead of pragma_compound
5320 as second c_parser_pragma argument.
5321 (c_parser_omp_ordered, c_parser_omp_target_update,
5322 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5323 false as second argument to c_parser_skip_to_pragma_eol after
5324 diagnosing standalone directives used in pragma_stmt context.
5325
688c4de0
IV
53262015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5327
5328 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5329 with "if (ENABLE_OFFLOADING)".
5330
cbd03aee
DM
53312015-11-23 David Malcolm <dmalcolm@redhat.com>
5332
5333 PR objc/68438
5334 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5335 for various Objective-C constructs: Class.name syntax,
5336 @selector(), @protocol(), @encode(), and [] message syntax.
5337
a87a86e1
DM
53382015-11-20 David Malcolm <dmalcolm@redhat.com>
5339
5340 PR 62314
5341 * c-typeck.c (should_suggest_deref_p): New function.
5342 (build_component_ref): Special-case POINTER_TYPE when
5343 generating a "not a structure of union" error message, and
5344 suggest a "->" rather than a ".", providing a fix-it hint.
5345
8ece8dfb
DM
53462015-11-19 David Malcolm <dmalcolm@redhat.com>
5347
5348 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5349 candidate into a new function, find_closest_identifier.
5350
433068cc
MP
53512015-11-19 Marek Polacek <polacek@redhat.com>
5352
5353 PR c/68412
5354 * c-typeck.c (parser_build_binary_op): Properly handle
5355 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5356
bef08b71
DM
53572015-11-17 David Malcolm <dmalcolm@redhat.com>
5358
5359 * c-parser.c (set_c_expr_source_range): Bulletproof both
5360 overloaded implementations against NULL expr->value.
5361 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5362 values.
5363 (c_parser_unary_expression): Likewise when handling addresses of
5364 labels.
5365 (c_parser_postfix_expression): Likewise for statement expressions,
5366 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5367 __builtin_va_arg, and for __builtin_offset_of.
5368 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5369 src_range using the range of the braced initializer.
5370 (c_parser_transaction_expression): Set src_range for "ret" to a
5371 sane pair of values.
5372
fff77217
KY
53732015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5374
5375 * c-parser.c (c_finish_omp_declare_simd): Look for
5376 "simd" attribute as well. Update error message.
5377
1d899da2
TS
53782015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5379
5380 * c-parser.c (c_parser_omp_declare_target): Adjust.
5381
e4606348
JJ
53822015-11-14 Jakub Jelinek <jakub@redhat.com>
5383
5384 * c-typeck.c (c_finish_omp_clauses): Don't mark
5385 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5386
3e636daf
MP
53872015-11-14 Marek Polacek <polacek@redhat.com>
5388
5389 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5390 * c-typeck.c: Likewise.
5391
ebedc9a3
DM
53922015-11-13 David Malcolm <dmalcolm@redhat.com>
5393
5394 * c-decl.c (warn_defaults_to): Pass line_table to
5395 rich_location ctor.
5396 * c-errors.c (pedwarn_c99): Likewise.
5397 (pedwarn_c90): Likewise.
5398 * c-parser.c (set_c_expr_source_range): New functions.
5399 (c_token::get_range): New method.
5400 (c_token::get_finish): New method.
5401 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5402 based on the range from the start of the LHS to the end of the
5403 RHS.
5404 (c_parser_conditional_expression): Likewise, based on the range
5405 from the start of the cond.value to the end of exp2.value.
5406 (c_parser_binary_expression): Call set_c_expr_source_range on
5407 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5408 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5409 based on the cast_loc through to the end of the expr.
5410 (c_parser_unary_expression): Likewise, based on the
5411 op_loc through to the end of op.
5412 (c_parser_sizeof_expression) Likewise, based on the start of the
5413 sizeof token through to either the closing paren or the end of
5414 expr.
5415 (c_parser_postfix_expression): Likewise, using the token range,
5416 or from the open paren through to the close paren for
5417 parenthesized expressions.
5418 (c_parser_postfix_expression_after_primary): Likewise, for
5419 various kinds of expression.
5420 * c-tree.h (struct c_expr): Add field "src_range".
5421 (c_expr::get_start): New method.
5422 (c_expr::get_finish): New method.
5423 (set_c_expr_source_range): New decls.
5424 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5425 on ret for prefix unary ops.
5426 (parser_build_binary_op): Likewise, running from the start of
5427 arg1.value through to the end of arg2.value.
5428
ec8b536f
MP
54292015-11-13 Marek Polacek <polacek@redhat.com>
5430
5431 PR c/68320
5432 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5433
277fe616
DM
54342015-11-13 David Malcolm <dmalcolm@redhat.com>
5435
5436 * c-typeck.c: Include spellcheck.h.
5437 (lookup_field_fuzzy_find_candidates): New function.
5438 (lookup_field_fuzzy): New function.
5439 (build_component_ref): If the field was not found, try using
5440 lookup_field_fuzzy and potentially offer a suggestion.
5441
6e232ba4
JN
54422015-11-12 James Norris <jnorris@codesourcery.com>
5443 Joseph Myers <joseph@codesourcery.com>
5444
5445 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5446 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5447 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5448 and PRAGMA_OMP_CLAUSE_LINK.
5449 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5450 and PRAGMA_OACC_CLAUSE_LINK.
5451 (OACC_DECLARE_CLAUSE_MASK): New definition.
5452 (c_parser_oacc_declare): New function.
5453
9be4f715
MP
54542015-11-12 Marek Polacek <polacek@redhat.com>
5455
5456 PR c/67784
5457 * c-parser.c (c_parser_for_statement): Reclassify the token in
5458 a correct scope.
5459
e78bede6
MP
54602015-11-11 Marek Polacek <polacek@redhat.com>
5461
5462 PR c/68107
5463 PR c++/68266
5464 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5465 checking the size of an array.
5466
69f293c9
AM
54672015-11-11 Andrew MacLeod <amacleod@redhat.com>
5468
5469 * c-array-notation.c: Remove unused header files.
5470 * c-aux-info.c: Likewise.
5471 * c-convert.c: Likewise.
5472 * c-decl.c: Likewise.
5473 * c-errors.c: Likewise.
5474 * c-lang.c: Likewise.
5475 * c-objc-common.c: Likewise.
5476 * c-parser.c: Likewise.
5477 * c-typeck.c: Likewise.
5478 * gccspec.c: Likewise.
5479
3a40d81d
NS
54802015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5481 Cesar Philippidis <cesar@codesourcery.com>
5482 James Norris <jnorris@codesourcery.com>
5483 Julian Brown <julian@codesourcery.com>
5484 Nathan Sidwell <nathan@codesourcery.com>
5485
3a40d81d
NS
5486 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5487 routine arg.
5488 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5489 (c_parser_pragma): Parse 'acc routine'.
5490 (OACC_ROUTINE_CLAUSE_MARK): Define.
5491 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5492
fc402eec
AA
54932015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5494
5495 PR debug/67192
5496 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5497 location of the backward-goto to the start of the loop body.
5498
f6b0b3db
AA
54992015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5500
5501 PR debug/67192
5502 * c-parser.c (c_parser_while_statement): Finish the loop before
5503 parsing ahead for misleading indentation.
5504 (c_parser_for_statement): Likewise.
5505
ee45a32d
EB
55062015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5507
5508 * c-decl.c (finish_struct): If the structure has reverse storage
5509 order, rewrite the type of array fields with scalar component. Call
5510 maybe_apply_pragma_scalar_storage_order on entry.
5511 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5512 errors on bit-fields and reverse SSO here and not...
5513 (c_mark_addressable): ...here.
5514 (output_init_element): Adjust call to initializer_constant_valid_p.
5515 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5516
8a645150
DM
55172015-11-06 David Malcolm <dmalcolm@redhat.com>
5518
5519 * c-decl.c (warn_defaults_to): Update for change in signature
5520 of diagnostic_set_info.
5521 * c-errors.c (pedwarn_c99): Likewise.
5522 (pedwarn_c90): Likewise.
5523 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5524 for textinfo::set_location.
5525
7a5e4956
CP
55262015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5527 Thomas Schwinge <thomas@codesourcery.com>
5528 James Norris <jnorris@codesourcery.com>
5529
5530 * c-parser.c (c_parser_omp_clause_name): Add support for
5531 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5532 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5533 default(none) in OpenACC.
5534 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5535 arguments.
5536 (c_parser_oacc_clause_tile): New function.
5537 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5538 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5539 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5540 TILE}.
5541 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5542 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5543 FIRSTPRIVATE}.
5544 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5545 (c_parser_oacc_update): Update the error message for missing clauses.
5546 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5547 and OMP_CLAUSE_INDEPENDENT.
5548
bfcfbfa0
MP
55492015-11-05 Marek Polacek <polacek@redhat.com>
5550
5551 PR c/68090
5552 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5553 deal with pre-evaluation on invalid types.
5554
e01d41e5
JJ
55552015-11-05 Jakub Jelinek <jakub@redhat.com>
5556 Ilya Verbin <ilya.verbin@intel.com>
5557
5558 * c-parser.c: Include context.h and gimple-expr.h.
5559 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5560 monotonic together with nonmonotonic.
5561 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5562 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5563 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5564 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5565 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5566 expressions on combined target teams before the target.
5567 (c_parser_omp_declare_target): If decl has "omp declare target" or
5568 "omp declare target link" attribute, and cgraph or varpool node already
5569 exists, then set corresponding flags. Call c_finish_omp_clauses
5570 in the parenthesized extended-list syntax case.
5571 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5572 declare target.
5573 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5574 on OMP_CLAUSE_REDUCTION array sections.
5575 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5576 into the constant offset, or for variable low-bound using
5577 POINTER_PLUS_EXPR. For structure element based array sections use
5578 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5579 (c_finish_omp_clauses): Drop generic_field_head, structure
5580 elements are now always mapped even as array section bases,
5581 diagnose same var in data sharing and mapping clauses. Diagnose if
5582 linear step on declare simd is neither a constant nor a uniform
5583 parameter. Look through POINTER_PLUS_EXPR for array section
5584 reductions. Diagnose the same var or function appearing multiple
5585 times on the same directive. Fix up wording for the to clause if t
5586 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5587 modifier on kinds other than dynamic or guided or nonmonotonic
5588 modifier together with ordered clause.
5589
4bf9e5a8
TS
55902015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5591 Chung-Lin Tang <cltang@codesourcery.com>
5592
5593 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5594
2adfab87
AM
55952015-10-29 Andrew MacLeod <amacleod@redhat.com>
5596
5597 * c-array-notation.c: Reorder #include's and remove duplicates.
5598 * c-aux-info.c: Likewise.
5599 * c-convert.c: Likewise.
5600 * c-decl.c: Likewise.
5601 * c-errors.c: Likewise.
5602 * c-lang.c: Likewise.
5603 * c-objc-common.c: Likewise.
5604 * c-parser.c: Likewise.
5605 * c-typeck.c: Likewise.
5606
e922069e
JW
56072015-10-26 Jim Wilson <jim.wilson@linaro.org>
5608
5609 PR debug/66068
5610 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5611 after calling build_qualified_type.
5612
765dd391
CP
56132015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5614 Thomas Schwinge <thomas@codesourcery.com>
5615 James Norris <jnorris@codesourcery.com>
5616 Joseph Myers <joseph@codesourcery.com>
5617 Julian Brown <julian@codesourcery.com>
5618 Bernd Schmidt <bschmidt@redhat.com>
5619
5620 * c-parser.c (c_parser_oacc_shape_clause): New.
5621 (c_parser_oacc_simple_clause): New.
5622 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5623 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5624
88bae6f4
TS
56252015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5626 James Norris <jnorris@codesourcery.com>
5627 Cesar Philippidis <cesar@codesourcery.com>
5628
5629 PR c/64765
5630 PR c/64880
5631 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5632 parameters, and handle these. Adjust all users.
5633 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5634 into...
5635 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5636 all users.
5637 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5638 declare functions.
5639 (c_finish_omp_construct): Declare function.
5640 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5641 Merge functions into...
5642 (c_finish_omp_construct): ... this new function.
5643
a8fc2579
RB
56442015-10-22 Richard Biener <rguenther@suse.de>
5645
5646 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5647 before folding a MINUS_EXPR.
5648
e9122ef6
MP
56492015-10-21 Marek Polacek <polacek@redhat.com>
5650
5651 PR c/68024
5652 * c-decl.c (start_function): Warn about vararg functions without
5653 a prototype.
5654
9f47c7e5
IE
56552015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5656
5657 * c-typeck.c (build_conditional_expr): Use boolean vector
5658 type for vector comparison.
5659 (build_vec_cmp): New.
5660 (build_binary_op): Use build_vec_cmp for comparison.
5661
fa60eeb9
MP
56622015-10-20 Marek Polacek <polacek@redhat.com>
5663
5664 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5665
2c7020eb
MP
56662015-10-20 Marek Polacek <polacek@redhat.com>
5667
5668 PR c/67964
5669 * c-parser.c (c_parser_attributes): Break out of the loop if the
5670 token after an attribute isn't a comma.
5671
d9a6bd32
JJ
56722015-10-13 Jakub Jelinek <jakub@redhat.com>
5673 Aldy Hernandez <aldyh@redhat.com>
5674
5675 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5676 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5677 (c_parser_omp_variable_list): Handle structure elements for
5678 map, to and from clauses. Handle array sections in reduction
5679 clause. Formatting fixes.
5680 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5681 if clause modifiers.
5682 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5683 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5684 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5685 c_parser_omp_clause_is_device_ptr): New functions.
5686 (c_parser_omp_clause_ordered): Parse optional parameter.
5687 (c_parser_omp_clause_reduction): Handle array reductions.
5688 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5689 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5690 functions.
5691 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5692 (c_parser_omp_clause_depend_sink): New function.
5693 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5694 (c_parser_omp_clause_map): Parse release/delete map kinds and
5695 optional always modifier.
5696 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5697 and c_finish_omp_clauses callers.
5698 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5699 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5700 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5701 (OMP_CRITICAL_CLAUSE_MASK): Define.
5702 (c_parser_omp_critical): Parse critical clauses.
5703 (c_parser_omp_for_loop): Handle doacross loops, adjust
5704 c_finish_omp_for and c_finish_omp_clauses callers.
5705 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5706 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5707 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5708 (c_parser_omp_for): Disallow ordered clause when combined with
5709 distribute. Disallow linear clause when combined with distribute
5710 and not combined with simd.
5711 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5712 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5713 parse clauses and if depend clause is found, don't parse a body.
5714 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5715 Allow target parallel without for after it.
5716 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5717 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5718 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5719 invalid kinds.
5720 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5721 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5722 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5723 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5724 functions.
5725 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5726 defaultmap and is_device_ptr clauses.
5727 (c_parser_omp_target): Parse target parallel and target simd. Set
5728 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5729 and target exit data. Diagnose invalid map kinds.
5730 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5731 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5732 construct.
5733 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5734 &omp_priv.
5735 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5736 (c_parser_omp_taskloop): New function.
5737 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5738 handle PRAGMA_OMP_TASKLOOP.
5739 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5740 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5741 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5742 Add IS_OMP argument, handle structure element bases, diagnose
5743 bitfields, pass IS_OMP recursively, diagnose known zero length
5744 array sections in depend clauses, handle array sections in reduction
5745 clause, diagnose negative length even for pointers.
5746 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5747 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5748 array sections in reduction clause, set
5749 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5750 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5751 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5752 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5753
21ba0cea
MP
57542015-10-06 Marek Polacek <polacek@redhat.com>
5755
5756 * c-parser.c (c_parser_statement_after_labels): Use
5757 protected_set_expr_location.
5758 (c_parser_omp_clause_num_gangs): Likewise.
5759 (c_parser_omp_clause_num_threads): Likewise.
5760 (c_parser_omp_clause_num_workers): Likewise.
5761 (c_parser_omp_clause_vector_length): Likewise.
5762 (c_parser_omp_clause_num_teams): Likewise.
5763 (c_parser_omp_clause_thread_limit): Likewise.
5764 * c-typeck.c (build_c_cast): Likewise.
5765 (c_cast_expr): Likewise.
5766
624d31fe
RS
57672015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5768
5769 * c-typeck.c (c_tree_equal): Use real_equal instead of
5770 REAL_VALUES_EQUAL.
5771
b8fd7909
JM
57722015-10-04 Jason Merrill <jason@redhat.com>
5773
5774 * c-parser.c (c_lex_one_token): Handle @synchronized.
5775 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5776 can change whether the function is transaction_safe.
5777
1c7485af
MP
57782015-10-02 Marek Polacek <polacek@redhat.com>
5779
5780 PR c/67730
5781 * c-typeck.c (convert_for_assignment): Use the expansion point
5782 location throughout.
5783
3e3b8d63
MP
57842015-10-02 Marek Polacek <polacek@redhat.com>
5785
5786 PR c/64249
5787 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5788 and pass it down to c_parser_if_statement.
5789 (c_parser_else_body): Add CHAIN parameter and pass it down to
5790 c_parser_statement_after_labels.
5791 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5792 duplicated if-else-if conditions.
5793
aabef2de
MP
57942015-10-01 Marek Polacek <polacek@redhat.com>
5795
5796 * c-typeck.c (convert_for_assignment): Improve commentary.
5797
de8ddd5f
MP
57982015-09-30 Marek Polacek <polacek@redhat.com>
5799
5800 PR c/67730
5801 * c-typeck.c (c_finish_return): Use the expansion point location for
5802 certain "return with value" warnings.
5803
c4914de6
MLI
58042015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5805
5806 * c-parser.c (pragma_lex): Add loc argument.
5807
0e36f5c7
MP
58082015-09-15 Marek Polacek <polacek@redhat.com>
5809
5810 PR c/67580
5811 * c-decl.c (tag_exists_p): New function.
5812 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5813 struct/union/enum keywords are missing.
5814 * c-tree.h (tag_exists_p): Declare.
5815
2f3bb934
MP
58162015-09-15 Marek Polacek <polacek@redhat.com>
5817
5818 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5819 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5820 Return NULL_TREE instead of 0.
5821 (lookup_name): Return NULL_TREE instead of 0.
5822 (lookup_name_in_scope): Likewise.
5823 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5824 (parser_xref_tag): Use false instead of 0.
5825 (start_struct): Use true instead of 1.
5826 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5827
aa256c4a
MP
58282015-09-14 Marek Polacek <polacek@redhat.com>
5829
5830 * c-typeck.c (set_nonincremental_init_from_string): Use
5831 HOST_WIDE_INT_M1U when shifting a negative value.
5832
dbb68221
MW
58332015-09-09 Mark Wielaard <mjw@redhat.com>
5834
5835 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5836 parm against NULL.
5837
a8a098ac
JJ
58382015-09-10 Jakub Jelinek <jakub@redhat.com>
5839
5840 PR c/67502
5841 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5842 into OMP_FOR_PRE_BODY rather than before the loop.
5843
f4b189d5
JJ
58442015-09-09 Jakub Jelinek <jakub@redhat.com>
5845
0bb99c11
JJ
5846 PR c/67501
5847 * c-parser.c (c_parser_oacc_all_clauses,
5848 c_parser_omp_all_clauses): Remove invalid clause from
5849 list of clauses even if parser->error is set.
5850
fce5e5e3
JJ
5851 PR c/67500
5852 * c-parser.c (c_parser_omp_clause_aligned,
5853 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5854 test for errors.
5855 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5856 error_mark_node.
5857
f4b189d5
JJ
5858 PR c/67495
5859 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5860 instead of c_parser_unary_expression. If the result is !lvalue_p,
5861 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5862
b2aaf235
MP
58632015-09-04 Marek Polacek <polacek@redhat.com>
5864
5865 PR sanitizer/67279
5866 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5867
1807ffc1
MS
58682015-09-03 Martin Sebor <msebor@redhat.com>
5869
5870 PR c/66516
8b652e65
JJ
5871 * c-typeck.c (convert_arguments, parser_build_unary_op,
5872 build_conditional_expr, c_cast_expr, convert_for_assignment,
5873 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5874 reject_gcc_builtin.
5875 (c_decl_implicit): Define.
5876
d04ff417
MP
58772015-09-02 Marek Polacek <polacek@redhat.com>
5878
5879 PR c/67432
5880 * c-parser.c (c_parser_enum_specifier): Give a better error for
5881 an empty enum.
5882
a79683d5
TS
58832015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5884
5885 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5886
191a6b94
MP
58872015-08-12 Marek Polacek <polacek@redhat.com>
5888
5889 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5890 LOC to it.
5891
420a9d9b
MP
58922015-08-03 Marek Polacek <polacek@redhat.com>
5893
5894 PR c/67088
5895 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5896 Use it.
5897 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5898
992118a1
PP
58992015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5900
5901 * c-parser.c (c_parser_if_body): Take token_indent_info
5902 argument. Call warn_for_misleading_indentation even when the
5903 body is a semicolon. Extract token_indent_infos corresponding
5904 to the guard, body and next tokens. Adjust call to
5905 warn_for_misleading_indentation accordingly.
5906 (c_parser_else_body): Likewise.
5907 (c_parser_if_statement): Likewise.
5908 (c_parser_while_statement): Likewise.
5909 (c_parser_for_statement): Likewise.
5910
46308474
LFSM
59112015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5912 Manuel López-Ibáñez <manu@gcc.gnu.org>
5913
5914 * c-decl.c (get_parm_info): Remove static var. Update warning
5915 message.
5916
05b28fd6
MP
59172015-07-27 Marek Polacek <polacek@redhat.com>
5918
5919 PR c++/66555
5920 PR c/54979
5921 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5922
451b5e48
MP
59232015-07-20 Marek Polacek <polacek@redhat.com>
5924
5925 PR c++/55095
5926 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5927 (build_binary_op): Warn about left shift overflows.
5928
1916bcb5
AM
59292015-07-09 Andrew MacLeod <amacleod@redhat.com>
5930
5931 * c-array-notation.c: Adjust includes for flags.h changes.
5932 * c-objc-common.c: Likewise.
5933
c7131fb2
AM
59342015-07-07 Andrew MacLeod <amacleod@redhat.com>
5935
5936 * c-array-notation.c: Adjust includes.
5937 * c-aux-info.c: Likewise.
5938 * c-convert.c: Likewise.
5939 * c-decl.c: Likewise.
5940 * c-errors.c: Likewise.
5941 * c-lang.c: Likewise.
5942 * c-objc-common.c: Likewise.
5943 * c-parser.c: Likewise.
5944 * c-typeck.c: Likewise.
5945
da2e71c9
MLI
59462015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5947
5948 PR fortran/66605
5949 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5950
b155cfd9
MP
59512015-06-29 Marek Polacek <polacek@redhat.com>
5952
5953 PR c/66322
5954 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5955 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5956 about -Wswitch-bool here.
5957 (do_case): Update c_add_case_label call.
5958 (c_finish_case): Update c_do_switch_warnings call.
5959
31521951
MP
59602015-06-27 Marek Polacek <polacek@redhat.com>
5961
5962 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5963
22d03525
MP
59642015-06-26 Marek Polacek <polacek@redhat.com>
5965
5966 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5967 INDIRECT_REF_P.
5968 * c-typeck.c (array_to_pointer_conversion): Likewise.
5969 (build_unary_op): Likewise.
5970 (c_finish_return): Likewise.
5971
f0889939
AM
59722015-06-25 Andrew MacLeod <amacleod@redhat.com>
5973
5974 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5975 * c-parser.c: Likewise.
5976
8d67ee55
RS
59772015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5978
5979 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5980 instead of pointer_hash.
5981 (detect_field_duplicates): Likewise.
5982
0ae9bd27
MP
59832015-06-25 Marek Polacek <polacek@redhat.com>
5984
5985 * c-array-notation.c: Use VAR_P throughout.
5986 * c-decl.c: Likewise.
5987 * c-objc-common.c: Likewise.
5988 * c-parser.c: Likewise.
5989 * c-typeck.c: Likewise.
5990
62f9079a
MP
59912015-06-25 Marek Polacek <polacek@redhat.com>
5992
5993 * c-decl.c: Use is_global_var throughout.
5994 * c-parser.c: Likewise.
5995 * c-typeck.c: Likewise.
5996
abb226c9
AM
59972015-06-17 Andrew MacLeod <amacleod@redhat.com>
5998
5999 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6000 * c-aux-info.c: Likewise.
6001 * c-convert.c: Likewise.
6002 * c-decl.c: Likewise.
6003 * c-errors.c: Likewise.
6004 * c-lang.c: Likewise.
6005 * c-objc-common.c: Likewise.
6006 * c-parser.c: Likewise.
6007 * c-typeck.c: Likewise.
6008
8cbababc
JH
60092015-06-11 Jan Hubicka <hubicka@ucw.cz>
6010
6011 PR middle-end/66325
6012 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6013 variants.
6014
a0349665
PMR
60152015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6016
6017 * c-decl.c (pop_scope): Register the main translation unit
6018 through the new debug hook.
6019
13fdf2e2
AM
60202015-06-08 Andrew MacLeod <amacleod@redhat.com>
6021
6022 * c-array-notation.c : Adjust include files.
6023 * c-aux-info.c : Likewise.
6024 * c-convert.c : Likewise.
6025 * c-decl.c : Likewise.
6026 * c-errors.c : Likewise.
6027 * c-lang.c : Likewise.
6028 * c-lang.h : Likewise.
6029 * c-objc-common.c : Likewise.
6030 * c-parser.c : Likewise.
6031 * c-typeck.c : Likewise.
6032
d7438551
AH
60332015-06-05 Aldy Hernandez <aldyh@redhat.com>
6034
6035 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6036 immediately clobber it.
6037 (c_write_global_declarations_1): Remove call to
6038 check_global_declaration_1.
6039 (c_write_global_declarations_2): Remove.
6040 (c_write_final_cleanups): Rename from c_write_global_declarations.
6041 Remove call to finalize_compilation_unit.
6042 Remove calls to debugging hooks.
6043 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6044 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6045 * c-tree.h: Remove c_write_global_declarations.
6046
ecb9f223
AM
60472015-06-04 Andrew MacLeod <amacleod@redhat.com>
6048
6049 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6050 * c-aux-info.c: Likewise.
6051 * c-convert.c: Likewise.
6052 * c-decl.c: Likewise.
6053 * c-errors.c: Likewise.
6054 * c-lang.c: Likewise.
6055 * c-objc-common.c: Likewise.
6056 * c-parser.c: Likewise.
6057 * c-typeck.c: Likewise.
6058
9482b620
MP
60592015-06-04 Marek Polacek <polacek@redhat.com>
6060
6061 PR c/66341
6062 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6063 it is a lvalue.
6064
bc51ace3
PK
60652015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6066
6067 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6068 Warn for empty struct.
6069 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6070
ea5b45b6
AT
60712015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6072
6073 * c-decl.c (start_function): Call plugin before parsing.
6074 (finish_function): Call plugin after parsing.
6075
c2d47482
PK
60762015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6077
6078 PR c/49551
6079 * c-decl.c (merge_decls): Merge DECL_COMMON.
6080
a95492ab
JW
60812015-05-22 Jim Wilson <jim.wilson@linaro.org>
6082
6083 * Make-lang.in (check_gcc_pallelize): Define.
6084
fd5c817a
MP
60852015-05-22 Marek Polacek <polacek@redhat.com>
6086
6087 PR c/47043
6088 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6089 attributes.
6090
c7b70a3c
MP
60912015-05-21 Marek Polacek <polacek@redhat.com>
6092
6093 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6094 DECL_BUILT_IN.
6095
21b634ae
MP
60962015-05-20 Marek Polacek <polacek@redhat.com>
6097
6098 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6099 * c-typeck.c: Likewise.
6100
296a8c2f
MP
61012015-05-19 Marek Polacek <polacek@redhat.com>
6102
6103 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6104
41b37d5e
JJ
61052015-05-19 Jakub Jelinek <jakub@redhat.com>
6106
6107 PR middle-end/66199
6108 * c-parser.c (c_parser_omp_for_loop): Don't add
6109 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6110 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6111 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6112 constructs.
6113
fab27f52
MM
61142015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6115
6116 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 6117 swaps.
fab27f52 6118
40de31cf
MLI
61192015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6120
6121 PR fortran/44054
6122 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6123 accessor function.
6124
3aa3c9fc
MP
61252015-05-14 Marek Polacek <polacek@redhat.com>
6126
6127 PR c/66066
6128 PR c/66127
6129 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6130 rather than with 0.
6131
c3388e62
DM
61322015-05-12 David Malcolm <dmalcolm@redhat.com>
6133
6134 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6135 to add a call to warn_for_misleading_indentation.
6136 (c_parser_else_body): Likewise, adding param "else_loc".
6137 (c_parser_if_statement): Check for misleading indentation.
6138 (c_parser_while_statement): Likewise.
6139 (c_parser_for_statement): Likewise.
6140
755e528f
MP
61412015-05-08 Marek Polacek <polacek@redhat.com>
6142
6143 PR c/64918
6144 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6145 (output_init_element): Likewise.
6146
0173bd2a
MP
61472015-05-07 Marek Polacek <polacek@redhat.com>
6148
6149 PR c/65179
6150 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6151 value.
6152
9babc352
MP
61532015-04-30 Marek Polacek <polacek@redhat.com>
6154
6155 * c-typeck.c (set_init_label): Call error_at instead of error and
6156 pass LOC to it.
6157
ac9f18db
MP
6158 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6159 the type of a decl.
6160
ec3fba51
MP
6161 * c-typeck.c (c_build_va_arg): Clarify the error message.
6162
b811915d
TS
61632015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6164
6165 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6166 OMP_STANDALONE_CLAUSES.
6167
f3075008
MP
61682015-04-28 Marek Polacek <polacek@redhat.com>
6169
6170 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6171
4e81b788
MP
61722015-04-28 Marek Polacek <polacek@redhat.com>
6173
6174 PR c/65901
6175 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6176
6c1db78e
MP
61772015-04-25 Marek Polacek <polacek@redhat.com>
6178
6179 PR c/52085
6180 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6181 attribute.
6182
5c4abbb8
MP
61832015-04-23 Marek Polacek <polacek@redhat.com>
6184
6185 PR c/65345
6186 * c-decl.c (set_labels_context_r): New function.
6187 (store_parm_decls): Call it via walk_tree_without_duplicates.
6188 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6189 instead of create_tmp_var. Build TARGET_EXPR instead of
6190 COMPOUND_EXPR.
6191 (build_atomic_assign): Use create_tmp_var_raw instead of
6192 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6193
06aca1d5
IV
61942015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6195
6196 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6197 (c_parser_omp_target_update): Add missed %> to error_at ().
6198
8fba1830
BRF
61992015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6200
6201 PR target/55143
6202 * c-decl.c (c_default_pointer_mode): Remove definition.
6203 * c-tree.h (c_default_pointer_mode): Remove declaration.
6204
62021f64
TB
62052015-03-27 Tobias Burnus <burnus@net-b.de>
6206
6207 PR c/65586
6208 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6209 error out.
6210 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6211 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6212 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6213
9b65e171
JJ
62142015-03-19 Jakub Jelinek <jakub@redhat.com>
6215
6216 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6217 attribute for DECL_EXTERNAL VAR_DECLs.
6218
17958621
JJ
62192015-03-11 Jakub Jelinek <jakub@redhat.com>
6220
6221 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6222 argument.
6223
7ccb1a11
JJ
62242015-03-10 Jakub Jelinek <jakub@redhat.com>
6225
6226 PR c/65120
6227 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6228 before preparing arguments to warn_logical_not_parentheses.
6229
01177669
JJ
62302015-03-09 Jakub Jelinek <jakub@redhat.com>
6231
6232 PR c/65120
6233 * c-typeck.c (parser_build_binary_op): Don't warn for
6234 !!x == y or !b == y where b is _Bool.
6235
802ac282
MP
62362015-03-09 Marek Polacek <polacek@redhat.com>
6237
6238 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6239 * c-decl.c (grokdeclarator): Likewise.
6240 * c-typeck.c (build_binary_op): Likewise.
6241
e5165b60
MP
62422015-02-27 Marek Polacek <polacek@redhat.com>
6243
6244 PR c/65228
6245 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6246
065d214c
MP
62472015-02-14 Marek Polacek <polacek@redhat.com>
6248
6249 PR c/64768
6250 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6251 declared through a typedef name.
6252
e5d9235b
MP
62532015-02-13 Marek Polacek <polacek@redhat.com>
6254
6255 PR c/65050
6256 * c-decl.c (grokdeclarator): Print also the type when giving
6257 the error message about array's incomplete element type.
6258
fa01ffcc
JJ
62592015-02-11 Jakub Jelinek <jakub@redhat.com>
6260
6261 PR c/64824
6262 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6263 check in the POP macro.
6264
c3e38a03
MP
62652015-02-09 Marek Polacek <polacek@redhat.com>
6266
6267 PR c/64856
6268 * c-typeck.c (process_init_element): Don't always wrap
6269 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6270 initializing a range of elements.
6271
4886ec8e
JJ
62722015-02-04 Jakub Jelinek <jakub@redhat.com>
6273
6274 PR c/64824
6275 PR c/64868
6276 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6277
c3e38a03 62782015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
6279
6280 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6281 processing enum declaration.
6282
7b33f0c8
MP
62832015-01-29 Marek Polacek <polacek@redhat.com>
6284
6285 PR c/64709
6286 * c-typeck.c (pop_init_level): If constructor_elements has
6287 exactly one element with integer_zerop value, set constructor_zeroinit
6288 to 1. Remove braces around warning_init call.
6289
dea63e49
JJ
62902015-01-27 Jakub Jelinek <jakub@redhat.com>
6291
6292 PR c/64766
6293 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6294 of FUNCTION_DECLs with error_mark_node.
6295
d38f7dce
JJ
62962015-01-26 Jakub Jelinek <jakub@redhat.com>
6297
6298 PR c/64778
6299 * c-typeck.c (convert_arguments): Return -1 if there are
6300 error_args, even if we've diagnosed too many arguments.
6301
cbf5d0e7
RB
63022015-01-21 Richard Biener <rguenther@suse.de>
6303
6304 PR middle-end/64313
6305 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6306 for builtins the user declared correctly.
6307
41dbbb37
TS
63082015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6309 Bernd Schmidt <bernds@codesourcery.com>
6310 Cesar Philippidis <cesar@codesourcery.com>
6311 James Norris <jnorris@codesourcery.com>
6312 Jakub Jelinek <jakub@redhat.com>
6313 Ilmir Usmanov <i.usmanov@samsung.com>
6314
6315 * c-parser.c: Include "gomp-constants.h".
6316 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6317 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6318 Use OMP_CLAUSE_SET_MAP_KIND.
6319 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6320 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6321 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6322 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6323 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6324 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6325 "copyout", "create", "delete", "deviceptr", "gang", "host",
6326 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6327 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6328 "present_or_create", "pcreate", "seq", "self", "vector",
6329 "vector_length", "wait", "worker".
6330 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6331 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6332 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6333 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6334 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6335 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6336 (c_parser_oacc_data_clause_deviceptr)
6337 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6338 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6339 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6340 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6341 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6342 (c_parser_oacc_parallel, c_parser_oacc_update)
6343 (c_parser_oacc_wait): New functions.
6344 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6345 (c_finish_oacc_data): New prototypes.
6346 * c-typeck.c: Include "gomp-constants.h".
6347 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6348 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6349 OMP_CLAUSE_SET_MAP_KIND.
6350 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6351 (c_finish_oacc_data): New functions.
6352 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6353 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6354 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6355 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6356 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6357 GOMP_MAP_FORCE_DEVICEPTR.
6358
adfac8df
JJ
63592015-01-09 Michael Collison <michael.collison@linaro.org>
6360
6361 * c-array-notation.c: Include hash-set.h, machmode.h,
6362 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6363 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6364 * c-aux-info.c: Ditto.
6365 * c-convert.c: Ditto.
6366 * c-decl.c: Ditto.
6367 * c-errors.c: Ditto.
6368 * c-lang.c: Dittoxs.
6369 * c-objc-common.c: Ditto.
6370 * c-parser.c: Ditto.
6371 * c-typeck.c: Include hash-set.h, machmode.h,
6372 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6373 fold-const.h, wide-int.h, inchash.h, real.h and
6374 fixed-value.h due to flattening of tree.h.
6375
2cc901dc
MP
63762015-01-07 Marek Polacek <polacek@redhat.com>
6377
6378 PR c/64417
6379 * c-typeck.c (process_init_element): Disallow initialization of
6380 a flexible array member with a string constant if the structure
6381 is in an array.
6382
5624e564
JJ
63832015-01-05 Jakub Jelinek <jakub@redhat.com>
6384
e5341100
JJ
6385 PR sanitizer/64344
6386 * c-typeck.c (convert_for_assignment, c_finish_return): For
6387 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6388 types also set in_late_binary_op around convert call.
6389 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6390 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6391 result on expr as last argument to ubsan_instrument_float_cast,
6392 if in_late_binary_op, don't use c_save_expr but save_expr.
6393
5624e564
JJ
6394 Update copyright years.
6395
5bd012f8
MP
63962015-01-05 Marek Polacek <polacek@redhat.com>
6397
6398 PR c/64423
6399 * c-typeck.c (build_array_ref): Pass loc down to
6400 warn_array_subscript_with_type_char.
6401
3f8257db 64022014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6403
6404 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6405 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6406 element type.
8e745a17 6407 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6408 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6409 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6410 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6411 to PEDWARN_FOR_QUALIFIERS.
768952be 6412
8f94a8c4
JJ
64132014-12-17 Jakub Jelinek <jakub@redhat.com>
6414
6415 PR sanitizer/64289
6416 * c-convert.c: Include ubsan.h.
6417 (convert): For real -> integral casts and
6418 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6419 instead instrument the float cast directly.
6420
b731b390
JJ
64212014-11-29 Jakub Jelinek <jakub@redhat.com>
6422
6423 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6424 c_finish_stmt_expr): Remove NULL last argument from
6425 create_tmp_var_raw and create_tmp_var calls.
6426 * c-array-notation.c (fix_builtin_array_notation_fn,
6427 build_array_notation_expr, fix_conditional_array_notations_1,
6428 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6429
541e35a6
MP
64302014-11-28 Marek Polacek <polacek@redhat.com>
6431
6432 PR c/63862
6433 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6434 convert the right operand to integer type.
6435
b286be94
MP
64362014-11-25 Marek Polacek <polacek@redhat.com>
6437
6438 PR c/63877
6439 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6440 for inline functions.
6441
aa7da51a
JJ
64422014-11-21 Jakub Jelinek <jakub@redhat.com>
6443
6444 PR target/63764
6445 * c-typeck.c (build_array_ref): Adjust
6446 convert_vector_to_pointer_for_subscript caller. If it returns true,
6447 call non_lvalue_loc on the result.
6448
d876207f
RB
64492014-11-11 Richard Biener <rguenther@suse.de>
6450
6451 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6452 to true.
6453
e5e44252
AK
64542014-11-10 Andi Kleen <ak@linux.intel.com>
6455
6456 PR c/60804
6457 * c-parser.c (c_parser_statement_after_labels): Call
6458 check_no_cilk.
6459 (c_parser_if_statement): Dito.
6460 (c_parser_switch_statement): Dito.
6461 (c_parser_while_statement): Dito.
6462 (c_parser_do_statement): Dito.
6463 (c_parser_for_statement): Dito.
6464 * c-typeck.c (c_finish_loop): Dito.
6465
13c21655
PC
64662014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6467
6468 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6469 OPT_Wshift_count_overflow in the warnings.
6470
2d51fcef
MP
64712014-10-30 Marek Polacek <polacek@redhat.com>
6472
6473 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6474 print the stripped version as well, if they're not the same.
6475
ef4bddc2
RS
64762014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6477
6478 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6479 machine_mode.
6480
c582198b
AM
64812014-10-28 Andrew MacLeod <amacleod@redhat.com>
6482
6483 * c-decl.c: Adjust include files.
6484 * c-parser.c: Ditto.
6485
ddc8de03
PM
64862014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6487 Tom Tromey <tromey@redhat.com>
6488
6489 * c-tree.h (enum c_oracle_request): New.
6490 (c_binding_oracle_function): New typedef.
6491 (c_binding_oracle, c_pushtag, c_bind): Declare.
6492 * c-decl.c (c_binding_oracle): New global.
6493 (I_SYMBOL_CHECKED): New macro.
6494 (i_symbol_binding): New function.
6495 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6496 (I_TAG_CHECKED): New macro.
6497 (i_tag_binding): New function.
6498 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6499 (I_LABEL_CHECKED): New macro.
6500 (i_label_binding): New function.
6501 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6502 (c_print_identifier): Save and restore c_binding_oracle.
6503 (c_pushtag, c_bind): New functions.
6504
60393bbc
AM
65052014-10-27 Andrew MacLeod <amacleod@redhat.com>
6506
6507 * c-typeck.c: Adjust include files.
6508
d723bb7c
MLI
65092014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6510
6511 PR c++/53061
6512 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6513 initialization here...
6514 (c_initialize_diagnostics): ... but here. Set defaults after
6515 building pretty-printer.
6516
1bc5a451
MP
65172014-10-23 Marek Polacek <polacek@redhat.com>
6518
6519 PR c/63626
6520 * c-decl.c (pop_scope): Don't print warning in external_scope.
6521
4435bb92
MP
65222014-10-19 Marek Polacek <polacek@redhat.com>
6523
6524 PR c/63567
6525 * c-typeck.c (output_init_element): Allow initializing objects with
6526 static storage duration with compound literals even in C99 and add
6527 pedwarn for it.
6528
7278465e
MP
65292014-10-17 Marek Polacek <polacek@redhat.com>
6530
6531 PR c/63567
6532 * c-typeck.c (digest_init): Allow initializing objects with static
6533 storage duration with compound literals even in C99 and add pedwarn
6534 for it.
6535
d9b7be2e
MP
65362014-10-17 Marek Polacek <polacek@redhat.com>
6537
6538 PR c/63543
6539 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6540 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6541 error multiple times. Print the type.
6542
f406ae1f
MP
65432014-10-17 Marek Polacek <polacek@redhat.com>
6544
6545 PR c/63549
6546 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6547 type.
6548
92574c7c
MP
65492014-10-17 Marek Polacek <polacek@redhat.com>
6550
6551 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6552 (start_function): Use OPT_Wimplicit_int instead of 0.
6553 (store_parm_decls_oldstyle): Likewise.
6554
1bc4a978
MT
65552014-10-17 Alan Modra <amodra@gmail.com>
6556
6557 PR middle-end/61848
6558 * c-decl.c (merge_decls): Don't merge section name or tls model
6559 to newdecl symtab node, instead merge to olddecl. Override
6560 existing olddecl section name. Set tls_model for all thread-local
6561 vars, not just OMP thread-private ones. Remove incorrect comment.
6562
83685514
AM
65632014-10-16 Andrew MacLeod <amacleod@redhat.com>
6564
6565 * c-decl.c: Adjust include files.
6566
78a7c317
DD
65672014-10-14 DJ Delorie <dj@redhat.com>
6568
6569 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6570 (c_token_starts_typename): Check all __intN, not just __int128.
6571 (c_token_starts_declspecs): Likewise.
6572 (c_parser_declspecs): Likewise.
6573 (c_parser_attribute_any_word): Likewise.
6574 (c_parser_objc_selector): Likewise.
6575 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6576 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6577 is specified.
6578 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6579 __int128.
6580 (finish_declspecs): Likewise.
6581
74d98c1e
AB
65822014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6583
8e745a17 6584 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6585 the duplicate code.
8e745a17 6586 (c_parser_statement): Call the new function.
74d98c1e 6587
84937de2
MP
65882014-10-09 Marek Polacek <polacek@redhat.com>
6589
6590 PR c/63480
6591 * c-typeck.c (pop_init_level): Don't warn about initializing
6592 with { }.
6593
0382aaa0
MP
65942014-10-07 Marek Polacek <polacek@redhat.com>
6595
6596 PR c/59717
6597 * c-decl.c (header_for_builtin_fn): New function.
6598 (implicitly_declare): Suggest which header to include.
6599
7a0ca710
MP
66002014-10-07 Marek Polacek <polacek@redhat.com>
6601
6602 * c-convert.c (convert): Use error_operand_p.
6603 * c-typeck.c (require_complete_type): Likewise.
6604 (really_atomic_lvalue): Likewise.
6605 (digest_init): Likewise.
6606 (handle_omp_array_sections_1): Likewise.
6607
6bc8a126
MP
66082014-10-03 Marek Polacek <polacek@redhat.com>
6609
6610 PR c/63453
6611 * c-decl.c (pop_scope): Don't warn about "inline function declared
6612 but never defined" for functions marked with gnu_inline attribute.
6613
d90c0a59
JJ
66142014-09-25 Jakub Jelinek <jakub@redhat.com>
6615
6616 PR c++/63249
6617 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6618 on low_bound and length.
6619
083e891e
MP
66202014-09-24 Marek Polacek <polacek@redhat.com>
6621
6622 PR c/61405
6623 PR c/53874
6624 * c-parser.c: Don't define CPP_KEYWORD.
6625 (c_parser_switch_statement): Pass original type to c_finish_case.
6626 * c-tree.h (c_finish_case): Update declaration.
6627 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6628 conditionally to c_do_switch_warnings.
6629
8d95fe25
MP
66302014-09-03 Marek Polacek <polacek@redhat.com>
6631
6632 PR c/62024
6633 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6634 conversions.
6635
9a771876
JJ
66362014-09-02 Jakub Jelinek <jakub@redhat.com>
6637 Balaji V. Iyer <balaji.v.iyer@intel.com>
6638 Igor Zamyatin <igor.zamyatin@intel.com>
6639
6640 * c-parser.c (c_parser_cilk_for): New function.
6641 (c_parser_cilk_grainsize): Likewise.
6642 (c_get_temp_regvar): Likewise.
6643 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6644 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6645 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6646 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6647 case.
6648
b7679d96
CG
66492014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6650
6651 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6652 with using HOST_WIDE_INT without truncation to 'int'
6653
59ea0364
MP
66542014-08-22 Marek Polacek <polacek@redhat.com>
6655
6656 PR c++/62199
6657 * c-typeck.c (parser_build_binary_op): Adjust call to
6658 warn_logical_not_parentheses.
6659
671a475e
IZ
66602014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6661
6662 PR other/62008
6663 * c-parser.c (c_parser_array_notation): Check for correct
6664 type of an array added.
6665
04159acf
MP
66662014-08-19 Marek Polacek <polacek@redhat.com>
6667
6668 PR c++/62153
6669 * c-typeck.c (build_binary_op): If either operand of a comparison
6670 is a boolean expression, call maybe_warn_bool_compare.
6671
c77935ee
PP
66722014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6673
6674 PR c/45584
6675 * c-typeck.c (build_c_cast): Do a conversion even when the
6676 TYPE_MAIN_VARIANTs are the same.
6677
35aff4fb
MP
66782014-08-19 Marek Polacek <polacek@redhat.com>
6679
6680 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6681 pedwarn_c99 instead of pedwarn.
6682 (grokfield): Likewise.
6683 (warn_defaults_to): New function.
6684 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6685 Unconditionally call pedwarn_c99 instead of pedwarn.
6686 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6687 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6688 check flag_isoc11 before.
6689 * c-errors.c (pedwarn_c99): Change the return type to bool.
6690 Handle -Wc99-c11-compat.
6691 * c-parser.c (disable_extension_diagnostics): Handle
6692 warn_c99_c11_compat.
6693 (restore_extension_diagnostics): Likewise.
6694 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6695 instead of pedwarn, don't check flag_isoc11 before.
6696 (c_parser_declspecs): Likewise.
6697 (c_parser_alignas_specifier): Likewise.
6698 (c_parser_alignof_expression): Likewise.
6699 (c_parser_generic_selection): Likewise.
6700 * c-tree.h (pedwarn_c99): Update declaration.
6701 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6702 of pedwarn_c99.
6703
177cce46
MP
67042014-08-19 Marek Polacek <polacek@redhat.com>
6705
6706 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6707 to pedwarn_c90.
6708 * c-errors.c: Include "opts.h".
6709 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6710 * c-parser.c (disable_extension_diagnostics): Handle negative value
6711 of warn_c90_c99_compat, too.
6712 (restore_extension_diagnostics): Likewise.
6713 (c_parser_compound_statement_nostart): Pass
6714 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6715
6dc99c33
MP
67162014-08-12 Marek Polacek <polacek@redhat.com>
6717
6718 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6719 Add pedwarn.
6720 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6721 Likewise.
6722 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6723
3f8257db 67242014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6725
6726 PR c/51849
6727 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6728 Call pedwarn_c90 instead of pedwarn.
6729 (check_bitfield_type_and_width): Likewise.
6730 (declspecs_add_qual): Likewise.
6731 (declspecs_add_type): Likewise.
6732 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6733 Adjust to only call pedwarn_c90.
6734 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6735 pedwarn_c90 instead of pedwarn.
6736 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6737 * c-parser.c (disable_extension_diagnostics): Handle
6738 warn_c90_c99_compat.
6739 (restore_extension_diagnostics): Likewise.
6740 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6741 pedwarn_c90 instead of pedwarn.
6742 (c_parser_initelt): Likewise.
6743 (c_parser_postfix_expression): Likewise.
6744 (c_parser_postfix_expression_after_paren_type): Likewise.
6745 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6746 * c-tree.h: Fix formatting.
6747 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6748 pedwarn_c90 instead of pedwarn.
6749
9f25a338
TS
67502014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6751
6752 * c-typeck.c: Remove include of pointer-set.h.
6753
044331a8
MP
67542014-08-07 Marek Polacek <polacek@redhat.com>
6755
6756 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6757
b787e7a2
TS
67582014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6759
6760 * c-typeck.c: Use hash_map instead of pointer_map.
6761
6e2830c3
TS
67622014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6763
6764 * c-decl.c: Use hash_set instead of pointer_set.
6765
a7ee52fb
IZ
67662014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6767
6768 PR middle-end/61455
6769 * c-array-notation.c (expand_array_notations): Handling
6770 of DECL_EXPR added.
6771
b4dfdc11
MG
67722014-07-31 Marc Glisse <marc.glisse@inria.fr>
6773
6774 PR c++/60517
6775 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6776 a local variable.
6777
976d5a22
TT
67782014-07-30 Tom Tromey <tromey@redhat.com>
6779
6780 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6781 field.
6782 (really_start_incremental_init, push_init_level): Initialize
6783 designator_depth.
6784 (pop_init_level): Set global designator_depth.
6785 (process_init_element): Check for designated_init attribute.
6786
30281de2
MP
67872014-07-20 Marek Polacek <polacek@redhat.com>
6788
6789 PR c/61852
6790 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6791 (implicitly_declare): Pass location to implicit_decl_warning.
6792
b108f48f
JJ
67932014-07-14 Jakub Jelinek <jakub@redhat.com>
6794
6795 PR middle-end/61294
6796 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6797 If non-NULL, call c_parser_check_literal_zero.
6798 (c_parser_check_literal_zero): New function.
6799 (c_parser_postfix_expression_after_primary): Adjust
6800 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6801
773ec47f
MP
68022014-07-06 Marek Polacek <polacek@redhat.com>
6803
6804 PR c/6940
6805 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6806 * c-tree.h (C_ARRAY_PARAMETER): Define.
6807 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6808 function parameter.
6809
22e1cf1c 68102014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6811 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6812
6813 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6814 releasing symbol.
6815
52ec0ea3
MP
68162014-07-01 Marek Polacek <polacek@redhat.com>
6817
6818 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6819 instead of 0 to WARN_FOR_ASSIGNMENT.
6820
d5c3d343
MP
68212014-07-01 Marek Polacek <polacek@redhat.com>
6822
6823 PR c/58286
6824 * c-typeck.c (convert_for_assignment): Pass
6825 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6826
6a7253a4
MP
68272014-06-30 Marek Polacek <polacek@redhat.com>
6828
6829 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6830 has no_sanitize_undefined attribute.
6831
5e88a8f4
IZ
68322014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6833
6834 PR middle-end/57541
6835 * c-array-notation.c (fix_builtin_array_notation_fn):
6836 Check for 0 arguments in builtin call. Check that bultin argument is
6837 correct.
6838 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6839 index.
6840
9698b078
SH
68412014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6842
6843 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6844 qualifiers in __auto_type for atomic types.
6845 (c_parser_typeof_specifier): Discard all type qualifiers in
6846 __typeof__ for atomic types.
6847
6e07c515
MP
68482014-06-25 Marek Polacek <polacek@redhat.com>
6849
6850 PR c/61162
6851 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6852 the return expression to c_finish_return.
6853
da6f124d
JJ
68542014-06-25 Jakub Jelinek <jakub@redhat.com>
6855
6856 * c-typeck.c (c_finish_omp_clauses): Make sure
6857 OMP_CLAUSE_LINEAR_STEP has correct type.
6858
c203e8a7
TS
68592014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6860
6861 * c-decl.c: Adjust.
6862
56ad0e38
JJ
68632014-06-24 Jakub Jelinek <jakub@redhat.com>
6864
6865 * c-parser.c (c_parser_omp_for_loop): For
6866 #pragma omp parallel for simd move lastprivate clause from parallel
6867 to for rather than simd.
6868
47c2554f
MP
68692014-06-23 Marek Polacek <polacek@redhat.com>
6870
6871 * c-typeck.c (parser_build_binary_op): Don't call
6872 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6873
56363ffd
JH
68742014-06-15 Jan Hubicka <hubicka@ucw.cz>
6875
6876 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6877 * c-decl.c (merge_decls): Likewise.
6878
d7ff7ae5
MP
68792014-06-09 Marek Polacek <polacek@redhat.com>
6880
6881 PR c/36446
6882 * c-typeck.c (error_init): Call inform instead of error_at.
6883 (pedwarn_init): Call inform instead of pedwarn.
6884 (warning_init): Call inform instead of warning_at.
6885
24d047a3
JH
68862014-06-07 Jan Hubicka <hubicka@ucw.cz>
6887
6888 * c-decl.c (merge_decls): Use set_decl_section_name.
6889 (duplicate_decls): Remove node if it exists.
6890
9bac5cbb
G
68912014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6892
6893 PR c/53119
6894 * c-typeck.c (push_init_level, process_init_element,
6895 pop_init_level): Correct check for zero initialization, move
6896 missing brace warning to respect zero initialization.
6897
8ffcdea8
MP
68982014-06-05 Marek Polacek <polacek@redhat.com>
6899
6900 PR c/56724
6901 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6902
742938c9
MP
69032014-06-05 Marek Polacek <polacek@redhat.com>
6904
6905 PR c/49706
6906 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6907 on the left hand side operand of a comparison.
742938c9 6908
6447c55d
MP
69092014-06-05 Marek Polacek <polacek@redhat.com>
6910
6911 PR c/48062
6912 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6913 Print note only if the warning was printed.
6914
9dc7743c
IZ
69152014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6916
6917 PR c/58942
6918 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6919 with a pointer.
6920
fedfecef
MP
69212014-06-03 Marek Polacek <polacek@redhat.com>
6922
6923 PR c/60439
6924 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6925 c_start_case.
6926 * c-tree.h (c_start_case): Update.
6927 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6928 switch condition has boolean value.
6929
9b2b7279
AM
69302014-06-02 Andrew MacLeod <amacleod@redhat.com>
6931
6932 * c-decl.c: Include builtins.h.
6933 * c-parser.c: Likewise.
6934
5c1bc275
MP
69352014-05-27 Marek Polacek <polacek@redhat.com>
6936
6937 PR c/56724
6938 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6939 error and warning calls to error_at and warning_at. Pass location of
6940 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6941 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6942 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6943
97563bc8
IZ
69442014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6945
6946 PR c/61191
6947 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6948 function parameters.
6949
aede2c10
JH
69502014-05-23 Jan Hubicka <hubicka@ucw.cz>
6951
6952 * c-decl.c (merge_decls): Preserve symtab node pointers.
6953 (duplicate_decls): Free new decl.
6954
edbba2ce
TS
69552014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6956
f3316c6d
TS
6957 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6958 initialization.
6959
edbba2ce
TS
6960 * c-parser.c (c_parser_omp_target): Return bool values.
6961
68c81f24
TS
69622014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6963
6964 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6965 num_teams_loc variable to num_thread_limit_loc.
6966
632f2871
RS
69672014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6968
6969 * c-array-notation.c (expand_array_notations): Use void_node
6970 instead of void_zero_node.
6971
766090c2
TS
69722014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6973
6974 * c-decl.c (finish_struct): Adjust.
6975 (finish_enum): Likewise.
6976 (bind): Adjust.
6977 (record_inline_static): Likewise.
6978 (push_scope): Likewise.
6979 (make_label): Likewise.
6980 (lookup_label_for_goto): Likewise.
6981 (finish_struct): Likewise.
6982 (finish_enum): Likewise.
6983 (store_parm_decls): Likewise.
6984 (c_push_function_context): Likewise.
6985 * c-lang.h: Remove usage of variable_size gty attribute.
6986 * c-parser.c (c_parse_init): Adjust.
6987 (c_parse_file): Likewise.
6988
2b107f6b
MP
69892014-05-13 Marek Polacek <polacek@redhat.com>
6990
6991 PR c/61162
6992 * c-typeck.c (convert_for_assignment): Pass location to
6993 WARN_FOR_ASSIGNMENT instead of input_location.
6994
d033409e
MP
69952014-05-10 Marek Polacek <polacek@redhat.com>
6996
6997 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6998 maybe_warn_string_init.
6999 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7000 maybe_warn_string_init.
7001 * c-tree.h (maybe_warn_string_init): Update declaration.
7002 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7003 Call pedwarn_init with loc instead of with input_location.
7004 (digest_init): Pass init_loc to maybe_warn_string_init.
7005 (pop_init_level): Call pedwarn_init with loc instead of with
7006 input_location.
7007 (set_init_index): Likewise.
7008 (process_init_element): Likewise.
7009
ea58ef42
MP
70102014-05-09 Marek Polacek <polacek@redhat.com>
7011
7012 PR c/61096
7013 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7014 (c_parser_initelt): Pass location to set_init_label. Pass array index
7015 location to set_init_index.
7016 * c-tree.h (push_init_level): Update declaration.
7017 (pop_init_level): Likewise.
7018 (set_init_index): Likewise.
7019 (set_init_label): Likewise.
7020 * c-typeck.c (error_init): Add location parameter. Call error_at
7021 instead of error.
7022 (digest_init): Pass init_loc to error_init.
7023 (really_start_incremental_init):
7024 (push_init_level): Add location parameter. Pass loc to pop_init_level
7025 and error_init.
7026 (pop_init_level): Likewise.
7027 (set_designator): Add location parameter. Pass loc to pop_init_level,
7028 push_init_level, and error_init.
7029 (set_init_index): Add location parameter. Pass loc to error_init and
7030 set_designator.
7031 (set_init_label): Likewise.
7032 (output_init_element): Pass loc to error_init.
7033 (process_init_element): Pass loc to error_init, pop_init_level,
7034 pedwarn_init, and push_init_level.
7035
661a0813
MP
70362014-05-09 Marek Polacek <polacek@redhat.com>
7037
7038 PR c/50459
7039 * c-parser.c (c_parser_attributes): Parse the arguments as an
7040 expression-list if the attribute takes identifier.
7041
2793eeab
MP
70422014-05-08 Marek Polacek <polacek@redhat.com>
7043
7044 PR c/61053
7045 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7046 TYPE_ALIGN_UNIT.
7047
f827930a
MP
70482014-05-08 Marek Polacek <polacek@redhat.com>
7049
7050 PR c/61077
7051 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7052 of main.
7053
1d60af08
KZ
70542014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7055 Mike Stump <mikestump@comcast.net>
7056 Richard Sandiford <rdsandiford@googlemail.com>
7057
7058 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7059 (finish_enum): Use wide-int interfaces.
7060 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7061 * c-typeck.c (build_c_cast): Likewise.
7062 (set_nonincremental_init_from_string): Likewise.
7063 (c_tree_equal): Likewise.
7064
a0e24419
MP
70652014-05-02 Marek Polacek <polacek@redhat.com>
7066
7067 PR c/25801
7068 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7069 Return size_one_node when the type is not complete.
7070 (pointer_diff): Remove comment.
7071 (build_unary_op): Improve error messages.
7072
19fc9faa
MP
70732014-05-02 Marek Polacek <polacek@redhat.com>
7074
7075 * c-typeck.c (c_finish_return): Separate warning_at calls.
7076
63bc4e87
MP
70772014-05-02 Marek Polacek <polacek@redhat.com>
7078
7079 * c-tree.h (error_init): Remove declaration.
7080 (pedwarn_init): Likewise.
7081 * c-typeck.c (error_init): Make static and move above.
7082 (pedwarn_init): Likewise.
7083 (warning_init): Move above.
7084 (maybe_warn_string_init): Likewise.
7085
4bd2511b
JL
70862014-05-01 Jeff Law <law@redhat.com>
7087
7088 Revert:
7089
7090 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7091 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7092 avoid goto.
7093
6a358dcb
MP
70942014-05-02 Marek Polacek <polacek@redhat.com>
7095
7096 PR c/60784
7097 * c-typeck.c (push_init_level): Set constructor_designated to
7098 p->designated for structures.
7099
ae5ebda4
MP
71002014-05-01 Marek Polacek <polacek@redhat.com>
7101
7102 PR c/60915
7103 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7104 function-definition has an attribute after the declarator.
7105
96b40f8d
MP
71062014-05-01 Marek Polacek <polacek@redhat.com>
7107
7108 PR c/60257
7109 * c-typeck.c (warning_init): Add location_t parameter. Call
7110 warning_at instead of warning.
7111 (push_init_level): Pass input_location to warning_init.
7112 (add_pending_init): Add location_t parameter. Pass loc to
7113 warning_init.
7114 (set_nonincremental_init): Pass input_location to add_pending_init.
7115 (set_nonincremental_init_from_string): Likewise.
7116 (output_init_element): Pass loc to warning_init and to
7117 add_pending_init.
7118
32e00768
MP
71192014-05-01 Marek Polacek <polacek@redhat.com>
7120
7121 PR c/43395
7122 * c-typeck.c (c_finish_return): Distinguish between label and variable
7123 when warning about returning local address.
7124
c9379ce2
MP
71252014-05-01 Marek Polacek <polacek@redhat.com>
7126
7127 PR c/29467
7128 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7129 in C89 mode.
7130
d00887e8
MP
71312014-05-01 Marek Polacek <polacek@redhat.com>
7132
7133 PR c/43245
7134 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7135 instead of 0 to WARN_FOR_QUALIFIERS.
7136
5436fa2e
MP
71372014-05-01 Marek Polacek <polacek@redhat.com>
7138
7139 PR c/56989
7140 * c-typeck.c (default_conversion): Use better location for
7141 error call.
7142
f8ed5150
MP
71432014-04-30 Marek Polacek <polacek@redhat.com>
7144
7145 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7146 also when SANITIZE_FLOAT_DIVIDE is on.
7147
8337d1db
MP
71482014-04-30 Marek Polacek <polacek@redhat.com>
7149
7150 PR c/60139
7151 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7152 and pedwarn_init. Use loc insted of input_location.
7153
c4bdc42f
MP
71542014-04-30 Marek Polacek <polacek@redhat.com>
7155
7156 PR c/60351
7157 * c-typeck.c (build_binary_op): Use location when warning about
7158 shift count.
7159
45484dcf
MP
71602014-04-25 Marek Polacek <polacek@redhat.com>
7161
7162 PR c/18079
7163 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7164 always_inline/noinline and hot/cold attributes.
7165
34cf811f
MP
71662014-04-25 Marek Polacek <polacek@redhat.com>
7167
7168 PR c/60114
7169 * c-parser.c (c_parser_initelt): Pass input_location to
7170 process_init_element.
7171 (c_parser_initval): Pass loc to process_init_element.
7172 * c-tree.h (process_init_element): Adjust declaration.
7173 * c-typeck.c (push_init_level): Pass input_location to
7174 process_init_element.
7175 (pop_init_level): Likewise.
7176 (set_designator): Likewise.
7177 (output_init_element): Add location_t parameter. Pass loc to
7178 digest_init.
7179 (output_pending_init_elements): Pass input_location to
7180 output_init_element.
7181 (process_init_element): Add location_t parameter. Pass loc to
7182 output_init_element.
7183
42056eac
JJ
71842014-04-24 Jakub Jelinek <jakub@redhat.com>
7185
7186 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7187 atomic-clause, allow comma in between atomic-clause and
7188 seq_cst.
7189
e162a134
JJ
71902014-04-22 Jakub Jelinek <jakub@redhat.com>
7191
7192 PR c/59073
7193 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7194 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7195
2f6babac
IZ
71962014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7197
7198 PR middle-end/60469
7199 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7200 create_tmp_var instead build_decl for creating temps.
7201 (build_array_notation_expr): Likewise.
7202 (fix_conditional_array_notations_1): Likewise.
7203 (fix_array_notation_expr): Likewise.
7204 (fix_array_notation_call_expr): Likewise.
7205
8edbfaa6
JJ
72062014-03-28 Jakub Jelinek <jakub@redhat.com>
7207
7208 PR c++/60689
7209 * c-tree.h (c_build_function_call_vec): New prototype.
7210 * c-typeck.c (build_function_call_vec): Don't call
7211 resolve_overloaded_builtin here.
7212 (c_build_function_call_vec): New wrapper function around
7213 build_function_call_vec. Call resolve_overloaded_builtin here.
7214 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7215 Call c_build_function_call_vec instead of build_function_call_vec.
7216 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7217 * c-decl.c (finish_decl): Likewise.
7218
7485aeea
MLI
72192014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7220
7221 PR c/55383
7222 * c-typeck.c: Use correct format string in cast-qual warning
7223
b17a8b07
TS
72242014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7225
7226 * c-decl.c (c_decl_attributes): Use
7227 lang_hooks.types.omp_mappable_type.
7228 * c-typeck.c (c_finish_omp_clauses): Likewise.
7229
3af9c5e9
MP
72302014-03-06 Marek Polacek <polacek@redhat.com>
7231
7232 PR c/60197
7233 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7234 of checking tree code.
7235
1c9f5f33
PK
72362014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7237
7238 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7239 (c_parser_parameter_declaration): Likewise.
7240
cc28fc7f
MP
72412014-02-19 Marek Polacek <polacek@redhat.com>
7242
7243 PR c/60195
7244 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7245 Call mark_exp_read on exp.value.
7246 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7247 TREE_ADDRESSABLE on old instead of val.
7248 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7249
b581c05c
PK
72502014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7251
7252 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7253 C_EXPR_APPEND by vec_safe_push.
7254 * c-tree.h (C_EXPR_APPEND): Remove.
7255
81e5eca8
MP
72562014-01-31 Marek Polacek <polacek@redhat.com>
7257
7258 PR c/59963
7259 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7260 build_function_call_vec.
7261 (build_function_call): Likewise.
7262 (build_atomic_assign): Likewise.
7263 (build_function_call_vec): Add arg_loc parameter. Use it.
7264 (convert_arguments): Likewise.
7265 (convert_for_assignment): Rename rhs_loc to expr_loc.
7266 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7267 (c_parser_objc_keywordexpr): Likewise.
7268 (c_parser_postfix_expression_after_primary): Call
7269 build_function_call_vec with expr_loc rather than op_loc.
7270 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7271 build_function_call_vec.
7272 (c_parser_expr_list): Add locations parameter. Fill it with locations
7273 of function arguments.
7274 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7275
68fca595
MP
72762014-01-30 Marek Polacek <polacek@redhat.com>
7277
7278 PR c/59940
7279 * c-typeck.c (build_function_call_vec): Use loc parameter.
7280 (convert_arguments): Add location parameter. Use it.
7281 (ep_convert_and_check): Likewise.
7282 (build_atomic_assign): Adjust convert_for_assignment call.
7283 (build_modify_expr): Likewise.
7284 (digest_init): Likewise.
7285 (c_finish_return): Likewise.
7286 (build_conditional_expr): Adjust ep_convert_and_check calls.
7287 (convert_for_assignment): Add rhs_loc parameter. Use it.
7288 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7289 calls.
7290
fa337f3a
RB
72912014-01-30 Richard Biener <rguenther@suse.de>
7292
7293 PR c/59905
7294 * c-typeck.c (build_function_call_vec): Do not replace calls
7295 to a function via an incompatible type with a runtime abort.
7296
b72271b9
BI
72972014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7298
7299 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7300 flag_enable_cilkplus with flag_cilkplus.
7301 (c_parser_direct_declarator_inner): Likewise.
7302 (c_parser_attribute_any_word): Likewise.
7303 (c_parser_attributes): Likewise.
7304 (c_parser_compound_statement): Likewise.
7305 (c_parser_statement_after_labels): Likewise.
7306 (c_parser_if_statement): Likewise.
7307 (c_parser_switch_statement): Likewise.
7308 (c_parser_do_statement): Likewise.
7309 (c_parser_for_statement): Likewise.
7310 (c_parser_unary_expression): Likewise.
7311 (c_parser_postfix_expression): Likewise.
7312 (c_parser_postfix_expression_after_primary): Likewise.
7313 (c_parser_postfix_expression_after_primary): Likewise.
7314 (c_parser_omp_clause_name): Likewise.
7315 (c_finish_omp_declare_simd): Likewise.
7316 (c_parser_cilk_verify_simd): Likewise.
7317 * c-typeck.c (build_array_ref): Likewise.
7318 (build_function_call_vec): Likewise.
7319 (convert_arguments): Likewise.
7320 (build_compound_expr): Likewise.
7321 (c_finish_return): Likewise.
7322 (c_finish_if_stmt): Likewise.
7323 (c_finish_loop): Likewise.
7324 (build_binary_op): Likewise.
7325
393e8e8b
MP
73262014-01-23 Marek Polacek <polacek@redhat.com>
7327
7328 PR c/59846
7329 * c-typeck.c (parser_build_binary_op): Use location instead of
7330 input_location.
7331 (build_binary_op): Pass location to shorten_compare.
7332
f04dda30
MP
73332014-01-23 Marek Polacek <polacek@redhat.com>
7334
7335 PR c/58346
7336 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7337 an empty aggregate.
7338
789eadcd
MP
73392014-01-23 Marek Polacek <polacek@redhat.com>
7340
7341 PR c/59871
7342 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7343 of a comma expression.
7344 (emit_side_effect_warnings): Likewise.
7345
40f14e9f
BI
73462014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7347
7348 PR c/59825
7349 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7350 function to use walk_tree and moved a lot of its functionality to
7351 expand_array_notations.
7352 (expand_array_notations): New function.
7353
74558dd9
BI
73542014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7355
7356 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7357 attribute an attribute without value.
7358
652fea39
JJ
73592014-01-23 Jakub Jelinek <jakub@redhat.com>
7360
7361 PR middle-end/58809
7362 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7363 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7364
f34f1c87
MP
73652014-01-22 Marek Polacek <polacek@redhat.com>
7366
7367 PR c/59891
7368 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7369 of remove_c_maybe_const_expr on op1 and op2.
7370
241f845a
JJ
73712014-01-15 Jakub Jelinek <jakub@redhat.com>
7372
7373 PR c/58943
7374 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7375 effects, preevaluate rhs using SAVE_EXPR first.
7376
9a74f20c
BI
73772014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7378
7379 PR c++/59631
7380 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7381 statements with if-elseif statements.
7382
96066ce1
MP
73832014-01-06 Marek Polacek <polacek@redhat.com>
7384
7385 PR c/57773
7386 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7387 defined bit-field types only in ISO C.
7388
23a5b65a
RS
73892014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7390
7391 Update copyright years
7392
f9030485
RS
73932014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7394
7395 * c-array-notation.c: Use the standard form for the copyright notice.
7396
41958c28
BI
73972013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7398
7399 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7400 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7401 field in parser is not empty. If not-empty, call the function
7402 c_parser_finish_omp_declare_simd.
7403 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7404 between SIMD-enabled functions and #pragma simd. Added new parameter.
7405 (c_parser_cilk_all_clauses): Modified the usage of the function
7406 c_parser_cilk_clause_vectorlength as mentioned above.
7407 (c_parser_cilk_simd_fn_vector_attrs): New function.
7408 (c_finish_cilk_simd_fn_tokens): Likewise.
7409 (is_cilkplus_vector_p): Likewise.
7410 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7411 "nomask," and "mask" strings in clause name.
7412 (c_parser_omp_all_clauses): Added 3 new case statements:
7413 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7414 PRAGMA_CILK_CLAUSE_NOMASK.
7415 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7416 check for vector attribute and if so call the function
7417 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7418 called the function c_finish_cilk_simd_fn_tokens.
7419 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7420 parser field is non-empty. If so, parse them as you would parse
7421 the omp declare simd pragma.
7422 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7423 Added a check when step is a parameter and flag it as error.
7424 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7425 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7426 pragma_omp_clause.
7427
cef0fd0e
TS
74282013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7429
7430 * c-parser.c (c_parser_omp_parallel): Fix description.
7431
12893402
BI
74322013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7433
7434 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7435 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7436 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7437 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7438
296674db
JM
74392013-12-04 Joseph Myers <joseph@codesourcery.com>
7440
7441 PR c/52023
7442 * c-parser.c (c_parser_alignas_specifier): Use
7443 c_sizeof_or_alignof_type instead of c_alignof.
7444 (c_parser_alignof_expression): Likewise, with min_alignof
7445 parameter depending on alignof spelling used.
7446
edd28054
MP
74472013-12-04 Marek Polacek <polacek@redhat.com>
7448
7449 PR c/54113
7450 * c-decl.c (start_function): Don't warn for missing prototype for
7451 inline functions.
7452
da0fc454
MP
74532013-12-03 Marek Polacek <polacek@redhat.com>
7454
7455 PR c/59351
7456 * c-decl.c (build_compound_literal): Allow compound literals with
7457 empty initial value.
7458
4c2ecab0
JM
74592013-12-02 Joseph Myers <joseph@codesourcery.com>
7460
7461 PR c/58235
7462 * c-typeck.c (build_modify_expr): Diagnose assignment to
7463 expression with array type.
7464
340baef7
JM
74652013-11-29 Joseph Myers <joseph@codesourcery.com>
7466
7467 PR c/42262
7468 * c-typeck.c (process_init_element): Do not treat a string as
7469 initializing a whole array when used with a designator for an
7470 individual element.
7471
6763b9f7
JM
74722013-11-29 Joseph Myers <joseph@codesourcery.com>
7473
7474 PR c/57574
7475 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7476 an inline function following a static declaration.
7477
e7bd1de1
JJ
74782013-11-28 Jakub Jelinek <jakub@redhat.com>
7479
7480 PR c/59310
7481 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7482 to p_name before calling c_parser_omp_teams instead of after.
7483 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7484 argument. Remove unused p_name variable.
7485
0136f8f0
AH
74862013-11-27 Aldy Hernandez <aldyh@redhat.com>
7487 Jakub Jelinek <jakub@redhat.com>
7488
7489 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7490 external_scope is NULL.
7491
241b71bb
TV
74922013-11-27 Tom de Vries <tom@codesourcery.com>
7493 Marc Glisse <marc.glisse@inria.fr>
7494
7495 PR c++/59032
7496 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7497
2fb9a547
AM
74982013-11-22 Andrew MacLeod <amacleod@redhat.com>
7499
7500 * c-typeck.c: Add required include files from gimple.h.
7501
8400e75e
DM
75022013-11-22 David Malcolm <dmalcolm@redhat.com>
7503
7504 * c-decl.c (define_label, shadow_tag_warned)
7505 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7506 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7507 (declspecs_add_type): Remove use of in_system_header macro.
7508 * c-parser.c (c_parser_unary_expression): Likewise.
7509 * c-typeck.c (store_init_value, process_init_element)
7510 (c_start_case): Likewise.
7511
7512 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7513 macro.
7514
7515 * c-parser.c (c_parser_set_source_position_from_token): Remove
7516 reference to in_system_header from comment.
7517
386b1f1f
RS
75182013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7519
7520 * c-decl.c (grokdeclarator): Update comment to refer to
7521 tree_to_[su]hwi rather than tree_low_cst.
7522
ae7e9ddd
RS
75232013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7524
7525 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7526 tree_to_uhwi throughout.
7527
9439e9a1
RS
75282013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7529
7530 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7531 throughout.
7532
9541ffee
RS
75332013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7534
7535 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7536 throughout.
7537
c02065fc
AH
75382013-11-15 Aldy Hernandez <aldyh@redhat.com>
7539
7540 * c-parser.c (c_parser_cilk_simd): New.
7541 (c_parser_cilk_verify_simd): New.
7542 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7543 (c_parser_omp_for_loop): Add case for NE_EXPR.
7544 Set c_break_label for CILK_SIMD.
7545 (c_parser_cilk_clause_vectorlength): New.
7546 (c_parser_cilk_clause_linear): New.
7547 (c_parser_cilk_clause_name): New.
7548 (c_parser_cilk_all_clauses): New.
7549 * c-typeck.c (build_unary_op): Pass location argument to
7550 readonly_error.
7551 (build_modify_expr): Same.
7552 (build_asm_expr): Same.
7553 (c_finish_bc_stmt): Error on break/continue in loops.
7554
18f429e2
AM
75552013-11-14 Andrew MacLeod <amacleod@redhat.com>
7556
7557 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7558
d8a2d370
DN
75592013-11-14 Diego Novillo <dnovillo@google.com>
7560
7561 * c-decl.c: Include print-tree.h.
7562 Include stor-layout.h.
7563 Include varasm.h.
7564 Include attribs.h.
7565 Include stringpool.h.
7566 * c-lang.c: Include fold-const.h.
7567 * c-parser.c: Include stringpool.h.
7568 Include attribs.h.
7569 Include stor-layout.h.
7570 Include varasm.h.
7571 Include trans-mem.h.
7572 * c-typeck.c: Include stor-layout.h.
7573 Include trans-mem.h.
7574 Include varasm.h.
7575 Include stmt.h.
7576
38b7bc7f
JM
75772013-11-13 Joseph Myers <joseph@codesourcery.com>
7578
7579 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7580 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7581 __auto_type.
7582 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7583 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7584 RID_AUTO_TYPE.
7585 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7586 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7587 (c_parser_declarator, c_parser_direct_declarator_inner)
7588 (c_parser_parameter_declaration, c_parser_type_name): All callers
7589 changed.
7590 (c_parser_declaration_or_fndef): Handle declarations with type
7591 determined from the initializer.
7592
45b0be94
AM
75932013-11-12 Andrew MacLeod <amacleod@redhat.com>
7594
18f429e2 7595 * c-typeck.c: Include gimplify.h.
45b0be94 7596
582d9b50
JM
75972013-11-12 Joseph Myers <joseph@codesourcery.com>
7598
7599 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7600 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7601 comment.
7602 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7603 or _Thread_local as appropriate in diagnostics.
7604 (build_null_declspecs): Initialize ret->thread_gnu_p.
7605 (declspecs_add_scspec): Handle either __thread or _Thread_local
7606 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7607 pedantic. Do not disallow _Thread_local extern and _Thread_local
7608 static.
7609
267bac10
JM
76102013-11-07 Joseph Myers <joseph@codesourcery.com>
7611 Andrew MacLeod <amacleod@redhat.com>
7612
7613 * c-aux-info.c (gen_type): Handle atomic qualifier.
7614 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7615 qualifiers when compating types.
7616 (shadow_tag_warned): Handle atomic_p in declspecs.
7617 (quals_from_declspecs): Likewise.
7618 (start_decl): Use c_type_promotes_to when promoting argument
7619 types.
7620 (grokdeclarator): Handle _Atomic.
7621 (get_parm_info): Diagnose any qualifier on "void" as only
7622 parameter.
7623 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7624 comparing types. Use c_type_promotes_to when promoting argument
7625 types.
7626 (finish_function): Use c_type_promotes_to when promoting argument
7627 types.
7628 (build_null_declspecs): Handle atomic_p in declspecs.
7629 (declspecs_add_qual): Handle RID_ATOMIC.
7630 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7631 (c_token_starts_declspecs): Handle RID_ATOMIC.
7632 (c_parser_declspecs): Handle atomic type specifiers and
7633 qualifiers.
7634 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7635 from types of expressions with atomic type.
7636 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7637 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7638 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7639 (c_parser_statement_after_labels, c_parser_switch_statement)
7640 (c_parser_for_statement, c_parser_expr_no_commas)
7641 (c_parser_conditional_expression, c_parser_binary_expression)
7642 (c_parser_cast_expression, c_parser_unary_expression)
7643 (c_parser_postfix_expression)
7644 (c_parser_postfix_expression_after_primary, c_parser_expression):
7645 Use convert_lvalue_to_rvalue.
7646 (c_parser_expression_conv, c_parser_expr_list): Document
7647 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7648 (c_parser_objc_synchronized_statement): Use
7649 convert_lvalue_to_rvalue.
7650 (c_parser_objc_selector): Handle RID_ATOMIC.
7651 (c_parser_objc_receiver, c_parser_array_notation): Use
7652 convert_lvalue_to_rvalue.
7653 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7654 _Atomic (type-name).
7655 (struct c_declspecs): Add atomic_p field.
7656 (convert_lvalue_to_rvalue): Declare.
7657 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7658 corresponding atomic types.
7659 (qualify_type): Don't add _Atomic qualifiers from second argument.
7660 (comp_target_types): Do not allow _Atomic mismatches.
7661 (type_lists_compatible_p): Do not remove atomic qualifiers when
7662 comparing types.
7663 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7664 (build_atomic_assign): New functions.
7665 (build_unary_op): Use build_atomic_assign for atomic increment and
7666 decrement.
7667 (build_conditional_expr): Do not treat _Atomic void as a qualified
7668 version of void.
7669 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7670 (find_anonymous_field_with_type, convert_to_anonymous_field)
7671 (convert_for_assignment): Do not remove atomic qualifiers when
7672 comparing types.
7673 (digest_init): Do not accept initialization of arrays of atomic
7674 elements by string constants.
7675 (build_asm_expr): Use convert_lvalue_to_rvalue.
7676 (build_binary_op): Do not treat _Atomic void as a qualified
7677 version of void.
7678
0c249d4b
DD
76792013-11-06 DJ Delorie <dj@redhat.com>
7680
7681 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7682 both explicit and builtin, print the location of the explicit one.
7683
6d7f7e0a
TB
76842013-11-05 Tobias Burnus <burnus@net-b.de>
7685
7686 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7687 c_parser_omp_distribute, c_parser_omp_teams,
7688 c_parser_omp_target, c_parser_omp_declare): Handle
7689 -fopenmp-simd.
7690
b906f4ca
MP
76912013-11-03 Marek Polacek <polacek@redhat.com>
7692
7693 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7694
ee1d5a02
JJ
76952013-11-01 Jakub Jelinek <jakub@redhat.com>
7696
7697 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7698 check_dup_generic at the end, unless remove is true.
7699 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7700 remove = true;.
7701 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7702
5a9785fb
JJ
77032013-10-31 Jakub Jelinek <jakub@redhat.com>
7704
7705 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7706 with decl that is not pointer nor array.
7707
939b37da
BI
77082013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7709
7710 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7711 a spawning function is found.
7712 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7713 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7714 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7715 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7716 case.
7717 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7718 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7719 expr.
7720 (c_finish_return): Added a check to reject _Cilk_spawn in return
7721 expression.
7722 (build_cilk_spawn): New function.
7723 (build_cilk_sync): Likewise.
7724 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7725
d4af74d4
TB
77262013-10-27 Tobias Burnus <burnus@net-b.de>
7727
7728 PR other/33426
7729 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7730 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7731 (c_parser_statement_after_labels): Update calls.
7732
d73749df 77332013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7734
7735 PR other/33426
7736 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7737 Handle PRAGMA_IVDEP.
7738 (c_parser_statement_after_labels): Update call.
7739
f28aa681
MP
77402013-10-24 Marek Polacek <polacek@redhat.com>
7741
7742 * c-parser.c (c_parser_struct_declaration): Add a comment.
7743 (c_parser_declarator): Don't allow _Alignas here.
7744
0645c1a2
AM
77452013-10-17 Andrew MacLeod <amacleod@redhat.com>
7746
7747 * c-parser.c: Include omp-low.h.
7748 * c-typeck.c: Likewise.
7749
568a31f2
MP
77502013-10-17 Marek Polacek <polacek@redhat.com>
7751
7752 PR c/58267
7753 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7754 Document syntax of the array-declarator.
7755 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7756 are not permitted.
7757 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7758 (c_parser_struct_declaration): Likewise.
7759 (c_parser_declarator): Likewise.
7760 (c_parser_direct_declarator_inner): Likewise.
7761 (c_parser_parameter_declaration): Likewise.
7762 (c_parser_type_name): Likewise.
7763
acf0174b
JJ
77642013-10-11 Jakub Jelinek <jakub@redhat.com>
7765
7766 * c-lang.h (current_omp_declare_target_attribute): New extern
7767 decl.
7768 * c-parser.c: Include c-lang.h.
7769 (struct c_parser): Change tokens to c_token *.
7770 Add tokens_buf field. Change tokens_avail type to unsigned int.
7771 (c_parser_consume_token): If parser->tokens isn't
7772 &parser->tokens_buf[0], increment parser->tokens.
7773 (c_parser_consume_pragma): Likewise.
7774 (enum pragma_context): Add pragma_struct and pragma_param.
7775 (c_parser_external_declaration): Adjust
7776 c_parser_declaration_or_fndef caller.
7777 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7778 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7779 Adjust recursive call.
7780 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7781 of pragma_external.
7782 (c_parser_parameter_declaration): Use pragma_param instead of
7783 pragma_external.
7784 (c_parser_compound_statement_nostart, c_parser_label,
7785 c_parser_for_statement): Adjust
7786 c_parser_declaration_or_fndef callers.
7787 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7788 it through to c_parser_conditional_expression.
7789 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7790 pass it through to c_parser_binary_expression. Adjust recursive
7791 call.
7792 (c_parser_binary_expression): Remove prec argument, add
7793 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7794 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7795 binop matches it, use build2 instead of parser_build_binary_op.
7796 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7797 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7798 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7799 Handle pragma_struct and pragma_param the same as pragma_external.
7800 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7801 (c_parser_omp_variable_list): Parse array sections for
7802 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7803 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7804 (c_parser_omp_clause_reduction): Handle user defined reductions.
7805 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7806 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7807 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7808 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7809 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7810 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7811 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7812 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7813 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7814 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7815 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7816 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7817 (c_parser_omp_for_loop): Add CODE argument, pass it through
7818 to c_finish_omp_for. Change last argument to cclauses,
7819 and adjust uses to grab parallel clauses from the array of all
7820 the split clauses. Adjust c_parser_binary_expression,
7821 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7822 (omp_split_clauses): New function.
7823 (c_parser_omp_simd): New function.
7824 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7825 Allow the function to be called also when parsing combined constructs,
7826 and call c_parser_omp_simd when parsing for simd.
7827 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7828 #pragma omp section, require exactly one structured-block instead of
7829 sequence of statements.
7830 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7831 Allow the function to be called also when parsing combined constructs.
7832 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7833 Allow the function to be called also when parsing combined
7834 constructs.
7835 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7836 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7837 c_parser_omp_teams, c_parser_omp_target_data,
7838 c_parser_omp_target_update, c_parser_omp_target,
7839 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7840 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7841 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7842 (c_parser_omp_construct): Add p_name and mask vars. Handle
7843 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7844 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7845 and c_parser_omp_sections callers.
7846 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7847 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7848 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7849 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7850 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7851 OMP_CLAUSE_DEPEND.
7852 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7853 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7854 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7855 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7856 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7857 * c-typeck.c: Include tree-inline.h.
7858 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7859 handle_omp_array_sections_1, handle_omp_array_sections,
7860 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7861 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7862 user defined reductions.
7863 (c_tree_equal): New function.
7864 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7865 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7866 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7867 c_check_omp_declare_reduction_r): New prototypes.
7868 * c-decl.c (current_omp_declare_target_attribute): New variable.
7869 (c_decl_attributes): New function.
7870 (start_decl, start_function): Use it instead of decl_attributes.
7871 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7872 c_omp_reduction_decl, c_omp_reduction_lookup,
7873 c_check_omp_declare_reduction_r): New functions.
7874
0a6c2227
TT
78752013-09-25 Tom Tromey <tromey@redhat.com>
7876
7877 * Make-lang.in (c/gccspec.o): Remove.
7878 (CFLAGS-c/gccspec.o): New variable.
7879 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7880 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7881 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7882
f3bc55f0
TT
78832013-09-25 Tom Tromey <tromey@redhat.com>
7884
7885 * Make-lang.in (c/gccspec.o): Don't use subshell.
7886
a24d975c
MP
78872013-09-18 Marek Polacek <polacek@redhat.com>
7888
7889 PR sanitize/58443
7890 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7891 Remove unnecessary check.
7892
ce6923c5
MP
78932013-09-18 Marek Polacek <polacek@redhat.com>
7894
7895 PR sanitizer/58411
7896 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7897 no_sanitize_undefined attribute.
7898
a1e51df9
KT
78992013-09-13 Kai Tietz <ktietz@redhat.com>
7900
7901 PR target/57848
7902 * c-decl.c (c_builtin_function_ext_scope): Remove
7903 wrong assumption that it is never called on prexisting
7904 symbol.
7905
0af94e6f
JR
79062013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7907
7908 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7909
20059c8b
GDR
79102013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7911
7912 * c-objc-common.c (c_tree_printer): Tidy.
7913
de5a5fa1
MP
79142013-08-30 Marek Polacek <polacek@redhat.com>
7915
7916 * c-typeck.c (build_binary_op): Add division by zero and shift
7917 instrumentation.
7918
2531a1d9 79192013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7920 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7921
6e2bcc98 7922 PR c/35649
2531a1d9
JR
7923 * c-typeck.c (c_common_type): Prefer double_type_node over
7924 other REAL_TYPE types with the same precision.
7925 (convert_arguments): Likewise.
7926
025311c4
GDR
79272013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7928
7929 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7930 (c_initialize_diagnostics): Call a destructor for the early printer.
7931
da6ca2b5
GDR
79322013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7933
7934 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7935 printer initialization.
7936
318cda85 79372013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7938
318cda85
BI
7939 PR c/57490
7940 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7941 check for truth values.
7942 (expand_array_notation_exprs): Added truth values case. Removed an
7943 unwanted else. Added for-loop to walk through subtrees in default
7944 case.
7945
b066401f
GDR
79462013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7947
7948 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7949
fb48aadc
JM
79502013-07-23 Joseph Myers <joseph@codesourcery.com>
7951
7952 * c-parser.c (struct c_generic_association): Fix typo.
7953
433cc7b0
TT
79542013-07-23 Tom Tromey <tromey@redhat.com>
7955 Joseph Myers <joseph@codesourcery.com>
7956
7957 * c-parser.c (struct c_generic_association): New.
7958 (c_generic_association_d): New typedef.
7959 (c_parser_generic_selection): New function.
7960 (c_parser_postfix_expression): Handle RID_GENERIC.
7961
26d40c3d
JM
79622013-07-13 Jason Merrill <jason@redhat.com>
7963
7964 PR c++/57793
7965 * c-decl.c (finish_struct): Check for too-large class.
7966
ecdbd01a 79672013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7968
7969 PR c/57821
7970 * c-typeck.c (set_init_index): When folding, check for index overflow.
7971
1141ed3f
BI
79722013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7973
7974 * c-parser.c (c_parser_array_notation): Removed rejection of array
7975 notations in an array of function pointers.
7976
713b46fa
BI
79772013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7978
7979 * c-array-notation.c (make_triplet_val_inv): New function.
7980 (create_cmp_incr): Likewise.
7981 (create_array_refs): Likewise.
7982 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7983 Also modularized common parts between functions and called the function.
7984 (build_array_notation_expr): Likewise.
7985 (fix_conditional_array_notations_1): Likewise.
7986 (fix_array_notation_expr): Likewise.
7987 (fix_array_notation_call_expr): Likewise.
7988
92f20202
MP
79892013-06-18 Marek Polacek <polacek@redhat.com>
7990
7991 PR c/57630
7992 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7993
73a23b06
BI
79942013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7995
7996 * c-array-notation.c (build_array_notation_expr): Reject array notation
7997 mismatch between LHS and RHS even inside a call_expr. Also, removed
7998 a couple while statements that were dead code.
7999
00b8517d
BI
80002013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8001
8002 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8003 excessive precision expressions in function parameters. Also removed
8004 couple unwanted while statements.
8005
1509bdda
BI
80062013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8007
8008 * c-array-notation.c (expand_array_notation_exprs): Added
8009 ARRAY_NOTATION_REF case.
ab20d992 8010
d60f1706
BI
80112013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8012
8013 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8014 function to c-family/array-notation-common.c.
8015 (is_cilkplus_reduce_builtin): Likewise.
8016 (find_rank): Likewise.
8017 (extract_array_notation_exprs): Likewise.
8018 (replace_array_notations): Likewise.
8019 (find_inv_trees): Likewise.
8020 (replace_inv_trees): Likewise.
8021 (contains_array_notation_expr): Likewise.
8022 (find_correct_array_notation_type): Likewise.
8023 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8024 (struct inv_list): Moved this to c-family/array-notation-common.c.
8025 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 8026
6d6efbb3
BI
80272013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8028
8029 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8030 reduction functions outside the for-loop. Added a check if the fundecl
8031 is non-NULL. Finally, removed an unwanted if-statement, and made the
8032 body unconditional.
8033
25c22937
BI
80342013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8035
8036 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8037 condition of the if-statement matches the rank of else-block and then-
8038 block when array notations are used.
8039 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8040 expression after the entire function body is parsed.
8041 (c_parser_expr_no_commas): Delayed creating array notation expressions
8042 to the end of function parsing.
8043 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8044 whole if-statement instead of just the condition.
ab20d992 8045 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 8046
edd25645
BI
80472013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8048
8049 PR c/57474
8050 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8051 array to NULL_TREE if they are unused. Also added a check for the
8052 field to be NULL before its fields are used in future.
ab20d992 8053
065ce7f1
RO
80542013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8055
8056 PR bootstrap/57450
8057 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8058 (build_array_notation_expr): Likewise.
8059
36536d79
BI
80602013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8061
8062 * c-typeck.c (build_array_ref): Added a check to see if array's
8063 index is greater than one. If true, then emit an error.
8064 (build_function_call_vec): Exclude error reporting and checking
8065 for builtin array-notation functions.
8066 (convert_arguments): Likewise.
8067 (c_finish_return): Added a check for array notations as a return
8068 expression. If true, then emit an error.
8069 (c_finish_loop): Added a check for array notations in a loop
8070 condition. If true then emit an error.
8071 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8072 (build_binary_op): Added a check for array notation expr inside
8073 op1 and op0. If present, we call another function to find correct
8074 type.
8075 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8076 * c-parser.c (c_parser_compound_statement): Check if array
8077 notation code is used in tree, if so, then transform them into
8078 appropriate C code.
8079 (c_parser_expr_no_commas): Check if array notation is used in LHS
8080 or RHS, if so, then build array notation expression instead of
8081 regular modify.
8082 (c_parser_postfix_expression_after_primary): Added a check for
8083 colon(s) after square braces, if so then handle it like an array
8084 notation. Also, break up array notations in unary op if found.
8085 (c_parser_direct_declarator_inner): Added a check for array
8086 notation.
8087 (c_parser_compound_statement): Added a check for array notation in
8088 a stmt. If one is present, then expand array notation expr.
8089 (c_parser_if_statement): Likewise.
8090 (c_parser_switch_statement): Added a check for array notations in
8091 a switch statement's condition. If true, then output an error.
8092 (c_parser_while_statement): Similarly, but for a while.
8093 (c_parser_do_statement): Similarly, but for a do-while.
8094 (c_parser_for_statement): Similarly, but for a for-loop.
8095 (c_parser_unary_expression): Check if array notation is used in a
8096 pre-increment or pre-decrement expression. If true, then expand
8097 them.
8098 (c_parser_array_notation): New function.
8099 * c-array-notation.c: New file.
8100 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 8101
cd192ccc
MS
81022013-05-23 Mike Stump <mikestump@comcast.net>
8103
8104 * c-typeck.c (convert_for_assignment): Handle references to memory
8105 spaces better.
8106
427b248d
JM
81072013-05-16 Jason Merrill <jason@redhat.com>
8108
8109 * Make-lang.in (cc1$(exeext)): Use link mutex.
8110
44d90fe1
PC
81112013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8112
8113 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8114 to simply use OPT_Wpointer_arith.
8115 (build_unary_op): Likewise.
8116
4e7d7b3d
JJ
81172013-04-03 Jakub Jelinek <jakub@redhat.com>
8118
8119 PR c/19449
8120 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8121 argument. If set, or it temporarily for parsing of the first
8122 argument into force_folding_builtin_constant_p.
8123 (c_parser_postfix_expression): Adjust callers.
8124
839b422f
RB
81252013-03-21 Richard Biener <rguenther@suse.de>
8126
8127 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8128 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8129
2ee028f1
MP
81302013-02-12 Marek Polacek <polacek@redhat.com>
8131
8132 PR c/44938
8133 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8134 origtypes to NULL.
8135
8824edff
JJ
81362013-01-24 Jakub Jelinek <jakub@redhat.com>
8137
8138 PR c/56078
8139 * c-typeck.c (set_nonincremental_init_from_string): If
8140 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8141 returned false.
8142 (process_init_element): Likewise.
8143
eadd3d0d
JJ
81442012-12-20 Jakub Jelinek <jakub@redhat.com>
8145
8146 PR c++/55619
8147 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8148 argument, don't call default_function_array_conversion
8149 nor c_fully_fold here.
8150 (c_parser_asm_statement): Adjust callers.
8151 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8152 and outputs here, and call default_function_array_conversion
8153 on inputs that don't need to be addressable.
8154
f8a93a2e
JJ
81552012-12-18 Jakub Jelinek <jakub@redhat.com>
8156
8157 PR c/39464
8158 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8159 warning require that both c_common_unsigned_type as well as
8160 c_common_signed_type is the same for both mvl and mvr types.
8161
9771b263
DN
81622012-11-16 Diego Novillo <dnovillo@google.com>
8163
8164 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8165
8166 * c-common.c: Use new vec API in vec.h.
8167 * c-common.h: Likewise.
8168 * c-gimplify.c: Likewise.
8169 * c-pragma.c: Likewise.
8170 * c-pretty-print.c: Likewise.
8171 * c-pretty-print.h: Likewise.
8172 * c-semantics.c: Likewise.
8173 * c-decl.c: Likewise.
8174 * c-parser.c: Likewise.
8175 * c-tree.h: Likewise.
8176 * c-typeck.c: Likewise.
8177
880661a4
JW
81782012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8179
8180 PR c++/54930
8181 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8182
077d1abe
MLI
81832012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8184
8185 PR c/53066
8186 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8187 shadows a function, unless the variable is a function or a
8188 pointer-to-function.
8189
3a785c97
JJ
81902012-10-12 Jakub Jelinek <jakub@redhat.com>
8191
8192 PR c/54381
8193 * c-parser.c (struct c_tree_loc_pair): Removed.
8194 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8195 add location_t * and tree * arguments, fill in array of 3
8196 sizeof_arg trees and corresponding locs.
8197 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8198 c_parser_expr_list callers.
8199 (c_parser_postfix_expression_after_primary): Likewise. Pass
8200 array of 3 sizeof_arg trees and locs (corresponding to first
8201 3 arguments) to sizeof_pointer_memaccess_warning.
8202
703c8606
LC
82032012-10-09 Lawrence Crowl <crowl@google.com>
8204
8205 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8206 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8207 hash table.
8208
5d9de0d0
PC
82092012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8210
8211 PR c++/54194
8212 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8213 call.
8214
a212e43f
MG
82152012-10-09 Marc Glisse <marc.glisse@inria.fr>
8216
8217 PR c++/54427
8218 * c-typeck.c: Include c-common.h.
8219 (enum stv_conv): Moved to c-common.h.
8220 (scalar_to_vector): Moved to c-common.c.
8221 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8222 * Make-lang.in: c-typeck.c depends on c-common.h.
8223
3b78de56
AC
82242012-10-04 Arnaud Charlet <charlet@adacore.com>
8225
8226 * c-decl.c (c_write_global_declarations): Fix handling of
8227 -fdump-ada-spec*.
8228
78c60e3d
SS
82292012-09-30 Sharad Singhai <singhai@google.com>
8230
8231 * c-decl.c (c_write_global_declarations): Use a different method
8232 to determine if the dump has ben initialized.
8233
9f33203d
JM
82342012-09-14 Joseph Myers <joseph@codesourcery.com>
8235
8236 PR c/54552
8237 * c-typeck.c (c_cast_expr): When casting to a type requiring
8238 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8239 c_fully_fold first.
8240
a27d595d
JM
82412012-09-14 Joseph Myers <joseph@codesourcery.com>
8242
8243 PR c/54103
8244 * c-typeck.c (build_unary_op): Pass original argument of
8245 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8246 any C_MAYBE_CONST_EXPR, if it has integer operands.
8247 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8248 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8249 to c_objc_common_truthvalue_conversion, then remove any
8250 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8251 c_objc_common_truthvalue_conversion not
8252 c_common_truthvalue_conversion.
8253 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8254 call note_integer_operands for arguments with integer operands
8255 that are not integer constants.
8256
9feb29df
JJ
82572012-09-13 Jakub Jelinek <jakub@redhat.com>
8258
8259 PR c/54559
8260 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8261 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8262
d409320c
JJ
82632012-08-31 Jakub Jelinek <jakub@redhat.com>
8264
8265 PR c/54428
8266 * c-convert.c (convert): Don't call fold_convert_loc if
8267 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8268 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8269 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8270
6265d07c
JJ
82712012-08-24 Jakub Jelinek <jakub@redhat.com>
8272
8273 PR c/54355
8274 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8275 for nested and empty_ok arguments in the call to
8276 c_parser_declaration_or_fndef.
8277
1a4049e7
JJ
82782012-08-17 Jakub Jelinek <jakub@redhat.com>
8279
8280 * c-tree.h (c_last_sizeof_arg): Declare.
8281 * c-parser.c (struct c_tree_loc_pair): New type.
8282 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8283 non-NULL.
8284 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8285 (c_parser_postfix_expression_after_primary): Likewise. Call
8286 sizeof_pointer_memaccess_warning if needed.
8287 (sizeof_ptr_memacc_comptypes): New function.
8288 * c-typeck.c (c_last_sizeof_arg): New global variable.
8289 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8290
0229aee9
UB
82912012-07-24 Uros Bizjak <ubizjak@gmail.com>
8292
8293 * c-lang.h (lang_decl): Add variable_size GTY option.
8294
7ee2468b
SB
82952012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8296
8297 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8298 * Make-lang.in: Fix dependencies.
8299
d4a10d0a
SB
83002012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8301
8302 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8303 and add language Makefile hooks.
8304 * config-lang.in: New file.
8305 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8306 add the required "normal" config-lang.in rules.
8307 * c-lang.h: Moved from gcc/ to here.
8308 * c-tree.h: Likewise.
8309 * c-objc-common.c: Likewise.
8310 * c-objc-common.h: Likewise.
8311 * c-typeck.c: Likewise.
8312 * c-convert.c: Likewise.
8313 * c-lang.c: Likewise.
8314 * c-aux-info.c: Likewise.
8315 * c-errors.c: Likewise.
8316 * gccspec.c: Likewise.
8317 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8318 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8319\f
877e3c2a 8320Copyright (C) 2012-2022 Free Software Foundation, Inc.
d4a10d0a
SB
8321
8322Copying and distribution of this file, with or without modification,
8323are permitted in any medium without royalty provided the copyright
8324notice and this notice are preserved.