]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
Daily bump.
[gcc.git] / gcc / c / ChangeLog
CommitLineData
2554e2da
GA
12021-12-17 Marek Polacek <polacek@redhat.com>
2
3 PR c/103649
4 * c-decl.c (c_warn_unused_attributes): Don't warn for
5 attribute_ignored_p.
6 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
7 arguments when the attribute is ignored.
8
9c6586bc
GA
92021-12-14 Jakub Jelinek <jakub@redhat.com>
10
11 PR c/103587
12 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
13 consume the pragma and silently skip to the pragma eol.
14
c8dcf64b
GA
152021-12-12 Jonathan Wakely <jwakely@redhat.com>
16
17 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
18 * c-parser.c: Likewise.
19
4b4839e3
GA
202021-12-09 Jakub Jelinek <jakub@redhat.com>
21
22 PR pch/71934
23 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
24 to resort_data.new_value.
25
641ff219
GA
262021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
27
28 * c-parser.c (struct omp_dim): New struct type for use inside
29 c_parser_omp_variable_list.
30 (c_parser_omp_variable_list): Allow multiple levels of array and
31 component accesses in array section base-pointer expression.
32 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
33 c_parser_omp_var_list_parens.
34 (c_parser_omp_clause_from): Likewise.
35 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
36 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
37 POINTER_PLUS_EXPR.
38 (c_finish_omp_clauses): Extend allowed ranged of expressions
39 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
40
412021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
42
43 PR middle-end/92120
44 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
45 call to c_parser_omp_variable_list to 'true'.
46 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
47 array base handling.
48 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
49
c177e806
GA
502021-11-30 Thomas Schwinge <thomas@codesourcery.com>
51
52 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
53 orphan loop" checking.
54
552021-11-30 Cesar Philippidis <cesar@codesourcery.com>
56 Thomas Schwinge <thomas@codesourcery.com>
57
58 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
59 OpenACC gang reductions.
60
612021-11-30 Richard Biener <rguenther@suse.de>
62
63 * gimple-parser.c (c_parser_gimple_postfix_expression):
64 avoid unreachable code after break.
65
87cd82c8
GA
662021-11-29 Eric Gallager <egallager@gcc.gnu.org>
67
68 PR other/103021
69 * Make-lang.in: Use ETAGS variable in TAGS target.
70
712021-11-29 Richard Biener <rguenther@suse.de>
72
73 * c-typeck.c (c_tree_equal): Remove unreachable return.
74 * c-parser.c (get_matching_symbol): Likewise.
75
e1d43592
GA
762021-11-23 Jakub Jelinek <jakub@redhat.com>
77
78 * c-typeck.c (c_clone_omp_udr): Don't initialize
79 id.transform_lang_insert_block.
80
9c077398
GA
812021-11-19 Martin Sebor <msebor@redhat.com>
82
83 PR c++/33925
84 PR c/102867
85 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
86 code resulting from macro expansion.
87
882021-11-19 Martin Liska <mliska@suse.cz>
89
90 Revert:
91 2021-11-19 Martin Liska <mliska@suse.cz>
92
93 * c-parser.c (add_debug_begin_stmt): Use option directly.
94
483092d3
GA
952021-11-18 Matthias Kretz <m.kretz@gsi.de>
96
97 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
98 * c-parser.c (c_parser_postfix_expression): Likewise.
99
1002021-11-18 Martin Liska <mliska@suse.cz>
101
102 * c-parser.c (add_debug_begin_stmt): Use option directly.
103
280d2838
GA
1042021-11-17 Martin Sebor <msebor@redhat.com>
105
106 PR c/101702
107 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
108 bounds before deciding if they're constant.
109
e2b57363
GA
1102021-11-15 Jakub Jelinek <jakub@redhat.com>
111
112 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
113 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
114
b39265d4
GA
1152021-11-11 Jakub Jelinek <jakub@redhat.com>
116
117 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
118 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
119 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
120 OMP_CLAUSE_NUM_TEAMS_EXPR.
121 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
122 combined target teams even lower-bound expression.
123
1242021-11-11 Richard Biener <rguenther@suse.de>
125
126 * gimple-parser.c: Shuffle bitmap.h include.
127
18ae471f
GA
1282021-11-03 Joseph Myers <joseph@codesourcery.com>
129
130 PR c/103031
131 * c-convert.c (c_convert): New function, based on convert.
132 (convert): Make into wrapper of c_convert.
133 (convert_init): New function.
134 * c-typeck.c (enum impl_conv): Add ic_init_const.
135 (convert_for_assignment): Handle ic_init_const like ic_init. Add
136 new argument to convert_and_check call.
137 (digest_init): Pass ic_init_const to convert_for_assignment for
138 initializers required to be constant.
139
b4df2dd3
GA
1402021-11-02 Richard Sandiford <richard.sandiford@arm.com>
141
142 * c-tree.h (c_simulate_record_decl): Declare.
143 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
144 * c-decl.c (c_simulate_record_decl): New function.
145
c2bd5d8a
GA
1462021-10-22 Eric Gallager <egallager@gcc.gnu.org>
147
148 PR other/102663
149 * Make-lang.in: Add dummy c.install-dvi target.
150
93d183a5
GA
1512021-10-15 Richard Biener <rguenther@suse.de>
152
153 PR c/102763
154 * gimple-parser.c
155 (c_parser_gimple_postfix_expression_after_primary): Check
156 for a pointer do be dereferenced by ->.
157
5d5885c9
GA
1582021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
159
160 * c-parser.c (c_finish_omp_declare_variant): Change call from
161 c_omp_check_context_selector to omp_check_context_selector. Change
162 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
163
c9db17b8
GA
1642021-10-09 Jakub Jelinek <jakub@redhat.com>
165
166 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
167 (c_parser_omp_scan_loop_body): Use it.
168 (c_parser_omp_sections_scope): Likewise.
169
50e20ee6
GA
1702021-10-07 Richard Biener <rguenther@suse.de>
171
172 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
173
bb6194e0
GA
1742021-10-05 Richard Biener <rguenther@suse.de>
175
176 PR c/102605
177 * gimple-parser.c (c_parser_gimple_postfix_expression):
178 Accept more address _Literals.
179
da9c5f78
GA
1802021-10-04 Marek Polacek <polacek@redhat.com>
181
182 PR c++/97573
183 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
184
9d116bcc
GA
1852021-10-01 Martin Sebor <msebor@redhat.com>
186
187 PR c/102103
188 * c-typeck.c (maybe_warn_for_null_address): New function.
189 (build_binary_op): Call it.
190
1912021-10-01 Jakub Jelinek <jakub@redhat.com>
192 Richard Biener <rguenther@suse.de>
193
194 PR sanitizer/102515
195 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
196 for division even for SANITIZE_SI_OVERFLOW.
197
1982021-10-01 Jakub Jelinek <jakub@redhat.com>
199
200 * c-parser.c (c_parser_omp_clause_order): Set
201 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
202
fd133479
GA
2032021-09-28 Andrew Pinski <apinski@marvell.com>
204
205 PR c/32122
206 * c-parser.c (c_parser_statement_after_labels): Pass
207 the c_expr instead of the tree to c_finish_goto_ptr.
208 * c-typeck.c (c_finish_goto_ptr): Change the second
209 argument type to c_expr.
210 * c-tree.h (c_finish_goto_ptr): Likewise.
211 Error out if the expression was not of a pointer type.
212
e4777439
GA
2132021-09-22 Jakub Jelinek <jakub@redhat.com>
214
215 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
216 modifiers.
217
cf74e7b5
GA
2182021-09-18 Jakub Jelinek <jakub@redhat.com>
219
220 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
221 and reproducible modifiers.
222 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
223
2242021-09-18 Jakub Jelinek <jakub@redhat.com>
225
226 * c-parser.c (c_parser_omp_clause_default): Handle private and
227 firstprivate arguments, adjust diagnostics on unknown argument.
228
0a4cb439
GA
2292021-09-17 Jakub Jelinek <jakub@redhat.com>
230
231 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
232 is true.
233
a26206ec
GA
2342021-09-10 Jakub Jelinek <jakub@redhat.com>
235
236 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
237 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
238 don't call build_conditional_expr, instead build a COND_EXPR directly.
239 (c_parser_binary_expression): Avoid calling parser_build_binary_op
240 if omp_atomic_lhs even in more cases for >, < or ==.
241 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
242 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
243 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
244 * c-typeck.c (build_binary_op): For flag_openmp only handle
245 MIN_EXPR/MAX_EXPR.
246
b2748138
GA
2472021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
248
249 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
250 directive.
251
e11c6046
GA
2522021-09-01 Iain Sandoe <iain@sandoe.co.uk>
253
254 * c-decl.c (enum deprecated_states): Add unavailable state.
255 (merge_decls): Copy unavailability.
256 (quals_from_declspecs): Handle unavailable case.
257 (start_decl): Amend the logic handling suppression of nested
258 deprecation states to include unavailability.
259 (smallest_type_quals_location): Amend comment.
260 (grokdeclarator): Handle the unavailable deprecation state.
261 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
262 * c-tree.h (struct c_declspecs): Add unavailable_p.
263 * c-typeck.c (build_component_ref): Handle unavailability.
264 (build_external_ref): Likewise.
265
2662021-09-01 Roger Sayle <roger@nextmovesoftware.com>
267 Joseph Myers <joseph@codesourcery.com>
268
269 PR c/79412
270 * c-decl.c (duplicate_decls): On significant mismatches, mark the
271 types of both (non-function) decls as error_mark_node, so that the
272 middle-end can see the code is malformed.
273 (free_attr_access_data): Don't process if the type has been set to
274 error_mark_node.
275
6d51ee43
GA
2762021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
277
278 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
279 and 'ancestor' in 'target device' clauses.
280
38b19c5b
GA
2812021-08-23 Jakub Jelinek <jakub@redhat.com>
282
283 * c-parser.c (c_parser_omp_clause_num_tasks,
284 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
285
5b2876f9
GA
2862021-08-22 Martin Uecker <muecker@gwdg.de>
287
288 PR c/98397
289 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
290 for pointers to arrays with qualifiers.
291 (build_conditional_expr): For C23 don't lose qualifiers for pointers
292 to arrays when the other pointer is a void pointer. Update warnings.
293 (convert_for_assignment): Update warnings for C2X when converting from
294 void* with qualifiers to a pointer to array with the same qualifiers.
295
7c9e1645
GA
2962021-08-20 Jakub Jelinek <jakub@redhat.com>
297
298 * c-parser.c (c_parser_omp_error): New function.
299 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
300
3012021-08-20 Jakub Jelinek <jakub@redhat.com>
302
303 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
304 comma at the end of list.
305 (c_parser_omp_requires): Likewise.
306
b57fba5e
GA
3072021-08-19 Jakub Jelinek <jakub@redhat.com>
308
309 * c-parser.c (c_parser_omp_requires): Don't call
310 c_parser_peek_2nd_token and optionally consume token if current
311 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
312
6e529985
GA
3132021-08-18 Jakub Jelinek <jakub@redhat.com>
314
315 * c-parser.c (c_parser_omp_nothing): New function.
316 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
317
3182021-08-18 Jakub Jelinek <jakub@redhat.com>
319
320 * c-parser.c (c_parser_statement_after_labels): Add restart label
321 near the start of the function. If c_parser_pragma returns false,
322 goto restart.
323 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
324 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
325 return what c_parser_omp_declare returned. Return true instead of
326 false after emitting errors that the directive is not allowed in
327 pragma_stmt context.
328 (c_parser_omp_ordered): Return true instead of
329 false after emitting errors that the directive is not allowed in
330 pragma_stmt context.
331 (c_parser_omp_target_update): Likewise.
332 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
333 Change return type from tree to bool, return false if the
334 directive should be ignored in pragma_stmt contexts.
335 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
336 return their result directly.
337 (c_parser_omp_cancellation_point): Change return type from void to
338 bool, return false if the directive should be ignored in pragma_stmt
339 contexts.
340 (c_parser_omp_declare): Likewise.
341
2d14d64b
GA
3422021-08-17 Jakub Jelinek <jakub@redhat.com>
343
344 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
345 (c_parser_omp_scope): New function.
346 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
347
72be20e2
GA
3482021-08-12 Jakub Jelinek <jakub@redhat.com>
349
350 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
351 (c_parser_omp_clause_filter): New function.
352 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
353 (OMP_MASKED_CLAUSE_MASK): Define.
354 (c_parser_omp_masked): New function.
355 (c_parser_omp_parallel): Handle parallel masked.
356 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
357 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
358
3592021-08-12 Martin Uecker <muecker@gwdg.de>
360
361 PR c/101838
362 PR c/29970
363 * c-typeck.c (c_expr_sizeof_type): Evaluate
364 size expressions for structs of variable size.
365
3662021-08-12 Tobias Burnus <tobias@codesourcery.com>
367
368 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
369 'primary' as alias for 'master'.
370
3ae564ea
GA
3712021-08-10 Martin Uecker <muecker@gwdg.de>
372
373 PR c/29970
374 * c-typeck.c (c_expr_sizeof_expr): Evaluate
375 size expressions for structs of variable size.
376
f92f4778
GA
3772021-08-06 Tamar Christina <tamar.christina@arm.com>
378
379 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
380 * c-tree.h (c_simulate_enum_decl): Likewise.
381
3822021-08-06 Martin Sebor <msebor@redhat.com>
383
384 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
385 vec arguments to by-reference.
386 (c_finish_omp_declare_simd): Same.
387 (c_parser_compound_statement_nostart): Same.
388 (c_parser_for_statement): Same.
389 (c_parser_objc_methodprotolist): Same.
390 (c_parser_oacc_routine): Same.
391 (c_parser_omp_for_loop): Same.
392 (c_parser_omp_declare_simd): Same.
393
419c6c68
GA
3942021-07-21 Thomas Schwinge <thomas@codesourcery.com>
395 Joseph Myers <joseph@codesourcery.com>
396 Cesar Philippidis <cesar@codesourcery.com>
397
398 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
399 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
400 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
401 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
402
92d45509
GA
4032021-07-20 Martin Sebor <msebor@redhat.com>
404
405 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
406 by-const-reference.
407 * c-typeck.c (c_build_function_call_vec): Same.
408
d97d71a1
GA
4092021-07-15 Martin Sebor <msebor@redhat.com>
410
411 PR c/101289
412 PR c/97548
413 * c-decl.c (get_parm_array_spec): Strip nops.
414
6fba0eea
GA
4152021-07-06 Martin Sebor <msebor@redhat.com>
416
417 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
418
7a60a6e8
GA
4192021-07-02 Jakub Jelinek <jakub@redhat.com>
420
421 PR c/101297
422 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
423 appears before a CPP_NAME.
424
90708f87
GA
4252021-06-25 Martin Sebor <msebor@redhat.com>
426
427 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
428 warning_suppressed_p, suppress_warning, and copy_no_warning.
429 (diagnose_mismatched_decls): Same.
430 (duplicate_decls): Same.
431 (grokdeclarator): Same.
432 (finish_function): Same.
433 (c_write_global_declarations_1): Same.
434 * c-fold.c (c_fully_fold_internal): Same.
435 * c-parser.c (c_parser_expr_no_commas): Same.
436 (c_parser_postfix_expression): Same.
437 * c-typeck.c (array_to_pointer_conversion): Same.
438 (function_to_pointer_conversion): Same.
439 (default_function_array_conversion): Same.
440 (convert_lvalue_to_rvalue): Same.
441 (default_conversion): Same.
442 (build_indirect_ref): Same.
443 (build_function_call_vec): Same.
444 (build_atomic_assign): Same.
445 (build_unary_op): Same.
446 (c_finish_return): Same.
447 (emit_side_effect_warnings): Same.
448 (c_finish_stmt_expr): Same.
449 (c_omp_clause_copy_ctor): Same.
450
9aa8327e
GA
4512021-06-24 Jakub Jelinek <jakub@redhat.com>
452
453 PR c/101176
454 * c-parser.c (c_parser_has_attribute_expression): Set source range for
455 the result.
456
4572021-06-24 Jakub Jelinek <jakub@redhat.com>
458
459 PR c/101171
460 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
461 error_mark_node.
462
4632021-06-24 Jakub Jelinek <jakub@redhat.com>
464
465 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
466 C_ORT_OMP for clauses on target construct.
467 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
468 (c_parser_omp_target): For non-combined target add
469 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
470 C_ORT_OMP_TARGET to c_finish_omp_clauses.
471 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
472 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
473 never present on C_ORT_*DECLARE_SIMD.
474 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
475 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
476 corresponding map clauses.
477
2f080224
GA
4782021-06-21 Jakub Jelinek <jakub@redhat.com>
479
480 PR inline-asm/100785
481 * c-typeck.c (c_mark_addressable): Diagnose trying to make
482 bit-fields addressable.
483
ede6c356
GA
4842021-06-15 Robin Dapp <rdapp@linux.ibm.com>
485
486 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
487 similar.
488
8dc48181
GA
4892021-06-14 Tobias Burnus <tobias@codesourcery.com>
490
491 PR c/100913
492 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
493 var in the error case.
494
438aac59
GA
4952021-06-07 Eric Botcazou <ebotcazou@adacore.com>
496
497 PR c/100920
498 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
499 spot built-in functions.
500
7d6987e9
GA
5012021-06-06 Jakub Jelinek <jakub@redhat.com>
502
503 PR c/100902
504 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
505 even when target is combined with other constructs.
506
5072021-06-06 Eric Botcazou <ebotcazou@adacore.com>
508
509 PR c/100920
510 * c-decl.c (finish_struct): Fix thinko in previous change.
511 * c-typeck.c (convert_for_assignment): Do not warn on pointer
512 assignment and initialization for storage order purposes if the
513 RHS is a call to a DECL_IS_MALLOC function.
514
600f90cb
GA
5152021-06-04 Martin Sebor <msebor@redhat.com>
516
517 PR c/100783
518 * c-objc-common.c (print_type): Handle erroneous types.
519
440c8a0a
GA
5202021-06-03 Jakub Jelinek <jakub@redhat.com>
521
522 PR c++/100859
523 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
524 after depend only cases.
525
ee682192
GA
5262021-05-31 Richard Biener <rguenther@suse.de>
527
528 PR c++/88601
529 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
530 * c-parser.c (c_parser_postfix_expression): Likewise.
531
48166757
GA
5322021-05-28 Richard Biener <rguenther@suse.de>
533
534 PR c/100803
535 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
536 invalid if conditions.
537
5382021-05-28 Jakub Jelinek <jakub@redhat.com>
539
540 PR middle-end/99928
541 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
542 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
543 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
544 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
545 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
546 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
547 if present in map_head, map_field_head or map_firstprivate_head
548 bitmaps.
549
5502021-05-28 Tobias Burnus <tobias@codesourcery.com>
551
552 * c-parser.c (c_parser_omp_clause_affinity): New.
553 (c_parser_omp_clause_name, c_parser_omp_variable_list,
554 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
555 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
556 c_finish_omp_clauses): Likewise.
557
01c59ef2
GA
5582021-05-26 Eric Botcazou <ebotcazou@adacore.com>
559
560 PR c/100653
561 * c-decl.c (finish_struct): Warn for a union containing an aggregate
562 field with a differing scalar storage order.
563
2832d51b
GA
5642021-05-21 Jakub Jelinek <jakub@redhat.com>
565
566 PR middle-end/99928
567 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
568 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
569 if a decl is mentioned both in map clause and in such firstprivate
570 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
571
65f32e5d
GA
5722021-05-19 Jakub Jelinek <jakub@redhat.com>
573
574 PR middle-end/99928
575 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
576 master when combined with taskloop.
577 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
578 parallel master when not combined with taskloop.
579
a8daf9a1
GA
5802021-05-18 Richard Biener <rguenther@suse.de>
581
582 PR c/100522
583 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
584 Diagnose calls to non-functions.
585 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
586
a7ffc1ef
GA
5872021-05-17 Richard Biener <rguenther@suse.de>
588
589 PR c/100625
590 * gimple-parser.c (c_parser_gimple_label): Avoid building
591 a GIMPLE label with NULL label decl.
592
f9af11c7
GA
5932021-05-13 Martin Sebor <msebor@redhat.com>
594
595 PR c/100550
596 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
597
0ff3a0f2
GA
5982021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
599
600 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
601 'close'.
602
aa891c56
GA
6032021-05-10 Martin Liska <mliska@suse.cz>
604
605 * c-aux-info.c (affix_data_type): Use startswith
606 function instead of strncmp.
607 * c-typeck.c (build_function_call_vec): Likewise.
608 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
609
62d87a32
GA
6102021-05-07 Eric Botcazou <ebotcazou@adacore.com>
611
612 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
613 on the address of a pointer field in a record with reverse SSO.
614
99e8df7a
GA
6152021-05-04 Tobias Burnus <tobias@codesourcery.com>
616
617 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
618 for || and && reductions.
619
3c8e539d
GA
6202021-04-29 Joseph Myers <joseph@codesourcery.com>
621
622 * c-typeck.c (function_types_compatible_p): For C2X, treat
623 unprototyped function as compatible with non-variadic prototyped
624 function even if some argument types are changed by the default
625 argument promotions.
626
ee351f7f
GA
6272021-04-15 Martin Sebor <msebor@redhat.com>
628
629 PR c/99420
630 PR c/99972
631 * c-decl.c (pushdecl): Always propagate type attribute.
632
6332021-04-15 Richard Sandiford <richard.sandiford@arm.com>
634
635 PR c/98852
636 * c-typeck.c (c_common_type): Do not drop attributes that
637 affect type identity.
638
1d54b138
GA
6392021-04-10 Jakub Jelinek <jakub@redhat.com>
640
641 PR c/99990
642 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
643 error_mark_node.
644
4493b1c1
GA
6452021-03-25 Jakub Jelinek <jakub@redhat.com>
646
647 PR c++/99565
648 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
649 to operand_equal_p.
650
5f256a70
GA
6512021-03-19 Jakub Jelinek <jakub@redhat.com>
652
653 PR c/99588
654 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
655 with modifycode NOP_EXPR produces and mark the _Atomic var as read
656 if found.
657 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
658 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
659 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
660
3c5b6d24
GA
6612021-03-15 Tobias Burnus <tobias@codesourcery.com>
662
663 PR c++/99509
664 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
665 ensure that the varpool node is marked as offloadable.
666
ceae9533
GA
6672021-03-05 Tobias Burnus <tobias@codesourcery.com>
668
669 PR c/99137
670 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
671
4028d01a
GA
6722021-02-24 Martin Sebor <msebor@redhat.com>
673
674 PR middle-end/97172
675 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
676
bf81237e
GA
6772021-02-18 Jakub Jelinek <jakub@redhat.com>
678
679 PR c/99136
680 * c-typeck.c (c_finish_return): Don't wrap retval into
681 EXCESS_PRECISION_EXPR in functions that return void.
682
0c5cdb31
GA
6832021-02-11 Marek Polacek <polacek@redhat.com>
684
685 * c-parser.c (c_parser_if_statement): Use vec_free.
686
a19dd5e6
GA
6872021-02-04 Martin Sebor <msebor@redhat.com>
688
689 PR c/97882
690 * c-decl.c (locate_old_decl): Add type to diagnostic output.
691 (diagnose_mismatched_decls): Same.
692 (start_function): Introduce temporaries for better readability.
693 * c-typeck.c (comptypes_internal): Only consider complete enum
694 types in comparisons with integers.
695
f7884fb1
GA
6962021-02-01 Martin Sebor <msebor@redhat.com>
697
698 PR middle-end/97172
699 * c-decl.c (free_attr_access_data): New function.
700 (c_parse_final_cleanups): Call free_attr_access_data.
701
59cf67d1
GA
7022021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
703
704 * c-parser.c (c_parser_omp_clause_detach): New.
705 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
706 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
707 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
708 clause. Prevent use of detach with mergeable and overriding the
709 data sharing mode of the event handle.
710
2f7f0d32
GA
7112021-01-15 Jakub Jelinek <jakub@redhat.com>
712
713 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
714 unqualified element type and then call c_build_qualified_type on the
715 ARRAY_TYPE.
716
7d187e4f
GA
7172021-01-07 Richard Biener <rguenther@suse.de>
718
719 * gimple-parser.c (c_parser_gimple_compound_statement): Only
720 reallocate loop array if it is too small.
721
eefe499f
GA
7222020-12-16 Martin Uecker <muecker@gwdg.de>
723
724 PR c/98047
725 * c-typeck.c (build_modify_expr): Drop qualifiers.
726
7272020-12-16 Martin Uecker <muecker@gwdg.de>
728
729 PR c/98260
730 * c-parser.c (c_parser_expression): Look into
731 nop expression when marking expressions as read.
732
d52945ce
GA
7332020-12-14 Martin Liska <mliska@suse.cz>
734
735 PR sanitizer/98204
736 * c-typeck.c (pointer_diff): Do not emit a top-level
737 sanitization.
738 (build_binary_op): Likewise.
739
ca2bd949
GA
7402020-12-09 Tobias Burnus <tobias@codesourcery.com>
741
742 * c-parser.c (c_parser_omp_allocate): New.
743 (c_parser_omp_construct): Call it.
744
7452020-12-09 Richard Biener <rguenther@suse.de>
746
747 PR c/98200
748 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
749 early on error.
750
bc8a7013
GA
7512020-12-07 Martin Uecker <muecker@gwdg.de>
752
753 PR c/97981
754 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
755 that drops qualifiers to the end of the function.
756
d48df6f2
GA
7572020-11-26 Martin Uecker <muecker@gwdg.de>
758
759 PR c/65455
760 PR c/92935
761 * c-parser.c (c_parser_declaration_or_fndef): Remove
762 redundant code to drop qualifiers of _Atomic types for __auto_type.
763 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
764 types for __typeof__.
765
1e2c9a27
GA
7662020-11-24 Jakub Jelinek <jakub@redhat.com>
767
768 PR c/97958
769 * c-parser.c (c_parser_binary_expression): For omp atomic binary
770 expressions, use make_node instead of build2 to avoid checking build2
771 performs.
772
8e6198d0
GA
7732020-11-23 Joseph Myers <joseph@codesourcery.com>
774
775 PR c/95630
776 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
777 for comparisons of complete and incomplete pointers.
778
7a97e2fc
GA
7792020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
780
781 * c-aux-info.c (gen_type): Support opaque types.
782
82e5048e
GA
7832020-11-20 Martin Sebor <msebor@redhat.com>
784
785 PR middle-end/97879
786 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
787
7882020-11-20 Jakub Jelinek <jakub@redhat.com>
789
790 PR other/97911
791 * Make-lang.in (c.serial): Change from goal to a variable.
792 (.PHONY): Drop c.serial.
793
7942020-11-20 Martin Uecker <muecker@gwdg.de>
795
796 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
797
d62586ee
GA
7982020-11-19 Jakub Jelinek <jakub@redhat.com>
799
800 PR c/97860
801 * c-decl.c (get_parm_array_spec): Bail out of nelts is
802 error_operand_p.
803
25bb75f8
GA
8042020-11-18 Jakub Jelinek <jakub@redhat.com>
805
806 * Make-lang.in (c.serial): New goal.
807 (.PHONY): Add c.serial c.prev.
808 (cc1$(exeext)): Call LINK_PROGRESS.
809
77f67db2
GA
8102020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
811
812 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
813 goto too.
814 * c-typeck.c (build_asm_expr): Remove an assert checking output
815 absence for asm goto.
816
8172020-11-13 Jakub Jelinek <jakub@redhat.com>
818
819 * c-typeck.c (c_finish_omp_clauses): Don't clear
820 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
821
8222020-11-13 Iain Sandoe <iain@sandoe.co.uk>
823
824 PR objc/77404
825 * c-parser.c (c_parser_objc_class_definition): Pass the
826 location of the class name to the interface declaration.
827
bb622641
GA
8282020-11-10 Strager Neds <strager.nds@gmail.com>
829
830 * c-decl.c (merge_decls): Use new overload of
831 set_decl_section_name.
832
8332020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
834
835 * c-parser.c (c_parser_omp_target_data): Add use of
836 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
837 handled map clause kind.
838 (c_parser_omp_target_enter_data): Likewise.
839 (c_parser_omp_target_exit_data): Likewise.
840 (c_parser_omp_target): Likewise.
841 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
842 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
843 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
844 same struct field access to co-exist on OpenMP construct.
845
2da7ee05
GA
8462020-11-07 Martin Uecker <muecker@gwdg.de>
847
848 * c-parser.c (c_parser_label): Implement mixing of labels and code.
849 (c_parser_all_labels): Likewise.
850
44cab2d8
GA
8512020-11-06 Iain Sandoe <iain@sandoe.co.uk>
852
853 * c-parser.c (c_parser_objc_at_property_declaration):
854 Improve parsing fidelity. Associate better location info
855 with @property attributes. Clean up the interface to
856 objc_add_property_declaration ().
857
8582020-11-06 Nathan Sidwell <nathan@acm.org>
859
860 * c-decl.c (diagnose_mismatched_decls): Rename
861 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
862 (warn_if_shadowing, implicitly_declare, names_builtin_p)
863 (collect_source_refs): Likewise.
864 * c-typeck.c (inform_declaration, inform_for_arg)
865 (convert_for_assignment): Likewise.
866
8672020-11-06 Tobias Burnus <tobias@codesourcery.com>
868
869 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
870 OpenACC matching.
871 (c_parser_omp_construct): Update call.
872
35c125cb
GA
8732020-11-04 Jakub Jelinek <jakub@redhat.com>
874
875 PR c++/97670
876 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
877 find underlying decl to clear in the aligned_head bitmap.
878
8792020-11-04 Joseph Myers <joseph@codesourcery.com>
880
881 * c-decl.c (handle_nodiscard_attribute): New.
882 (std_attribute_table): Add nodiscard.
883 * c-parser.c (c_parser_std_attribute): Expect argument to
884 nodiscard attribute to be a string. Do not special-case ignoring
885 nodiscard.
886 * c-typeck.c (maybe_warn_nodiscard): New.
887 (build_compound_expr, emit_side_effect_warnings): Call
888 maybe_warn_nodiscard.
889 (c_process_expr_stmt, c_finish_stmt_expr): Also call
890 emit_side_effect_warnings if warn_unused_result.
891
4f0606fe
GA
8922020-10-29 Asher Gordon <AsDaGo@posteo.net>
893
894 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
895 with XDELETE.
896 (finish_init): Likewise.
897 (pop_init_level): Likewise.
898
e93aae4a
GA
8992020-10-28 Joseph Myers <joseph@codesourcery.com>
900
901 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
902 error_at for omitted parameter name.
903
9042020-10-28 Jakub Jelinek <jakub@redhat.com>
905
906 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
907 (c_parser_omp_clause_allocate): New function.
908 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
909 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
910 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
911 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
912 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
913 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
914 PRAGMA_OMP_CLAUSE_ALLOCATE.
915 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
916
89bb01e7
GA
9172020-10-27 Joseph Myers <joseph@codesourcery.com>
918
919 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
920 standard attributes.
921
efe71fcc
GA
9222020-10-23 Marek Polacek <polacek@redhat.com>
923
924 PR c++/91741
925 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
926 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
927 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
928 * c-tree.h (char_type_p): Declare.
929 * c-typeck.c (char_type_p): No longer static.
930
9312020-10-23 Martin Sebor <msebor@redhat.com>
932
933 PR middle-end/97552
934 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
935
2fe5b7d1
GA
9362020-09-19 Martin Sebor <msebor@redhat.com>
937
938 PR c/50584
939 * c-decl.c (lookup_last_decl): Define new function.
940 (c_decl_attributes): Call it.
941 (start_decl): Add argument and use it.
942 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
943 (get_parm_array_spec): Define new function.
944 (push_parm_decl): Call get_parm_array_spec.
945 (start_function): Call warn_parm_array_mismatch. Build attribute
946 access and add it to current function.
947 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
948 in forms of array parameters.
949 * c-tree.h (start_decl): Add argument.
950
9512020-09-19 Sandra Loosemore <sandra@codesourcery.com>
952
953 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
954 with...
955 (in_statement): New.
956 (start_function): Adjust for above change.
957 (c_push_function_context, c_pop_function_context): Likewise.
958 * c-lang.h (struct language_function): Likewise.
959 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
960 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
961 New.
962 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
963 (c_parser_switch_statement): Adjust break/switch context handling
964 and calls to renamed functions.
965 (c_parser_while_statement): Adjust break/switch context handling and
966 build a WHILE_STMT.
967 (c_parser_do_statement): Ditto, with DO_STMT respectively.
968 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
969 (c_parser_omp_for_loop): Adjust break/switch context handling.
970 * c-tree.h (c_break_label, c_cont_label): Delete.
971 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
972 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
973 (in_statement, switch_statement_break_seen_p): Declare.
974 (c_start_case, c_finish_case): Renamed to...
975 (c_start_switch, c_finish_switch).
976 (c_finish_bc_stmt): Adjust arguments.
977 * c-typeck.c (build_function_call_vec): Don't try to print
978 statements with %qE format.
979 (struct c_switch): Rename switch_expr field to switch_stmt.
980 Add break_stmt_seen_p field.
981 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
982 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
983 (do_case): Update for changes to struct c_switch.
984 (c_finish_case): Rename to c_finish_switch. Update for changes to
985 struct c_switch and change of representation from SWITCH_EXPR to
986 SWITCH_STMT.
987 (c_finish_loop): Delete.
988 (c_finish_bc_stmt): Update to reflect changes to break/continue
989 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
990 of a GOTO_EXPR except for objc foreach loops.
991
e1a4a8a0
GA
9922020-09-01 Jakub Jelinek <jakub@redhat.com>
993
994 PR c++/96867
995 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
996 only on PARM_DECLs.
997
8f7ea26a
GA
9982020-08-28 Martin Sebor <msebor@redhat.com>
999
1000 PR c/96596
1001 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1002 argument type.
1003
8b394f01
GA
10042020-08-27 Martin Liska <mliska@suse.cz>
1005
1006 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1007 growth function to true.
1008
db0f6efe
GA
10092020-08-25 Tobias Burnus <tobias@codesourcery.com>
1010
1011 PR c/96678
1012 * c-typeck.c (handle_omp_array_sections_1): Talk about
1013 array function parameter in the error message.
1014
5c265693
GA
10152020-08-18 Jakub Jelinek <jakub@redhat.com>
1016
1017 PR c/96571
1018 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1019 to int, holding index of the match. Call mark_exp_read on the selector
1020 expression and on expressions other than the selected one.
1021
4967ca2f
GA
10222020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1023
1024 PR c/96377
1025 * c-typeck.c (process_init_element): Split test for whether to
1026 recurse into a record, union or array into...
1027 (initialize_elementwise_p): ...this new function. Don't recurse
1028 into a vector type if the initialization value is also a vector.
1029
48cc2e46
GA
10302020-07-31 Richard Biener <rguenther@suse.de>
1031
1032 PR debug/96383
1033 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1034 Define to c_common_finalize_early_debug.
1035
3ea9abca
GA
10362020-07-22 Tobias Burnus <tobias@codesourcery.com>
1037
1038 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1039 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1040 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1041
30430061
GA
10422020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1043
1044 PR target/95237
1045 * c-decl.c (finish_decl): Call target hook
1046 lower_local_decl_alignment to lower local decl alignment.
1047
3f8ca9cb
GA
10482020-07-09 Julian Brown <julian@codesourcery.com>
1049 Thomas Schwinge <thomas@codesourcery.com>
1050
1051 PR middle-end/95270
1052 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1053 for standalone attach/detach clauses.
1054
a82c4c4c 10552020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1056
1057 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1058 set, warn for conversion between pointers that point to incompatible
1059 scalar storage orders.
1060
f60ee68d
GA
10612020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1062
1063 * c-parser.c (c_parser_statement_after_labels): Pass correct
1064 parameters to c_parser_do_statement.
1065
56638b9b
GA
10662020-06-16 Jakub Jelinek <jakub@redhat.com>
1067
1068 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1069 c_in_omp_for.
1070 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1071 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1072 c_finish_omp_for.
1073 * c-tree.h (c_in_omp_for): Declare.
1074 * c-typeck.c (c_in_omp_for): Define.
1075 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1076 (digest_init): Likewise.
1077 (build_binary_op): Likewise.
1078
10792020-06-16 Jakub Jelinek <jakub@redhat.com>
1080
1081 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1082 from kind by comma rather than colon.
1083
1a59f3db
GA
10842020-06-05 Mark Wielaard <mark@klomp.org>
1085
1086 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1087 an undeclared builtin, then add a fixit header hint, if found.
1088 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1089 warning_at about implicit builtin declaration type mismatch.
1090
9a5b7438
GA
10912020-06-03 Mark Wielaard <mark@klomp.org>
1092
1093 * c-parser.c (struct c_parser): Add seen_string_literal
1094 bitfield.
1095 (c_parser_consume_token): Reset seen_string_literal.
1096 (c_parser_error_richloc): Add name_hint if seen_string_literal
1097 and next token is a CPP_NAME and we have a missing header
1098 suggestion for the name.
1099 (c_parser_string_literal): Set seen_string_literal.
1100
11012020-06-03 Mark Wielaard <mark@klomp.org>
1102
1103 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1104 scope with matching_parens after CPP_OPEN_PAREN.
1105
11062020-06-03 Tobias Burnus <tobias@codesourcery.com>
1107
1108 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1109
53ffb43a
GA
11102020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1111
1112 * Make-lang.in: Remove extra slash.
1113
8f66f175
ML
11142020-05-19 Martin Liska <mliska@suse.cz>
1115
1116 * c-parser.c: Fix typo.
1117
49ddde69
JJ
11182020-05-14 Jakub Jelinek <jakub@redhat.com>
1119
1120 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1121
eb72dc66
RB
11222020-05-07 Richard Biener <rguenther@suse.de>
1123
1124 PR middle-end/94703
1125 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1126 DECL_GIMPLE_REG_P.
1127
bf915591
JJ
11282020-04-30 Jakub Jelinek <jakub@redhat.com>
1129
1130 PR c/94842
1131 * c-decl.c (set_labels_context_r): In addition to context-less
1132 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1133 parent function if any.
1134 (store_parm_decls): Adjust comment.
1135
e1113ffb
JJ
11362020-04-19 Jakub Jelinek <jakub@redhat.com>
1137
1138 PR objc/94637
1139 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1140 two CPP_COLON tokens.
1141
2e389749
JJ
11422020-04-17 Jakub Jelinek <jakub@redhat.com>
1143
1144 PR other/94629
1145 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1146 to data.clauses.
1147
2dc9294c
JJ
11482020-04-15 Jakub Jelinek <jakub@redhat.com>
1149
1150 PR c/94593
1151 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1152 requires directive when not at file scope.
1153
13e41d8b
TB
11542020-04-08 Tobias Burnus <tobias@codesourcery.com>
1155
1156 PR middle-end/94120
1157 * c-decl.c (c_check_in_current_scope): New function.
1158 * c-tree.h (c_check_in_current_scope): Declare it.
1159 * c-parser.c (c_parser_oacc_declare): Add check that variables
1160 are declared in the same scope as the directive. Fix handling
1161 of namespace vars.
1162
4df50a05
JJ
11632020-04-07 Jakub Jelinek <jakub@redhat.com>
1164
1165 PR c++/94512
1166 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1167 if c_parser_omp_master succeeded.
1168
5db9e893
JJ
11692020-03-23 Jakub Jelinek <jakub@redhat.com>
1170
1171 PR gcov-profile/94029
1172 PR c/94239
1173 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1174 the function_start_locus location. Don't do that afterwards for the
1175 __GIMPLE body parsing.
1176
9def91e9
JJ
11772020-03-19 Jakub Jelinek <jakub@redhat.com>
1178
1179 PR gcov-profile/94029
1180 * c-tree.h (finish_function): Add location_t argument defaulted to
1181 input_location.
1182 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1183 set it to the locus of closing } if non-NULL.
1184 (c_parser_compound_statement_nostart): Return locus of closing }.
1185 (c_parser_parse_rtl_body): Likewise.
1186 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1187 finish_function.
1188 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1189 input_location to set function_end_locus.
1190
046c5890
JJ
11912020-03-17 Jakub Jelinek <jakub@redhat.com>
1192
1193 PR c/94172
1194 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1195 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1196 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1197 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1198 ENUMERAL_TYPEs.
1199 (finish_incomplete_vars): New function, moved from finish_struct. Use
1200 relayout_decl instead of layout_decl.
1201 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1202 being TYPE_VFIELD. Use finish_incomplete_vars.
1203 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1204 finish_incomplete_vars.
1205 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1206 also on ENUMERAL_TYPEs.
1207
c015ff8c
JJ
12082020-03-16 Jakub Jelinek <jakub@redhat.com>
1209
1210 PR c/94179
1211 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1212
f2e9fe5f
MS
12132020-03-13 Martin Sebor <msebor@redhat.com>
1214
1215 PR c/94040
1216 * c-decl.c (builtin_structptr_type_count): New constant.
1217 (match_builtin_function_types): Reject decls that are incompatible
1218 in types pointed to by pointers.
1219 (diagnose_mismatched_decls): Adjust comments.
1220
c9d70946
JM
12212020-03-05 Joseph Myers <joseph@codesourcery.com>
1222
1223 PR c/93577
1224 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1225 empty when initialized type is error_mark_node.
1226 (set_designator, process_init_element): Ignore initializers for
1227 elements of a variable-size type or of error_mark_node.
1228
726e292d
MS
12292020-03-01 Martin Sebor <msebor@redhat.com>
1230
1231 PR middle-end/93926
1232 * c-decl.c (types_close_enough_to_match): New function.
1233 (match_builtin_function_types):
1234 (diagnose_mismatched_decls): Add missing inform call to a warning.
1235
a499c2f8
MS
12362020-03-01 Martin Sebor <msebor@redhat.com>
1237
1238 PR c/93812
1239 * c-typeck.c (build_functype_attribute_variant): New function.
1240 (composite_type): Call it.
1241
9c3da8cc
JJ
12422020-02-25 Jakub Jelinek <jakub@redhat.com>
1243
1244 PR other/93912
1245 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1246 Rename last argument from probablity to probability.
1247
bacdd5e9
JJ
12482020-02-13 Jakub Jelinek <jakub@redhat.com>
1249
1250 PR c/93576
1251 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1252 *expr if it has side effects.
1253
f9eb0973
JL
12542020-01-30 Jeff Law <law@redhat.com>
1255
1256 PR c/88660
1257 * c-parser.c (c_parser_switch_statement): Make sure to request
1258 marking the switch expr as used.
1259
ac68e287
JM
12602020-01-22 Joseph Myers <joseph@codesourcery.com>
1261
1262 PR c/93348
1263 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1264 argument with integer operands.
1265
852f0ae8
KK
12662020-01-16 Kerem Kat <keremkat@gmail.com>
1267
1268 PR c/92833
1269 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1270 to support 4 available tokens.
1271
e2346a33
JM
12722020-01-15 Joseph Myers <joseph@codesourcery.com>
1273
1274 PR c/93072
1275 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1276 determine whether to set DECL_CONTEXT.
1277
3d77686d
JM
12782020-01-13 Joseph Myers <joseph@codesourcery.com>
1279
1280 PR c/93241
1281 * c-typeck.c (build_c_cast): Check for expressions with integer
1282 operands that can occur in an unevaluated part of an integer
1283 constant expression and call note_integer_operands as needed.
1284
f74c4b2c
RB
12852019-01-08 Richard Biener <rguenther@suse.de>
1286
1287 PR middle-end/93199
1288 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1289 permanently.
1290
8d9254fc
JJ
12912020-01-01 Jakub Jelinek <jakub@redhat.com>
1292
1293 Update copyright years.
1294
39292e25
EB
12952019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1296
1297 * c-decl.c (collect_source_ref_cb): Delete.
1298 (for_each_global_decl): Rename into...
1299 (collect_source_refs): ...this. Call collect_source_ref directly.
1300 (c_parse_final_cleanups): Always call collect_source_ref on the main
1301 input filename.
1302
519d7496
JB
13032019-12-19 Julian Brown <julian@codesourcery.com>
1304 Cesar Philippidis <cesar@codesourcery.com>
1305
1306 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1307 detach clauses.
1308 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1309 Allow deref (->) in variable lists if true.
1310 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1311 Pass to c_parser_omp_variable_list.
1312 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1313 call to c_parser_omp_variable_list.
1314 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1315 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1316 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1317 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1318 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1319 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1320 and detach. Support deref.
1321 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1322 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1323 (c_oacc_check_attachments): New function.
1324 (c_finish_omp_clauses): Check attach/detach arguments for being
1325 pointers using above. Support deref.
1326
a6163563
JB
13272019-12-19 Julian Brown <julian@codesourcery.com>
1328 Maciej W. Rozycki <macro@codesourcery.com>
1329 Tobias Burnus <tobias@codesourcery.com>
1330 Thomas Schwinge <thomas@codesourcery.com>
1331
1332 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1333 (c_parser_oacc_data_clause): Likewise.
1334 (c_parser_oacc_all_clauses): Likewise.
1335 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1336 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1337 PRAGMA_OACC_CLAUSE_NO_CREATE.
1338 * c-typeck.c (handle_omp_array_sections): Support
1339 GOMP_MAP_NO_ALLOC.
1340
d68f5d45
DM
13412019-12-09 David Malcolm <dmalcolm@redhat.com>
1342
1343 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1344 Replace label_text ctor calls.
1345
4691bf46
JM
13462019-12-04 Joseph Myers <joseph@codesourcery.com>
1347
1348 PR c/36941
1349 PR c/88827
1350 * c-typeck.c (convert_lvalue_to_rvalue): Call
1351 require_complete_type for arguments not of void types.
1352 (build_indirect_ref): Do not diagnose dereferencing pointers to
1353 incomplete types.
1354 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1355
85d11957
JM
13562019-12-03 Joseph Myers <joseph@codesourcery.com>
1357
1358 PR c/88704
1359 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1360 old-style parameter definitions.
1361
4569f8b3
SL
13622019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1363
1364 PR target/92499
1365
1366 * c-decl.c (flexible_array_type_p): Move to common code.
1367
65ef05d0
RS
13682019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1369
1370 * c-decl.c (start_decl): Allow initialization of variables whose
1371 size is a POLY_INT_CST.
1372 (finish_decl): Use verify_type_context to check whether the target
1373 allows variables with a particular type to have static or thread-local
1374 storage duration. Don't raise a second error if such variables do
1375 not have a constant size.
1376 (grokdeclarator): Use verify_type_context to check whether the
1377 target allows fields or array elements to have a particular type.
1378 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1379 the target allows pointer difference for the types involved.
1380 (build_unary_op): Likewise for pointer increment and decrement.
1381
34b43828
JM
13822019-11-29 Joseph Myers <joseph@codesourcery.com>
1383
1384 * c-parser.c (struct c_parser): Add members raw_tokens and
1385 raw_tokens_used.
1386 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1387 using previously-lexed raw tokens.
1388 (c_parser_peek_nth_token_raw)
1389 (c_parser_check_balanced_raw_token_sequence): New functions.
1390 (c_parser_nth_token_starts_std_attributes): Use
1391 c_parser_check_balanced_raw_token_sequence for Objective-C.
1392
5b8d9367
JM
13932019-11-25 Joseph Myers <joseph@codesourcery.com>
1394
1395 PR c/91985
1396 * c-decl.c (finish_declspecs): Use int instead of decimal
1397 floating-point types if decimal floating-point not supported.
1398
1723e1be
JM
13992019-11-25 Joseph Myers <joseph@codesourcery.com>
1400
1401 * c-tree.h (struct c_declarator): Use a structure for id member.
1402 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1403 declarators at the start, not when handling individual declarators
1404 later. Use u.id.id instead of u.id.
1405 (grokfield): Use u.id.id instead of u.id.
1406 (build_id_declarator): Set u.id.id and u.id.attrs.
1407 (finish_declspecs): Handle postfix attributes in case of typedef
1408 name or typeof used.
1409 * c-parser.c (c_parser_direct_declarator)
1410 (c_parser_direct_declarator_inner): Place declarator for
1411 attributes inside that for function or array, not outside. Set
1412 u.id.attrs for identifiers.
1413 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1414 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1415 instead of u.id.
1416
bdaf8be1
JJ
14172019-11-22 Jakub Jelinek <jakub@redhat.com>
1418
1419 PR c/90677
1420 * c-decl.c (identifier_global_tag): Define.
1421
3e00ba47
RB
14222019-11-20 Richard Biener <rguenther@suse.de>
1423
1424 PR c/92088
1425 * c-decl.c (grokdeclarator): Prevent inlining of nested
1426 function with VLA arguments.
1427
8c5b727a
JM
14282019-11-20 Joseph Myers <joseph@codesourcery.com>
1429
1430 * c-decl.c (c_warn_type_attributes): New function.
1431 (groktypename, grokdeclarator, finish_declspecs): Call
1432 c_warn_type_attributes before applying attributes to types.
1433 * c-tree.h (c_warn_type_attributes): Declare.
1434
192961ff
JM
14352019-11-19 Joseph Myers <joseph@codesourcery.com>
1436
1437 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1438 standard attributes.
1439 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1440 pedwarn for unknown standard attributes and return error_mark_node
1441 for them.
1442
20a38017
MM
14432019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1444
1445 * c-parser.c (c_parser_parse_rtl_body): Always call
1446 run_rtl_passes, even if startwith pass is not provided.
1447
d5fbe5e0
JM
14482019-11-15 Joseph Myers <joseph@codesourcery.com>
1449
1450 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1451 duplicate standard attributes.
1452
97cc1187
JM
14532019-11-15 Joseph Myers <joseph@codesourcery.com>
1454
1455 * c-decl.c (std_attribute_table): Add maybe_unused.
1456
f8aea5e3
JM
14572019-11-15 Joseph Myers <joseph@codesourcery.com>
1458
1459 * c-decl.c (std_attribute_table): Add fallthrough.
1460 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1461 attribute at top level.
1462
2cc94aa8
JM
14632019-11-15 Joseph Myers <joseph@codesourcery.com>
1464
1465 * c-decl.c (std_attribute_table): New.
1466 (c_init_decl_processing): Register attributes from
1467 std_attribute_table.
1468 * c-parser.c (c_parser_attribute_arguments): Add arguments
1469 require_string and allow_empty_args. All callers changed.
1470 (c_parser_std_attribute): Set require_string argument for
1471 "deprecated" attribute.
1472
7c5890cc
JM
14732019-11-14 Joseph Myers <joseph@codesourcery.com>
1474
1475 * c-parser.c (c_parser_postfix_expression)
1476 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1477 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1478
e8738f4e
RS
14792019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1480
1481 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1482 of build_same_sized_truth_vector_type.
1483 (build_vec_cmp): Likewise.
1484
b2417b59
JJ
14852019-11-14 Jakub Jelinek <jakub@redhat.com>
1486
bedb7f04
JJ
1487 * c-parser.c (c_parser_omp_context_selector): Don't require score
1488 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1489 negative score.
1490
b2417b59
JJ
1491 * c-parser.c (c_parser_omp_context_selector): Rename
1492 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1493 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1494 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1495 and string literals.
1496
4e03c3a7
JM
14972019-11-14 Joseph Myers <joseph@codesourcery.com>
1498
1499 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1500 ctsk_tagfirstref_attrs.
1501 (struct c_declspecs): Update description of attrs. Add
1502 postfix_attrs and non_std_attrs_seen_p. Increase size of
1503 typespec_kind bit-field.
1504 (c_warn_unused_attributes): New declaration.
1505 (parser_xref_tag): Update prototype.
1506 * c-decl.c (c_warn_unused_attributes): New function.
1507 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1508 ctsk_tagref_attrs. Handle attribute declarations.
1509 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1510 (grokdeclarator): Handle standard attributes.
1511 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1512 attributes to incomplete type reference.
1513 (xref_tag): Update call to parser_xref_tag.
1514 (declspecs_add_addrspace, declspecs_add_type)
1515 (declspecs_add_scspec, declspecs_add_attrs): Set
1516 non_std_attrs_seen_p.
1517 (finish_declspecs): Apply postfix standard attributes to type.
1518 * c-parser.c (c_token_starts_declspecs)
1519 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1520 (c_parser_next_tokens_start_declaration): Update comments.
1521 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1522 parser->tokens[2] to parser->tokens[1].
1523 (c_parser_nth_token_starts_std_attributes)
1524 (c_parser_std_attribute_specifier_sequence): New functions.
1525 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1526 attrs. All callers changed. Handle standard attributes.
1527 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1528 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1529 All callers changed.
1530 (c_parser_declspecs): Add arguments start_std_attr_ok and
1531 end_std_attr_ok. All callers changed. Handle standard
1532 attributes.
1533 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1534 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1535 (c_parser_compound_statement_nostart, c_parser_all_labels)
1536 (c_parser_label, c_parser_statement, c_parser_for_statement):
1537 Handle standard attributes.
1538 * c-parser.h (c_parser_declspecs): Update prototype.
1539 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1540 c_parser_declspecs.
1541
0c29cac4
ML
15422019-11-12 Martin Liska <mliska@suse.cz>
1543
1544 * gimple-parser.c: Do not include params.h.
1545
028d4092
ML
15462019-11-12 Martin Liska <mliska@suse.cz>
1547
1548 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1549 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1550 macro.
1551
62aee289
MR
15522019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1553 Frederik Harwath <frederik@codesourcery.com>
1554
1555 gcc/c/
1556 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1557 (c_parser_oacc_kernels_parallel): Rename function to...
1558 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1559 (c_parser_omp_construct): Update accordingly.
1560
1561
7cec9588
JJ
15622019-11-11 Jakub Jelinek <jakub@redhat.com>
1563
1564 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1565 without corresponding end declare target.
1566
f486280c
RS
15672019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1568
1569 * c-convert.c (convert): Only handle vector conversions if one of
1570 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1571 allows it.
1572 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1573 vectors satisfy gnu_vector_type_p.
1574 (build_unary_op): Only allow unary operators to be applied to
1575 vectors if they satisfy gnu_vector_type_p.
1576 (digest_init): Only allow by-element initialization of vectors
1577 if they satisfy gnu_vector_type_p.
1578 (really_start_incremental_init): Likewise.
1579 (push_init_level): Likewise.
1580 (pop_init_level): Likewise.
1581 (process_init_element): Likewise.
1582 (build_binary_op): Only allow binary operators to be applied to
1583 vectors if they satisfy gnu_vector_type_p.
1584
017c6491
JM
15852019-11-08 Joseph Myers <joseph@codesourcery.com>
1586
1587 * c-decl.c (grokparms): Convert () in a function definition to
1588 (void) for C2x.
1589 (store_parm_decls_oldstyle): Pedwarn for C2x.
1590 (store_parm_decls): Update comment about () not generating a
1591 prototype.
1592
c01bd174
JM
15932019-11-07 Joseph Myers <joseph@codesourcery.com>
1594
1595 * c-parser.c (c_parser_attribute_arguments): New function.
1596 Factored out of c_parser_gnu_attribute.
1597 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1598 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1599 (c_parser_std_attribute_specifier): New functions.
1600 (c_parser_transaction_attributes): Use
1601 c_parser_std_attribute_specifier.
1602
471c5330
JM
16032019-11-07 Joseph Myers <joseph@codesourcery.com>
1604
1605 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1606 lex_joined_string and translate_strings_p.
1607 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1608 c_lex_with_flags.
1609 (c_parser_string_literal): New function.
1610 (c_parser_static_assert_declaration_no_semi): Use
1611 c_parser_string_literal. Do not set lex_untranslated_string.
1612 (c_parser_asm_string_literal): Use c_parser_string_literal.
1613 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1614 (c_parser_gnu_attributes): Set and restore translate_strings_p
1615 instead of lex_untranslated_string.
1616 (c_parser_asm_statement): Do not set lex_untranslated_string.
1617 (c_parser_asm_operands): Likewise.
1618 (c_parser_has_attribute_expression): Set and restore
1619 translate_strings_p instead of lex_untranslated_string.
1620 (c_parser_postfix_expression): Use c_parser_string_literal.
1621 (pragma_lex): Likewise.
1622 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1623 (c_parse_file): Set translate_strings_p.
1624 * gimple-parser.c (c_parser_gimple_postfix_expression)
1625 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1626 * c-parser.c (c_parser_string_literal): Declare function.
1627
d0c464d2
JJ
16282019-11-02 Jakub Jelinek <jakub@redhat.com>
1629
1630 * c-parser.c (c_finish_omp_declare_variant): Use
1631 omp_get_context_selector instead of c_omp_get_context_selector.
1632
ac2cfa6c
RS
16332019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1634
1635 * c-tree.h (c_simulate_enum_decl): Declare.
1636 * c-decl.c (c_simulate_enum_decl): New function.
1637 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
1638
74078538
RS
16392019-10-29 Richard Sandiford <richard.sandiford@arm.com>
1640
1641 * c-tree.h (c_simulate_builtin_function_decl): Declare.
1642 * c-decl.c (c_simulate_builtin_function_decl): New function.
1643 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
1644 to the above.
1645
ad1539d5
MS
16462019-10-28 Martin Sebor <msebor@redhat.com>
1647
1648 PR c/66970
1649 * c-decl.c (names_builtin_p): Define a new function.
1650
cb73e4e7
RB
16512019-10-28 Richard Biener <rguenther@suse.de>
1652
1653 PR c/92249
1654 * gimple-parser.c (c_parser_parse_gimple_body): Make
1655 current_bb the entry block initially to easier recover
1656 from errors.
1657 (c_parser_gimple_compound_statement): Adjust.
1658
135df52c
JJ
16592019-10-24 Jakub Jelinek <jakub@redhat.com>
1660
1661 * c-parser.c (c_finish_omp_declare_variant): Use
1662 omp_context_selector_matches instead of
1663 c_omp_context_selector_matches.
1664 * c-decl.c (c_decl_attributes): Add "omp declare target block"
1665 attribute in between declare target and end declare target
1666 pragmas.
1667
783bfe5e
JM
16682019-10-15 Joseph Myers <joseph@codesourcery.com>
1669
1670 * c-parser.c (c_parser_attribute_any_word): Rename to
1671 c_parser_gnu_attribute_any_word. All callers changed.
1672 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
1673 callers changed.
1674 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
1675 callers changed.
1676 (c_parser_declaration_or_fndef, c_parser_declspecs)
1677 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1678 (c_parser_struct_declaration, c_parser_declarator)
1679 (c_parser_gnu_attribute, c_parser_compound_statement)
1680 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
1681 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
1682 attribute-related syntax productions.
1683
56898e43
RS
16842019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1685
1686 * c-objc-common.c (useful_aka_type_p): Replace with...
1687 (get_aka_type): ...this new function. Given the original type,
1688 decide which aka type to print (if any). Only look through typedefs
1689 if user_facing_original_type_p.
1690 (print_type): Update accordingly.
1691
b9424661
JJ
16922019-10-14 Jakub Jelinek <jakub@redhat.com>
1693
1694 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
1695 into int NESTED, if it is 2, diagnose missing commas in between
1696 clauses.
1697 (c_parser_omp_context_selector): Pass 2 as last argument to
1698 c_parser_omp_all_clauses.
1699
20de9568
JJ
17002019-10-12 Jakub Jelinek <jakub@redhat.com>
1701
1702 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
1703 For simd properties, put them directly into TREE_VALUE.
1704 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
1705 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
1706 add "omp declare variant base" attribute rather than
1707 "omp declare variant".
1708
fe2bc27c
JM
17092019-10-11 Joseph Myers <joseph@codesourcery.com>
1710
1711 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
1712
94e7f906
JJ
17132019-10-10 Jakub Jelinek <jakub@redhat.com>
1714
1715 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
1716 true, terminate processing on closing paren and don't skip to end of
1717 pragma line.
1718 (c_parser_omp_declare_simd): Handle also declare variant.
1719 (omp_construct_selectors, omp_device_selectors,
1720 omp_implementation_selectors, omp_user_selectors): New variables.
1721 (c_parser_omp_context_selector,
1722 c_parser_omp_context_selector_specification,
1723 c_finish_omp_declare_variant): New functions.
1724 (c_finish_omp_declare_simd): Handle both declare simd and
1725 declare variant.
1726 (c_parser_omp_declare): Handle declare variant.
1727
93313b94
JM
17282019-10-02 Joseph Myers <joseph@codesourcery.com>
1729
1730 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
1731 CPP_COLON tokens.
1732
55879815
RS
17332019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1734
1735 * c-objc-common.c (useful_aka_type_p): New function.
1736 (print_type): Use it to decide whether an aka type is worth printing.
1737
59bc434a
JJ
17382019-09-27 Jakub Jelinek <jakub@redhat.com>
1739
1740 PR c++/88203
1741 * c-parser.c (c_parser_predefined_identifier): New function.
1742 (c_parser_postfix_expression): Use it.
1743 (c_parser_omp_variable_list): Parse predefined identifiers.
1744 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
1745 in shared and firstprivate clauses, even when they are predetermined
1746 shared.
1747
c6447c20
RS
17482019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1749
1750 * c-typeck.c (build_function_call_vec): Take the original function
1751 decl as an optional final parameter. Pass all built-in calls to
1752 check_builtin_function_arguments.
1753
522da4c2
EB
17542019-09-20 Eric Botcazou <ebotcazou@adacore.com>
1755
1756 PR c/91815
1757 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
1758 of identifiers in the external scope only for variables and functions.
1759
68e2c199
PK
17602019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1761
1762 PR c/78736
1763 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
1764
22f8849d
IS
17652019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1766
1767 PR pch/61250
1768 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
1769 after determining that the first token is not
1770 PRAGMA_GCC_PCH_PREPROCESS.
1771
db376f45
EB
17722019-08-22 Eric Botcazou <ebotcazou@adacore.com>
1773
1774 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
1775 FUNCTION_DECL to the right value in the presence of nested declarators.
1776
4d732405
RS
17772019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1778
1779 PR middle-end/91421
1780 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
1781
cb1180d5
RS
17822019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1783
1784 PR middle-end/91421
1785 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
1786 of a built_in_function.
1787 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
1788
77eb117f
JJ
17892019-08-10 Jakub Jelinek <jakub@redhat.com>
1790
1791 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
1792 (c_parser_omp_clause_device_type): New function.
1793 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1794 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1795 (c_parser_omp_declare_target): Handle device_type clauses. Remove
1796 diagnostics for declare target with clauses nested in clause-less
1797 declare target declaration-definition-seq.
1798 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
1799
2c3b8bad
JJ
18002019-08-09 Jakub Jelinek <jakub@redhat.com>
1801
bb522e2e
JJ
1802 * c-parser.c (check_no_duplicate_clause): Simplify using
1803 omp_find_clause.
1804 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
1805 directive name modifiers.
1806 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
1807
2c3b8bad
JJ
1808 PR c/91401
1809 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
1810 check_no_duplicate_clause call. Comment it out, instead emit a
1811 warning for duplicate dist_schedule clauses.
1812
99769e7f
RS
18132019-08-08 Richard Sandiford <richard.sandiford@arm.com>
1814
1815 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
1816
8860d270
JJ
18172019-08-08 Jakub Jelinek <jakub@redhat.com>
1818
1819 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
1820 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
1821 instead of generic_head to track duplicates.
1822
398e3feb
JJ
18232019-08-07 Jakub Jelinek <jakub@redhat.com>
1824
1825 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
1826 (c_parser_omp_clause_use_device_addr): New function.
1827 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1828 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
1829 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
1830 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
1831 map or use_device_* clauses.
1832 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
1833 in OpenMP, require pointer type rather than pointer or array type.
1834 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
1835
a28351e7
JJ
18362019-07-31 Jakub Jelinek <jakub@redhat.com>
1837
1838 PR c/91192
1839 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
1840 even if finish is UNKNOWN_LOCATION, just use start as finish in that
1841 case.
1842
6343b6bf
ML
18432019-07-25 Martin Liska <mliska@suse.cz>
1844 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
1845
1846 PR c++/23383
1847 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
1848
cb50701e
ML
18492019-07-25 Martin Liska <mliska@suse.cz>
1850
1851 * c-decl.c (merge_decls): Use new macros
1852 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
1853
62e3e66f
RB
18542019-07-23 Richard Biener <rguenther@suse.de>
1855
1856 PR tree-optimization/83518
1857 * gimple-parser.c (c_parser_parse_gimple_body): When we have
1858 a CFG also rebuild cgraph edges.
1859
554a530f
JJ
18602019-07-20 Jakub Jelinek <jakub@redhat.com>
1861
1862 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
1863 (c_parser_omp_clause_bind): New function.
1864 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
1865 (OMP_LOOP_CLAUSE_MASK): Define.
1866 (c_parser_omp_loop): New function.
1867 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
1868 loop combined with parallel or teams.
1869 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
1870 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
1871
d119bf79
RS
18722019-07-18 Richard Sandiford <richard.sandiford@arm.com>
1873
1874 PR c/53633
1875 * c-decl.c (finish_function): Check targetm.warn_func_return
1876 before issuing a -Wreturn-type warning.
1877
ab20d992 18782019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
1879
1880 * gimple-parser.c (c_parser_gimple_try_stmt): New.
1881 (c_parser_compound_statement): Call it.
1882
1fdd6f04
JJ
18832019-07-12 Jakub Jelinek <jakub@redhat.com>
1884
1885 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
1886 (c_parser_omp_clause_order): New function.
1887 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
1888 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
1889 PRAGMA_OMP_CLAUSE_ORDER.
1890 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
1891
8389386c
RB
18922019-07-10 Richard Biener <rguenther@suse.de>
1893
1894 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
1895 _Literal (int *) &x for address literals.
1896
99b1c316
MS
18972019-07-09 Martin Sebor <msebor@redhat.com>
1898
1899 PR c++/61339
1900 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
1901 to class.
1902 (field_decl_cmp): Same.
1903 * c-parser.c (c_parser_struct_or_union_specifier): Same.
1904 * c-tree.h: Same.
1905 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
1906
6c1dae73
MS
19072019-07-09 Martin Sebor <msebor@redhat.com>
1908
1909 PR c++/61339
1910 * c-decl.c: Change class-key from class to struct and vice versa
1911 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
1912 * gimple-parser.c: Same.
1913
69b5279e
RB
19142019-07-01 Richard Biener <rguenther@suse.de>
1915
1916 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
1917 _Literal (char *) &"foo" for address literals pointing to
1918 STRING_CSTs.
1919
ab20d992
JJ
19202019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1921
1922 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
1923 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
1924 C incompatibility if alternate "__intN__" form is used.
1925
1e3d475e
MS
19262019-06-24 Martin Sebor <msebor@redhat.com>
1927
1928 * c-typeck.c (build_binary_op): Hyphenate floating-point.
1929
bf38f7e9
JJ
19302019-06-10 Jakub Jelinek <jakub@redhat.com>
1931
1932 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
1933 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
1934 (c_parser_omp_scan_loop_body): New function.
1935 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
1936 inscan reduction clauses.
1937 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
1938 non-inscan reductions on the same construct, or inscan reductions with
1939 ordered or schedule clauses, or inscan array reductions.
1940
65985d78
MS
19412019-06-05 Martin Sebor <msebor@redhat.com>
1942
1943 PR c/90737
1944 * c-typeck.c (c_finish_return): Only consider functions returning
1945 pointers as candidates for -Wreturn-local-addr.
1946
0ecf545c
MS
19472019-06-05 Martin Sebor <msebor@redhat.com>
1948
1949 * c-decl.c (start_decl): Adjust quoting and hyphenation
1950 in diagnostics.
1951 (finish_decl): Same.
1952 (finish_enum): Same.
1953 (start_function): Same.
1954 (declspecs_add_type): Same.
1955 * c-parser.c (warn_for_abs): Same.
1956 * c-typeck.c (build_binary_op): Same.
1957
e03436e7
TS
19582019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1959
b48f44bf
TS
1960 PR c/89433
1961 * c-parser.c (c_finish_oacc_routine): Rework checking if already
1962 marked with an OpenACC 'routine' directive.
1963
5bf04509
TS
1964 PR c/89433
1965 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
1966 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
1967
e03436e7
TS
1968 PR c/89433
1969 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
1970 clauses from "omp declare target" attribute.
1971
a9c697b8
MS
19722019-05-16 Martin Sebor <msebor@redhat.com>
1973
ab20d992
JJ
1974 * c-decl.c (start_decl): Quote keywords, operators, and
1975 types in diagnostics.
1976 (finish_decl): Same.
1977 * c-parser.c (c_parser_asm_statement): Same.
1978 (c_parser_conditional_expression): Same.
1979 (c_parser_transaction_cancel): Same.
1980 * c-typeck.c (c_common_type): Same.
1981 (build_conditional_expr): Same.
1982 (digest_init): Same.
1983 (process_init_element): Same.
1984 (build_binary_op): Same.
a9c697b8 1985
c4499192
RB
19862019-05-17 Richard Biener <rguenther@suse.de>
1987
1988 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
1989 (c_parser_gimple_unary_expression): Likewise.
1990 (c_parser_gimple_parentized_ternary_expression): New function.
1991
adfe6e4b
RB
19922019-05-16 Richard Biener <rguenther@suse.de>
1993
1994 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
1995 (c_parser_gimple_unary_expression): Likewise.
1996
186dabf2
RB
19972019-05-15 Richard Biener <rguenther@suse.de>
1998
1999 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2000 __BIT_FIELD_REF.
2001
1158c5b4
RB
20022019-05-14 Richard Biener <rguenther@suse.de>
2003
2004 * gimple-parser.c (c_parser_gimple_statement): Remove
2005 questionable auto-promotion to VIEW_CONVERT_EXPR.
2006 (c_parser_gimple_typespec): Split out from __MEM parsing.
2007 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2008 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2009 as __VIEW_CONVERT with -gimple.
2010
fd4485aa
ML
20112019-05-09 Martin Liska <mliska@suse.cz>
2012
2013 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2014 __MAX.
2015 (c_parser_gimple_unary_expression): Parse also binary expression
2016 __MIN and __MAX.
2017 (c_parser_gimple_parentized_binary_expression): New function.
2018
d276406a
ML
20192019-05-09 Martin Liska <mliska@suse.cz>
2020
2021 * gimple-parser.c (struct gimple_parser): Add probability.
2022 for gimple_parser_edge.
2023 (gimple_parser::push_edge): Add new argument probability.
2024 (c_parser_gimple_parse_bb_spec): Parse also probability
2025 if present.
2026 (c_parser_parse_gimple_body): Set edge probability.
2027 (c_parser_gimple_compound_statement): Consume token
2028 before calling c_parser_gimple_goto_stmt.
2029 Parse BB counts.
2030 (c_parser_gimple_statement): Pass new argument.
2031 (c_parser_gimple_goto_stmt): Likewise.
2032 (c_parser_gimple_if_stmt): Likewise.
2033 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2034 * c-parser.c (c_parser_declaration_or_fndef): Pass
2035 hot_bb_threshold argument.
2036 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2037 field.
2038 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2039
f179b64e
JJ
20402019-04-26 Jakub Jelinek <jakub@redhat.com>
2041
2042 PR debug/90197
2043 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2044 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2045 (c_parser_do_statement): Likewise.
2046 (c_parser_for_statement): Likewise. Formatting fixes.
2047 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2048 emit DEBUG_BEGIN_STMTs if needed.
2049
e7178413
JJ
20502019-04-19 Jakub Jelinek <jakub@redhat.com>
2051
c280b7ee
JJ
2052 PR c/89888
2053 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2054 (c_start_case): Don't clear it.
2055 (do_case): Adjust c_add_case_label caller.
2056 (c_finish_case): Adjust c_do_switch_warnings caller.
2057
e7178413
JJ
2058 PR c++/90108
2059 * c-decl.c (merge_decls): If remove is main variant and
2060 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2061 variant that has newdecl as TYPE_NAME if any.
2062
60a2c645
JJ
20632019-04-12 Jakub Jelinek <jakub@redhat.com>
2064
2065 PR c/89933
2066 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2067 don't try to remove it from the variant list, but instead assert
2068 it has no variants.
2069
2a82beaa
RB
20702019-04-01 Richard Biener <rguenther@suse.de>
2071
2072 PR c/71598
2073 * c-tree.h (c_get_alias_set): Declare.
2074 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2075 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2076 as the underlying integer type.
2077
bec1da64
MS
20782019-03-19 Martin Sebor <msebor@redhat.com>
2079
2080 PR tree-optimization/89688
2081 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2082 kinds of initializers.
2083
855cd9b1
JJ
20842019-03-19 Jakub Jelinek <jakub@redhat.com>
2085
2086 PR c/89734
2087 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2088 return type even if quals_used is 0. Formatting fixes.
2089
baa09dc5
RB
20902019-03-14 Richard Biener <rguenther@suse.de>
2091
2092 * c-tree.h (enum c_declspec_il): New.
2093 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2094 enum bitfield.
2095 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2096 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2097 (c_parser_declspecs): Adjust.
2098 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2099 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2100 and bitmap.h.
2101 (struct gimple_parser): New.
2102 (gimple_parser::push_edge): New method.
2103 (c_parser_gimple_parse_bb_spec): New helper.
2104 (c_parser_parse_gimple_body): Get start pass and IL specification.
2105 Initialize SSA and CFG.
2106 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2107 Build a gimple_parser parsing state and pass it along.
2108 (c_parser_gimple_statement): Change intermittend __PHI internal
2109 function argument for the edge.
2110 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2111 (c_parser_gimple_goto_stmt): Record edges to build.
2112 (c_parser_gimple_if_stmt): Likewise.
2113 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2114 (c_parser_gimple_or_rtl_pass_list): Likewise.
2115
a3f9f006
ML
21162019-03-11 Martin Liska <mliska@suse.cz>
2117
2118 * c-decl.c (check_for_loop_decls): Wrap an option name
2119 in a string format message and fix GNU coding style.
2120 * c-parser.c (c_parser_declspecs): Likewise.
2121
1db01ff9
JJ
21222019-03-08 Jakub Jelinek <jakub@redhat.com>
2123
2124 PR tree-optimization/89550
2125 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2126 returned true.
2127 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2128 or warning returned true.
2129
66dcb747
JJ
21302019-02-28 Jakub Jelinek <jakub@redhat.com>
2131
2132 PR c/89525
2133 * c-typeck.c (convert_arguments): Call inform_declaration only if
2134 the previous warning_at call returned true.
2135
2263c9f2
TS
21362019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2137
2138 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2139 parameter. Adjust all users.
2140 (c_parser_oacc_simple_clause): Replace parser with loc formal
2141 parameter. Adjust all users.
2142
ab20d992 21432019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2144
2145 PR c/87924
2146 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2147 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2148
5f88ba10
JJ
21492019-02-15 Jakub Jelinek <jakub@redhat.com>
2150
2151 PR c/89340
2152 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2153 before c_decl_attributes rather than after it.
2154
cfc30fd1
JJ
21552019-02-06 Jakub Jelinek <jakub@redhat.com>
2156
2157 PR c/89211
2158 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2159 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2160 instead of 3 nested ifs.
2161
fbe83e6b
JM
21622019-02-06 Joseph Myers <joseph@codesourcery.com>
2163
2164 PR c/88584
2165 * c-decl.c (finish_decl): Do not complete array types for arrays
2166 with external linkage not at file scope.
2167
f461f938
RB
21682019-02-05 Richard Biener <rguenther@suse.de>
2169
2170 PR c/88606
2171 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2172 all type variants when not supported.
2173
fe509359
JJ
21742019-01-30 Jakub Jelinek <jakub@redhat.com>
2175
2176 PR c/89061
2177 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2178 * c-decl.c (decl_jump_unsafe): Return false for
2179 C_DECL_COMPOUND_LITERAL_P decls.
2180 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2181
6a335b96
JJ
21822019-01-29 Jakub Jelinek <jakub@redhat.com>
2183
f4b7e754
JJ
2184 PR c/89045
2185 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2186 scope.
2187
6a335b96
JJ
2188 PR c/86125
2189 * c-decl.c (last_fileptr_type): Remove.
2190 (last_structptr_types): New variable.
2191 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2192 {old,new}rettype instead of the types themselves. Assert
2193 last_structptr_types array has the same number of elements
2194 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2195 argument oldtype and newtype. Instead of handling
2196 just fileptr_type_node specially, handle all builtin_structptr_types
2197 pointer nodes. Formatting fix.
2198
d8b5a1a0
MS
21992019-01-24 Martin Sebor <msebor@redhat.com>
2200
2201 PR c/86125
2202 PR c/88886
2203 PR middle-end/86308
2204 * c-decl.c (match_builtin_function_types): Add arguments.
2205 (diagnose_mismatched_decls): Diagnose mismatched declarations
2206 of built-ins more strictly.
2207
e21c4491
JJ
22082019-01-24 Jakub Jelinek <jakub@redhat.com>
2209
2210 PR c++/88976
2211 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2212 on #pragma omp cancel with different modifiers.
2213
420183d9
L
22142019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2215
2216 PR c/51628
2217 PR c/88664
2218 * c-typeck.c (convert_for_assignment): Upate the
2219 warn_for_address_or_pointer_of_packed_member call.
2220
17ad43dd
TH
22212019-01-16 Tom Honermann <tom@honermann.net>
2222 Jason Merrill <jason@redhat.com>
2223
2224 * c-typeck.c (digest_init): Revised the error message produced for
2225 ill-formed cases of array initialization with a string literal.
2226 (error_init): Make variadic.
2227
5f07d78a
JJ
22282019-01-12 Jakub Jelinek <jakub@redhat.com>
2229
2230 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2231
c4581bbf
JJ
22322019-01-07 Jakub Jelinek <jakub@redhat.com>
2233
2234 PR c/88701
2235 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2236 if current_function_decl is non-NULL.
2237
65c5b1eb
JM
22382019-01-07 Joseph Myers <joseph@codesourcery.com>
2239
2240 PR c/88720
2241 PR c/88726
2242 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2243 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2244 functions declared but never defined only for external scope, not
2245 for other scopes.
2246
d8fcab68
JJ
22472019-01-07 Jakub Jelinek <jakub@redhat.com>
2248
2249 PR c++/85052
2250 * c-parser.c (c_parser_postfix_expression): Parse
2251 __builtin_convertvector.
2252
a5544970
JJ
22532019-01-01 Jakub Jelinek <jakub@redhat.com>
2254
2255 Update copyright years.
2256
da77eace
L
22572018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2258
2259 PR c/51628
2260 * c-typeck.c (convert_for_assignment): Call
2261 warn_for_address_or_pointer_of_packed_member.
2262
1edf8866
SB
22632018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2264
2265 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2266 a more specific error message (instead of just falling through).
2267
db4fd626
SB
22682018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2269
2270 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2271 asm qualifier is first seen; use that to give nicer "duplicate asm
2272 qualifier" messages. Delete 'quals" variable, instead pass the
2273 "is_volatile_ flag to build_asm_stmt directly.
2274 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2275 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2276
9c9cfcbb
SB
22772018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2278
2279 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2280 "done" boolean variable.
2281
a14feb3c
DM
22822018-12-19 David Malcolm <dmalcolm@redhat.com>
2283
2284 PR c++/87504
2285 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2286 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2287 (build_binary_op): Use struct op_location_t and
2288 class binary_op_rich_location.
2289
6d939173
JJ
22902018-12-11 Jakub Jelinek <jakub@redhat.com>
2291
2292 PR sanitizer/88426
2293 * c-convert.c (convert): Call c_fully_fold before calling
2294 ubsan_instrument_float_cast.
2295
b7055028
SB
22962018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2297
2298 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2299 setting "quals".
2300
5b76e75f
SB
23012018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2302
2303 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2304 after asm. Pass a flag for it to build_asm_expr.
2305 * c-tree.h (build_asm_expr): Update declaration.
2306 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2307 set ASM_INLINE_P.
2308
30bd42b9
SB
23092018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2310
2311 PR inline-asm/55681
2312 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2313 combination of volatile and goto, in any order, without repetitions.
2314
9df6c0e4
JB
23152018-12-04 James Norris <jnorris@codesourcery.com>
2316 Cesar Philippidis <cesar@codesourcery.com>
2317 Julian Brown <julian@codesourcery.com>
2318
2319 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2320 code.
2321
f44697b7
RB
23222018-11-30 Richard Biener <rguenther@suse.de>
2323
2324 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2325 _Literal (type) { ... } as empty aggregate or vector constructor.
2326
550dfbdc
MS
23272018-11-29 Martin Sebor <msebor@redhat.com>
2328
2329 PR c/88091
2330 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2331 (convert_arguments): Add comments. Pass additional argument to
2332 the function above.
2333
673670da
MS
23342018-11-29 Martin Sebor <msebor@redhat.com>
2335
2336 PR c/88172
2337 PR testsuite/88208
2338 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2339
db1d09b0
MS
23402018-11-23 Martin Sebor <msebor@redhat.com>
2341
2342 PR testsuite/88098
2343 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2344 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2345
98f08eb8
MS
23462018-11-20 Martin Sebor <msebor@redhat.com>
2347
2348 * c-parser.c (c_parser_has_attribute_expression): New function.
2349 (c_parser_attribute): New function.
2350 (c_parser_attributes): Move code into c_parser_attribute.
2351 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2352
cd5da983
MS
23532018-11-15 Martin Sebor <msebor@redhat.com>
2354
2355 PR c/83656
2356 * c-decl.c (header_for_builtin_fn): Declare.
2357 (diagnose_mismatched_decls): Diagnose declarations of built-in
2358 functions without a prototype.
2359 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2360 (convert_argument): Same.
2361 (convert_arguments): Factor code out into convert_argument.
2362 Detect mismatches between built-in formal arguments in calls
2363 to built-in without prototype.
2364 (build_conditional_expr): Same.
2365 (type_or_builtin_type): New function.
2366 (convert_for_assignment): Add argument. Conditionally issue
2367 warnings instead of errors for mismatches.
2368
620e594b
DM
23692018-11-13 David Malcolm <dmalcolm@redhat.com>
2370
2371 * c-decl.c: Replace "source_location" with "location_t".
2372 * c-tree.h: Likewise.
2373 * c-typeck.c: Likewise.
2374 * gimple-parser.c: Likewise.
2375
3179ebae
JJ
23762018-11-09 Jakub Jelinek <jakub@redhat.com>
2377
81a227c6
JJ
2378 * c-parser.c (c_parser_omp_clause_final): Use
2379 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2380 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2381 parsing instead of c_parser_paren_condition.
2382 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2383 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2384 c_fully_fold instead of c_parser_condition.
2385 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2386 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2387 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2388 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2389 c_parser_expr_no_commas instead of c_parser_expression.
2390
98c91c56
JJ
2391 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2392 reduction clause with inscan modifier.
2393
3179ebae
JJ
2394 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2395 clauses other than atomic_default_mem_order.
2396
28567c40
JJ
23972018-11-08 Jakub Jelinek <jakub@redhat.com>
2398
2399 * c-parser.c: Include memmode.h.
2400 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2401 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2402 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2403 task_reduction clauses.
2404 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2405 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2406 section, or lvalue assignment expression.
2407 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2408 (c_parser_omp_clause_lastprivate): Parse optional
2409 conditional: modifier.
2410 (c_parser_omp_clause_hint): Require constant integer expression rather
2411 than just integer expression.
2412 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2413 clause.
2414 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2415 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2416 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2417 functions.
2418 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2419 iterators. Parse mutexinoutset and depobj kinds.
2420 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2421 callers.
2422 (c_parser_omp_all_clauses): Likewise. Handle
2423 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2424 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2425 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2426 default memory order from requires directive if any. Adjust
2427 c_finish_omp_atomic caller.
2428 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2429 (c_parser_omp_flush): Parse flush with memory-order-clause.
2430 (c_parser_omp_for_loop): Allow NE_EXPR even in
2431 OpenMP loops, adjust c_finish_omp_for caller.
2432 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2433 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2434 Allow to be called while parsing combined parallel master.
2435 Parse combined master taskloop{, simd}.
2436 (c_parser_omp_parallel): Parse combined
2437 parallel master{, taskloop{, simd}} constructs.
2438 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2439 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2440 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2441 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2442 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2443 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2444 around teams body. Use SET_EXPR_LOCATION.
2445 (c_parser_omp_target_data): Allow target data
2446 with only use_device_ptr clauses.
2447 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2448 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2449 (c_parser_omp_requires): New function.
2450 (c_finish_taskloop_clauses): New function.
2451 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2452 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2453 declaration. Disallow in_reduction clause when combined with parallel
2454 master.
2455 (c_parser_omp_construct): Adjust c_parser_omp_master and
2456 c_parser_omp_taskgroup callers.
2457 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2458 other than cancel.
2459 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2460 like OMP_CLAUSE_REDUCTION.
2461 (handle_omp_array_sections): Likewise. Call save_expr on array
2462 reductions before calling build_index_type. Handle depend clauses
2463 with iterators.
2464 (struct c_find_omp_var_s): New type.
2465 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2466 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2467 with static, runtime or auto schedule kinds. Call save_expr for whole
2468 array reduction sizes. Diagnose reductions with zero sized elements
2469 or variable length structures. Diagnose nogroup clause used with
2470 reduction clause(s). Handle depend clause with
2471 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2472 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2473 some different type for other kinds. Use build_unary_op with
2474 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2475 Handle depend clauses with iterators. Remove no longer needed special
2476 case that predetermined const qualified vars may be specified in
2477 firstprivate clause. Complain if const qualified vars are mentioned
2478 in data-sharing clauses other than firstprivate or shared. Use
2479 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2480 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2481 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2482 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2483
7e2de6df
DM
24842018-10-29 David Malcolm <dmalcolm@redhat.com>
2485
2486 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2487 logic for change to name_hint::operator bool.
2488 (undeclared_variable): Likewise.
2489 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2490 (c_parser_parameter_declaration): Likewise.
2491
9f936c86
JM
24922018-10-17 Joseph Myers <joseph@codesourcery.com>
2493
2494 * c-errors.c (pedwarn_c11): New function.
2495 * c-parser.c (disable_extension_diagnostics): Save
2496 warn_c11_c2x_compat and set it to 0.
2497 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2498 (c_parser_static_assert_declaration_no_semi): Handle
2499 _Static_assert without string constant.
2500 * c-tree.h (pedwarn_c11): New prototype.
2501
033eb567
DM
25022018-10-17 David Malcolm <dmalcolm@redhat.com>
2503
2504 * Make-lang.in (selftest-c): New.
2505 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2506 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2507 from gcc/Makefile.in.
2508
0edf3afe
RB
25092018-10-02 Richard Biener <rguenther@suse.de>
2510
2511 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2512
8313a764
JM
25132018-09-26 Joseph Myers <joseph@codesourcery.com>
2514
2515 PR c/87390
2516 * c-typeck.c (build_binary_op): Use excess precision for
2517 comparisons of integers and floating-point for C11 and later.
2518
ce6f0888
MJ
25192018-09-26 Martin Jambor <mjambor@suse.cz>
2520
2521 PR c/87347
2522 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2523 comment.
ce6f0888 2524
9c4a4b3c
DM
25252018-09-17 David Malcolm <dmalcolm@redhat.com>
2526
2527 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2528 Update for new param.
2529 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2530 Likewise.
2531
80c6d1f4
MJ
25322018-09-17 Martin Jambor <mjambor@suse.cz>
2533
2534 PR c/63886
2535 * c-parser.c: (warn_for_abs): New function.
2536 (c_parser_postfix_expression_after_primary): Call it.
2537
4a426e36
BE
25382018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2539
2540 * c-typeck.c (digest_init): Shorten overlength strings.
2541
6d900107
BE
25422018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2543
2544 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2545
b5764229
BE
25462018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2547
2548 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2549 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2550
22eea6b2
AM
25512018-08-30 Alexander Monakov <amonakov@ispras.ru>
2552
2553 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2554 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2555
85204e23
DM
25562018-08-27 David Malcolm <dmalcolm@redhat.com>
2557
2558 PR 87091
2559 * c-decl.c (implicitly_declare): Update call to
2560 maybe_add_include_fixit to suggest overriding the location, as it
2561 is for a note.
2562 * c-objc-common.c (c_tree_printer): Update for conversion of
2563 show_caret_p to a tri-state.
2564
3d78e008
ML
25652018-08-27 Martin Liska <mliska@suse.cz>
2566
2567 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2568 fndecl_built_in_p and remove check for FUNCTION_DECL if
2569 possible.
3d78e008
ML
2570 (diagnose_mismatched_decls): Likewise.
2571 (merge_decls): Likewise.
2572 (warn_if_shadowing): Likewise.
2573 (pushdecl): Likewise.
2574 (implicitly_declare): Likewise.
2575 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2576 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2577 * c-typeck.c (build_function_call_vec): Likewise.
2578 (convert_arguments): Likewise.
2579
097f82ec
DM
25802018-08-20 David Malcolm <dmalcolm@redhat.com>
2581
2582 PR other/84889
2583 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2584 (diagnose_mismatched_decls): Likewise, in various places.
2585 (warn_if_shadowing): Likewise.
2586 (implicit_decl_warning): Likewise.
2587 (implicitly_declare): Likewise.
2588 (undeclared_variable): Likewise.
2589 (declare_label): Likewise.
2590 (grokdeclarator): Likewise.
2591 (start_function): Likewise.
2592 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2593 (c_parser_parameter_declaration): Likewise.
2594 (c_parser_binary_expression): Likewise.
2595 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2596 (parser_build_binary_op): Likewise.
2597 (build_unary_op): Likewise.
2598 (error_init): Likewise.
2599 (pedwarn_init): Likewise.
2600 (warning_init): Likewise.
2601 (convert_for_assignment): Likewise.
2602
96e6ae57
DM
26032018-08-15 David Malcolm <dmalcolm@redhat.com>
2604
2605 * c-objc-common.c: Include "gcc-rich-location.h".
2606 (c_tree_printer): Move implemenation of '%T' to...
2607 (print_type): ...this new function.
2608 (range_label_for_type_mismatch::get_text): New function.
2609 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2610 range for the various ic_argpass cases.
2611 (class maybe_range_label_for_tree_type_mismatch): New class.
2612 (build_binary_op): Use it when calling binary_op_error.
2613
0cd020ae 26142018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2615
0cd020ae
PK
2616 * c-decl.c (start_decl): Do not warn if variables is named as main
2617 and is a local variable.
2618
72733314
IS
26192018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2620
2621 PR c/19315
2622 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2623 objects of unknown size.
2624
23aa9f7c
MS
26252018-08-13 Martin Sebor <msebor@redhat.com>
2626
2627 PR tree-optimization/71625
2628 * c-parser.c (c_parser_declaration_or_fndef): Call
2629 braced_list_to_string.
2630
e5e7e50d
BH
26312018-08-03 Bogdan Harjoc <harjoc@gmail.com>
2632
2633 PR c/86690
2634 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
2635 errors.
2636
8a45b051
MS
26372018-08-01 Martin Sebor <msebor@redhat.com>
2638
2639 PR tree-optimization/86650
2640 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
2641 and TREE_BLOCK (t) from within percent_K_format to this callsite.
2642
5922dcb5
JJ
26432018-08-01 Jakub Jelinek <jakub@redhat.com>
2644
2645 PR c/85704
2646 * c-typeck.c (init_field_decl_cmp): New function.
2647 (output_pending_init_elements): Use it for field comparisons
2648 instead of pure bit_position comparisons.
2649
9b452033
JJ
26502018-07-12 Jakub Jelinek <jakub@redhat.com>
2651
2652 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
2653 type here, instead add "omp declare target implicit" attribute.
2654 (finish_decl): Diagnose vars without mappable type here.
2655
ab20d992
JJ
26562018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2657 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2658 Cesar Philippidis <cesar@codesourcery.com>
2659
2660 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
2661 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
2662 to their non-present_or_* counterparts. Make 'self' an alias to
2663 PRAGMA_OACC_CLAUSE_HOST.
2664 (c_parser_oacc_data_clause): Update GOMP mappings for
2665 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
2666 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
2667 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
2668 Remove support for present_or_* clauses.
2669 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2670 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
2671 (OACC_DECLARE_CLAUSE_MASK): Likewise.
2672 (OACC_DATA_CLAUSE_MASK): Likewise.
2673 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
2674 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
2675 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
2676 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
2677 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
2678
e197e64e
KV
26792018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2680
2681 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
2682 * gimple-parser.c (c_parser_gimple_statement): Likewise.
2683 (c_parser_gimple_unary_expression): Likewise.
2684
487f2f61
JJ
26852018-06-15 Jakub Jelinek <jakub@redhat.com>
2686
2687 PR c/86093
2688 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
2689 before doing POINTER_DIFF_EXPR.
2690
e4d44a37
MP
26912018-06-07 Marek Polacek <polacek@redhat.com>
2692
2693 PR c/85318
2694 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
2695 for loop initial declarations.
2696
b67b9225
DP
26972018-05-30 David Pagan <dave.pagan@oracle.com>
2698
2699 PR c/55976
2700 * c-decl.c (grokdeclarator): Update check for return type warnings.
2701 (start_function): Likewise.
2702 (finish_function): Likewise.
2703 * c-typeck.c (c_finish_return): Update check for return type warnings.
2704 Pass OPT_Wreturn_type to pedwarn when appropriate.
2705
c566cc9f
RS
27062018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
2707
2708 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
2709 __FMA_EXPR handlng.
2710
e4f81565
RS
27112018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
2712
2713 * gimple-parser.c: Include internal-fn.h.
2714 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
2715 (c_parser_gimple_call_internal): New function.
2716 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
2717 Fix typos in comment.
2718
79e7b1fe
JJ
27192018-05-10 Jakub Jelinek <jakub@redhat.com>
2720
2721 PR c++/85662
2722 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
2723 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
2724 fold_convert_loc.
2725 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
2726 fold_offsetof_1, pass argtype as TYPE to it and drop the
2727 fold_convert_loc.
2728
f7584c81
DP
27292018-05-02 David Pagan <dave.pagan@oracle.com>
2730
2731 PR c/30552
2732 * c-decl.c (old_style_parameter_scope): New function.
2733 * c-parser.c (c_parser_postfix_expression): Check for statement
2734 expressions in old-style function parameter list declarations.
2735 * c-parser.h (old_style_parameter_scope): New extern declaration.
2736
b33a0cb3
JJ
27372018-04-25 Jakub Jelinek <jakub@redhat.com>
2738
2739 PR sanitizer/84307
2740 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
2741 it is not TREE_STATIC.
2742 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
2743 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
2744 its COMPOUND_LITERAL_EXPR_DECL.
2745
c5c5822a
JM
27462018-03-21 Joseph Myers <joseph@codesourcery.com>
2747
2748 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
2749 where all functions return the same _FloatN or _FloatNx type,
2750 treat integer types as _Float64 instead of double.
2751
aa1c9429
JJ
27522018-03-21 Jakub Jelinek <jakub@redhat.com>
2753
2754 PR c/84999
2755 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
2756 building vector comparison, diagnose it and return error_mark_node.
2757
9bb45a95
JJ
27582018-03-15 Jakub Jelinek <jakub@redhat.com>
2759
2760 PR c/84853
2761 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
2762 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
2763 INTEGER_TYPE element type.
2764
ada6bad9
DP
27652018-03-13 David Pagan <dave.pagan@oracle.com>
2766
2767 PR c/46921
2768 * c-typeck.c (output_init_element): Ensure field initializer
2769 expression is always evaluated if there are side effects.
2770
849bbdb9
JJ
27712018-03-06 Jakub Jelinek <jakub@redhat.com>
2772
2773 PR c/84721
2774 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
2775 !building_stmt_list_p ().
2776
d74641bd
RS
27772018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
2778
2779 PR c/84305
2780 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
2781 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
2782 and include the BIND_EXPR in the list of things that need to be
2783 pre-evaluated.
2784
0444aa9c
NS
27852018-02-09 Nathan Sidwell <nathan@acm.org>
2786
2787 PR c/84293
2788 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
2789 to strict_aliasing_warning.
2790
7c30b12a
PC
27912018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2792
2793 * c-typeck.c (really_start_incremental_init, push_init_level,
2794 set_nonincremental_init, output_init_element, process_init_element):
2795 Use DECL_UNNAMED_BIT_FIELD.
2796
2be4dfcb
MP
27972018-01-31 Marek Polacek <polacek@redhat.com>
2798
2799 PR c/81779
2800 * c-parser.c (c_parser_compound_statement_nostart): Call
2801 expansion_point_location_if_in_system_header.
2802
bb9869d5
DM
28032018-01-17 David Malcolm <dmalcolm@redhat.com>
2804
2805 PR c++/83814
2806 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
2807 the C part.
2808
b4923738
JJ
28092018-01-13 Jakub Jelinek <jakub@redhat.com>
2810
2811 PR c/83801
2812 * c-tree.h (decl_constant_value_1): Add a bool argument.
2813 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
2814 returning a CONSTRUCTOR if it is true. Use error_operand_p.
2815 (decl_constant_value): Adjust caller.
2816 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
2817 decl_constant_value_1 as IN_INIT. Otherwise, punt if
2818 decl_constant_value returns initializer that has BLKmode or
2819 array type.
2820 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
2821
928686b1
RS
28222018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2823 Alan Hayward <alan.hayward@arm.com>
2824 David Sherwood <david.sherwood@arm.com>
2825
2826 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
2827 TYPE_VECTOR_SUBPARTS.
2828
85ec4feb
JJ
28292018-01-03 Jakub Jelinek <jakub@redhat.com>
2830
2831 Update copyright years.
2832
913884f7
JJ
28332018-01-01 Jakub Jelinek <jakub@redhat.com>
2834
2835 PR c/83595
2836 * c-parser.c (c_parser_braced_init, c_parser_initelt,
2837 c_parser_conditional_expression, c_parser_cast_expression,
2838 c_parser_sizeof_expression, c_parser_alignof_expression,
2839 c_parser_postfix_expression, c_parser_omp_declare_reduction,
2840 c_parser_transaction_expression): Use set_error () method instead
2841 of setting value member to error_mark_node.
2842
c6cfa2bf
MM
28432017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
2844
2845 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
2846 and _Float<N>X built-in functions.
2847
11d29d63
JJ
28482017-12-22 Jakub Jelinek <jakub@redhat.com>
2849
14ec014e
JJ
2850 PR debug/83550
2851 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
2852 TYPE_STUB_DECL and call rest_of_type_compilation before processing
2853 incomplete vars rather than after it.
2854
11d29d63
JJ
2855 PR debug/83547
2856 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
2857 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
2858 and consider empty ones if there are no other stmts. For
2859 -Wunused-value walk all statements before the one only followed by
2860 DEBUG_BEGIN_STMTs.
2861
170a8bd6 28622017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2863 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2864
2865 * c-parser.c (c_parser_while_statement): Add unroll parameter and
2866 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
2867 (c_parser_do_statement): Likewise.
2868 (c_parser_for_statement): Likewise.
2869 (c_parser_statement_after_labels): Adjust calls to above.
2870 (c_parse_pragma_ivdep): New static function.
2871 (c_parser_pragma_unroll): Likewise.
2872 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
2873 <PRAGMA_UNROLL>: New case.
2874
01512446
JJ
28752017-12-19 Jakub Jelinek <jakub@redhat.com>
2876
2877 * c-typeck.c (comptypes_internal, function_types_compatible_p,
2878 perform_integral_promotions, digest_init): Replace Yoda conditions
2879 with typical order conditions.
2880 * c-decl.c (check_bitfield_type_and_width): Likewise.
2881
c65e18d3
BE
28822017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2883
2884 * c-typeck.c (c_safe_arg_type_equiv_p,
2885 c_safe_function_type_cast_p): New function.
2886 (build_c_cast): Implement -Wcast-function-type.
2887
b7280579
RB
28882017-12-14 Richard Biener <rguenther@suse.de>
2889
2890 PR c/83415
2891 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
2892 like REALPART_EXPR for the behavior of whether its operand
2893 is an lvalue.
2894
49e6a6c0
MP
28952017-12-12 Marek Polacek <polacek@redhat.com>
2896
2897 PR c/82679
2898 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
2899
ab20d992 29002017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2901
2902 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
2903 * c-parser.c (add_debug_begin_stmt): New.
2904 (c_parser_declaration_or_fndef): Call it.
2905 (c_parser_compound_statement_nostart): Likewise.
2906 (c_parser_statement_after_labels): Likewise.
2907 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
2908
4b2b493f
JM
29092017-12-07 Joseph Myers <joseph@codesourcery.com>
2910
2911 * c-decl.c (build_compound_literal): Add parameter alignas_align
2912 and set alignment of decl if nonzero.
2913 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
2914 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
2915 qualifier.
2916 (c_parser_struct_declaration): Update syntax comment.
2917 (c_parser_type_name): Add alignas_ok argument and pass it to
2918 c_parser_declspecs.
2919 (c_parser_cast_expression): Pass true to c_parser_type_name and
2920 give error if a cast used an _Alignas specifier.
2921 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
2922 give error if sizeof (type-name) used an _Alignas specifier.
2923 (c_parser_alignof_expression): Pass true to c_parser_type_name and
2924 give error if _Alignof (type-name) used an _Alignas specifier.
2925 (c_parser_postfix_expression_after_paren_type): Check specified
2926 alignment for a compound literal and pass it to
2927 build_compound_literal.
2928 * c-parser.h (c_parser_type_name): Update prototype.
2929 * c-tree.h (build_compound_literal): Update prototype.
2930
5d9ae53d
MS
29312017-12-07 Martin Sebor <msebor@redhat.com>
2932
2933 PR c/81544
2934 * c-decl.c (c_decl_attributes): Look up existing declaration and
2935 pass it to decl_attributes.
2936
c79144f8
DM
29372017-12-06 David Malcolm <dmalcolm@redhat.com>
2938
2939 PR c/83236
2940 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
2941 reserved for use by the implementation.
2942
613bc14f
DM
29432017-12-06 David Malcolm <dmalcolm@redhat.com>
2944
2945 * c-decl.c: Include "c-family/c-spellcheck.h".
2946
05abad4c
ML
29472017-12-05 Martin Liska <mliska@suse.cz>
2948 Jakub Jelinek <jakub@redhat.com>
2949
2950 * c-typeck.c (pointer_diff): Add new argument and instrument
2951 pointer subtraction.
2952 (build_binary_op): Similar for pointer comparison.
2953
cc6534d4
JJ
29542017-12-01 Jakub Jelinek <jakub@redhat.com>
2955
65791f42
JJ
2956 PR c/79153
2957 * c-parser.c: Include tree-iterator.h.
2958 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
2959 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
2960 on it.
2961
cc6534d4
JJ
2962 PR c/83222
2963 * c-tree.h (decl_constant_value_1): Declare.
2964 * c-typeck.c (decl_constant_value_1): New function.
2965 (decl_constant_value): Use it.
2966 * c-fold.c (c_fully_fold_internal): If in_init, use
2967 decl_constant_value_1 instead of decl_constant_value.
2968
5de73c05
JJ
29692017-11-30 Jakub Jelinek <jakub@redhat.com>
2970
2971 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
2972
058f0b9e
JJ
29732017-11-28 Jakub Jelinek <jakub@redhat.com>
2974
2975 PR sanitizer/81275
2976 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
2977 c_switch_covers_all_cases_p returns true.
2978
5e9d6aa4 29792017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2980 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2981
2982 * Make-lang.in (c/c-array-notation.o): Remove.
2983 * c-array-notation.c: Delete.
2984 * c-decl.c: Remove cilkplus condition.
2985 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
2986 c_parser_cilk_verify_simd, c_parser_array_notation,
2987 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
2988 c_parser_cilk_simd_fn_vector_attrs,
2989 c_finish_cilk_simd_fn_tokens): Delete.
2990 (c_parser_declaration_or_fndef): Remove cilkplus condition.
2991 (c_parser_direct_declarator_inner): Ditto.
2992 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
2993 (c_parser_attributes, c_parser_compound_statement,
2994 c_parser_statement_after_labels, c_parser_if_statement,
2995 c_parser_switch_statement, c_parser_while_statement,
2996 c_parser_do_statement, c_parser_for_statement,
2997 c_parser_unary_expression, c_parser_postfix_expression,
2998 c_parser_postfix_expression_after_primary,
2999 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3000 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3001 support.
3002 * c-typeck.c (build_array_ref, build_function_call_vec,
3003 convert_arguments,
3004 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3005 c_finish_loop, build_binary_op): Remove cilkplus support.
3006
9e851845
JJ
30072017-11-28 Jakub Jelinek <jakub@redhat.com>
3008
3009 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3010 of build3.
3011
ab20d992 30122017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
3013
3014 * Make-lang.in (c.install-plugin): Install backend import library.
3015
41521dee
JJ
30162017-11-23 Jakub Jelinek <jakub@redhat.com>
3017
3018 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3019 pragma_stmt context.
3020
ac9effed
EB
30212017-11-23 Mike Stump <mikestump@comcast.net>
3022 Eric Botcazou <ebotcazou@adacore.com>
3023
3024 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3025 ANNOTATE_EXPR.
3026 (c_parser_do_statement): Likewise.
3027 (c_parser_for_statement): Likewise.
3028
ce95abc4
DM
30292017-11-22 David Malcolm <dmalcolm@redhat.com>
3030
3031 PR c++/62170
3032 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3033 bool to bool *. Within '%T' handling, if showing an "aka", use
3034 "quoted" param to add appropriate quoting.
3035
974aedcc
MP
30362017-11-22 Marek Polacek <polacek@redhat.com>
3037
3038 PR c++/60336
3039 PR middle-end/67239
3040 PR target/68355
3041 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3042
d4300cc6
DM
30432017-11-21 David Malcolm <dmalcolm@redhat.com>
3044
3045 PR c/83056
3046 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3047 earlier failed lookups.
3048
1af4ebf5
MG
30492017-11-21 Marc Glisse <marc.glisse@inria.fr>
3050
3051 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3052 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3053
26edace6
DM
30542017-11-20 David Malcolm <dmalcolm@redhat.com>
3055
3056 PR c/81404
3057 * c-decl.c: Include "c-family/known-headers.h".
3058 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3059 to known-headers.cc.
3060 (class suggest_missing_header): Move to known-header.h.
3061 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3062 than get_c_name_hint.
3063
b1212255
DM
30642017-11-20 David Malcolm <dmalcolm@redhat.com>
3065
3066 * c-decl.c (get_c_name_hint): New function.
3067 (class suggest_missing_header): New class.
3068 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3069 suggest missing headers to the user.
3070
6c7a259b
DM
30712017-11-20 David Malcolm <dmalcolm@redhat.com>
3072
3073 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3074 Include "c-family/name-hint.h"
3075 (implicit_decl_warning): Convert "hint" from
3076 const char * to name_hint. Pass location to
3077 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3078 warning was not printed.
3079 (undeclared_variable): Likewise for "guessed_id".
3080 (lookup_name_fuzzy): Convert return type from const char *
3081 to name_hint. Add location_t param.
3082 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3083 Include "c-family/name-hint.h"
3084 (c_parser_declaration_or_fndef): Convert "hint" from
3085 const char * to name_hint. Pass location to lookup_name_fuzzy.
3086 (c_parser_parameter_declaration): Likewise.
3087
f9c59f7e
JJ
30882017-11-19 Jakub Jelinek <jakub@redhat.com>
3089
3090 PR c/66618
3091 PR c/69960
3092 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3093 where needed.
3094 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3095 handle_omp_array_sections): Likewise.
3096 (digest_init): Don't call decl_constant_value_for_optimization.
3097 * c-tree.h (decl_constant_value_for_optimization): Removed.
3098 * c-fold.c (c_fold_array_ref): New function.
3099 (c_fully_fold_internal): Add LVAL argument, propagate it through
3100 recursive calls. For VAR_P call decl_constant_value and
3101 unshare if not LVAL and either optimizing or IN_INIT. Remove
3102 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3103 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3104 (c_fully_fold): Add LVAL argument, pass it through to
3105 c_fully_fold_internal.
3106 (decl_constant_value_for_optimization): Removed.
3107
3ca0dc60
JM
31082017-11-15 Joseph Myers <joseph@codesourcery.com>
3109
3110 PR c/81156
3111 * c-parser.c (check_tgmath_function): New function.
3112 (enum tgmath_parm_kind): New enum.
3113 (c_parser_postfix_expression): Handle __builtin_tgmath.
3114
64a5912c
DM
31152017-10-31 David Malcolm <dmalcolm@redhat.com>
3116
3117 * c-decl.c (implicit_decl_warning): Update for renaming of
3118 pedwarn_at_rich_loc and warning_at_rich_loc.
3119 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3120 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3121 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3122 (c_parser_struct_or_union_specifier): Likewise for renaming of
3123 pedwarn_at_rich_loc.
3124 (c_parser_parameter_declaration): Likewise for renaming of
3125 error_at_rich_loc.
3126 * c-typeck.c (build_component_ref): Likewise.
3127 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3128 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3129 (set_init_label): Likewise for renaming of error_at_rich_loc.
3130
c1136864
RB
31312017-10-30 Richard Biener <rguenther@suse.de>
3132
3133 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3134 stmts.
3135
ee5fd23a
MM
31362017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3137
3138 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3139 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3140
1a59ccf2
DM
31412017-10-25 David Malcolm <dmalcolm@redhat.com>
3142
3143 PR c/7356
3144 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3145 semicolons.
3146
bc1a75dd
JJ
31472017-10-25 Jakub Jelinek <jakub@redhat.com>
3148
3149 PR libstdc++/81706
3150 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3151 newdecl to corresponding __builtin_ if any.
3152
ff1ff960
PC
31532017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3154
3155 PR c++/82466
3156 * c-decl.c (diagnose_mismatched_decls): Use
3157 OPT_Wbuiltin_declaration_mismatch.
3158
62e1c678
DM
31592017-10-12 David Malcolm <dmalcolm@redhat.com>
3160
3161 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3162 use it to guard calls to maybe_suggest_missing_token_insertion.
3163 (c_parser_parms_list_declarator): Override default value of new
3164 "type_is_unique" param to c_parser_require.
3165 (c_parser_asm_statement): Likewise.
3166 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3167 defaulting to true.
3168
a92f6726
NS
31692017-10-11 Nathan Sidwell <nathan@acm.org>
3170
3171 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3172
8e6cdc90
RS
31732017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3174
3175 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3176 operating on trees as wide_ints.
3177 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3178 (c_tree_equal): Likewise.
3179
8139a48e
DM
31802017-10-04 David Malcolm <dmalcolm@redhat.com>
3181
3182 * c-decl.c (push_parm_decl): Store c_parm's location into the
3183 PARAM_DECL.
3184 (build_c_parm): Add "loc" param and store it within the c_parm.
3185 * c-parser.c (struct c_parser): Add "last_token_location" field.
3186 (c_parser_consume_token): Store location of the token into the
3187 new field.
3188 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3189 when handling a FUNCTION_DECL, if it doesn't already have them.
3190 (c_parser_parameter_declaration): Generate a location for the
3191 parameter, and pass it to the call to build_c_parm.
3192 * c-tree.h (struct c_parm): Add field "loc".
3193 (build_c_parm): Add location_t param.
3194 * c-typeck.c (get_fndecl_argument_location): New function.
3195 (inform_for_arg): New function.
3196 (convert_for_assignment): Use inform_for_arg when dealing with
3197 ic_argpass.
3198
2a389958
JJ
31992017-09-29 Jakub Jelinek <jakub@redhat.com>
3200
7d386d45
JJ
3201 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3202 width is non-NULL.
3203 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3204 don't SET_DECL_C_BIT_FIELD here.
3205
2a389958
JJ
3206 PR c/82340
3207 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3208 instead of trying to set just TREE_READONLY manually.
3209
ebc6a85e
TV
32102017-09-16 Tom de Vries <tom@codesourcery.com>
3211
3212 PR c/81875
3213 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3214 cond itself.
3215
bb75facd
JM
32162017-09-15 Joseph Myers <joseph@codesourcery.com>
3217
3218 PR c/82071
3219 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3220 for C11.
3221 (build_conditional_expr): For C11, generate result with excess
3222 precision when one argument is an integer and the other is of a
3223 type using excess precision.
3224
1d933576
BE
32252017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3226
3227 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3228
267bbb6f
MP
32292017-09-13 Marek Polacek <polacek@redhat.com>
3230
3231 PR c/82167
3232 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3233 than expr.original_type.
3234
6836632e
NS
32352017-09-12 Nathan Sidwell <nathan@acm.org>
3236
3237 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3238 resort_sorted_fields): Moved from c-family/c-common.c.
3239 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3240
e035be33
JM
32412017-09-01 Joseph Myers <joseph@codesourcery.com>
3242
3243 PR c/82071
3244 * c-typeck.c (build_atomic_assign): Handle argument with excess
3245 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3246 argument passed to build_binary_op and convert_for_assignment but
3247 not for call to c_fully_fold.
3248 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3249 Ensure build_binary_op is called with argument with original
3250 semantic type. Avoid calling c_fully_fold with an
3251 EXCESS_PRECISION_EXPR from build_binary_op.
3252
d2e05fcb
JJ
32532017-09-01 Jakub Jelinek <jakub@redhat.com>
3254
3255 PR c/81887
3256 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3257
b397965c
RS
32582017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3259 Alan Hayward <alan.hayward@arm.com>
3260 David Sherwood <david.sherwood@arm.com>
3261
3262 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3263 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3264 m1 and m2 to the signed equivalent of a fixed-point
3265 SCALAR_TYPE_MODE.
3266
14e18d71
DM
32672017-08-24 David Malcolm <dmalcolm@redhat.com>
3268
3269 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3270 than CAN_HAVE_LOCATION_P when determining whether to use the
3271 location_t value within "value".
3272
7f204c0f
DM
32732017-08-21 David Malcolm <dmalcolm@redhat.com>
3274
3275 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3276 rather than peeking the location of the first token.
3277 * c-tree.h (c_expr::get_location): New method.
3278
2f687306
DM
32792017-08-21 David Malcolm <dmalcolm@redhat.com>
3280
3281 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3282 to check_function_arguments.
3283
3e7b80d7
MP
32842017-08-18 Marek Polacek <polacek@redhat.com>
3285
3286 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3287 commentary.
3288
00aa1fa2
L
32892017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3290
3291 PR c/53037
3292 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3293 (check_bitfield_type_and_width): Don't allow bit-field with
3294 warn_if_not_aligned type.
3295
da67acb9
MS
32962017-08-14 Martin Sebor <msebor@redhat.com>
3297
3298 PR c/81117
3299 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3300
bb85aa74
MP
33012017-08-11 Marek Polacek <polacek@redhat.com>
3302
3303 PR c/81795
3304 * c-decl.c (pushtag): Only print inform if the warning was printed.
3305 (grokdeclarator): Likewise.
3306
32129a17
DM
33072017-08-10 David Malcolm <dmalcolm@redhat.com>
3308
3309 * c-parser.c (c_parser_error): Rename to...
3310 (c_parser_error_richloc): ...this, making static, and adding
3311 "richloc" parameter, passing it to the c_parse_error call,
3312 rather than calling c_parser_set_source_position_from_token.
3313 (c_parser_error): Reintroduce, reimplementing in terms of the
3314 above, converting return type from void to bool.
3315 (class token_pair): New class.
3316 (struct matching_paren_traits): New struct.
3317 (matching_parens): New typedef.
3318 (struct matching_brace_traits): New struct.
3319 (matching_braces): New typedef.
3320 (get_matching_symbol): New function.
3321 (c_parser_require): Add param MATCHING_LOCATION, using it to
3322 highlight matching "opening" tokens for missing "closing" tokens.
3323 (c_parser_skip_until_found): Likewise.
3324 (c_parser_static_assert_declaration_no_semi): Convert explicit
3325 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3326 class matching_parens, so that the pertinent open parenthesis is
3327 highlighted when there are problems locating the close
3328 parenthesis.
3329 (c_parser_struct_or_union_specifier): Likewise.
3330 (c_parser_typeof_specifier): Likewise.
3331 (c_parser_alignas_specifier): Likewise.
3332 (c_parser_simple_asm_expr): Likewise.
3333 (c_parser_braced_init): Likewise, for matching_braces.
3334 (c_parser_paren_condition): Likewise, for matching_parens.
3335 (c_parser_switch_statement): Likewise.
3336 (c_parser_for_statement): Likewise.
3337 (c_parser_asm_statement): Likewise.
3338 (c_parser_asm_operands): Likewise.
3339 (c_parser_cast_expression): Likewise.
3340 (c_parser_sizeof_expression): Likewise.
3341 (c_parser_alignof_expression): Likewise.
3342 (c_parser_generic_selection): Likewise.
3343 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3344 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3345 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3346 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3347 c_parser_skip_until_found call.
3348 (c_parser_objc_class_definition): Use class matching_parens as
3349 above.
3350 (c_parser_objc_method_decl): Likewise.
3351 (c_parser_objc_try_catch_finally_statement): Likewise.
3352 (c_parser_objc_synchronized_statement): Likewise.
3353 (c_parser_objc_at_property_declaration): Likewise.
3354 (c_parser_oacc_wait_list): Likewise.
3355 (c_parser_omp_var_list_parens): Likewise.
3356 (c_parser_omp_clause_collapse): Likewise.
3357 (c_parser_omp_clause_default): Likewise.
3358 (c_parser_omp_clause_if): Likewise.
3359 (c_parser_omp_clause_num_threads): Likewise.
3360 (c_parser_omp_clause_num_tasks): Likewise.
3361 (c_parser_omp_clause_grainsize): Likewise.
3362 (c_parser_omp_clause_priority): Likewise.
3363 (c_parser_omp_clause_hint): Likewise.
3364 (c_parser_omp_clause_defaultmap): Likewise.
3365 (c_parser_oacc_single_int_clause): Likewise.
3366 (c_parser_omp_clause_ordered): Likewise.
3367 (c_parser_omp_clause_reduction): Likewise.
3368 (c_parser_omp_clause_schedule): Likewise.
3369 (c_parser_omp_clause_num_teams): Likewise.
3370 (c_parser_omp_clause_thread_limit): Likewise.
3371 (c_parser_omp_clause_aligned): Likewise.
3372 (c_parser_omp_clause_linear): Likewise.
3373 (c_parser_omp_clause_safelen): Likewise.
3374 (c_parser_omp_clause_simdlen): Likewise.
3375 (c_parser_omp_clause_depend): Likewise.
3376 (c_parser_omp_clause_map): Likewise.
3377 (c_parser_omp_clause_device): Likewise.
3378 (c_parser_omp_clause_dist_schedule): Likewise.
3379 (c_parser_omp_clause_proc_bind): Likewise.
3380 (c_parser_omp_clause_uniform): Likewise.
3381 (c_parser_omp_for_loop): Likewise.
3382 (c_parser_cilk_clause_vectorlength): Likewise.
3383 (c_parser_cilk_clause_linear): Likewise.
3384 (c_parser_transaction_expression): Likewise.
3385 * c-parser.h (c_parser_require): Add param matching_location with
3386 default UNKNOWN_LOCATION.
3387 (c_parser_error): Convert return type from void to bool.
3388 (c_parser_skip_until_found): Add param matching_location with
3389 default UNKNOWN_LOCATION.
3390
30af3a2b
MP
33912017-08-09 Marek Polacek <polacek@redhat.com>
3392
3393 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3394 * c-tree.h (build_external_ref): Update declaration.
3395 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3396 (build_external_ref): Change the type of a parameter to bool.
3397 (parser_build_binary_op): Use true/false instead of 1/0.
3398 (pointer_diff): Likewise.
3399 (build_modify_expr): Likewise.
3400 (set_designator): Change the type of a parameter to bool.
3401 (set_init_index): Use true/false instead of 1/0.
3402 (set_init_label): Likewise.
3403 (output_init_element): Change the type of a parameter to bool.
3404 (output_pending_init_elements): Use true/false instead of 1/0.
3405 (process_init_element): Likewise.
3406 (build_binary_op): Change the type of a parameter to bool.
3407
296c53ac
MP
34082017-08-09 Marek Polacek <polacek@redhat.com>
3409
3410 PR c/81233
3411 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3412 Call emit_diagnostic_valist instead of pedwarn.
3413 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3414 Print the relevant types in diagnostics.
3415
a32c8316
MP
34162017-08-09 Marek Polacek <polacek@redhat.com>
3417
3418 PR c/81417
3419 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3420 build_conditional_expr.
a32c8316
MP
3421 * c-parser.c (c_parser_conditional_expression): Create locations for
3422 EXP1 and EXP2 from their source ranges. Pass the locations down to
3423 build_conditional_expr.
3424 * c-tree.h (build_conditional_expr): Update declaration.
3425 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3426 For -Wsign-compare, also print the types.
3427
314e6352
ML
34282017-08-08 Martin Liska <mliska@suse.cz>
3429
3430 * c-convert.c: Include header files.
3431 * c-typeck.c: Likewise.
3432
577eec56
ML
34332017-08-07 Martin Liska <mliska@suse.cz>
3434
3435 * c-parser.c (c_parser_attributes): Canonicalize name of an
3436 attribute.
3437
f7b6353a
MP
34382017-08-02 Marek Polacek <polacek@redhat.com>
3439
3440 PR c/81289
3441 * c-parser.c (c_parser_unary_expression): Use set_error.
3442
8a6eab34
MP
3443 PR c/81448
3444 PR c/81306
3445 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3446 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3447
ab20d992 34482017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3449 Martin Liska <mliska@suse.cz>
3450
3451 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3452 statement.
7fef86d3 3453
f34ebeb2
ML
34542017-07-31 Martin Liska <mliska@suse.cz>
3455
3456 PR sanitize/81530
3457 * c-convert.c (convert): Guard condition with flag_sanitize_p
3458 also with current_function_decl non-null equality.
3459 * c-decl.c (grokdeclarator): Likewise.
3460 * c-typeck.c (build_binary_op): Likewise.
3461
8595f67b
MP
34622017-07-25 Marek Polacek <polacek@redhat.com>
3463
3464 * c-decl.c (grokfield): Remove local variable.
3465
d49718d6
MP
34662017-07-25 Marek Polacek <polacek@redhat.com>
3467
3468 PR c/81364
3469 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3470 macro expansion if the body is in { }.
3471 (c_parser_while_statement): Likewise.
3472 (c_parser_for_statement): Likewise.
3473
ff22eb12
NS
34742017-07-18 Nathan Sidwell <nathan@acm.org>
3475
3476 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3477
eea77d1f
DM
34782017-07-14 David Malcolm <dmalcolm@redhat.com>
3479
3480 * c-decl.c (implicitly_declare): When suggesting a missing
3481 #include, provide a fix-it hint.
3482
b6f43128
DM
34832017-07-06 David Malcolm <dmalcolm@redhat.com>
3484
3485 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3486 and call that instead.
3487 * c-tree.h (selftest::run_c_tests): New decl.
3488
3e2becc4
MP
34892017-06-26 Marek Polacek <polacek@redhat.com>
3490
3491 PR c/80116
3492 * c-parser.c (c_parser_if_body): Set the location of the
3493 body of the conditional after parsing all the labels. Call
3494 warn_for_multistatement_macros.
3495 (c_parser_else_body): Likewise.
3496 (c_parser_switch_statement): Likewise.
3497 (c_parser_while_statement): Likewise.
3498 (c_parser_for_statement): Likewise.
3499 (c_parser_statement): Add a default argument. Save the location
3500 after labels have been parsed.
3501 (c_parser_c99_block_statement): Likewise.
3502
343ae898
RB
35032017-06-19 Richard Biener <rguenther@suse.de>
3504
3505 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3506 negated _Literals to parse _Literal (int) -1.
3507
45b2222a
ML
35082017-06-13 Martin Liska <mliska@suse.cz>
3509
3510 PR sanitize/78204
3511 * c-convert.c (convert): Use sanitize_flags_p.
3512 * c-decl.c (grokdeclarator): Likewise.
3513 * c-typeck.c (convert_for_assignment): Likewise.
3514 (c_finish_return): Likewise.
3515 (build_binary_op): Likewise.
3516
8ab7005b
JJ
35172017-06-08 Jakub Jelinek <jakub@redhat.com>
3518
3519 PR c/81006
3520 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3521 to sizetype before size_binop.
3522
363dc72c
JJ
35232017-06-07 Jakub Jelinek <jakub@redhat.com>
3524
3525 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3526 of TDI_generic.
3527
dc949728
MP
35282017-06-06 Marek Polacek <polacek@redhat.com>
3529
3530 PR c/79983
3531 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3532 ref.
3533 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3534
40ffd95f
BE
35352017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3536
3537 * c-parser.c (c_parser_binary_expression): Implement the
3538 -Wsizeof_pointer_div warning.
3539 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3540 from a parenthesized expression.
3541 (c_parser_expr_list): Use c_last_sizeof_loc.
3542 * c-tree.h (c_last_sizeof_loc): New external.
3543 * c-typeck.c (c_last_sizeof_loc): New variable.
3544 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3545
9fc5e7a4
MM
35462017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3547
3548 PR testsuite/80580
3549 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3550
f012c8ef
DM
35512017-05-30 David Malcolm <dmalcolm@redhat.com>
3552
3553 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3554 parameters.
3555
3cd211af
MS
35562017-05-24 Martin Sebor <msebor@redhat.com>
3557
3558 PR c/80731
3559 * c-fold.c (c_fully_fold_internal): Adjust.
3560 * c-typeck.c (parser_build_unary_op): Adjust.
3561
fd71a9a2
TS
35622017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3563
3564 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3565 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3566 "VECTOR_LENGTH".
3567
92fa0f9e
MP
35682017-05-23 Marek Polacek <polacek@redhat.com>
3569
3570 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3571 quotes.
3572
d11c168a
JJ
35732017-05-22 Jakub Jelinek <jakub@redhat.com>
3574
3575 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3576 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3577 it returned invariant. Call tree_invariant_p unconditionally
3578 afterwards to decide whether to return expr or op0.
3579
58aca9d9
NS
35802017-05-22 Nathan Sidwell <nathan@acm.org>
3581
3582 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3583
7fd549d2
TS
35842017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3585
3586 * c-parser.c (c_parser_omp_clause_default): Handle
3587 "OMP_CLAUSE_DEFAULT_PRESENT".
3588
6ecd2339
BE
35892017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3590
3591 * config-lang.in (gtfiles): Add c-family/c-format.c.
3592
8a57ecff
NS
35932017-05-18 Nathan Sidwell <nathan@acm.org>
3594
3595 * c-decl.c (pushdecl_top_level): Delete unused function.
3596
6574d78e
MP
35972017-05-18 Marek Polacek <polacek@redhat.com>
3598
3599 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3600 (check_earlier_gotos): Likewise.
3601 (define_label): Likewise.
3602 (pending_xref_error): Likewise.
3603 (smallest_type_quals_location): Likewise.
3604 (grokdeclarator): Likewise.
3605 (grokparms): Likewise.
3606 (identifier_global_value): Likewise.
3607 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3608 (find_init_member): Likewise.
3609
e3455240
MP
36102017-05-18 Marek Polacek <polacek@redhat.com>
3611
3612 * c-decl.c (start_decl): Use false/true instead of 0/1.
3613 (grokdeclarator): Likewise.
3614 (finish_struct): Likewise.
3615 (start_function): Change the return type to bool. Use false/true
3616 instead of 0/1.
3617 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3618 * c-tree.h (start_function): Update.
3619 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3620 (set_designator): Change the return type to bool. Use false/true
3621 instead of 0/1.
3622
3fa8871b
MP
36232017-05-17 Marek Polacek <polacek@redhat.com>
3624
3625 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3626 * c-typeck.c: Likewise.
3627
142473df
MP
36282017-05-17 Marek Polacek <polacek@redhat.com>
3629
3630 PR sanitizer/80659
3631 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
3632 DECL_IGNORED_P even for non-static compound literals.
3633
1a817418
ML
36342017-05-17 Martin Liska <mliska@suse.cz>
3635
3636 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
3637 use it instead of int type.
3638
b2fa0a8b
MP
36392017-05-17 Marek Polacek <polacek@redhat.com>
3640
3641 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
3642 call c_fully_fold.
3643 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 3644 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
3645 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
3646 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
3647 save_expr.
3648 (c_parser_conditional_expression): Likewise.
3649 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
3650 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
3651 (process_init_element): Likewise.
3652 (build_binary_op): Likewise.
3653 (handle_omp_array_sections_1): Likewise.
3654
1e47f02b
TS
36552017-05-12 Thomas Schwinge <thomas@codesourcery.com>
3656
3657 * c-parser.c (c_parser_omp_clause_num_gangs)
3658 (c_parser_omp_clause_num_workers)
3659 (c_parser_omp_clause_vector_length): Merge functions into...
3660 (c_parser_oacc_single_int_clause): ... this new function. Adjust
3661 all users.
3662
c24e924f
NS
36632017-05-11 Nathan Sidwell <nathan@acm.org>
3664
3665 * gimple-parser.c: Don't #include tree-dump.h.
3666
c587104e
MM
36672017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3668
3669 PR testsuite/80580
3670 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
3671
67ac9a9d
MM
36722017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3673
3674 PR testsuite/80580
3675 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3676 incorrect __MEM syntax.
3677
ac4eb40f
MM
36782017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3679
3680 PR testsuite/80580
3681 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
3682 type of unary '*'.
3683
641da50a
NS
36842017-05-09 Nathan Sidwell <nathan@acm.org>
3685
3686 * c-tree.h (pushdecl): Declare.
3687
56d35585
DM
36882017-05-05 David Malcolm <dmalcolm@redhat.com>
3689
3690 * c-decl.c (warn_defaults_to): Replace report_diagnostic
3691 with diagnostic_report_diagnostic.
3692 * c-errors.c (pedwarn_c99): Likewise.
3693 (pedwarn_c90): Likewise.
3694
815d9cc6
XR
36952017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3696
92a285c1 3697 PR c++/80038
815d9cc6
XR
3698 * c-gimplify.c (c_gimplify_expr): Remove calls to
3699 cilk_gimplifY_call_params_in_spawned_fn.
3700
1c4ea66f
DM
37012017-04-25 David Malcolm <dmalcolm@redhat.com>
3702
3703 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
3704 hint for removing extra semicolon.
3705
666f7903
JJ
37062017-04-21 Jakub Jelinek <jakub@redhat.com>
3707
3708 PR c/80468
3709 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
3710 enabled, set specs->type to integer_type_node.
3711
5764ee3c
JW
37122017-04-03 Jonathan Wakely <jwakely@redhat.com>
3713
3714 * c-array-notation.c: Fix typo in comment.
3715
10fa8dfb
MP
37162017-03-29 Marek Polacek <polacek@redhat.com>
3717
3718 PR c/79730
3719 * c-decl.c (finish_decl): Check VAR_P.
3720
a9e4a1a5
JJ
37212017-03-27 Jakub Jelinek <jakub@redhat.com>
3722
3723 PR middle-end/80162
3724 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
3725 * c-typeck.c (c_mark_addressable): Likewise. Look through
3726 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
3727 to ARRAY_TYPE.
3728 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
3729
ee3ff394
MP
37302017-03-23 Marek Polacek <polacek@redhat.com>
3731
3732 * c-tree.h: Remove a C_RID_YYCODE reference.
3733
4d1b8e70
JJ
37342017-03-21 Jakub Jelinek <jakub@redhat.com>
3735
3736 PR c/80097
3737 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
3738 optional COMPOUND_EXPR with ubsan instrumentation.
3739
31dc71a8
MP
37402017-03-17 Marek Polacek <polacek@redhat.com>
3741
3742 * c-parser.c: Add C11 references.
3743
d579c385
MP
37442017-03-15 Marek Polacek <polacek@redhat.com>
3745
3746 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
3747
85059a38
MP
37482017-03-11 Marek Polacek <polacek@redhat.com>
3749
3750 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
3751
2f6f187a
DM
37522017-03-10 David Malcolm <dmalcolm@redhat.com>
3753
3754 PR translation/79848
3755 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
3756 "%qs".
3757 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
3758
36618428
MP
37592017-03-09 Marek Polacek <polacek@redhat.com>
3760
3761 PR sanitizer/79757
3762 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
3763 parameter declarations with initializers.
3764
01e5af5a
JJ
37652017-03-09 Jakub Jelinek <jakub@redhat.com>
3766
3767 PR c/79969
3768 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
3769 TYPE_STUB_DECL.
3770
a71dbc63
JJ
37712017-03-07 Jakub Jelinek <jakub@redhat.com>
3772
3773 PR c/79834
3774 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
3775 for "may only be used in compound statements" diagnostics, change it
3776 such that the same translatable string is used for all pragmas. For
3777 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
3778 diagnostics.
3779 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
3780 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
3781 "may only be used in compound statements" diagnostics, such that the
3782 same translatable string is used for all pragmas.
3783
1ff4bae6
MP
37842017-03-04 Marek Polacek <polacek@redhat.com>
3785
3786 PR c/79847
3787 * c-decl.c (implicit_decl_warning): Add missing space.
3788
7f5a7d78
MP
37892017-03-03 Marek Polacek <polacek@redhat.com>
3790
3791 PR c/79758
3792 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
3793 current_function_prototype_arg_types is error_mark_node. Fix
3794 formatting. Use TREE_VALUE instead of TREE_TYPE.
3795
883c8f06
JJ
37962017-03-03 Jakub Jelinek <jakub@redhat.com>
3797
79c9b7a8
JJ
3798 PR c/79837
3799 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
3800 %<min%> or %<max%> in the diagnostics, instead mention identifier.
3801 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
3802 diagnostics.
3803
883c8f06
JJ
3804 PR c/79836
3805 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
3806 instead of %<_Generic>.
3807 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
3808 (c_parser_omp_target_exit_data): Use %<release%> instead of
3809 %<release>.
3810
324ff1a0
JJ
38112017-02-28 Jakub Jelinek <jakub@redhat.com>
3812
3813 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
3814 instead of just cond ? "..." : "...".
3815 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
3816 for "enter"/"exit" keyword.
3817 (c_finish_oacc_routine): Don't use %s to supply portions of the
3818 message.
3819
4227c9ad
JJ
38202017-02-24 Jakub Jelinek <jakub@redhat.com>
3821
3822 PR c++/79588
3823 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
3824 handle -Wrestrict here.
3825 * c-typeck.c (build_function_call_vec): Adjust
3826 check_function_arguments caller.
3827
5d972e66
RB
38282017-02-23 Richard Biener <rguenther@suse.de>
3829
3830 PR c/79684
3831 * gimple-parser.c (c_parser_gimple_statement): Use set_error
3832 to initialize c_exprs to return.
3833 (c_parser_gimple_binary_expression): Likewise.
3834 (c_parser_gimple_unary_expression): Likewise.
3835 (c_parser_gimple_postfix_expression): Likewise.
3836
61ac5ebe
MP
38372017-02-22 Marek Polacek <polacek@redhat.com>
3838
3839 PR c/79662
3840 * c-typeck.c (convert_arguments): Handle error_mark_node.
3841
41d1b0b1
PK
38422017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3843
3844 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
3845 value of c_parser_parse_ssa_name against error_mark_node and emit
3846 error if ssa name is anonymous and written as default definition.
3847
eab1f169
PK
38482017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3849
3850 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3851 FMA_EXPR.
3852
bcac0b4d
JJ
38532017-02-16 Jakub Jelinek <jakub@redhat.com>
3854
3855 PR c++/79512
3856 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
3857 ignore #pragma omp target even when not followed by identifier.
3858
1be33173
PK
38592017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3860
3861 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
3862 (c_parser_gimple_unary_expression): Likewise.
3863
aa326bfb
JJ
38642017-02-13 Jakub Jelinek <jakub@redhat.com>
3865
3866 * c-parser.c (c_parser_oacc_declare): Add missing space in
3867 diagnostics.
3868
8a398bc5
PK
38692017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3870
3871 PR c/79478
3872 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
3873 set_c_expr_source_range when parsing ssa-name.
3874
3dcde5ef 38752017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 3876 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
3877
3878 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
3879 building IL when arguments are error_mark_node.
3880 (c_parser_gimple_unary_expression): Likewise.
3881 (c_parser_gimple_if_stmt): Likewise.
3882 (c_parser_gimple_switch_stmt): Likewise.
3883 (c_parser_gimple_return_stmt): Likewise.
3884 (c_parser_parse_ssa_name): When name lookup fails do not build
3885 an SSA name. Use undeclared rather than not declared in error
3886 reporting.
3887
192b048b
MP
38882017-02-09 Marek Polacek <polacek@redhat.com>
3889
3890 PR c/79428
3891 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
3892 instead of c_parser_skip_until_found.
3893
56f71478
JJ
38942017-02-09 Jakub Jelinek <jakub@redhat.com>
3895
3896 PR c/79431
3897 * c-parser.c (c_parser_omp_declare_target): Don't invoke
3898 symtab_node::get on automatic variables.
3899
02889d23
CLT
39002016-02-09 Nathan Sidwell <nathan@codesourcery.com>
3901 Chung-Lin Tang <cltang@codesourcery.com>
3902
3903 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
3904 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
3905 semantic checking.
3906 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
3907
7af4b20d
RB
39082017-02-07 Richard Biener <rguenther@suse.de>
3909
3910 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
3911 (c_parser_gimple_postfix_expression_after_primary):
3912 Do not use c_build_function_call_vec to avoid folding and promotion.
3913 Simplify.
3914
e5e391d6
MO
39152017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
3916
3917 PR lto/79061
3918 * c-decl.c (pop_scope): Pass main_input_filename to
3919 build_translation_unit_decl.
3920
c2e84327
DM
39212017-01-24 David Malcolm <dmalcolm@redhat.com>
3922
3923 * c-parser.c: Include "read-rtl-function.h" and
3924 "run-rtl-passes.h".
3925 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
3926 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
3927 production. Update for renaming of field "gimple_pass" to
3928 "gimple_or_rtl_pass". If __RTL was seen, call
3929 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
3930 to an auto_timevar, to cope with early exit.
3931 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
3932 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
3933 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
3934 Handle RID_RTL.
3935 (c_parser_parse_rtl_body): New function.
3936 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
3937 (struct c_declspecs): Rename field "gimple_pass" to
3938 "gimple_or_rtl_pass". Add field "rtl_p".
3939 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
3940 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
3941 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
3942 (c_parser_gimple_or_rtl_pass_list): ...this.
3943
2ebd93e1
MP
39442017-01-20 Marek Polacek <polacek@redhat.com>
3945
3946 PR c/64279
3947 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
3948
b1c95bb5
RB
39492017-01-13 Richard Biener <rguenther@suse.de>
3950
3951 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
3952 nops.
3953
25329913
RB
39542017-01-13 Richard Biener <rguenther@suse.de>
3955
3956 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3957 _Literal ( type-name ) number.
3958
6bb4ea5c
RB
39592017-01-12 Richard Biener <rguenther@suse.de>
3960
3961 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3962 __MEM.
3963
6b5b4e9c
JJ
39642017-01-11 Jakub Jelinek <jakub@redhat.com>
3965
3966 PR c++/72813
3967 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
3968 PCH file.
3969
e3252775
RB
39702017-01-11 Richard Biener <rguenther@suse.de>
3971
3972 PR bootstrap/79052
3973 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
3974 returns on parse errors.
3975
a9342885
MP
39762017-01-04 Marek Polacek <polacek@redhat.com>
3977
3978 PR c++/64767
3979 * c-parser.c (c_parser_postfix_expression): Mark zero character
3980 constants by setting original_type in c_expr.
3981 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
3982 with a zero character constant.
3983 (char_type_p): New function.
3984
5dd9a9d0
DM
39852017-01-04 David Malcolm <dmalcolm@redhat.com>
3986
3987 * c-parser.c (c_parser_declaration_or_fndef): Create a
3988 rich_location at init_loc and parse it to start_init.
3989 (last_init_list_comma): New global.
3990 (c_parser_braced_init): Update last_init_list_comma when parsing
3991 commas. Pass it to pop_init_level. Pass location of closing
3992 brace to pop_init_level.
3993 (c_parser_postfix_expression_after_paren_type): Create a
3994 rich_location at type_loc and parse it to start_init.
3995 (c_parser_omp_declare_reduction): Likewise for loc.
3996 * c-tree.h (start_init): Add rich_location * param.
3997 (pop_init_level): Add location_t param.
3998 * c-typeck.c (struct initializer_stack): Add field
3999 "missing_brace_richloc".
4000 (start_init): Add richloc param, use it to initialize
4001 the stack node's missing_brace_richloc.
4002 (last_init_list_comma): New decl.
4003 (finish_implicit_inits): Pass last_init_list_comma to
4004 pop_init_level.
4005 (push_init_level): When finding missing open braces, add fix-it
4006 hints to the richloc.
4007 (pop_init_level): Add "insert_before" param and pass it
4008 when calling pop_init_level. Add fixits about missing
4009 close braces to any richloc. Use the richloc for the
4010 -Wmissing-braces warning.
4011 (set_designator): Pass last_init_list_comma to pop_init_level.
4012 (process_init_element): Likewise.
4013
cbe34bb5
JJ
40142017-01-01 Jakub Jelinek <jakub@redhat.com>
4015
4016 Update copyright years.
4017
d17680f3
JJ
40182016-12-21 Jakub Jelinek <jakub@redhat.com>
4019
0dba7960
JJ
4020 PR bootstrap/78817
4021 * c-typeck.c (build_function_call_vec): If check_function_arguments
4022 returns true, set TREE_NO_WARNING on CALL_EXPR.
4023
d17680f3
JJ
4024 PR c/77767
4025 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4026 to *expr instead of overwriting it.
4027
aa90531e
RB
40282016-12-20 Richard Biener <rguenther@suse.de>
4029
4030 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4031 error recovery.
4032 (c_parser_gimple_statement): Only build assigns for non-error
4033 stmts.
4034 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4035
629b3d75
MJ
40362016-12-14 Martin Jambor <mjambor@suse.cz>
4037
4038 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4039 omp-low.h.
4040 (c_finish_oacc_routine): Adjusted call to
4041 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4042 to use their new names.
4043 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4044 use its new name.
4045 (c_parser_oacc_update): Likewise.
4046 (c_parser_omp_simd): Likewise.
4047 (c_parser_omp_target_update): Likewise.
4048 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4049 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4050 name.
4051 (c_finish_omp_cancellation_point): Likewise.
4052 * gimple-parser.c: Do not include omp-low.h
4053
c5af52eb
CP
40542016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4055 James Norris <jnorris@codesourcery.com>
4056
4057 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4058 EXIT_DATA,WAIT} are not used in compound statements.
4059 (c_parser_oacc_enter_exit_data): Update diagnostics.
4060
48330c93
BE
40612016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4062
4063 PR c++/71973
4064 * c-decl.c (diagnose_mismatched_decls): Use
4065 OPT_Wbuiltin_declaration_mismatch here too.
4066
899ca90e 40672016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
4068 Alan Hayward <alan.hayward@arm.com>
4069 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
4070
4071 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4072 (make_label, finish_struct): Likewise.
4073
1ee62b92 40742016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 4075 Richard Biener <rguenther@suse.de>
22b15758 4076
8e745a17
JJ
4077 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4078 * config-lang.in (gtfiles): Add c/c-parser.h.
4079 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4080 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4081 * c-parser.c (enum c_id_kind, struct c_token,
4082 c_parser_next_token_is, c_parser_next_token_is_not,
4083 c_parser_next_token_is_keyword,
4084 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4085 Split out to ...
4086 * c-parser.h: ... new header.
4087 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 4088 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
4089 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4090 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4091 c_parser_error, c_parser_require, c_parser_skip_until_found,
4092 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4093 c_parser_type_name): Export.
4094 (c_parser_tokens_buf): New function.
4095 (c_parser_error): Likewise.
4096 (c_parser_set_error): Likewise.
4097 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
4098 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4099 via c_parser_parse_gimple_body.
8e745a17
JJ
4100 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4101 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4102 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4103 c_parser_error, c_parser_require, c_parser_skip_until_found,
4104 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4105 c_parser_type_name): Declare.
1ee62b92
PG
4106 (struct c_parser): Declare forward.
4107 (c_parser_tokens_buf): Declare.
8e745a17
JJ
4108 (c_parser_error): Likewise.
4109 (c_parser_set_error): Likewise.
4110 * gimple-parser.c: New file.
4111 * gimple-parser.h: Likewise.
1ee62b92 4112
22b15758
UB
41132016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4114
4115 PR c/35503
4116 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4117 warn_for_restrict.
4118
84ff4775
LCW
41192016-09-11 Le-Chun Wu <lcwu@google.com>
4120 Mark Wielaard <mjw@redhat.com>
4121
4122 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4123 to the given -Wshadow= variant.
4124
4d0cdd0c
TP
41252016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4126
4127 * c-typeck.c: Include memmodel.h.
4128
1202f33e
JJ
41292016-10-13 Jakub Jelinek <jakub@redhat.com>
4130
4131 PR target/77957
4132 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4133 instead of lhd_return_null_tree_v.
4134
8a14afd0
BS
41352016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4136
4137 PR c++/69733
4138 * c-decl.c (smallest_type_quals_location): New static function.
4139 (grokdeclarator): Try to find the correct location for an ignored
4140 qualifier.
4141
81fea426
MP
41422016-09-26 Marek Polacek <polacek@redhat.com>
4143
4144 PR c/7652
4145 * c-decl.c (pop_scope): Add gcc_fallthrough.
4146
41472016-09-26 Marek Polacek <polacek@redhat.com>
4148
4149 PR c/7652
4150 * c-parser.c (struct c_token): Add flags field.
4151 (c_lex_one_token): Pass it to c_lex_with_flags.
4152 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4153 into IFN_FALLTHROUGH.
4154 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4155 attribute fallthrough after a case label or default label.
4156 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4157
9a2300e9
MP
41582016-09-24 Marek Polacek <polacek@redhat.com>
4159
4160 PR c/77490
4161 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4162 have boolean value. Warn about ++/-- on booleans.
4163
7de76362
JJ
41642016-09-23 Jakub Jelinek <jakub@redhat.com>
4165
4166 * c-parser.c (incomplete_record_decls): Remove unnecessary
4167 = vNULL initialization of file scope vec.
4168
5b73d2ab
MP
41692016-09-16 Marek Polacek <polacek@redhat.com>
4170
4171 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4172
e51fbec3
MP
41732016-09-14 Marek Polacek <polacek@redhat.com>
4174
4175 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4176 (fix_array_notation_expr): Likewise.
4177 * c-decl.c (finish_decl): Likewise.
4178 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4179 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4180 (function_to_pointer_conversion): Use false instead of 0.
4181 (convert_lvalue_to_rvalue): Likewise.
4182 (parser_build_unary_op): Likewise.
4183 (build_atomic_assign): Likewise.
4184 (build_unary_op): Change nonconvert parameter type to bool, use
4185 true/false instead of 1/0.
4186 (build_binary_op): Use true instead of 1.
4187
254830ba
DM
41882016-09-13 David Malcolm <dmalcolm@redhat.com>
4189
4190 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4191 of add_fixit_insert to add_fixit_insert_before.
4192
4c13ba17
MP
41932016-09-13 Marek Polacek <polacek@redhat.com>
4194
4195 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4196 it.
4197
54dcdb88
BE
41982016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4199
4200 PR c++/77496
4201 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4202 COMPOUND_EXPR to warn_for_omitted_condop.
4203
e5106e27
DM
42042016-09-07 David Malcolm <dmalcolm@redhat.com>
4205
4206 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4207 c_get_substring_location for this new langhook.
4208
9dc5773f
JJ
42092016-09-02 Jakub Jelinek <jakub@redhat.com>
4210
4211 PR c/65467
4212 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4213 flag_openmp.
4214 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4215 instead of mark_exp_read on low_bound/length expression.
4216 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4217 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4218 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4219 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4220 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4221 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4222 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4223 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4224 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4225 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4226 instead of mark_expr_read.
4227 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4228 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4229 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4230 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4231 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4232 array section bases outside of depend clause, for depend clause
4233 use convert_lvalue_to_rvalue on the base.
4234 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4235 linear, aligned, map, to and from clauses.
4236 (c_omp_clause_copy_ctor): New function.
4237
295844f6
MP
42382016-09-01 Marek Polacek <polacek@redhat.com>
4239
4240 PR c/7652
4241 * c-typeck.c (composite_type): Add FALLTHRU comment.
4242
089af25c
DM
42432016-08-31 David Malcolm <dmalcolm@redhat.com>
4244
4245 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4246 to the insertion fixits for "struct", "union", and "enum".
4247
f9087798
DM
42482016-08-30 David Malcolm <dmalcolm@redhat.com>
4249
4250 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4251 rather than add_fixit_misspelled_id.
4252 (undeclared_variable): Likewise.
4253 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4254 now-redundant "here" params from add_fixit_insert method calls.
4255 (c_parser_parameter_declaration): Likewise.
4256 * c-typeck.c (build_component_ref): Remove now-redundant range
4257 param from add_fixit_replace method calls.
4258
ebef225f
MP
42592016-08-25 Marek Polacek <polacek@redhat.com>
4260
4261 * c-typeck.c (parser_build_binary_op): Pass LHS to
4262 warn_logical_not_parentheses.
4263
fe377a48
MP
42642016-08-25 Marek Polacek <polacek@redhat.com>
4265
4266 PR c/77323
4267 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4268 or _FloatN or _FloatNx is not supported.
4269 (finish_declspecs): Set type to integer_type_node when _FloatN or
4270 _FloatNx is not supported.
4271
c65699ef
JM
42722016-08-19 Joseph Myers <joseph@codesourcery.com>
4273
4274 PR c/32187
4275 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4276 (struct c_declspecs): Add field floatn_nx_idx.
4277 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4278 and _FloatNx type specifiers.
4279 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4280 (c_parser_declspecs, c_parser_attribute_any_word)
4281 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4282 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4283 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4284 narrower than double.
4285
2f1364c2
JJ
42862016-08-12 Jakub Jelinek <jakub@redhat.com>
4287 Martin Liska <mliska@suse.cz>
4288
4289 PR c/67410
4290 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4291 % to determine val element to change. Assert that
4292 wchar_bytes * charwidth fits into val array.
4293
191816a3
MP
42942016-08-12 Marek Polacek <polacek@redhat.com>
4295
4296 PR c/7652
4297 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4298 (c_parser_postfix_expression): Likewise.
4299 * c-typeck.c (build_unary_op): Adjust fall through comment.
4300 (c_mark_addressable): Likewise.
4301
b95a64bb
JJ
43022016-08-11 Jakub Jelinek <jakub@redhat.com>
4303
4304 PR c/72816
4305 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4306 array member through typedef, for orig_qual_indirect == 0 clear
4307 orig_qual_type.
4308
895aa8e1
DM
43092016-08-08 David Malcolm <dmalcolm@redhat.com>
4310
4311 PR c/64955
4312 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4313 this up to selftest::run_c_tests.
4314 (selftest::run_c_tests): New function.
4315
0b212d8c
TS
43162016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4317
ae9281fc
TS
4318 * c-parser.c (struct oacc_routine_data): Add error_seen and
4319 fndecl_seen members.
4320 (c_finish_oacc_routine): Use these.
4321 (c_parser_declaration_or_fndef): Adjust.
4322 (c_parser_oacc_routine): Likewise. Support more C language
4323 constructs, and improve diagnostics. Move pragma context
4324 checking...
4325 (c_parser_pragma): ... here.
4326
0b212d8c
TS
4327 * c-parser.c (struct oacc_routine_data): New.
4328 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4329 Simplify code.
4330 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4331 declare target" attribute.
4332
76e2c821
JB
43332016-08-01 Jan Beulich <jbeulich@suse.com>
4334
4335 * c-fold.c (c_fully_fold_internal): Also emit shift count
4336 warnings for vector types.
4337 * c-typeck.c (build_binary_op): Likewise.
4338
f618a472
MP
43392016-07-29 Marek Polacek <polacek@redhat.com>
4340
4341 PR c/71742
4342 * c-decl.c (finish_struct): Rephrase an error message.
4343
efd0786f
MP
4344 PR c/71853
4345 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4346 to error node for invalid code.
4347
e00dceaf
MP
4348 PR c/71573
4349 * c-decl.c (implicitly_declare): Return decl early not only for
4350 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4351
673a107a
JJ
43522016-07-29 Jakub Jelinek <jakub@redhat.com>
4353
4354 PR c/71969
4355 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4356 on GNU extern inline functions.
4357
a5b5c8b6
MP
43582016-07-29 Marek Polacek <polacek@redhat.com>
4359
4360 PR c/71583
4361 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4362 check expr.value.
4363
e3fe09c1
UB
43642016-07-22 Uros Bizjak <ubizjak@gmail.com>
4365
4366 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4367
7c8f7eaa
DM
43682016-07-20 David Malcolm <dmalcolm@redhat.com>
4369
4370 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4371 spellcheck-tree.h
4372 (best_macro_match): Likewise, converting from a typedef to a
4373 subclass.
4374 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4375 (lookup_name_fuzzy): Update for change of best_macro_match to a
4376 subclass with a ctor that calls cpp_forall_identifiers.
4377
de6a69ee
DM
43782016-07-20 David Malcolm <dmalcolm@redhat.com>
4379
4380 * c-decl.c (implicit_decl_warning): Update for conversion of
4381 return type of lookup_name_fuzzy to const char *.
4382 (undeclared_variable): Likewise.
4383 (lookup_name_fuzzy): Convert return type from tree to
4384 const char *.
4385 * c-parser.c (c_parser_declaration_or_fndef): Update for
4386 conversion of return type of lookup_name_fuzzy to const char *.
4387 (c_parser_parameter_declaration): Likewise.
4388
b1c9c068
CP
43892016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4390
4391 * c-parser.c (c_parser_oacc_declare): Don't scan for
4392 GOMP_MAP_POINTER.
4393 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4394 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4395 zero-length subarrays.
4396
ddbbcb19
JJ
43972016-07-15 Jakub Jelinek <jakub@redhat.com>
4398
4399 PR c/71858
4400 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4401 instead of FUZZY_LOOKUP_NAME.
4402 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4403 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4404
dd36b877
JJ
44052016-07-14 Jakub Jelinek <jakub@redhat.com>
4406
4407 PR c/71858
4408 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4409
8c681247
TS
44102016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4411
4412 * c-parser.c (c_parser_generic_selection): Make type of variable
4413 auto_vec.
4414 (c_parser_omp_declare_simd): Likewise.
4415
bf4fa671
TS
44162016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4417
4418 * c-decl.c (struct c_struct_parse_info): Change member types
4419 from vec to auto_vec.
4420 (start_struct): Adjust.
4421 (finish_struct): Likewise.
4422
557e8c49
JJ
44232016-07-02 Jakub Jelinek <jakub@redhat.com>
4424
4425 PR c/71719
4426 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4427
54d19c3b
TS
44282016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4429
4430 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4431 Move pragma context checking into...
4432 (c_parser_omp_cancellation_point): ... here, and improve
4433 diagnostic messages.
4434 * c-typeck.c (c_finish_omp_cancel)
4435 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4436
152ef731
JJ
44372016-06-29 Jakub Jelinek <jakub@redhat.com>
4438
4439 PR c/71685
4440 * c-typeck.c (c_build_qualified_type): Don't clear
4441 C_TYPE_INCOMPLETE_VARS for the main variant.
4442
44432016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4444
4445 PR c/71552
4446 * c-typeck.c (output_init_element): Diagnose incompatible types
4447 before non-constant initializers.
4448
e9ac1f86
JJ
44492016-06-28 Jakub Jelinek <jakub@redhat.com>
4450
4451 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4452
277d7ee0
AK
44532016-06-23 Andi Kleen <ak@linux.intel.com>
4454
4455 * Make-lang.in: Add support for autofdo.
4456
1a4f11c8
DM
44572016-06-22 David Malcolm <dmalcolm@redhat.com>
4458
4459 PR c/70339
4460 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4461 (implicit_decl_warning): When issuing warnings for implicit
4462 declarations, attempt to provide a suggestion via
4463 lookup_name_fuzzy.
4464 (undeclared_variable): Likewise when issuing errors.
4465 (lookup_name_in_scope): Likewise.
4466 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4467 (best_macro_match): New typedef.
4468 (find_closest_macro_cpp_cb): New function.
4469 (lookup_name_fuzzy): New function.
4470 * c-parser.c: Include gcc-rich-location.h.
4471 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4472 (c_keyword_starts_typename): ...this new function.
4473 (c_parser_declaration_or_fndef): When issuing errors about
4474 missing "struct" etc, add a fixit. For other kinds of errors,
4475 attempt to provide a suggestion via lookup_name_fuzzy.
4476 (c_parser_parms_declarator): When looking ahead to detect typos in
4477 type names, also reject CPP_KEYWORD.
4478 (c_parser_parameter_declaration): When issuing errors about
4479 unknown type names, attempt to provide a suggestion via
4480 lookup_name_fuzzy.
4481 * c-tree.h (c_keyword_starts_typename): New prototype.
4482
5a578671
JM
44832016-06-20 Joseph Myers <joseph@codesourcery.com>
4484
4485 PR c/71601
4486 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4487 c_common_type returns error_mark_node.
4488
3f8257db 44892016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4490
4491 PR c/69507
4492 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4493 __alignof__ (expression).
4494
6a3f203c
DM
44952016-06-14 David Malcolm <dmalcolm@redhat.com>
4496
4497 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4498
264757fb
DM
44992016-06-14 David Malcolm <dmalcolm@redhat.com>
4500
4501 * c-typeck.c (build_component_ref): Simplify fixit code by
4502 using gcc_rich_location::add_fixit_misspelled_id.
4503 (set_init_label): Likewise.
4504
f7e4f2e3
DM
45052016-06-13 David Malcolm <dmalcolm@redhat.com>
4506
4507 * c-parser.c (c_parser_initelt): Provide location of name for new
4508 location_t param of set_init_label.
4509 * c-tree.h (set_init_label): Add location_t param.
4510 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4511 param and use it when issuing error messages about unrecognized
4512 field names. Attempt to provide a fixit hint if appropriate,
4513 otherwise update the error message to provide the type name.
4514
4b1ffdb1
TS
45152016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4516
4517 PR c/71381
4518 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4519 Loosen checking.
4520
44a845ca
MS
45212016-06-08 Martin Sebor <msebor@redhat.com>
4522 Jakub Jelinek <jakub@redhat.com>
4523
4524 PR c++/70507
4525 PR c/68120
4526 * c-typeck.c (convert_arguments): Don't promote last argument
4527 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4528
92a5f2ba
MP
45292016-06-08 Marek Polacek <polacek@redhat.com>
4530
4531 PR c/71418
4532 * c-decl.c (grokdeclarator): Check TYPE_P.
4533
08203f73
MP
4534 PR c/71426
4535 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4536 code.
4537
6ffd47b7
DM
45382016-06-07 David Malcolm <dmalcolm@redhat.com>
4539
4540 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4541 and structure element reference, capture the location of the
4542 element name token and pass it to build_component_ref.
4543 (c_parser_postfix_expression_after_primary): Likewise for
4544 structure element dereference.
4545 (c_parser_omp_variable_list): Likewise for
4546 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4547 * c-tree.h (build_component_ref): Add location_t param.
4548 * c-typeck.c (build_component_ref): Add location_t param
4549 COMPONENT_LOC. Use it, if available, when issuing hints about
4550 mispelled member names to provide a fixit replacement hint.
4551
1f40cff3
MP
45522016-06-06 Marek Polacek <polacek@redhat.com>
4553
4554 PR c/71362
4555 * c-parser.c (c_parser_direct_declarator): Set location.
4556
5545a907
MP
45572016-06-06 Marek Polacek <polacek@redhat.com>
4558
4559 * c-typeck.c (comptypes_internal): Handle comparisons of
4560 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4561 TYPE_REF_CAN_ALIAS_ALL.
4562
b605f663
CLT
45632016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4564
4565 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4566 arguments as addressable when async clause exists.
4567
00631022
JJ
45682016-05-30 Jakub Jelinek <jakub@redhat.com>
4569
4570 PR c++/71349
4571 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4572 when combined with target construct.
4573
7211a097
JJ
45742016-05-26 Jakub Jelinek <jakub@redhat.com>
4575
4576 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4577 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4578
95efe6b6
MP
45792016-05-25 Marek Polacek <polacek@redhat.com>
4580
4581 PR c/71265
4582 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4583
a23faf7a
MP
4584 PR c/71266
4585 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4586
e46c7770
CP
45872016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4588
4589 * c-parser.c (c_parser_oacc_declare): Add support for
4590 GOMP_MAP_FIRSTPRIVATE_POINTER.
4591 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4592 argument with enum c_omp_region_type ort.
4593 (handle_omp_array_sections): Likewise. Update call to
4594 handle_omp_array_sections_1.
4595 (c_finish_omp_clauses): Add specific errors and warning messages for
4596 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4597 call to handle_omp_array_sections.
4598
a04e69c0
TS
45992016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4600
4601 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4602
f17a223d
RB
46032016-05-24 Richard Biener <rguenther@suse.de>
4604
4605 PR middle-end/70434
4606 PR c/69504
4607 * c-typeck.c (build_array_ref): Do not complain about indexing
4608 non-lvalue vectors. Adjust for function name change.
4609
79063edd
MS
46102016-05-20 Martin Sebor <msebor@redhat.com>
4611
4612 PR c/71115
4613 * c-typeck.c (error_init): Use
4614 expansion_point_location_if_in_system_header.
4615 (warning_init): Same.
4616
8a40fef3
DM
46172016-05-19 David Malcolm <dmalcolm@redhat.com>
4618
4619 PR c/71171
4620 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4621 in error-handling.
4622 (c_parser_postfix_expression): Likewise.
4623 * c-tree.h (c_expr::set_error): New method.
4624 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4625 that result's range is initialized.
4626
e9892350
JG
46272016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
4628
4629 * c-typeck.c (parser_build_unary_op): Fix formatting.
4630
8fad45f5
MW
46312016-05-16 Matthew Wahab <matthew.wahab@arm.com>
4632
4633 * c-decl.c (grokdeclarator): Remove errmsg and use of
4634 targetm.invalid_return_type.
4635 (grokparms): Remove errmsg and use of
4636 targetm.invalid_parameter_type.
4637
aa4b467b
JM
46382016-05-13 Joseph Myers <joseph@codesourcery.com>
4639
4640 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
4641 function return type.
4642
4f2e1536
MP
46432016-05-12 Marek Polacek <polacek@redhat.com>
4644
4645 PR c/70756
4646 * c-decl.c (build_compound_literal): Pass LOC down to
4647 c_incomplete_type_error.
4648 * c-tree.h (require_complete_type): Adjust declaration.
4649 (c_incomplete_type_error): Likewise.
4650 * c-typeck.c (require_complete_type): Add location parameter, pass it
4651 down to c_incomplete_type_error.
4652 (c_incomplete_type_error): Add location parameter, pass it down to
4653 error_at.
4654 (build_component_ref): Pass location down to c_incomplete_type_error.
4655 (default_conversion): Pass location down to require_complete_type.
4656 (build_array_ref): Likewise.
4657 (build_function_call_vec): Likewise.
4658 (convert_arguments): Likewise.
4659 (build_unary_op): Likewise.
4660 (build_c_cast): Likewise.
4661 (build_modify_expr): Likewise.
4662 (convert_for_assignment): Likewise.
4663 (c_finish_omp_clauses): Likewise.
4664
d6e83a8d
MM
46652016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4666
4667 PR c/43651
4668 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
4669 is enabled.
4670 * c-errors.c (pedwarn_c90): Return true if warned.
4671 * c-tree.h (pedwarn_c90): Change return type to bool.
4672 (enum c_declspec_word): Add new enumerator cdw_atomic.
4673
5c3a10fb
MP
46742016-05-11 Marek Polacek <polacek@redhat.com>
4675
4676 PR c++/71024
4677 * c-decl.c (diagnose_mismatched_decls): Factor out code to
4678 diagnose_mismatched_attributes and call it.
4679
cf68d92c
MP
46802016-05-10 Marek Polacek <polacek@redhat.com>
4681
4682 PR c/70255
4683 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
4684 on a declaration following the definition.
4685
351f85c5
JJ
46862016-05-05 Jakub Jelinek <jakub@redhat.com>
4687
4688 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
4689 parse it through to c_parser_c99_block_statement.
4690 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
4691 caller.
4692
deef7113
MP
46932016-05-04 Marek Polacek <polacek@redhat.com>
4694
4695 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
4696 OPT_Wdangling_else.
4697
de55efd5
MP
46982016-05-04 Marek Polacek <polacek@redhat.com>
4699
4700 PR c/48778
4701 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
4702 for macro expansions.
4703
79ce98bc
MP
47042016-05-03 Marek Polacek <polacek@redhat.com>
4705
4706 PR c/70859
4707 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
4708 check_builtin_function_arguments.
4709
fb2647aa
RB
47102016-05-03 Richard Biener <rguenther@suse.de>
4711
4712 * Make-lang.in (cc1-checksum.c): For stage-final re-use
4713 the checksum from the previous stage.
4714
77886428
CP
47152016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4716
4717 * c-parser.c (c_parser_oacc_all_clauses): Update call to
4718 c_finish_omp_clauses.
4719 (c_parser_omp_all_clauses): Likewise.
4720 (c_parser_oacc_cache): Likewise.
4721 (c_parser_oacc_loop): Likewise.
4722 (omp_split_clauses): Likewise.
4723 (c_parser_omp_declare_target): Likewise.
4724 (c_parser_cilk_all_clauses): Likewise.
4725 (c_parser_cilk_for): Likewise.
4726 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
4727 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
4728
7176a4a0
MP
47292016-05-02 Marek Polacek <polacek@redhat.com>
4730
4731 PR c/70851
4732 * c-decl.c (grokdeclarator): Diagnose when array's size has an
4733 incomplete type.
4734
e7ff0319
CP
47352016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4736
4737 PR middle-end/70626
4738 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
4739 OACC_LOOP_CLAUSE_MASK.
4740 (c_parser_oacc_kernels_parallel): Update call to
4741 c_oacc_split_loop_clauses.
4742
9f405ce1
AM
47432016-04-28 Andrew MacLeod <amacleod@redhat.com>
4744
4745 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
4746 argument to build_modify_expr in two cases.
4747
c1e1f433
BS
47482016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4749
4750 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4751 warn_for_memset instead of warning directly here.
4752
2448a956
MP
47532016-04-26 Marek Polacek <polacek@redhat.com>
4754
4755 PR c/67784
4756 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
4757 out of ...
4758 (c_parser_for_statement): ... here.
4759 (c_parser_if_statement): Use it.
4760 (c_parser_switch_statement): Use it.
4761 (c_parser_while_statement): Use it.
4762
b02a5e26
MP
4763 PR c/70791
4764 * c-decl.c (pushdecl): Pass LOCUS down to warning.
4765
477d4906
IV
47662016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4767
4768 PR c++/69363
4769 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
4770 instead of c_finish_cilk_clauses.
4771 * c-tree.h (c_finish_omp_clauses): Add new default argument.
4772 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
4773 floating-point variables in the linear clause for Cilk Plus.
4774
fe37c7af
MM
47752016-04-18 Michael Matz <matz@suse.de>
4776
4777 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
4778 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
4779
949505a9
MP
47802016-04-15 Marek Polacek <polacek@redhat.com>
4781
4782 PR c/70671
4783 * c-typeck.c (build_unary_op): Pass location down to error and
4784 warning call.
4785
dda1bf61
JJ
47862016-04-15 Jakub Jelinek <jakub@redhat.com>
4787
4788 PR c/70436
4789 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
4790 where needed.
4791 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
4792 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
4793 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
4794 Adjust c_parser_pragma callers.
4795 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
4796 caller.
4797 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
4798 c_parser_statement.
4799 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
4800 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
4801 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
4802 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
4803 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
4804 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
4805 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
4806 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
4807 down where needed.
4808 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
4809 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
4810 calls.
4811
99cd9857
MP
48122016-04-13 Marek Polacek <polacek@redhat.com>
4813
4814 PR c/70436
4815 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
4816 adjust callers.
4817 (c_parser_statement): Likewise.
4818 (c_parser_c99_block_statement): Likewise.
4819 (c_parser_while_statement): Likewise.
4820 (c_parser_for_statement): Likewise.
4821 (c_parser_if_body): Don't set IF_P here.
4822 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
4823 about dangling else here.
4824 * c-tree.h (c_finish_if_stmt): Adjust declaration.
4825 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
4826 warn about dangling else here.
4827
f13355da
MP
48282016-04-04 Marek Polacek <polacek@redhat.com>
4829
4830 PR c/70307
4831 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
4832
5fde6a45
MP
48332016-03-31 Marek Polacek <polacek@redhat.com>
4834
4835 PR c/70297
4836 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
4837
4bbf545b
DM
48382016-03-18 David Malcolm <dmalcolm@redhat.com>
4839
4840 PR c/70281
4841 * c-parser.c (c_parser_postfix_expression): Set the source range
4842 for uses of "__builtin_types_compatible_p".
4843
fcc2b74f
JJ
48442016-03-17 Jakub Jelinek <jakub@redhat.com>
4845
4846 PR c/70280
4847 * c-typeck.c (composite_type): Don't count void_list_node
4848 into len, if the list is terminated by void_list_node, start
4849 with void_list_node instead of NULL for newargs. Stop
4850 at void_list_node.
4851
ab4c578f
MP
48522016-03-16 Marek Polacek <polacek@redhat.com>
4853
4854 PR c/70093
4855 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
4856 nested functions returning VM types.
4857
96b3c82d
CP
48582016-03-09 Cesar Philippidis <cesar@codesourcery.com>
4859
4860 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
4861 when calling c_finish_omp_clauses.
4862
29b9828f
BS
48632016-03-04 Bernd Schmidt <bschmidt@redhat.com>
4864
4865 PR c/69824
4866 * c-decl.c (get_parm_info): Don't queue implicit function declarations
4867 for later.
4868
7ff6ca38
MP
48692016-03-04 Marek Polacek <polacek@redhat.com>
4870
4871 PR c/69798
4872 * c-parser.c (c_parser_postfix_expression): Call
4873 c_parser_cast_expression rather than c_parser_postfix_expression.
4874
686e2237
JJ
48752016-03-01 Jakub Jelinek <jakub@redhat.com>
4876
4877 PR c/69796
4878 PR c/69974
4879 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
4880 of incomplete decls to error_mark_node.
4881
0b05329b
MP
48822016-02-24 Marek Polacek <polacek@redhat.com>
4883
4884 PR c/69819
4885 * c-decl.c (finish_decl): Don't update the copy of the type of a
4886 different decl type.
4887
067fbd8b
JJ
48882016-02-23 Jakub Jelinek <jakub@redhat.com>
4889
4890 PR objc/69844
4891 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
4892 in id_kind reclassification.
4893
bf14eba2
JJ
48942016-02-16 Jakub Jelinek <jakub@redhat.com>
4895
4896 PR c/69835
4897 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
4898
ba539195
JN
48992016-02-16 James Norris <jnorris@codesourcery.com>
4900
4901 PR c/64748
4902 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
4903
16595a1f
BS
49042016-02-12 Bernd Schmidt <bschmidt@redhat.com>
4905
f48dfe98
BS
4906 * c-decl.c (build_null_declspecs): Zero the entire struct.
4907
16595a1f
BS
4908 PR c/69522
4909 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
4910 callers changed. If nested_p is true, use it to call
4911 finish_implicit_inits.
4912 * c-tree.h (finish_implicit_inits): Declare.
4913 * c-typeck.c (finish_implicit_inits): New function. Move code
4914 from ...
4915 (push_init_level): ... here.
4916 (set_designator, process_init_element): Call finish_implicit_inits.
4917
66756373
JJ
49182016-02-11 Jakub Jelinek <jakub@redhat.com>
4919
4920 PR c/69768
4921 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
4922 arguments for -Waddress warning.
4923
1066e9b5
JJ
49242016-02-04 Jakub Jelinek <jakub@redhat.com>
4925
4926 PR c/69669
4927 * c-decl.c (finish_enum): When honoring mode attribute,
4928 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
4929
3a5d2ba4
JJ
49302016-01-29 Jakub Jelinek <jakub@redhat.com>
4931
4932 PR debug/69518
4933 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
4934 all type variants, not just TYPE_MAIN_VARIANT.
4935
cbdd8ae0
JJ
49362016-01-27 Jakub Jelinek <jakub@redhat.com>
4937
4938 PR debug/66869
4939 * c-decl.c (c_write_global_declarations_1): Warn with
4940 warn_unused_function if static prototype without definition
4941 is not C_DECL_USED.
4942
fa74a4bc
MP
49432016-01-27 Marek Polacek <polacek@redhat.com>
4944
4945 PR c/68062
4946 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
4947 to unsigned, if needed. Add -Wsign-compare warning.
4948
13f92e8d
JJ
49492016-01-26 Jakub Jelinek <jakub@redhat.com>
4950
4951 PR tree-optimization/69483
4952 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
4953
cd8e73dc 49542016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
4955
4956 PR c/24293
4957 * c-tree.h (incomplete_record_decls): Declare.
4958 * c-parser.c (incomplete_record_decls): Define.
4959 (c_parser_translation_unit): Iterate through incomplete_record_decls and
4960 report error if any decl has zero size.
4961 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
4962 or enum type to incomplete_record_decls.
4963
e6d6ec9e
TV
49642016-01-14 Tom de Vries <tom@codesourcery.com>
4965
4966 PR tree-optimization/68773
4967 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
4968 set force_output.
4969
00083992
MP
49702016-01-14 Marek Polacek <polacek@redhat.com>
4971
4972 PR c/69262
4973 * c-decl.c (grokdeclarator): Provide more information for invalid
4974 array declarations.
4975
7443cf13
DM
49762016-01-06 David Malcolm <dmalcolm@redhat.com>
4977
4978 * c-parser.c (c_parser_unary_expression): For dereferences, build
4979 a combined location before calling build_indirect_ref, so that
4980 error reports cover the full range, manually updating the c_expr
4981 src_range.
4982
6b131d5b
MP
49832016-01-06 Marek Polacek <polacek@redhat.com>
4984
4985 PR sanitizer/69099
4986 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
4987 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
4988 NULL.
4989
818ab71a
JJ
49902016-01-04 Jakub Jelinek <jakub@redhat.com>
4991
4992 Update copyright years.
4993
2fe0a208
MP
49942016-01-04 Marek Polacek <polacek@redhat.com>
4995
4996 PR c/68908
4997 * c-typeck.c (build_atomic_assign): Improve commentary. Add
4998 optimization to use __atomic_fetch_* built-in if possible.
4999
c7b48c8a
TS
50002015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5001
5002 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5003 into...
5004 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5005 all users.
5006
fda5652f
MP
50072015-12-22 Marek Polacek <polacek@redhat.com>
5008
5009 PR c/69002
5010 * c-typeck.c (build_component_ref): Warn when acessing elements of
5011 atomic structures or unions.
5012
745e411d
DM
50132015-12-21 David Malcolm <dmalcolm@redhat.com>
5014
5015 * c-typeck.c: Include "gcc-rich-location.h".
5016 (build_binary_op): In the two places that call binary_op_error,
5017 create a gcc_rich_location and populate it with the location of
5018 the binary op and its two operands.
5019
94c40e19
DM
50202015-12-16 David Malcolm <dmalcolm@redhat.com>
5021
5022 * c-parser.c (c_parser_statement_after_labels): When calling
5023 c_finish_return, Use the return expression's location if it has
5024 one, falling back to the location of the first token within it.
5025 * c-typeck.c (c_finish_return): When issuing warnings about
5026 the incorrect presence/absence of a return value, issue a note
5027 showing the declaration of the function.
5028
de67c4c3
DM
50292015-12-16 David Malcolm <dmalcolm@redhat.com>
5030
5031 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5032 to 4.
5033 (c_parser_peek_nth_token): New function.
5034 (c_parser_peek_conflict_marker): New function.
5035 (c_parser_error): Detect conflict markers and report them as such.
5036
a10704e1
DM
50372015-12-16 David Malcolm <dmalcolm@redhat.com>
5038
5039 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5040 to preserve range information for the primary expression
5041 in the call to c_parser_postfix_expression_after_primary.
5042
8062bca6
DM
50432015-12-16 David Malcolm <dmalcolm@redhat.com>
5044
5045 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5046 expression location, falling back on the first token location,
5047 rather than always using the latter.
5048
d06f8b75
MP
50492015-12-16 Marek Polacek <polacek@redhat.com>
5050
5051 PR c/64637
5052 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5053 available.
5054
2994fb91
MP
50552015-12-15 Marek Polacek <polacek@redhat.com>
5056
5057 PR c/68907
5058 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5059 artificial decl.
5060
a1b93f8d
DM
50612015-12-08 David Malcolm <dmalcolm@redhat.com>
5062
5063 * c-parser.c (c_parser_alignof_expression): Capture location of
5064 closing parenthesis (if any), or of end of unary expression, and
5065 use it to build a src_range for the expression.
5066
46c6e1e2
DM
50672015-12-08 David Malcolm <dmalcolm@redhat.com>
5068
5069 PR c/68757
5070 * c-parser.c (c_parser_get_builtin_args): Add
5071 "out_close_paren_loc" param, and write back to it.
5072 (c_parser_postfix_expression): Capture the closing
5073 parenthesis location for RID_CHOOSE_EXPR,
5074 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5075 RID_BUILTIN_SHUFFLE and use it to set the source range
5076 for such expressions; within RID_BUILTIN_COMPLEX set
5077 the underlying location.
5078
66189108
MP
50792015-12-07 Marek Polacek <polacek@redhat.com>
5080
5081 PR c/68668
5082 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5083 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5084
f187980b
EB
50852015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5086
5087 * c-tree.h (c_build_va_arg): Adjust prototype.
5088 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5089 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5090 parameter, adjust throughout and issue an error if EXPR is a component
5091 with reverse storage order.
5092
4250754e
JM
50932015-12-02 Jason Merrill <jason@redhat.com>
5094
5095 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5096 (c_fully_fold_internal, decl_constant_value_for_optimization):
5097 Move from c-common.c.
5098 * c-tree.h: Declare decl_constant_value_for_optimization.
5099 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5100
e9e32ee6
JM
51012015-12-02 Joseph Myers <joseph@codesourcery.com>
5102
5103 PR c/68162
5104 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5105 following link from declarator to next declarator. Track original
5106 qualified type and pass it to c_build_qualified_type.
5107 * c-typeck.c (c_build_qualified_type): Add arguments
5108 orig_qual_type and orig_qual_indirect.
5109
ff7a55bf
TS
51102015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5111
5112 * c-parser.c (c_parser_omp_clause_name)
5113 (c_parser_oacc_all_clauses): Alphabetical sorting.
5114
657e4e47
JJ
51152015-12-02 Jakub Jelinek <jakub@redhat.com>
5116
5117 PR c/68533
5118 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5119 for diagnostics.
5120
37d5ad46
JB
51212015-12-01 Julian Brown <julian@codesourcery.com>
5122 Cesar Philippidis <cesar@codesourcery.com>
5123 James Norris <James_Norris@mentor.com>
5124
5125 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5126 (c_parser_oacc_clause_use_device): New function.
5127 (c_parser_oacc_all_clauses): Add use_device support.
5128 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5129 (c_parser_oacc_host_data): New function.
5130 (c_parser_omp_construct): Add host_data support.
5131 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5132 * c-typeck.c (c_finish_oacc_host_data): New function.
5133 (c_finish_omp_clauses): Add use_device support.
5134
a4850ce9
JH
51352015-11-29 Jan Hubicka <hubicka@ucw.cz>
5136
5137 PR c/67106
5138 * c-decl.c: Set TYPE_PACKED in variants.
5139
b58d3df2
ML
51402015-11-27 Martin Liska <mliska@suse.cz>
5141
5142 PR c++/68312
5143 * c-array-notation.c (fix_builtin_array_notation_fn):
5144 Use release_vec_vec instead of vec::release.
5145 (build_array_notation_expr): Likewise.
5146 (fix_conditional_array_notations_1): Likewise.
5147 (fix_array_notation_expr): Likewise.
5148 (fix_array_notation_call_expr): Likewise.
5149
aec17bfe
JJ
51502015-11-27 Jakub Jelinek <jakub@redhat.com>
5151
5152 PR c/63326
5153 * c-parser.c (c_parser_compound_statement_nostart): If
5154 last_label is true, use pragma_stmt instead of pragma_compound
5155 as second c_parser_pragma argument.
5156 (c_parser_omp_ordered, c_parser_omp_target_update,
5157 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5158 false as second argument to c_parser_skip_to_pragma_eol after
5159 diagnosing standalone directives used in pragma_stmt context.
5160
688c4de0
IV
51612015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5162
5163 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5164 with "if (ENABLE_OFFLOADING)".
5165
cbd03aee
DM
51662015-11-23 David Malcolm <dmalcolm@redhat.com>
5167
5168 PR objc/68438
5169 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5170 for various Objective-C constructs: Class.name syntax,
5171 @selector(), @protocol(), @encode(), and [] message syntax.
5172
a87a86e1
DM
51732015-11-20 David Malcolm <dmalcolm@redhat.com>
5174
5175 PR 62314
5176 * c-typeck.c (should_suggest_deref_p): New function.
5177 (build_component_ref): Special-case POINTER_TYPE when
5178 generating a "not a structure of union" error message, and
5179 suggest a "->" rather than a ".", providing a fix-it hint.
5180
8ece8dfb
DM
51812015-11-19 David Malcolm <dmalcolm@redhat.com>
5182
5183 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5184 candidate into a new function, find_closest_identifier.
5185
433068cc
MP
51862015-11-19 Marek Polacek <polacek@redhat.com>
5187
5188 PR c/68412
5189 * c-typeck.c (parser_build_binary_op): Properly handle
5190 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5191
bef08b71
DM
51922015-11-17 David Malcolm <dmalcolm@redhat.com>
5193
5194 * c-parser.c (set_c_expr_source_range): Bulletproof both
5195 overloaded implementations against NULL expr->value.
5196 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5197 values.
5198 (c_parser_unary_expression): Likewise when handling addresses of
5199 labels.
5200 (c_parser_postfix_expression): Likewise for statement expressions,
5201 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5202 __builtin_va_arg, and for __builtin_offset_of.
5203 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5204 src_range using the range of the braced initializer.
5205 (c_parser_transaction_expression): Set src_range for "ret" to a
5206 sane pair of values.
5207
fff77217
KY
52082015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5209
5210 * c-parser.c (c_finish_omp_declare_simd): Look for
5211 "simd" attribute as well. Update error message.
5212
1d899da2
TS
52132015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5214
5215 * c-parser.c (c_parser_omp_declare_target): Adjust.
5216
e4606348
JJ
52172015-11-14 Jakub Jelinek <jakub@redhat.com>
5218
5219 * c-typeck.c (c_finish_omp_clauses): Don't mark
5220 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5221
3e636daf
MP
52222015-11-14 Marek Polacek <polacek@redhat.com>
5223
5224 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5225 * c-typeck.c: Likewise.
5226
ebedc9a3
DM
52272015-11-13 David Malcolm <dmalcolm@redhat.com>
5228
5229 * c-decl.c (warn_defaults_to): Pass line_table to
5230 rich_location ctor.
5231 * c-errors.c (pedwarn_c99): Likewise.
5232 (pedwarn_c90): Likewise.
5233 * c-parser.c (set_c_expr_source_range): New functions.
5234 (c_token::get_range): New method.
5235 (c_token::get_finish): New method.
5236 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5237 based on the range from the start of the LHS to the end of the
5238 RHS.
5239 (c_parser_conditional_expression): Likewise, based on the range
5240 from the start of the cond.value to the end of exp2.value.
5241 (c_parser_binary_expression): Call set_c_expr_source_range on
5242 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5243 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5244 based on the cast_loc through to the end of the expr.
5245 (c_parser_unary_expression): Likewise, based on the
5246 op_loc through to the end of op.
5247 (c_parser_sizeof_expression) Likewise, based on the start of the
5248 sizeof token through to either the closing paren or the end of
5249 expr.
5250 (c_parser_postfix_expression): Likewise, using the token range,
5251 or from the open paren through to the close paren for
5252 parenthesized expressions.
5253 (c_parser_postfix_expression_after_primary): Likewise, for
5254 various kinds of expression.
5255 * c-tree.h (struct c_expr): Add field "src_range".
5256 (c_expr::get_start): New method.
5257 (c_expr::get_finish): New method.
5258 (set_c_expr_source_range): New decls.
5259 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5260 on ret for prefix unary ops.
5261 (parser_build_binary_op): Likewise, running from the start of
5262 arg1.value through to the end of arg2.value.
5263
ec8b536f
MP
52642015-11-13 Marek Polacek <polacek@redhat.com>
5265
5266 PR c/68320
5267 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5268
277fe616
DM
52692015-11-13 David Malcolm <dmalcolm@redhat.com>
5270
5271 * c-typeck.c: Include spellcheck.h.
5272 (lookup_field_fuzzy_find_candidates): New function.
5273 (lookup_field_fuzzy): New function.
5274 (build_component_ref): If the field was not found, try using
5275 lookup_field_fuzzy and potentially offer a suggestion.
5276
6e232ba4
JN
52772015-11-12 James Norris <jnorris@codesourcery.com>
5278 Joseph Myers <joseph@codesourcery.com>
5279
5280 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5281 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5282 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5283 and PRAGMA_OMP_CLAUSE_LINK.
5284 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5285 and PRAGMA_OACC_CLAUSE_LINK.
5286 (OACC_DECLARE_CLAUSE_MASK): New definition.
5287 (c_parser_oacc_declare): New function.
5288
9be4f715
MP
52892015-11-12 Marek Polacek <polacek@redhat.com>
5290
5291 PR c/67784
5292 * c-parser.c (c_parser_for_statement): Reclassify the token in
5293 a correct scope.
5294
e78bede6
MP
52952015-11-11 Marek Polacek <polacek@redhat.com>
5296
5297 PR c/68107
5298 PR c++/68266
5299 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5300 checking the size of an array.
5301
69f293c9
AM
53022015-11-11 Andrew MacLeod <amacleod@redhat.com>
5303
5304 * c-array-notation.c: Remove unused header files.
5305 * c-aux-info.c: Likewise.
5306 * c-convert.c: Likewise.
5307 * c-decl.c: Likewise.
5308 * c-errors.c: Likewise.
5309 * c-lang.c: Likewise.
5310 * c-objc-common.c: Likewise.
5311 * c-parser.c: Likewise.
5312 * c-typeck.c: Likewise.
5313 * gccspec.c: Likewise.
5314
3a40d81d
NS
53152015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5316 Cesar Philippidis <cesar@codesourcery.com>
5317 James Norris <jnorris@codesourcery.com>
5318 Julian Brown <julian@codesourcery.com>
5319 Nathan Sidwell <nathan@codesourcery.com>
5320
3a40d81d
NS
5321 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5322 routine arg.
5323 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5324 (c_parser_pragma): Parse 'acc routine'.
5325 (OACC_ROUTINE_CLAUSE_MARK): Define.
5326 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5327
fc402eec
AA
53282015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5329
5330 PR debug/67192
5331 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5332 location of the backward-goto to the start of the loop body.
5333
f6b0b3db
AA
53342015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5335
5336 PR debug/67192
5337 * c-parser.c (c_parser_while_statement): Finish the loop before
5338 parsing ahead for misleading indentation.
5339 (c_parser_for_statement): Likewise.
5340
ee45a32d
EB
53412015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5342
5343 * c-decl.c (finish_struct): If the structure has reverse storage
5344 order, rewrite the type of array fields with scalar component. Call
5345 maybe_apply_pragma_scalar_storage_order on entry.
5346 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5347 errors on bit-fields and reverse SSO here and not...
5348 (c_mark_addressable): ...here.
5349 (output_init_element): Adjust call to initializer_constant_valid_p.
5350 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5351
8a645150
DM
53522015-11-06 David Malcolm <dmalcolm@redhat.com>
5353
5354 * c-decl.c (warn_defaults_to): Update for change in signature
5355 of diagnostic_set_info.
5356 * c-errors.c (pedwarn_c99): Likewise.
5357 (pedwarn_c90): Likewise.
5358 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5359 for textinfo::set_location.
5360
7a5e4956
CP
53612015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5362 Thomas Schwinge <thomas@codesourcery.com>
5363 James Norris <jnorris@codesourcery.com>
5364
5365 * c-parser.c (c_parser_omp_clause_name): Add support for
5366 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5367 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5368 default(none) in OpenACC.
5369 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5370 arguments.
5371 (c_parser_oacc_clause_tile): New function.
5372 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5373 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5374 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5375 TILE}.
5376 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5377 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5378 FIRSTPRIVATE}.
5379 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5380 (c_parser_oacc_update): Update the error message for missing clauses.
5381 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5382 and OMP_CLAUSE_INDEPENDENT.
5383
bfcfbfa0
MP
53842015-11-05 Marek Polacek <polacek@redhat.com>
5385
5386 PR c/68090
5387 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5388 deal with pre-evaluation on invalid types.
5389
e01d41e5
JJ
53902015-11-05 Jakub Jelinek <jakub@redhat.com>
5391 Ilya Verbin <ilya.verbin@intel.com>
5392
5393 * c-parser.c: Include context.h and gimple-expr.h.
5394 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5395 monotonic together with nonmonotonic.
5396 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5397 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5398 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5399 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5400 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5401 expressions on combined target teams before the target.
5402 (c_parser_omp_declare_target): If decl has "omp declare target" or
5403 "omp declare target link" attribute, and cgraph or varpool node already
5404 exists, then set corresponding flags. Call c_finish_omp_clauses
5405 in the parenthesized extended-list syntax case.
5406 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5407 declare target.
5408 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5409 on OMP_CLAUSE_REDUCTION array sections.
5410 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5411 into the constant offset, or for variable low-bound using
5412 POINTER_PLUS_EXPR. For structure element based array sections use
5413 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5414 (c_finish_omp_clauses): Drop generic_field_head, structure
5415 elements are now always mapped even as array section bases,
5416 diagnose same var in data sharing and mapping clauses. Diagnose if
5417 linear step on declare simd is neither a constant nor a uniform
5418 parameter. Look through POINTER_PLUS_EXPR for array section
5419 reductions. Diagnose the same var or function appearing multiple
5420 times on the same directive. Fix up wording for the to clause if t
5421 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5422 modifier on kinds other than dynamic or guided or nonmonotonic
5423 modifier together with ordered clause.
5424
4bf9e5a8
TS
54252015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5426 Chung-Lin Tang <cltang@codesourcery.com>
5427
5428 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5429
2adfab87
AM
54302015-10-29 Andrew MacLeod <amacleod@redhat.com>
5431
5432 * c-array-notation.c: Reorder #include's and remove duplicates.
5433 * c-aux-info.c: Likewise.
5434 * c-convert.c: Likewise.
5435 * c-decl.c: Likewise.
5436 * c-errors.c: Likewise.
5437 * c-lang.c: Likewise.
5438 * c-objc-common.c: Likewise.
5439 * c-parser.c: Likewise.
5440 * c-typeck.c: Likewise.
5441
e922069e
JW
54422015-10-26 Jim Wilson <jim.wilson@linaro.org>
5443
5444 PR debug/66068
5445 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5446 after calling build_qualified_type.
5447
765dd391
CP
54482015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5449 Thomas Schwinge <thomas@codesourcery.com>
5450 James Norris <jnorris@codesourcery.com>
5451 Joseph Myers <joseph@codesourcery.com>
5452 Julian Brown <julian@codesourcery.com>
5453 Bernd Schmidt <bschmidt@redhat.com>
5454
5455 * c-parser.c (c_parser_oacc_shape_clause): New.
5456 (c_parser_oacc_simple_clause): New.
5457 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5458 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5459
88bae6f4
TS
54602015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5461 James Norris <jnorris@codesourcery.com>
5462 Cesar Philippidis <cesar@codesourcery.com>
5463
5464 PR c/64765
5465 PR c/64880
5466 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5467 parameters, and handle these. Adjust all users.
5468 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5469 into...
5470 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5471 all users.
5472 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5473 declare functions.
5474 (c_finish_omp_construct): Declare function.
5475 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5476 Merge functions into...
5477 (c_finish_omp_construct): ... this new function.
5478
a8fc2579
RB
54792015-10-22 Richard Biener <rguenther@suse.de>
5480
5481 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5482 before folding a MINUS_EXPR.
5483
e9122ef6
MP
54842015-10-21 Marek Polacek <polacek@redhat.com>
5485
5486 PR c/68024
5487 * c-decl.c (start_function): Warn about vararg functions without
5488 a prototype.
5489
9f47c7e5
IE
54902015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5491
5492 * c-typeck.c (build_conditional_expr): Use boolean vector
5493 type for vector comparison.
5494 (build_vec_cmp): New.
5495 (build_binary_op): Use build_vec_cmp for comparison.
5496
fa60eeb9
MP
54972015-10-20 Marek Polacek <polacek@redhat.com>
5498
5499 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5500
2c7020eb
MP
55012015-10-20 Marek Polacek <polacek@redhat.com>
5502
5503 PR c/67964
5504 * c-parser.c (c_parser_attributes): Break out of the loop if the
5505 token after an attribute isn't a comma.
5506
d9a6bd32
JJ
55072015-10-13 Jakub Jelinek <jakub@redhat.com>
5508 Aldy Hernandez <aldyh@redhat.com>
5509
5510 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5511 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5512 (c_parser_omp_variable_list): Handle structure elements for
5513 map, to and from clauses. Handle array sections in reduction
5514 clause. Formatting fixes.
5515 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5516 if clause modifiers.
5517 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5518 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5519 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5520 c_parser_omp_clause_is_device_ptr): New functions.
5521 (c_parser_omp_clause_ordered): Parse optional parameter.
5522 (c_parser_omp_clause_reduction): Handle array reductions.
5523 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5524 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5525 functions.
5526 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5527 (c_parser_omp_clause_depend_sink): New function.
5528 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5529 (c_parser_omp_clause_map): Parse release/delete map kinds and
5530 optional always modifier.
5531 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5532 and c_finish_omp_clauses callers.
5533 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5534 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5535 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5536 (OMP_CRITICAL_CLAUSE_MASK): Define.
5537 (c_parser_omp_critical): Parse critical clauses.
5538 (c_parser_omp_for_loop): Handle doacross loops, adjust
5539 c_finish_omp_for and c_finish_omp_clauses callers.
5540 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5541 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5542 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5543 (c_parser_omp_for): Disallow ordered clause when combined with
5544 distribute. Disallow linear clause when combined with distribute
5545 and not combined with simd.
5546 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5547 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5548 parse clauses and if depend clause is found, don't parse a body.
5549 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5550 Allow target parallel without for after it.
5551 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5552 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5553 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5554 invalid kinds.
5555 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5556 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5557 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5558 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5559 functions.
5560 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5561 defaultmap and is_device_ptr clauses.
5562 (c_parser_omp_target): Parse target parallel and target simd. Set
5563 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5564 and target exit data. Diagnose invalid map kinds.
5565 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5566 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5567 construct.
5568 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5569 &omp_priv.
5570 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5571 (c_parser_omp_taskloop): New function.
5572 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5573 handle PRAGMA_OMP_TASKLOOP.
5574 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5575 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5576 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5577 Add IS_OMP argument, handle structure element bases, diagnose
5578 bitfields, pass IS_OMP recursively, diagnose known zero length
5579 array sections in depend clauses, handle array sections in reduction
5580 clause, diagnose negative length even for pointers.
5581 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5582 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5583 array sections in reduction clause, set
5584 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5585 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5586 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5587 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5588
21ba0cea
MP
55892015-10-06 Marek Polacek <polacek@redhat.com>
5590
5591 * c-parser.c (c_parser_statement_after_labels): Use
5592 protected_set_expr_location.
5593 (c_parser_omp_clause_num_gangs): Likewise.
5594 (c_parser_omp_clause_num_threads): Likewise.
5595 (c_parser_omp_clause_num_workers): Likewise.
5596 (c_parser_omp_clause_vector_length): Likewise.
5597 (c_parser_omp_clause_num_teams): Likewise.
5598 (c_parser_omp_clause_thread_limit): Likewise.
5599 * c-typeck.c (build_c_cast): Likewise.
5600 (c_cast_expr): Likewise.
5601
624d31fe
RS
56022015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5603
5604 * c-typeck.c (c_tree_equal): Use real_equal instead of
5605 REAL_VALUES_EQUAL.
5606
b8fd7909
JM
56072015-10-04 Jason Merrill <jason@redhat.com>
5608
5609 * c-parser.c (c_lex_one_token): Handle @synchronized.
5610 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5611 can change whether the function is transaction_safe.
5612
1c7485af
MP
56132015-10-02 Marek Polacek <polacek@redhat.com>
5614
5615 PR c/67730
5616 * c-typeck.c (convert_for_assignment): Use the expansion point
5617 location throughout.
5618
3e3b8d63
MP
56192015-10-02 Marek Polacek <polacek@redhat.com>
5620
5621 PR c/64249
5622 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5623 and pass it down to c_parser_if_statement.
5624 (c_parser_else_body): Add CHAIN parameter and pass it down to
5625 c_parser_statement_after_labels.
5626 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5627 duplicated if-else-if conditions.
5628
aabef2de
MP
56292015-10-01 Marek Polacek <polacek@redhat.com>
5630
5631 * c-typeck.c (convert_for_assignment): Improve commentary.
5632
de8ddd5f
MP
56332015-09-30 Marek Polacek <polacek@redhat.com>
5634
5635 PR c/67730
5636 * c-typeck.c (c_finish_return): Use the expansion point location for
5637 certain "return with value" warnings.
5638
c4914de6
MLI
56392015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5640
5641 * c-parser.c (pragma_lex): Add loc argument.
5642
0e36f5c7
MP
56432015-09-15 Marek Polacek <polacek@redhat.com>
5644
5645 PR c/67580
5646 * c-decl.c (tag_exists_p): New function.
5647 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
5648 struct/union/enum keywords are missing.
5649 * c-tree.h (tag_exists_p): Declare.
5650
2f3bb934
MP
56512015-09-15 Marek Polacek <polacek@redhat.com>
5652
5653 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
5654 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
5655 Return NULL_TREE instead of 0.
5656 (lookup_name): Return NULL_TREE instead of 0.
5657 (lookup_name_in_scope): Likewise.
5658 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
5659 (parser_xref_tag): Use false instead of 0.
5660 (start_struct): Use true instead of 1.
5661 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
5662
aa256c4a
MP
56632015-09-14 Marek Polacek <polacek@redhat.com>
5664
5665 * c-typeck.c (set_nonincremental_init_from_string): Use
5666 HOST_WIDE_INT_M1U when shifting a negative value.
5667
dbb68221
MW
56682015-09-09 Mark Wielaard <mjw@redhat.com>
5669
5670 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
5671 parm against NULL.
5672
a8a098ac
JJ
56732015-09-10 Jakub Jelinek <jakub@redhat.com>
5674
5675 PR c/67502
5676 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
5677 into OMP_FOR_PRE_BODY rather than before the loop.
5678
f4b189d5
JJ
56792015-09-09 Jakub Jelinek <jakub@redhat.com>
5680
0bb99c11
JJ
5681 PR c/67501
5682 * c-parser.c (c_parser_oacc_all_clauses,
5683 c_parser_omp_all_clauses): Remove invalid clause from
5684 list of clauses even if parser->error is set.
5685
fce5e5e3
JJ
5686 PR c/67500
5687 * c-parser.c (c_parser_omp_clause_aligned,
5688 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
5689 test for errors.
5690 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
5691 error_mark_node.
5692
f4b189d5
JJ
5693 PR c/67495
5694 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5695 instead of c_parser_unary_expression. If the result is !lvalue_p,
5696 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
5697
b2aaf235
MP
56982015-09-04 Marek Polacek <polacek@redhat.com>
5699
5700 PR sanitizer/67279
5701 * c-typeck.c (build_binary_op): Don't instrument static initializers.
5702
1807ffc1
MS
57032015-09-03 Martin Sebor <msebor@redhat.com>
5704
5705 PR c/66516
8b652e65
JJ
5706 * c-typeck.c (convert_arguments, parser_build_unary_op,
5707 build_conditional_expr, c_cast_expr, convert_for_assignment,
5708 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
5709 reject_gcc_builtin.
5710 (c_decl_implicit): Define.
5711
d04ff417
MP
57122015-09-02 Marek Polacek <polacek@redhat.com>
5713
5714 PR c/67432
5715 * c-parser.c (c_parser_enum_specifier): Give a better error for
5716 an empty enum.
5717
a79683d5
TS
57182015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5719
5720 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
5721
191a6b94
MP
57222015-08-12 Marek Polacek <polacek@redhat.com>
5723
5724 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
5725 LOC to it.
5726
420a9d9b
MP
57272015-08-03 Marek Polacek <polacek@redhat.com>
5728
5729 PR c/67088
5730 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
5731 Use it.
5732 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
5733
992118a1
PP
57342015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5735
5736 * c-parser.c (c_parser_if_body): Take token_indent_info
5737 argument. Call warn_for_misleading_indentation even when the
5738 body is a semicolon. Extract token_indent_infos corresponding
5739 to the guard, body and next tokens. Adjust call to
5740 warn_for_misleading_indentation accordingly.
5741 (c_parser_else_body): Likewise.
5742 (c_parser_if_statement): Likewise.
5743 (c_parser_while_statement): Likewise.
5744 (c_parser_for_statement): Likewise.
5745
46308474
LFSM
57462015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
5747 Manuel López-Ibáñez <manu@gcc.gnu.org>
5748
5749 * c-decl.c (get_parm_info): Remove static var. Update warning
5750 message.
5751
05b28fd6
MP
57522015-07-27 Marek Polacek <polacek@redhat.com>
5753
5754 PR c++/66555
5755 PR c/54979
5756 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
5757
451b5e48
MP
57582015-07-20 Marek Polacek <polacek@redhat.com>
5759
5760 PR c++/55095
5761 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
5762 (build_binary_op): Warn about left shift overflows.
5763
1916bcb5
AM
57642015-07-09 Andrew MacLeod <amacleod@redhat.com>
5765
5766 * c-array-notation.c: Adjust includes for flags.h changes.
5767 * c-objc-common.c: Likewise.
5768
c7131fb2
AM
57692015-07-07 Andrew MacLeod <amacleod@redhat.com>
5770
5771 * c-array-notation.c: Adjust includes.
5772 * c-aux-info.c: Likewise.
5773 * c-convert.c: Likewise.
5774 * c-decl.c: Likewise.
5775 * c-errors.c: Likewise.
5776 * c-lang.c: Likewise.
5777 * c-objc-common.c: Likewise.
5778 * c-parser.c: Likewise.
5779 * c-typeck.c: Likewise.
5780
da2e71c9
MLI
57812015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5782
5783 PR fortran/66605
5784 * c-decl.c (finish_function): Call do_warn_unused_parameter.
5785
b155cfd9
MP
57862015-06-29 Marek Polacek <polacek@redhat.com>
5787
5788 PR c/66322
5789 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5790 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
5791 about -Wswitch-bool here.
5792 (do_case): Update c_add_case_label call.
5793 (c_finish_case): Update c_do_switch_warnings call.
5794
31521951
MP
57952015-06-27 Marek Polacek <polacek@redhat.com>
5796
5797 * c-typeck.c: Use VECTOR_TYPE_P throughout.
5798
22d03525
MP
57992015-06-26 Marek Polacek <polacek@redhat.com>
5800
5801 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5802 INDIRECT_REF_P.
5803 * c-typeck.c (array_to_pointer_conversion): Likewise.
5804 (build_unary_op): Likewise.
5805 (c_finish_return): Likewise.
5806
f0889939
AM
58072015-06-25 Andrew MacLeod <amacleod@redhat.com>
5808
5809 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
5810 * c-parser.c: Likewise.
5811
8d67ee55
RS
58122015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5813
5814 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
5815 instead of pointer_hash.
5816 (detect_field_duplicates): Likewise.
5817
0ae9bd27
MP
58182015-06-25 Marek Polacek <polacek@redhat.com>
5819
5820 * c-array-notation.c: Use VAR_P throughout.
5821 * c-decl.c: Likewise.
5822 * c-objc-common.c: Likewise.
5823 * c-parser.c: Likewise.
5824 * c-typeck.c: Likewise.
5825
62f9079a
MP
58262015-06-25 Marek Polacek <polacek@redhat.com>
5827
5828 * c-decl.c: Use is_global_var throughout.
5829 * c-parser.c: Likewise.
5830 * c-typeck.c: Likewise.
5831
abb226c9
AM
58322015-06-17 Andrew MacLeod <amacleod@redhat.com>
5833
5834 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
5835 * c-aux-info.c: Likewise.
5836 * c-convert.c: Likewise.
5837 * c-decl.c: Likewise.
5838 * c-errors.c: Likewise.
5839 * c-lang.c: Likewise.
5840 * c-objc-common.c: Likewise.
5841 * c-parser.c: Likewise.
5842 * c-typeck.c: Likewise.
5843
8cbababc
JH
58442015-06-11 Jan Hubicka <hubicka@ucw.cz>
5845
5846 PR middle-end/66325
5847 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
5848 variants.
5849
a0349665
PMR
58502015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
5851
5852 * c-decl.c (pop_scope): Register the main translation unit
5853 through the new debug hook.
5854
13fdf2e2
AM
58552015-06-08 Andrew MacLeod <amacleod@redhat.com>
5856
5857 * c-array-notation.c : Adjust include files.
5858 * c-aux-info.c : Likewise.
5859 * c-convert.c : Likewise.
5860 * c-decl.c : Likewise.
5861 * c-errors.c : Likewise.
5862 * c-lang.c : Likewise.
5863 * c-lang.h : Likewise.
5864 * c-objc-common.c : Likewise.
5865 * c-parser.c : Likewise.
5866 * c-typeck.c : Likewise.
5867
d7438551
AH
58682015-06-05 Aldy Hernandez <aldyh@redhat.com>
5869
5870 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
5871 immediately clobber it.
5872 (c_write_global_declarations_1): Remove call to
5873 check_global_declaration_1.
5874 (c_write_global_declarations_2): Remove.
5875 (c_write_final_cleanups): Rename from c_write_global_declarations.
5876 Remove call to finalize_compilation_unit.
5877 Remove calls to debugging hooks.
5878 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
5879 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
5880 * c-tree.h: Remove c_write_global_declarations.
5881
ecb9f223
AM
58822015-06-04 Andrew MacLeod <amacleod@redhat.com>
5883
5884 * c-array-notation.c: Adjust includes for restructured coretypes.h.
5885 * c-aux-info.c: Likewise.
5886 * c-convert.c: Likewise.
5887 * c-decl.c: Likewise.
5888 * c-errors.c: Likewise.
5889 * c-lang.c: Likewise.
5890 * c-objc-common.c: Likewise.
5891 * c-parser.c: Likewise.
5892 * c-typeck.c: Likewise.
5893
9482b620
MP
58942015-06-04 Marek Polacek <polacek@redhat.com>
5895
5896 PR c/66341
5897 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
5898 it is a lvalue.
5899
bc51ace3
PK
59002015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5901
5902 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
5903 Warn for empty struct.
5904 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
5905
ea5b45b6
AT
59062015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
5907
5908 * c-decl.c (start_function): Call plugin before parsing.
5909 (finish_function): Call plugin after parsing.
5910
c2d47482
PK
59112015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5912
5913 PR c/49551
5914 * c-decl.c (merge_decls): Merge DECL_COMMON.
5915
a95492ab
JW
59162015-05-22 Jim Wilson <jim.wilson@linaro.org>
5917
5918 * Make-lang.in (check_gcc_pallelize): Define.
5919
fd5c817a
MP
59202015-05-22 Marek Polacek <polacek@redhat.com>
5921
5922 PR c/47043
5923 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
5924 attributes.
5925
c7b70a3c
MP
59262015-05-21 Marek Polacek <polacek@redhat.com>
5927
5928 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
5929 DECL_BUILT_IN.
5930
21b634ae
MP
59312015-05-20 Marek Polacek <polacek@redhat.com>
5932
5933 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5934 * c-typeck.c: Likewise.
5935
296a8c2f
MP
59362015-05-19 Marek Polacek <polacek@redhat.com>
5937
5938 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
5939
41b37d5e
JJ
59402015-05-19 Jakub Jelinek <jakub@redhat.com>
5941
5942 PR middle-end/66199
5943 * c-parser.c (c_parser_omp_for_loop): Don't add
5944 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
5945 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
5946 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
5947 constructs.
5948
fab27f52
MM
59492015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5950
5951 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 5952 swaps.
fab27f52 5953
40de31cf
MLI
59542015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5955
5956 PR fortran/44054
5957 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5958 accessor function.
5959
3aa3c9fc
MP
59602015-05-14 Marek Polacek <polacek@redhat.com>
5961
5962 PR c/66066
5963 PR c/66127
5964 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
5965 rather than with 0.
5966
c3388e62
DM
59672015-05-12 David Malcolm <dmalcolm@redhat.com>
5968
5969 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
5970 to add a call to warn_for_misleading_indentation.
5971 (c_parser_else_body): Likewise, adding param "else_loc".
5972 (c_parser_if_statement): Check for misleading indentation.
5973 (c_parser_while_statement): Likewise.
5974 (c_parser_for_statement): Likewise.
5975
755e528f
MP
59762015-05-08 Marek Polacek <polacek@redhat.com>
5977
5978 PR c/64918
5979 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
5980 (output_init_element): Likewise.
5981
0173bd2a
MP
59822015-05-07 Marek Polacek <polacek@redhat.com>
5983
5984 PR c/65179
5985 * c-typeck.c (build_binary_op): Warn when left shifting a negative
5986 value.
5987
9babc352
MP
59882015-04-30 Marek Polacek <polacek@redhat.com>
5989
5990 * c-typeck.c (set_init_label): Call error_at instead of error and
5991 pass LOC to it.
5992
ac9f18db
MP
5993 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
5994 the type of a decl.
5995
ec3fba51
MP
5996 * c-typeck.c (c_build_va_arg): Clarify the error message.
5997
b811915d
TS
59982015-04-29 Thomas Schwinge <thomas@codesourcery.com>
5999
6000 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6001 OMP_STANDALONE_CLAUSES.
6002
f3075008
MP
60032015-04-28 Marek Polacek <polacek@redhat.com>
6004
6005 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6006
4e81b788
MP
60072015-04-28 Marek Polacek <polacek@redhat.com>
6008
6009 PR c/65901
6010 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6011
6c1db78e
MP
60122015-04-25 Marek Polacek <polacek@redhat.com>
6013
6014 PR c/52085
6015 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6016 attribute.
6017
5c4abbb8
MP
60182015-04-23 Marek Polacek <polacek@redhat.com>
6019
6020 PR c/65345
6021 * c-decl.c (set_labels_context_r): New function.
6022 (store_parm_decls): Call it via walk_tree_without_duplicates.
6023 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6024 instead of create_tmp_var. Build TARGET_EXPR instead of
6025 COMPOUND_EXPR.
6026 (build_atomic_assign): Use create_tmp_var_raw instead of
6027 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6028
06aca1d5
IV
60292015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6030
6031 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6032 (c_parser_omp_target_update): Add missed %> to error_at ().
6033
8fba1830
BRF
60342015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6035
6036 PR target/55143
6037 * c-decl.c (c_default_pointer_mode): Remove definition.
6038 * c-tree.h (c_default_pointer_mode): Remove declaration.
6039
62021f64
TB
60402015-03-27 Tobias Burnus <burnus@net-b.de>
6041
6042 PR c/65586
6043 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6044 error out.
6045 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6046 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6047 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6048
9b65e171
JJ
60492015-03-19 Jakub Jelinek <jakub@redhat.com>
6050
6051 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6052 attribute for DECL_EXTERNAL VAR_DECLs.
6053
17958621
JJ
60542015-03-11 Jakub Jelinek <jakub@redhat.com>
6055
6056 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6057 argument.
6058
7ccb1a11
JJ
60592015-03-10 Jakub Jelinek <jakub@redhat.com>
6060
6061 PR c/65120
6062 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6063 before preparing arguments to warn_logical_not_parentheses.
6064
01177669
JJ
60652015-03-09 Jakub Jelinek <jakub@redhat.com>
6066
6067 PR c/65120
6068 * c-typeck.c (parser_build_binary_op): Don't warn for
6069 !!x == y or !b == y where b is _Bool.
6070
802ac282
MP
60712015-03-09 Marek Polacek <polacek@redhat.com>
6072
6073 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6074 * c-decl.c (grokdeclarator): Likewise.
6075 * c-typeck.c (build_binary_op): Likewise.
6076
e5165b60
MP
60772015-02-27 Marek Polacek <polacek@redhat.com>
6078
6079 PR c/65228
6080 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6081
065d214c
MP
60822015-02-14 Marek Polacek <polacek@redhat.com>
6083
6084 PR c/64768
6085 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6086 declared through a typedef name.
6087
e5d9235b
MP
60882015-02-13 Marek Polacek <polacek@redhat.com>
6089
6090 PR c/65050
6091 * c-decl.c (grokdeclarator): Print also the type when giving
6092 the error message about array's incomplete element type.
6093
fa01ffcc
JJ
60942015-02-11 Jakub Jelinek <jakub@redhat.com>
6095
6096 PR c/64824
6097 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6098 check in the POP macro.
6099
c3e38a03
MP
61002015-02-09 Marek Polacek <polacek@redhat.com>
6101
6102 PR c/64856
6103 * c-typeck.c (process_init_element): Don't always wrap
6104 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6105 initializing a range of elements.
6106
4886ec8e
JJ
61072015-02-04 Jakub Jelinek <jakub@redhat.com>
6108
6109 PR c/64824
6110 PR c/64868
6111 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6112
c3e38a03 61132015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
6114
6115 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6116 processing enum declaration.
6117
7b33f0c8
MP
61182015-01-29 Marek Polacek <polacek@redhat.com>
6119
6120 PR c/64709
6121 * c-typeck.c (pop_init_level): If constructor_elements has
6122 exactly one element with integer_zerop value, set constructor_zeroinit
6123 to 1. Remove braces around warning_init call.
6124
dea63e49
JJ
61252015-01-27 Jakub Jelinek <jakub@redhat.com>
6126
6127 PR c/64766
6128 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6129 of FUNCTION_DECLs with error_mark_node.
6130
d38f7dce
JJ
61312015-01-26 Jakub Jelinek <jakub@redhat.com>
6132
6133 PR c/64778
6134 * c-typeck.c (convert_arguments): Return -1 if there are
6135 error_args, even if we've diagnosed too many arguments.
6136
cbf5d0e7
RB
61372015-01-21 Richard Biener <rguenther@suse.de>
6138
6139 PR middle-end/64313
6140 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6141 for builtins the user declared correctly.
6142
41dbbb37
TS
61432015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6144 Bernd Schmidt <bernds@codesourcery.com>
6145 Cesar Philippidis <cesar@codesourcery.com>
6146 James Norris <jnorris@codesourcery.com>
6147 Jakub Jelinek <jakub@redhat.com>
6148 Ilmir Usmanov <i.usmanov@samsung.com>
6149
6150 * c-parser.c: Include "gomp-constants.h".
6151 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6152 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6153 Use OMP_CLAUSE_SET_MAP_KIND.
6154 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6155 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6156 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6157 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6158 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6159 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6160 "copyout", "create", "delete", "deviceptr", "gang", "host",
6161 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6162 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6163 "present_or_create", "pcreate", "seq", "self", "vector",
6164 "vector_length", "wait", "worker".
6165 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6166 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6167 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6168 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6169 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6170 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6171 (c_parser_oacc_data_clause_deviceptr)
6172 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6173 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6174 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6175 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6176 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6177 (c_parser_oacc_parallel, c_parser_oacc_update)
6178 (c_parser_oacc_wait): New functions.
6179 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6180 (c_finish_oacc_data): New prototypes.
6181 * c-typeck.c: Include "gomp-constants.h".
6182 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6183 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6184 OMP_CLAUSE_SET_MAP_KIND.
6185 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6186 (c_finish_oacc_data): New functions.
6187 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6188 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6189 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6190 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6191 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6192 GOMP_MAP_FORCE_DEVICEPTR.
6193
adfac8df
JJ
61942015-01-09 Michael Collison <michael.collison@linaro.org>
6195
6196 * c-array-notation.c: Include hash-set.h, machmode.h,
6197 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6198 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6199 * c-aux-info.c: Ditto.
6200 * c-convert.c: Ditto.
6201 * c-decl.c: Ditto.
6202 * c-errors.c: Ditto.
6203 * c-lang.c: Dittoxs.
6204 * c-objc-common.c: Ditto.
6205 * c-parser.c: Ditto.
6206 * c-typeck.c: Include hash-set.h, machmode.h,
6207 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6208 fold-const.h, wide-int.h, inchash.h, real.h and
6209 fixed-value.h due to flattening of tree.h.
6210
2cc901dc
MP
62112015-01-07 Marek Polacek <polacek@redhat.com>
6212
6213 PR c/64417
6214 * c-typeck.c (process_init_element): Disallow initialization of
6215 a flexible array member with a string constant if the structure
6216 is in an array.
6217
5624e564
JJ
62182015-01-05 Jakub Jelinek <jakub@redhat.com>
6219
e5341100
JJ
6220 PR sanitizer/64344
6221 * c-typeck.c (convert_for_assignment, c_finish_return): For
6222 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6223 types also set in_late_binary_op around convert call.
6224 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6225 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6226 result on expr as last argument to ubsan_instrument_float_cast,
6227 if in_late_binary_op, don't use c_save_expr but save_expr.
6228
5624e564
JJ
6229 Update copyright years.
6230
5bd012f8
MP
62312015-01-05 Marek Polacek <polacek@redhat.com>
6232
6233 PR c/64423
6234 * c-typeck.c (build_array_ref): Pass loc down to
6235 warn_array_subscript_with_type_char.
6236
3f8257db 62372014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6238
6239 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6240 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6241 element type.
8e745a17 6242 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6243 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6244 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6245 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6246 to PEDWARN_FOR_QUALIFIERS.
768952be 6247
8f94a8c4
JJ
62482014-12-17 Jakub Jelinek <jakub@redhat.com>
6249
6250 PR sanitizer/64289
6251 * c-convert.c: Include ubsan.h.
6252 (convert): For real -> integral casts and
6253 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6254 instead instrument the float cast directly.
6255
b731b390
JJ
62562014-11-29 Jakub Jelinek <jakub@redhat.com>
6257
6258 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6259 c_finish_stmt_expr): Remove NULL last argument from
6260 create_tmp_var_raw and create_tmp_var calls.
6261 * c-array-notation.c (fix_builtin_array_notation_fn,
6262 build_array_notation_expr, fix_conditional_array_notations_1,
6263 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6264
541e35a6
MP
62652014-11-28 Marek Polacek <polacek@redhat.com>
6266
6267 PR c/63862
6268 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6269 convert the right operand to integer type.
6270
b286be94
MP
62712014-11-25 Marek Polacek <polacek@redhat.com>
6272
6273 PR c/63877
6274 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6275 for inline functions.
6276
aa7da51a
JJ
62772014-11-21 Jakub Jelinek <jakub@redhat.com>
6278
6279 PR target/63764
6280 * c-typeck.c (build_array_ref): Adjust
6281 convert_vector_to_pointer_for_subscript caller. If it returns true,
6282 call non_lvalue_loc on the result.
6283
d876207f
RB
62842014-11-11 Richard Biener <rguenther@suse.de>
6285
6286 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6287 to true.
6288
e5e44252
AK
62892014-11-10 Andi Kleen <ak@linux.intel.com>
6290
6291 PR c/60804
6292 * c-parser.c (c_parser_statement_after_labels): Call
6293 check_no_cilk.
6294 (c_parser_if_statement): Dito.
6295 (c_parser_switch_statement): Dito.
6296 (c_parser_while_statement): Dito.
6297 (c_parser_do_statement): Dito.
6298 (c_parser_for_statement): Dito.
6299 * c-typeck.c (c_finish_loop): Dito.
6300
13c21655
PC
63012014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6302
6303 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6304 OPT_Wshift_count_overflow in the warnings.
6305
2d51fcef
MP
63062014-10-30 Marek Polacek <polacek@redhat.com>
6307
6308 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6309 print the stripped version as well, if they're not the same.
6310
ef4bddc2
RS
63112014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6312
6313 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6314 machine_mode.
6315
c582198b
AM
63162014-10-28 Andrew MacLeod <amacleod@redhat.com>
6317
6318 * c-decl.c: Adjust include files.
6319 * c-parser.c: Ditto.
6320
ddc8de03
PM
63212014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6322 Tom Tromey <tromey@redhat.com>
6323
6324 * c-tree.h (enum c_oracle_request): New.
6325 (c_binding_oracle_function): New typedef.
6326 (c_binding_oracle, c_pushtag, c_bind): Declare.
6327 * c-decl.c (c_binding_oracle): New global.
6328 (I_SYMBOL_CHECKED): New macro.
6329 (i_symbol_binding): New function.
6330 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6331 (I_TAG_CHECKED): New macro.
6332 (i_tag_binding): New function.
6333 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6334 (I_LABEL_CHECKED): New macro.
6335 (i_label_binding): New function.
6336 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6337 (c_print_identifier): Save and restore c_binding_oracle.
6338 (c_pushtag, c_bind): New functions.
6339
60393bbc
AM
63402014-10-27 Andrew MacLeod <amacleod@redhat.com>
6341
6342 * c-typeck.c: Adjust include files.
6343
d723bb7c
MLI
63442014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6345
6346 PR c++/53061
6347 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6348 initialization here...
6349 (c_initialize_diagnostics): ... but here. Set defaults after
6350 building pretty-printer.
6351
1bc5a451
MP
63522014-10-23 Marek Polacek <polacek@redhat.com>
6353
6354 PR c/63626
6355 * c-decl.c (pop_scope): Don't print warning in external_scope.
6356
4435bb92
MP
63572014-10-19 Marek Polacek <polacek@redhat.com>
6358
6359 PR c/63567
6360 * c-typeck.c (output_init_element): Allow initializing objects with
6361 static storage duration with compound literals even in C99 and add
6362 pedwarn for it.
6363
7278465e
MP
63642014-10-17 Marek Polacek <polacek@redhat.com>
6365
6366 PR c/63567
6367 * c-typeck.c (digest_init): Allow initializing objects with static
6368 storage duration with compound literals even in C99 and add pedwarn
6369 for it.
6370
d9b7be2e
MP
63712014-10-17 Marek Polacek <polacek@redhat.com>
6372
6373 PR c/63543
6374 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6375 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6376 error multiple times. Print the type.
6377
f406ae1f
MP
63782014-10-17 Marek Polacek <polacek@redhat.com>
6379
6380 PR c/63549
6381 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6382 type.
6383
92574c7c
MP
63842014-10-17 Marek Polacek <polacek@redhat.com>
6385
6386 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6387 (start_function): Use OPT_Wimplicit_int instead of 0.
6388 (store_parm_decls_oldstyle): Likewise.
6389
1bc4a978
MT
63902014-10-17 Alan Modra <amodra@gmail.com>
6391
6392 PR middle-end/61848
6393 * c-decl.c (merge_decls): Don't merge section name or tls model
6394 to newdecl symtab node, instead merge to olddecl. Override
6395 existing olddecl section name. Set tls_model for all thread-local
6396 vars, not just OMP thread-private ones. Remove incorrect comment.
6397
83685514
AM
63982014-10-16 Andrew MacLeod <amacleod@redhat.com>
6399
6400 * c-decl.c: Adjust include files.
6401
78a7c317
DD
64022014-10-14 DJ Delorie <dj@redhat.com>
6403
6404 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6405 (c_token_starts_typename): Check all __intN, not just __int128.
6406 (c_token_starts_declspecs): Likewise.
6407 (c_parser_declspecs): Likewise.
6408 (c_parser_attribute_any_word): Likewise.
6409 (c_parser_objc_selector): Likewise.
6410 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6411 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6412 is specified.
6413 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6414 __int128.
6415 (finish_declspecs): Likewise.
6416
74d98c1e
AB
64172014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6418
8e745a17 6419 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6420 the duplicate code.
8e745a17 6421 (c_parser_statement): Call the new function.
74d98c1e 6422
84937de2
MP
64232014-10-09 Marek Polacek <polacek@redhat.com>
6424
6425 PR c/63480
6426 * c-typeck.c (pop_init_level): Don't warn about initializing
6427 with { }.
6428
0382aaa0
MP
64292014-10-07 Marek Polacek <polacek@redhat.com>
6430
6431 PR c/59717
6432 * c-decl.c (header_for_builtin_fn): New function.
6433 (implicitly_declare): Suggest which header to include.
6434
7a0ca710
MP
64352014-10-07 Marek Polacek <polacek@redhat.com>
6436
6437 * c-convert.c (convert): Use error_operand_p.
6438 * c-typeck.c (require_complete_type): Likewise.
6439 (really_atomic_lvalue): Likewise.
6440 (digest_init): Likewise.
6441 (handle_omp_array_sections_1): Likewise.
6442
6bc8a126
MP
64432014-10-03 Marek Polacek <polacek@redhat.com>
6444
6445 PR c/63453
6446 * c-decl.c (pop_scope): Don't warn about "inline function declared
6447 but never defined" for functions marked with gnu_inline attribute.
6448
d90c0a59
JJ
64492014-09-25 Jakub Jelinek <jakub@redhat.com>
6450
6451 PR c++/63249
6452 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6453 on low_bound and length.
6454
083e891e
MP
64552014-09-24 Marek Polacek <polacek@redhat.com>
6456
6457 PR c/61405
6458 PR c/53874
6459 * c-parser.c: Don't define CPP_KEYWORD.
6460 (c_parser_switch_statement): Pass original type to c_finish_case.
6461 * c-tree.h (c_finish_case): Update declaration.
6462 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6463 conditionally to c_do_switch_warnings.
6464
8d95fe25
MP
64652014-09-03 Marek Polacek <polacek@redhat.com>
6466
6467 PR c/62024
6468 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6469 conversions.
6470
9a771876
JJ
64712014-09-02 Jakub Jelinek <jakub@redhat.com>
6472 Balaji V. Iyer <balaji.v.iyer@intel.com>
6473 Igor Zamyatin <igor.zamyatin@intel.com>
6474
6475 * c-parser.c (c_parser_cilk_for): New function.
6476 (c_parser_cilk_grainsize): Likewise.
6477 (c_get_temp_regvar): Likewise.
6478 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6479 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6480 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6481 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6482 case.
6483
b7679d96
CG
64842014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6485
6486 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6487 with using HOST_WIDE_INT without truncation to 'int'
6488
59ea0364
MP
64892014-08-22 Marek Polacek <polacek@redhat.com>
6490
6491 PR c++/62199
6492 * c-typeck.c (parser_build_binary_op): Adjust call to
6493 warn_logical_not_parentheses.
6494
671a475e
IZ
64952014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6496
6497 PR other/62008
6498 * c-parser.c (c_parser_array_notation): Check for correct
6499 type of an array added.
6500
04159acf
MP
65012014-08-19 Marek Polacek <polacek@redhat.com>
6502
6503 PR c++/62153
6504 * c-typeck.c (build_binary_op): If either operand of a comparison
6505 is a boolean expression, call maybe_warn_bool_compare.
6506
c77935ee
PP
65072014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6508
6509 PR c/45584
6510 * c-typeck.c (build_c_cast): Do a conversion even when the
6511 TYPE_MAIN_VARIANTs are the same.
6512
35aff4fb
MP
65132014-08-19 Marek Polacek <polacek@redhat.com>
6514
6515 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6516 pedwarn_c99 instead of pedwarn.
6517 (grokfield): Likewise.
6518 (warn_defaults_to): New function.
6519 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6520 Unconditionally call pedwarn_c99 instead of pedwarn.
6521 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6522 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6523 check flag_isoc11 before.
6524 * c-errors.c (pedwarn_c99): Change the return type to bool.
6525 Handle -Wc99-c11-compat.
6526 * c-parser.c (disable_extension_diagnostics): Handle
6527 warn_c99_c11_compat.
6528 (restore_extension_diagnostics): Likewise.
6529 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6530 instead of pedwarn, don't check flag_isoc11 before.
6531 (c_parser_declspecs): Likewise.
6532 (c_parser_alignas_specifier): Likewise.
6533 (c_parser_alignof_expression): Likewise.
6534 (c_parser_generic_selection): Likewise.
6535 * c-tree.h (pedwarn_c99): Update declaration.
6536 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6537 of pedwarn_c99.
6538
177cce46
MP
65392014-08-19 Marek Polacek <polacek@redhat.com>
6540
6541 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6542 to pedwarn_c90.
6543 * c-errors.c: Include "opts.h".
6544 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6545 * c-parser.c (disable_extension_diagnostics): Handle negative value
6546 of warn_c90_c99_compat, too.
6547 (restore_extension_diagnostics): Likewise.
6548 (c_parser_compound_statement_nostart): Pass
6549 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6550
6dc99c33
MP
65512014-08-12 Marek Polacek <polacek@redhat.com>
6552
6553 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6554 Add pedwarn.
6555 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6556 Likewise.
6557 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6558
3f8257db 65592014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6560
6561 PR c/51849
6562 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6563 Call pedwarn_c90 instead of pedwarn.
6564 (check_bitfield_type_and_width): Likewise.
6565 (declspecs_add_qual): Likewise.
6566 (declspecs_add_type): Likewise.
6567 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6568 Adjust to only call pedwarn_c90.
6569 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6570 pedwarn_c90 instead of pedwarn.
6571 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6572 * c-parser.c (disable_extension_diagnostics): Handle
6573 warn_c90_c99_compat.
6574 (restore_extension_diagnostics): Likewise.
6575 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6576 pedwarn_c90 instead of pedwarn.
6577 (c_parser_initelt): Likewise.
6578 (c_parser_postfix_expression): Likewise.
6579 (c_parser_postfix_expression_after_paren_type): Likewise.
6580 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6581 * c-tree.h: Fix formatting.
6582 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6583 pedwarn_c90 instead of pedwarn.
6584
9f25a338
TS
65852014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6586
6587 * c-typeck.c: Remove include of pointer-set.h.
6588
044331a8
MP
65892014-08-07 Marek Polacek <polacek@redhat.com>
6590
6591 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6592
b787e7a2
TS
65932014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6594
6595 * c-typeck.c: Use hash_map instead of pointer_map.
6596
6e2830c3
TS
65972014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6598
6599 * c-decl.c: Use hash_set instead of pointer_set.
6600
a7ee52fb
IZ
66012014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6602
6603 PR middle-end/61455
6604 * c-array-notation.c (expand_array_notations): Handling
6605 of DECL_EXPR added.
6606
b4dfdc11
MG
66072014-07-31 Marc Glisse <marc.glisse@inria.fr>
6608
6609 PR c++/60517
6610 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6611 a local variable.
6612
976d5a22
TT
66132014-07-30 Tom Tromey <tromey@redhat.com>
6614
6615 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6616 field.
6617 (really_start_incremental_init, push_init_level): Initialize
6618 designator_depth.
6619 (pop_init_level): Set global designator_depth.
6620 (process_init_element): Check for designated_init attribute.
6621
30281de2
MP
66222014-07-20 Marek Polacek <polacek@redhat.com>
6623
6624 PR c/61852
6625 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6626 (implicitly_declare): Pass location to implicit_decl_warning.
6627
b108f48f
JJ
66282014-07-14 Jakub Jelinek <jakub@redhat.com>
6629
6630 PR middle-end/61294
6631 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
6632 If non-NULL, call c_parser_check_literal_zero.
6633 (c_parser_check_literal_zero): New function.
6634 (c_parser_postfix_expression_after_primary): Adjust
6635 c_parser_expr_list caller, handle -Wmemset-transposed-args.
6636
773ec47f
MP
66372014-07-06 Marek Polacek <polacek@redhat.com>
6638
6639 PR c/6940
6640 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
6641 * c-tree.h (C_ARRAY_PARAMETER): Define.
6642 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
6643 function parameter.
6644
22e1cf1c 66452014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 6646 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
6647
6648 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
6649 releasing symbol.
6650
52ec0ea3
MP
66512014-07-01 Marek Polacek <polacek@redhat.com>
6652
6653 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
6654 instead of 0 to WARN_FOR_ASSIGNMENT.
6655
d5c3d343
MP
66562014-07-01 Marek Polacek <polacek@redhat.com>
6657
6658 PR c/58286
6659 * c-typeck.c (convert_for_assignment): Pass
6660 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
6661
6a7253a4
MP
66622014-06-30 Marek Polacek <polacek@redhat.com>
6663
6664 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
6665 has no_sanitize_undefined attribute.
6666
5e88a8f4
IZ
66672014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
6668
6669 PR middle-end/57541
6670 * c-array-notation.c (fix_builtin_array_notation_fn):
6671 Check for 0 arguments in builtin call. Check that bultin argument is
6672 correct.
6673 * c-parser.c (c_parser_array_notation): Check for incorrect initial
6674 index.
6675
9698b078
SH
66762014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
6677
6678 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
6679 qualifiers in __auto_type for atomic types.
6680 (c_parser_typeof_specifier): Discard all type qualifiers in
6681 __typeof__ for atomic types.
6682
6e07c515
MP
66832014-06-25 Marek Polacek <polacek@redhat.com>
6684
6685 PR c/61162
6686 * c-parser.c (c_parser_statement_after_labels): Pass the location of
6687 the return expression to c_finish_return.
6688
da6f124d
JJ
66892014-06-25 Jakub Jelinek <jakub@redhat.com>
6690
6691 * c-typeck.c (c_finish_omp_clauses): Make sure
6692 OMP_CLAUSE_LINEAR_STEP has correct type.
6693
c203e8a7
TS
66942014-06-24 Trevor Saunders <tsaunders@mozilla.com>
6695
6696 * c-decl.c: Adjust.
6697
56ad0e38
JJ
66982014-06-24 Jakub Jelinek <jakub@redhat.com>
6699
6700 * c-parser.c (c_parser_omp_for_loop): For
6701 #pragma omp parallel for simd move lastprivate clause from parallel
6702 to for rather than simd.
6703
47c2554f
MP
67042014-06-23 Marek Polacek <polacek@redhat.com>
6705
6706 * c-typeck.c (parser_build_binary_op): Don't call
6707 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
6708
56363ffd
JH
67092014-06-15 Jan Hubicka <hubicka@ucw.cz>
6710
6711 * c-parser.c (c_parser_omp_threadprivate): Likewise.
6712 * c-decl.c (merge_decls): Likewise.
6713
d7ff7ae5
MP
67142014-06-09 Marek Polacek <polacek@redhat.com>
6715
6716 PR c/36446
6717 * c-typeck.c (error_init): Call inform instead of error_at.
6718 (pedwarn_init): Call inform instead of pedwarn.
6719 (warning_init): Call inform instead of warning_at.
6720
24d047a3
JH
67212014-06-07 Jan Hubicka <hubicka@ucw.cz>
6722
6723 * c-decl.c (merge_decls): Use set_decl_section_name.
6724 (duplicate_decls): Remove node if it exists.
6725
9bac5cbb
G
67262014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
6727
6728 PR c/53119
6729 * c-typeck.c (push_init_level, process_init_element,
6730 pop_init_level): Correct check for zero initialization, move
6731 missing brace warning to respect zero initialization.
6732
8ffcdea8
MP
67332014-06-05 Marek Polacek <polacek@redhat.com>
6734
6735 PR c/56724
6736 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
6737
742938c9
MP
67382014-06-05 Marek Polacek <polacek@redhat.com>
6739
6740 PR c/49706
6741 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 6742 on the left hand side operand of a comparison.
742938c9 6743
6447c55d
MP
67442014-06-05 Marek Polacek <polacek@redhat.com>
6745
6746 PR c/48062
6747 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
6748 Print note only if the warning was printed.
6749
9dc7743c
IZ
67502014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
6751
6752 PR c/58942
6753 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
6754 with a pointer.
6755
fedfecef
MP
67562014-06-03 Marek Polacek <polacek@redhat.com>
6757
6758 PR c/60439
6759 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
6760 c_start_case.
6761 * c-tree.h (c_start_case): Update.
6762 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
6763 switch condition has boolean value.
6764
9b2b7279
AM
67652014-06-02 Andrew MacLeod <amacleod@redhat.com>
6766
6767 * c-decl.c: Include builtins.h.
6768 * c-parser.c: Likewise.
6769
5c1bc275
MP
67702014-05-27 Marek Polacek <polacek@redhat.com>
6771
6772 PR c/56724
6773 * c-typeck.c (convert_arguments): Get location of a parameter. Change
6774 error and warning calls to error_at and warning_at. Pass location of
6775 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
6776 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
6777 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
6778
97563bc8
IZ
67792014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
6780
6781 PR c/61191
6782 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
6783 function parameters.
6784
aede2c10
JH
67852014-05-23 Jan Hubicka <hubicka@ucw.cz>
6786
6787 * c-decl.c (merge_decls): Preserve symtab node pointers.
6788 (duplicate_decls): Free new decl.
6789
edbba2ce
TS
67902014-05-23 Thomas Schwinge <thomas@codesourcery.com>
6791
f3316c6d
TS
6792 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
6793 initialization.
6794
edbba2ce
TS
6795 * c-parser.c (c_parser_omp_target): Return bool values.
6796
68c81f24
TS
67972014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6798
6799 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
6800 num_teams_loc variable to num_thread_limit_loc.
6801
632f2871
RS
68022014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6803
6804 * c-array-notation.c (expand_array_notations): Use void_node
6805 instead of void_zero_node.
6806
766090c2
TS
68072014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6808
6809 * c-decl.c (finish_struct): Adjust.
6810 (finish_enum): Likewise.
6811 (bind): Adjust.
6812 (record_inline_static): Likewise.
6813 (push_scope): Likewise.
6814 (make_label): Likewise.
6815 (lookup_label_for_goto): Likewise.
6816 (finish_struct): Likewise.
6817 (finish_enum): Likewise.
6818 (store_parm_decls): Likewise.
6819 (c_push_function_context): Likewise.
6820 * c-lang.h: Remove usage of variable_size gty attribute.
6821 * c-parser.c (c_parse_init): Adjust.
6822 (c_parse_file): Likewise.
6823
2b107f6b
MP
68242014-05-13 Marek Polacek <polacek@redhat.com>
6825
6826 PR c/61162
6827 * c-typeck.c (convert_for_assignment): Pass location to
6828 WARN_FOR_ASSIGNMENT instead of input_location.
6829
d033409e
MP
68302014-05-10 Marek Polacek <polacek@redhat.com>
6831
6832 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
6833 maybe_warn_string_init.
6834 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
6835 maybe_warn_string_init.
6836 * c-tree.h (maybe_warn_string_init): Update declaration.
6837 * c-typeck.c (maybe_warn_string_init): Add location parameter.
6838 Call pedwarn_init with loc instead of with input_location.
6839 (digest_init): Pass init_loc to maybe_warn_string_init.
6840 (pop_init_level): Call pedwarn_init with loc instead of with
6841 input_location.
6842 (set_init_index): Likewise.
6843 (process_init_element): Likewise.
6844
ea58ef42
MP
68452014-05-09 Marek Polacek <polacek@redhat.com>
6846
6847 PR c/61096
6848 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
6849 (c_parser_initelt): Pass location to set_init_label. Pass array index
6850 location to set_init_index.
6851 * c-tree.h (push_init_level): Update declaration.
6852 (pop_init_level): Likewise.
6853 (set_init_index): Likewise.
6854 (set_init_label): Likewise.
6855 * c-typeck.c (error_init): Add location parameter. Call error_at
6856 instead of error.
6857 (digest_init): Pass init_loc to error_init.
6858 (really_start_incremental_init):
6859 (push_init_level): Add location parameter. Pass loc to pop_init_level
6860 and error_init.
6861 (pop_init_level): Likewise.
6862 (set_designator): Add location parameter. Pass loc to pop_init_level,
6863 push_init_level, and error_init.
6864 (set_init_index): Add location parameter. Pass loc to error_init and
6865 set_designator.
6866 (set_init_label): Likewise.
6867 (output_init_element): Pass loc to error_init.
6868 (process_init_element): Pass loc to error_init, pop_init_level,
6869 pedwarn_init, and push_init_level.
6870
661a0813
MP
68712014-05-09 Marek Polacek <polacek@redhat.com>
6872
6873 PR c/50459
6874 * c-parser.c (c_parser_attributes): Parse the arguments as an
6875 expression-list if the attribute takes identifier.
6876
2793eeab
MP
68772014-05-08 Marek Polacek <polacek@redhat.com>
6878
6879 PR c/61053
6880 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
6881 TYPE_ALIGN_UNIT.
6882
f827930a
MP
68832014-05-08 Marek Polacek <polacek@redhat.com>
6884
6885 PR c/61077
6886 * c-decl.c (start_function): Warn for _Atomic-qualified return type
6887 of main.
6888
1d60af08
KZ
68892014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6890 Mike Stump <mikestump@comcast.net>
6891 Richard Sandiford <rdsandiford@googlemail.com>
6892
6893 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
6894 (finish_enum): Use wide-int interfaces.
6895 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
6896 * c-typeck.c (build_c_cast): Likewise.
6897 (set_nonincremental_init_from_string): Likewise.
6898 (c_tree_equal): Likewise.
6899
a0e24419
MP
69002014-05-02 Marek Polacek <polacek@redhat.com>
6901
6902 PR c/25801
6903 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
6904 Return size_one_node when the type is not complete.
6905 (pointer_diff): Remove comment.
6906 (build_unary_op): Improve error messages.
6907
19fc9faa
MP
69082014-05-02 Marek Polacek <polacek@redhat.com>
6909
6910 * c-typeck.c (c_finish_return): Separate warning_at calls.
6911
63bc4e87
MP
69122014-05-02 Marek Polacek <polacek@redhat.com>
6913
6914 * c-tree.h (error_init): Remove declaration.
6915 (pedwarn_init): Likewise.
6916 * c-typeck.c (error_init): Make static and move above.
6917 (pedwarn_init): Likewise.
6918 (warning_init): Move above.
6919 (maybe_warn_string_init): Likewise.
6920
4bd2511b
JL
69212014-05-01 Jeff Law <law@redhat.com>
6922
6923 Revert:
6924
6925 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
6926 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
6927 avoid goto.
6928
6a358dcb
MP
69292014-05-02 Marek Polacek <polacek@redhat.com>
6930
6931 PR c/60784
6932 * c-typeck.c (push_init_level): Set constructor_designated to
6933 p->designated for structures.
6934
ae5ebda4
MP
69352014-05-01 Marek Polacek <polacek@redhat.com>
6936
6937 PR c/60915
6938 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
6939 function-definition has an attribute after the declarator.
6940
96b40f8d
MP
69412014-05-01 Marek Polacek <polacek@redhat.com>
6942
6943 PR c/60257
6944 * c-typeck.c (warning_init): Add location_t parameter. Call
6945 warning_at instead of warning.
6946 (push_init_level): Pass input_location to warning_init.
6947 (add_pending_init): Add location_t parameter. Pass loc to
6948 warning_init.
6949 (set_nonincremental_init): Pass input_location to add_pending_init.
6950 (set_nonincremental_init_from_string): Likewise.
6951 (output_init_element): Pass loc to warning_init and to
6952 add_pending_init.
6953
32e00768
MP
69542014-05-01 Marek Polacek <polacek@redhat.com>
6955
6956 PR c/43395
6957 * c-typeck.c (c_finish_return): Distinguish between label and variable
6958 when warning about returning local address.
6959
c9379ce2
MP
69602014-05-01 Marek Polacek <polacek@redhat.com>
6961
6962 PR c/29467
6963 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
6964 in C89 mode.
6965
d00887e8
MP
69662014-05-01 Marek Polacek <polacek@redhat.com>
6967
6968 PR c/43245
6969 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
6970 instead of 0 to WARN_FOR_QUALIFIERS.
6971
5436fa2e
MP
69722014-05-01 Marek Polacek <polacek@redhat.com>
6973
6974 PR c/56989
6975 * c-typeck.c (default_conversion): Use better location for
6976 error call.
6977
f8ed5150
MP
69782014-04-30 Marek Polacek <polacek@redhat.com>
6979
6980 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
6981 also when SANITIZE_FLOAT_DIVIDE is on.
6982
8337d1db
MP
69832014-04-30 Marek Polacek <polacek@redhat.com>
6984
6985 PR c/60139
6986 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
6987 and pedwarn_init. Use loc insted of input_location.
6988
c4bdc42f
MP
69892014-04-30 Marek Polacek <polacek@redhat.com>
6990
6991 PR c/60351
6992 * c-typeck.c (build_binary_op): Use location when warning about
6993 shift count.
6994
45484dcf
MP
69952014-04-25 Marek Polacek <polacek@redhat.com>
6996
6997 PR c/18079
6998 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
6999 always_inline/noinline and hot/cold attributes.
7000
34cf811f
MP
70012014-04-25 Marek Polacek <polacek@redhat.com>
7002
7003 PR c/60114
7004 * c-parser.c (c_parser_initelt): Pass input_location to
7005 process_init_element.
7006 (c_parser_initval): Pass loc to process_init_element.
7007 * c-tree.h (process_init_element): Adjust declaration.
7008 * c-typeck.c (push_init_level): Pass input_location to
7009 process_init_element.
7010 (pop_init_level): Likewise.
7011 (set_designator): Likewise.
7012 (output_init_element): Add location_t parameter. Pass loc to
7013 digest_init.
7014 (output_pending_init_elements): Pass input_location to
7015 output_init_element.
7016 (process_init_element): Add location_t parameter. Pass loc to
7017 output_init_element.
7018
42056eac
JJ
70192014-04-24 Jakub Jelinek <jakub@redhat.com>
7020
7021 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7022 atomic-clause, allow comma in between atomic-clause and
7023 seq_cst.
7024
e162a134
JJ
70252014-04-22 Jakub Jelinek <jakub@redhat.com>
7026
7027 PR c/59073
7028 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7029 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7030
2f6babac
IZ
70312014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7032
7033 PR middle-end/60469
7034 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7035 create_tmp_var instead build_decl for creating temps.
7036 (build_array_notation_expr): Likewise.
7037 (fix_conditional_array_notations_1): Likewise.
7038 (fix_array_notation_expr): Likewise.
7039 (fix_array_notation_call_expr): Likewise.
7040
8edbfaa6
JJ
70412014-03-28 Jakub Jelinek <jakub@redhat.com>
7042
7043 PR c++/60689
7044 * c-tree.h (c_build_function_call_vec): New prototype.
7045 * c-typeck.c (build_function_call_vec): Don't call
7046 resolve_overloaded_builtin here.
7047 (c_build_function_call_vec): New wrapper function around
7048 build_function_call_vec. Call resolve_overloaded_builtin here.
7049 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7050 Call c_build_function_call_vec instead of build_function_call_vec.
7051 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7052 * c-decl.c (finish_decl): Likewise.
7053
7485aeea
MLI
70542014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7055
7056 PR c/55383
7057 * c-typeck.c: Use correct format string in cast-qual warning
7058
b17a8b07
TS
70592014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7060
7061 * c-decl.c (c_decl_attributes): Use
7062 lang_hooks.types.omp_mappable_type.
7063 * c-typeck.c (c_finish_omp_clauses): Likewise.
7064
3af9c5e9
MP
70652014-03-06 Marek Polacek <polacek@redhat.com>
7066
7067 PR c/60197
7068 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7069 of checking tree code.
7070
1c9f5f33
PK
70712014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7072
7073 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7074 (c_parser_parameter_declaration): Likewise.
7075
cc28fc7f
MP
70762014-02-19 Marek Polacek <polacek@redhat.com>
7077
7078 PR c/60195
7079 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7080 Call mark_exp_read on exp.value.
7081 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7082 TREE_ADDRESSABLE on old instead of val.
7083 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7084
b581c05c
PK
70852014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7086
7087 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7088 C_EXPR_APPEND by vec_safe_push.
7089 * c-tree.h (C_EXPR_APPEND): Remove.
7090
81e5eca8
MP
70912014-01-31 Marek Polacek <polacek@redhat.com>
7092
7093 PR c/59963
7094 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7095 build_function_call_vec.
7096 (build_function_call): Likewise.
7097 (build_atomic_assign): Likewise.
7098 (build_function_call_vec): Add arg_loc parameter. Use it.
7099 (convert_arguments): Likewise.
7100 (convert_for_assignment): Rename rhs_loc to expr_loc.
7101 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7102 (c_parser_objc_keywordexpr): Likewise.
7103 (c_parser_postfix_expression_after_primary): Call
7104 build_function_call_vec with expr_loc rather than op_loc.
7105 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7106 build_function_call_vec.
7107 (c_parser_expr_list): Add locations parameter. Fill it with locations
7108 of function arguments.
7109 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7110
68fca595
MP
71112014-01-30 Marek Polacek <polacek@redhat.com>
7112
7113 PR c/59940
7114 * c-typeck.c (build_function_call_vec): Use loc parameter.
7115 (convert_arguments): Add location parameter. Use it.
7116 (ep_convert_and_check): Likewise.
7117 (build_atomic_assign): Adjust convert_for_assignment call.
7118 (build_modify_expr): Likewise.
7119 (digest_init): Likewise.
7120 (c_finish_return): Likewise.
7121 (build_conditional_expr): Adjust ep_convert_and_check calls.
7122 (convert_for_assignment): Add rhs_loc parameter. Use it.
7123 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7124 calls.
7125
fa337f3a
RB
71262014-01-30 Richard Biener <rguenther@suse.de>
7127
7128 PR c/59905
7129 * c-typeck.c (build_function_call_vec): Do not replace calls
7130 to a function via an incompatible type with a runtime abort.
7131
b72271b9
BI
71322014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7133
7134 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7135 flag_enable_cilkplus with flag_cilkplus.
7136 (c_parser_direct_declarator_inner): Likewise.
7137 (c_parser_attribute_any_word): Likewise.
7138 (c_parser_attributes): Likewise.
7139 (c_parser_compound_statement): Likewise.
7140 (c_parser_statement_after_labels): Likewise.
7141 (c_parser_if_statement): Likewise.
7142 (c_parser_switch_statement): Likewise.
7143 (c_parser_do_statement): Likewise.
7144 (c_parser_for_statement): Likewise.
7145 (c_parser_unary_expression): Likewise.
7146 (c_parser_postfix_expression): Likewise.
7147 (c_parser_postfix_expression_after_primary): Likewise.
7148 (c_parser_postfix_expression_after_primary): Likewise.
7149 (c_parser_omp_clause_name): Likewise.
7150 (c_finish_omp_declare_simd): Likewise.
7151 (c_parser_cilk_verify_simd): Likewise.
7152 * c-typeck.c (build_array_ref): Likewise.
7153 (build_function_call_vec): Likewise.
7154 (convert_arguments): Likewise.
7155 (build_compound_expr): Likewise.
7156 (c_finish_return): Likewise.
7157 (c_finish_if_stmt): Likewise.
7158 (c_finish_loop): Likewise.
7159 (build_binary_op): Likewise.
7160
393e8e8b
MP
71612014-01-23 Marek Polacek <polacek@redhat.com>
7162
7163 PR c/59846
7164 * c-typeck.c (parser_build_binary_op): Use location instead of
7165 input_location.
7166 (build_binary_op): Pass location to shorten_compare.
7167
f04dda30
MP
71682014-01-23 Marek Polacek <polacek@redhat.com>
7169
7170 PR c/58346
7171 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7172 an empty aggregate.
7173
789eadcd
MP
71742014-01-23 Marek Polacek <polacek@redhat.com>
7175
7176 PR c/59871
7177 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7178 of a comma expression.
7179 (emit_side_effect_warnings): Likewise.
7180
40f14e9f
BI
71812014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7182
7183 PR c/59825
7184 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7185 function to use walk_tree and moved a lot of its functionality to
7186 expand_array_notations.
7187 (expand_array_notations): New function.
7188
74558dd9
BI
71892014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7190
7191 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7192 attribute an attribute without value.
7193
652fea39
JJ
71942014-01-23 Jakub Jelinek <jakub@redhat.com>
7195
7196 PR middle-end/58809
7197 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7198 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7199
f34f1c87
MP
72002014-01-22 Marek Polacek <polacek@redhat.com>
7201
7202 PR c/59891
7203 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7204 of remove_c_maybe_const_expr on op1 and op2.
7205
241f845a
JJ
72062014-01-15 Jakub Jelinek <jakub@redhat.com>
7207
7208 PR c/58943
7209 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7210 effects, preevaluate rhs using SAVE_EXPR first.
7211
9a74f20c
BI
72122014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7213
7214 PR c++/59631
7215 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7216 statements with if-elseif statements.
7217
96066ce1
MP
72182014-01-06 Marek Polacek <polacek@redhat.com>
7219
7220 PR c/57773
7221 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7222 defined bit-field types only in ISO C.
7223
23a5b65a
RS
72242014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7225
7226 Update copyright years
7227
f9030485
RS
72282014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7229
7230 * c-array-notation.c: Use the standard form for the copyright notice.
7231
41958c28
BI
72322013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7233
7234 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7235 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7236 field in parser is not empty. If not-empty, call the function
7237 c_parser_finish_omp_declare_simd.
7238 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7239 between SIMD-enabled functions and #pragma simd. Added new parameter.
7240 (c_parser_cilk_all_clauses): Modified the usage of the function
7241 c_parser_cilk_clause_vectorlength as mentioned above.
7242 (c_parser_cilk_simd_fn_vector_attrs): New function.
7243 (c_finish_cilk_simd_fn_tokens): Likewise.
7244 (is_cilkplus_vector_p): Likewise.
7245 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7246 "nomask," and "mask" strings in clause name.
7247 (c_parser_omp_all_clauses): Added 3 new case statements:
7248 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7249 PRAGMA_CILK_CLAUSE_NOMASK.
7250 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7251 check for vector attribute and if so call the function
7252 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7253 called the function c_finish_cilk_simd_fn_tokens.
7254 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7255 parser field is non-empty. If so, parse them as you would parse
7256 the omp declare simd pragma.
7257 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7258 Added a check when step is a parameter and flag it as error.
7259 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7260 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7261 pragma_omp_clause.
7262
cef0fd0e
TS
72632013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7264
7265 * c-parser.c (c_parser_omp_parallel): Fix description.
7266
12893402
BI
72672013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7268
7269 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7270 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7271 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7272 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7273
296674db
JM
72742013-12-04 Joseph Myers <joseph@codesourcery.com>
7275
7276 PR c/52023
7277 * c-parser.c (c_parser_alignas_specifier): Use
7278 c_sizeof_or_alignof_type instead of c_alignof.
7279 (c_parser_alignof_expression): Likewise, with min_alignof
7280 parameter depending on alignof spelling used.
7281
edd28054
MP
72822013-12-04 Marek Polacek <polacek@redhat.com>
7283
7284 PR c/54113
7285 * c-decl.c (start_function): Don't warn for missing prototype for
7286 inline functions.
7287
da0fc454
MP
72882013-12-03 Marek Polacek <polacek@redhat.com>
7289
7290 PR c/59351
7291 * c-decl.c (build_compound_literal): Allow compound literals with
7292 empty initial value.
7293
4c2ecab0
JM
72942013-12-02 Joseph Myers <joseph@codesourcery.com>
7295
7296 PR c/58235
7297 * c-typeck.c (build_modify_expr): Diagnose assignment to
7298 expression with array type.
7299
340baef7
JM
73002013-11-29 Joseph Myers <joseph@codesourcery.com>
7301
7302 PR c/42262
7303 * c-typeck.c (process_init_element): Do not treat a string as
7304 initializing a whole array when used with a designator for an
7305 individual element.
7306
6763b9f7
JM
73072013-11-29 Joseph Myers <joseph@codesourcery.com>
7308
7309 PR c/57574
7310 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7311 an inline function following a static declaration.
7312
e7bd1de1
JJ
73132013-11-28 Jakub Jelinek <jakub@redhat.com>
7314
7315 PR c/59310
7316 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7317 to p_name before calling c_parser_omp_teams instead of after.
7318 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7319 argument. Remove unused p_name variable.
7320
0136f8f0
AH
73212013-11-27 Aldy Hernandez <aldyh@redhat.com>
7322 Jakub Jelinek <jakub@redhat.com>
7323
7324 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7325 external_scope is NULL.
7326
241b71bb
TV
73272013-11-27 Tom de Vries <tom@codesourcery.com>
7328 Marc Glisse <marc.glisse@inria.fr>
7329
7330 PR c++/59032
7331 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7332
2fb9a547
AM
73332013-11-22 Andrew MacLeod <amacleod@redhat.com>
7334
7335 * c-typeck.c: Add required include files from gimple.h.
7336
8400e75e
DM
73372013-11-22 David Malcolm <dmalcolm@redhat.com>
7338
7339 * c-decl.c (define_label, shadow_tag_warned)
7340 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7341 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7342 (declspecs_add_type): Remove use of in_system_header macro.
7343 * c-parser.c (c_parser_unary_expression): Likewise.
7344 * c-typeck.c (store_init_value, process_init_element)
7345 (c_start_case): Likewise.
7346
7347 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7348 macro.
7349
7350 * c-parser.c (c_parser_set_source_position_from_token): Remove
7351 reference to in_system_header from comment.
7352
386b1f1f
RS
73532013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7354
7355 * c-decl.c (grokdeclarator): Update comment to refer to
7356 tree_to_[su]hwi rather than tree_low_cst.
7357
ae7e9ddd
RS
73582013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7359
7360 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7361 tree_to_uhwi throughout.
7362
9439e9a1
RS
73632013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7364
7365 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7366 throughout.
7367
9541ffee
RS
73682013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7369
7370 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7371 throughout.
7372
c02065fc
AH
73732013-11-15 Aldy Hernandez <aldyh@redhat.com>
7374
7375 * c-parser.c (c_parser_cilk_simd): New.
7376 (c_parser_cilk_verify_simd): New.
7377 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7378 (c_parser_omp_for_loop): Add case for NE_EXPR.
7379 Set c_break_label for CILK_SIMD.
7380 (c_parser_cilk_clause_vectorlength): New.
7381 (c_parser_cilk_clause_linear): New.
7382 (c_parser_cilk_clause_name): New.
7383 (c_parser_cilk_all_clauses): New.
7384 * c-typeck.c (build_unary_op): Pass location argument to
7385 readonly_error.
7386 (build_modify_expr): Same.
7387 (build_asm_expr): Same.
7388 (c_finish_bc_stmt): Error on break/continue in loops.
7389
18f429e2
AM
73902013-11-14 Andrew MacLeod <amacleod@redhat.com>
7391
7392 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7393
d8a2d370
DN
73942013-11-14 Diego Novillo <dnovillo@google.com>
7395
7396 * c-decl.c: Include print-tree.h.
7397 Include stor-layout.h.
7398 Include varasm.h.
7399 Include attribs.h.
7400 Include stringpool.h.
7401 * c-lang.c: Include fold-const.h.
7402 * c-parser.c: Include stringpool.h.
7403 Include attribs.h.
7404 Include stor-layout.h.
7405 Include varasm.h.
7406 Include trans-mem.h.
7407 * c-typeck.c: Include stor-layout.h.
7408 Include trans-mem.h.
7409 Include varasm.h.
7410 Include stmt.h.
7411
38b7bc7f
JM
74122013-11-13 Joseph Myers <joseph@codesourcery.com>
7413
7414 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7415 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7416 __auto_type.
7417 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7418 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7419 RID_AUTO_TYPE.
7420 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7421 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7422 (c_parser_declarator, c_parser_direct_declarator_inner)
7423 (c_parser_parameter_declaration, c_parser_type_name): All callers
7424 changed.
7425 (c_parser_declaration_or_fndef): Handle declarations with type
7426 determined from the initializer.
7427
45b0be94
AM
74282013-11-12 Andrew MacLeod <amacleod@redhat.com>
7429
18f429e2 7430 * c-typeck.c: Include gimplify.h.
45b0be94 7431
582d9b50
JM
74322013-11-12 Joseph Myers <joseph@codesourcery.com>
7433
7434 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7435 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7436 comment.
7437 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7438 or _Thread_local as appropriate in diagnostics.
7439 (build_null_declspecs): Initialize ret->thread_gnu_p.
7440 (declspecs_add_scspec): Handle either __thread or _Thread_local
7441 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7442 pedantic. Do not disallow _Thread_local extern and _Thread_local
7443 static.
7444
267bac10
JM
74452013-11-07 Joseph Myers <joseph@codesourcery.com>
7446 Andrew MacLeod <amacleod@redhat.com>
7447
7448 * c-aux-info.c (gen_type): Handle atomic qualifier.
7449 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7450 qualifiers when compating types.
7451 (shadow_tag_warned): Handle atomic_p in declspecs.
7452 (quals_from_declspecs): Likewise.
7453 (start_decl): Use c_type_promotes_to when promoting argument
7454 types.
7455 (grokdeclarator): Handle _Atomic.
7456 (get_parm_info): Diagnose any qualifier on "void" as only
7457 parameter.
7458 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7459 comparing types. Use c_type_promotes_to when promoting argument
7460 types.
7461 (finish_function): Use c_type_promotes_to when promoting argument
7462 types.
7463 (build_null_declspecs): Handle atomic_p in declspecs.
7464 (declspecs_add_qual): Handle RID_ATOMIC.
7465 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7466 (c_token_starts_declspecs): Handle RID_ATOMIC.
7467 (c_parser_declspecs): Handle atomic type specifiers and
7468 qualifiers.
7469 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7470 from types of expressions with atomic type.
7471 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7472 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7473 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7474 (c_parser_statement_after_labels, c_parser_switch_statement)
7475 (c_parser_for_statement, c_parser_expr_no_commas)
7476 (c_parser_conditional_expression, c_parser_binary_expression)
7477 (c_parser_cast_expression, c_parser_unary_expression)
7478 (c_parser_postfix_expression)
7479 (c_parser_postfix_expression_after_primary, c_parser_expression):
7480 Use convert_lvalue_to_rvalue.
7481 (c_parser_expression_conv, c_parser_expr_list): Document
7482 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7483 (c_parser_objc_synchronized_statement): Use
7484 convert_lvalue_to_rvalue.
7485 (c_parser_objc_selector): Handle RID_ATOMIC.
7486 (c_parser_objc_receiver, c_parser_array_notation): Use
7487 convert_lvalue_to_rvalue.
7488 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7489 _Atomic (type-name).
7490 (struct c_declspecs): Add atomic_p field.
7491 (convert_lvalue_to_rvalue): Declare.
7492 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7493 corresponding atomic types.
7494 (qualify_type): Don't add _Atomic qualifiers from second argument.
7495 (comp_target_types): Do not allow _Atomic mismatches.
7496 (type_lists_compatible_p): Do not remove atomic qualifiers when
7497 comparing types.
7498 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7499 (build_atomic_assign): New functions.
7500 (build_unary_op): Use build_atomic_assign for atomic increment and
7501 decrement.
7502 (build_conditional_expr): Do not treat _Atomic void as a qualified
7503 version of void.
7504 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7505 (find_anonymous_field_with_type, convert_to_anonymous_field)
7506 (convert_for_assignment): Do not remove atomic qualifiers when
7507 comparing types.
7508 (digest_init): Do not accept initialization of arrays of atomic
7509 elements by string constants.
7510 (build_asm_expr): Use convert_lvalue_to_rvalue.
7511 (build_binary_op): Do not treat _Atomic void as a qualified
7512 version of void.
7513
0c249d4b
DD
75142013-11-06 DJ Delorie <dj@redhat.com>
7515
7516 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7517 both explicit and builtin, print the location of the explicit one.
7518
6d7f7e0a
TB
75192013-11-05 Tobias Burnus <burnus@net-b.de>
7520
7521 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7522 c_parser_omp_distribute, c_parser_omp_teams,
7523 c_parser_omp_target, c_parser_omp_declare): Handle
7524 -fopenmp-simd.
7525
b906f4ca
MP
75262013-11-03 Marek Polacek <polacek@redhat.com>
7527
7528 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7529
ee1d5a02
JJ
75302013-11-01 Jakub Jelinek <jakub@redhat.com>
7531
7532 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7533 check_dup_generic at the end, unless remove is true.
7534 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7535 remove = true;.
7536 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7537
5a9785fb
JJ
75382013-10-31 Jakub Jelinek <jakub@redhat.com>
7539
7540 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7541 with decl that is not pointer nor array.
7542
939b37da
BI
75432013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7544
7545 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7546 a spawning function is found.
7547 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7548 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7549 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7550 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7551 case.
7552 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7553 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7554 expr.
7555 (c_finish_return): Added a check to reject _Cilk_spawn in return
7556 expression.
7557 (build_cilk_spawn): New function.
7558 (build_cilk_sync): Likewise.
7559 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7560
d4af74d4
TB
75612013-10-27 Tobias Burnus <burnus@net-b.de>
7562
7563 PR other/33426
7564 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7565 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7566 (c_parser_statement_after_labels): Update calls.
7567
d73749df 75682013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7569
7570 PR other/33426
7571 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7572 Handle PRAGMA_IVDEP.
7573 (c_parser_statement_after_labels): Update call.
7574
f28aa681
MP
75752013-10-24 Marek Polacek <polacek@redhat.com>
7576
7577 * c-parser.c (c_parser_struct_declaration): Add a comment.
7578 (c_parser_declarator): Don't allow _Alignas here.
7579
0645c1a2
AM
75802013-10-17 Andrew MacLeod <amacleod@redhat.com>
7581
7582 * c-parser.c: Include omp-low.h.
7583 * c-typeck.c: Likewise.
7584
568a31f2
MP
75852013-10-17 Marek Polacek <polacek@redhat.com>
7586
7587 PR c/58267
7588 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7589 Document syntax of the array-declarator.
7590 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7591 are not permitted.
7592 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7593 (c_parser_struct_declaration): Likewise.
7594 (c_parser_declarator): Likewise.
7595 (c_parser_direct_declarator_inner): Likewise.
7596 (c_parser_parameter_declaration): Likewise.
7597 (c_parser_type_name): Likewise.
7598
acf0174b
JJ
75992013-10-11 Jakub Jelinek <jakub@redhat.com>
7600
7601 * c-lang.h (current_omp_declare_target_attribute): New extern
7602 decl.
7603 * c-parser.c: Include c-lang.h.
7604 (struct c_parser): Change tokens to c_token *.
7605 Add tokens_buf field. Change tokens_avail type to unsigned int.
7606 (c_parser_consume_token): If parser->tokens isn't
7607 &parser->tokens_buf[0], increment parser->tokens.
7608 (c_parser_consume_pragma): Likewise.
7609 (enum pragma_context): Add pragma_struct and pragma_param.
7610 (c_parser_external_declaration): Adjust
7611 c_parser_declaration_or_fndef caller.
7612 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7613 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7614 Adjust recursive call.
7615 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7616 of pragma_external.
7617 (c_parser_parameter_declaration): Use pragma_param instead of
7618 pragma_external.
7619 (c_parser_compound_statement_nostart, c_parser_label,
7620 c_parser_for_statement): Adjust
7621 c_parser_declaration_or_fndef callers.
7622 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7623 it through to c_parser_conditional_expression.
7624 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7625 pass it through to c_parser_binary_expression. Adjust recursive
7626 call.
7627 (c_parser_binary_expression): Remove prec argument, add
7628 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
7629 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
7630 binop matches it, use build2 instead of parser_build_binary_op.
7631 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
7632 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
7633 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
7634 Handle pragma_struct and pragma_param the same as pragma_external.
7635 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
7636 (c_parser_omp_variable_list): Parse array sections for
7637 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
7638 (c_parser_omp_clause_collapse): Fully fold collapse expression.
7639 (c_parser_omp_clause_reduction): Handle user defined reductions.
7640 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
7641 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
7642 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
7643 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
7644 c_parser_omp_clause_depend, c_parser_omp_clause_map,
7645 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
7646 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
7647 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
7648 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
7649 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
7650 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
7651 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
7652 (c_parser_omp_for_loop): Add CODE argument, pass it through
7653 to c_finish_omp_for. Change last argument to cclauses,
7654 and adjust uses to grab parallel clauses from the array of all
7655 the split clauses. Adjust c_parser_binary_expression,
7656 c_parser_declaration_or_fndef and c_finish_omp_for callers.
7657 (omp_split_clauses): New function.
7658 (c_parser_omp_simd): New function.
7659 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
7660 Allow the function to be called also when parsing combined constructs,
7661 and call c_parser_omp_simd when parsing for simd.
7662 (c_parser_omp_sections_scope): If section-sequence doesn't start with
7663 #pragma omp section, require exactly one structured-block instead of
7664 sequence of statements.
7665 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
7666 Allow the function to be called also when parsing combined constructs.
7667 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
7668 Allow the function to be called also when parsing combined
7669 constructs.
7670 (c_parser_omp_taskgroup, c_parser_omp_cancel,
7671 c_parser_omp_cancellation_point, c_parser_omp_distribute,
7672 c_parser_omp_teams, c_parser_omp_target_data,
7673 c_parser_omp_target_update, c_parser_omp_target,
7674 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
7675 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
7676 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
7677 (c_parser_omp_construct): Add p_name and mask vars. Handle
7678 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
7679 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
7680 and c_parser_omp_sections callers.
7681 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
7682 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
7683 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
7684 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
7685 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
7686 OMP_CLAUSE_DEPEND.
7687 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
7688 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
7689 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
7690 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
7691 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
7692 * c-typeck.c: Include tree-inline.h.
7693 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
7694 handle_omp_array_sections_1, handle_omp_array_sections,
7695 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
7696 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
7697 user defined reductions.
7698 (c_tree_equal): New function.
7699 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
7700 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
7701 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
7702 c_check_omp_declare_reduction_r): New prototypes.
7703 * c-decl.c (current_omp_declare_target_attribute): New variable.
7704 (c_decl_attributes): New function.
7705 (start_decl, start_function): Use it instead of decl_attributes.
7706 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
7707 c_omp_reduction_decl, c_omp_reduction_lookup,
7708 c_check_omp_declare_reduction_r): New functions.
7709
0a6c2227
TT
77102013-09-25 Tom Tromey <tromey@redhat.com>
7711
7712 * Make-lang.in (c/gccspec.o): Remove.
7713 (CFLAGS-c/gccspec.o): New variable.
7714 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
7715 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7716 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
7717
f3bc55f0
TT
77182013-09-25 Tom Tromey <tromey@redhat.com>
7719
7720 * Make-lang.in (c/gccspec.o): Don't use subshell.
7721
a24d975c
MP
77222013-09-18 Marek Polacek <polacek@redhat.com>
7723
7724 PR sanitize/58443
7725 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
7726 Remove unnecessary check.
7727
ce6923c5
MP
77282013-09-18 Marek Polacek <polacek@redhat.com>
7729
7730 PR sanitizer/58411
7731 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
7732 no_sanitize_undefined attribute.
7733
a1e51df9
KT
77342013-09-13 Kai Tietz <ktietz@redhat.com>
7735
7736 PR target/57848
7737 * c-decl.c (c_builtin_function_ext_scope): Remove
7738 wrong assumption that it is never called on prexisting
7739 symbol.
7740
0af94e6f
JR
77412013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7742
7743 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
7744
20059c8b
GDR
77452013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7746
7747 * c-objc-common.c (c_tree_printer): Tidy.
7748
de5a5fa1
MP
77492013-08-30 Marek Polacek <polacek@redhat.com>
7750
7751 * c-typeck.c (build_binary_op): Add division by zero and shift
7752 instrumentation.
7753
2531a1d9 77542013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 7755 Joseph Myers <joseph@codesourcery.com>
2531a1d9 7756
6e2bcc98 7757 PR c/35649
2531a1d9
JR
7758 * c-typeck.c (c_common_type): Prefer double_type_node over
7759 other REAL_TYPE types with the same precision.
7760 (convert_arguments): Likewise.
7761
025311c4
GDR
77622013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
7763
7764 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
7765 (c_initialize_diagnostics): Call a destructor for the early printer.
7766
da6ca2b5
GDR
77672013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7768
7769 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
7770 printer initialization.
7771
318cda85 77722013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 7773
318cda85
BI
7774 PR c/57490
7775 * c-array-notation.c (fix_conditional_array_notations_1): Added a
7776 check for truth values.
7777 (expand_array_notation_exprs): Added truth values case. Removed an
7778 unwanted else. Added for-loop to walk through subtrees in default
7779 case.
7780
b066401f
GDR
77812013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7782
7783 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
7784
fb48aadc
JM
77852013-07-23 Joseph Myers <joseph@codesourcery.com>
7786
7787 * c-parser.c (struct c_generic_association): Fix typo.
7788
433cc7b0
TT
77892013-07-23 Tom Tromey <tromey@redhat.com>
7790 Joseph Myers <joseph@codesourcery.com>
7791
7792 * c-parser.c (struct c_generic_association): New.
7793 (c_generic_association_d): New typedef.
7794 (c_parser_generic_selection): New function.
7795 (c_parser_postfix_expression): Handle RID_GENERIC.
7796
26d40c3d
JM
77972013-07-13 Jason Merrill <jason@redhat.com>
7798
7799 PR c++/57793
7800 * c-decl.c (finish_struct): Check for too-large class.
7801
ecdbd01a 78022013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7803
7804 PR c/57821
7805 * c-typeck.c (set_init_index): When folding, check for index overflow.
7806
1141ed3f
BI
78072013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7808
7809 * c-parser.c (c_parser_array_notation): Removed rejection of array
7810 notations in an array of function pointers.
7811
713b46fa
BI
78122013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7813
7814 * c-array-notation.c (make_triplet_val_inv): New function.
7815 (create_cmp_incr): Likewise.
7816 (create_array_refs): Likewise.
7817 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
7818 Also modularized common parts between functions and called the function.
7819 (build_array_notation_expr): Likewise.
7820 (fix_conditional_array_notations_1): Likewise.
7821 (fix_array_notation_expr): Likewise.
7822 (fix_array_notation_call_expr): Likewise.
7823
92f20202
MP
78242013-06-18 Marek Polacek <polacek@redhat.com>
7825
7826 PR c/57630
7827 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
7828
73a23b06
BI
78292013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
7830
7831 * c-array-notation.c (build_array_notation_expr): Reject array notation
7832 mismatch between LHS and RHS even inside a call_expr. Also, removed
7833 a couple while statements that were dead code.
7834
00b8517d
BI
78352013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
7836
7837 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
7838 excessive precision expressions in function parameters. Also removed
7839 couple unwanted while statements.
7840
1509bdda
BI
78412013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7842
7843 * c-array-notation.c (expand_array_notation_exprs): Added
7844 ARRAY_NOTATION_REF case.
ab20d992 7845
d60f1706
BI
78462013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7847
7848 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
7849 function to c-family/array-notation-common.c.
7850 (is_cilkplus_reduce_builtin): Likewise.
7851 (find_rank): Likewise.
7852 (extract_array_notation_exprs): Likewise.
7853 (replace_array_notations): Likewise.
7854 (find_inv_trees): Likewise.
7855 (replace_inv_trees): Likewise.
7856 (contains_array_notation_expr): Likewise.
7857 (find_correct_array_notation_type): Likewise.
7858 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
7859 (struct inv_list): Moved this to c-family/array-notation-common.c.
7860 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 7861
6d6efbb3
BI
78622013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
7863
7864 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
7865 reduction functions outside the for-loop. Added a check if the fundecl
7866 is non-NULL. Finally, removed an unwanted if-statement, and made the
7867 body unconditional.
7868
25c22937
BI
78692013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7870
7871 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
7872 condition of the if-statement matches the rank of else-block and then-
7873 block when array notations are used.
7874 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
7875 expression after the entire function body is parsed.
7876 (c_parser_expr_no_commas): Delayed creating array notation expressions
7877 to the end of function parsing.
7878 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
7879 whole if-statement instead of just the condition.
ab20d992 7880 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 7881
edd25645
BI
78822013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
7883
7884 PR c/57474
7885 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
7886 array to NULL_TREE if they are unused. Also added a check for the
7887 field to be NULL before its fields are used in future.
ab20d992 7888
065ce7f1
RO
78892013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7890
7891 PR bootstrap/57450
7892 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
7893 (build_array_notation_expr): Likewise.
7894
36536d79
BI
78952013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7896
7897 * c-typeck.c (build_array_ref): Added a check to see if array's
7898 index is greater than one. If true, then emit an error.
7899 (build_function_call_vec): Exclude error reporting and checking
7900 for builtin array-notation functions.
7901 (convert_arguments): Likewise.
7902 (c_finish_return): Added a check for array notations as a return
7903 expression. If true, then emit an error.
7904 (c_finish_loop): Added a check for array notations in a loop
7905 condition. If true then emit an error.
7906 (lvalue_p): Added a ARRAY_NOTATION_REF case.
7907 (build_binary_op): Added a check for array notation expr inside
7908 op1 and op0. If present, we call another function to find correct
7909 type.
7910 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
7911 * c-parser.c (c_parser_compound_statement): Check if array
7912 notation code is used in tree, if so, then transform them into
7913 appropriate C code.
7914 (c_parser_expr_no_commas): Check if array notation is used in LHS
7915 or RHS, if so, then build array notation expression instead of
7916 regular modify.
7917 (c_parser_postfix_expression_after_primary): Added a check for
7918 colon(s) after square braces, if so then handle it like an array
7919 notation. Also, break up array notations in unary op if found.
7920 (c_parser_direct_declarator_inner): Added a check for array
7921 notation.
7922 (c_parser_compound_statement): Added a check for array notation in
7923 a stmt. If one is present, then expand array notation expr.
7924 (c_parser_if_statement): Likewise.
7925 (c_parser_switch_statement): Added a check for array notations in
7926 a switch statement's condition. If true, then output an error.
7927 (c_parser_while_statement): Similarly, but for a while.
7928 (c_parser_do_statement): Similarly, but for a do-while.
7929 (c_parser_for_statement): Similarly, but for a for-loop.
7930 (c_parser_unary_expression): Check if array notation is used in a
7931 pre-increment or pre-decrement expression. If true, then expand
7932 them.
7933 (c_parser_array_notation): New function.
7934 * c-array-notation.c: New file.
7935 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 7936
cd192ccc
MS
79372013-05-23 Mike Stump <mikestump@comcast.net>
7938
7939 * c-typeck.c (convert_for_assignment): Handle references to memory
7940 spaces better.
7941
427b248d
JM
79422013-05-16 Jason Merrill <jason@redhat.com>
7943
7944 * Make-lang.in (cc1$(exeext)): Use link mutex.
7945
44d90fe1
PC
79462013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7947
7948 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
7949 to simply use OPT_Wpointer_arith.
7950 (build_unary_op): Likewise.
7951
4e7d7b3d
JJ
79522013-04-03 Jakub Jelinek <jakub@redhat.com>
7953
7954 PR c/19449
7955 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
7956 argument. If set, or it temporarily for parsing of the first
7957 argument into force_folding_builtin_constant_p.
7958 (c_parser_postfix_expression): Adjust callers.
7959
839b422f
RB
79602013-03-21 Richard Biener <rguenther@suse.de>
7961
7962 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
7963 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
7964
2ee028f1
MP
79652013-02-12 Marek Polacek <polacek@redhat.com>
7966
7967 PR c/44938
7968 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
7969 origtypes to NULL.
7970
8824edff
JJ
79712013-01-24 Jakub Jelinek <jakub@redhat.com>
7972
7973 PR c/56078
7974 * c-typeck.c (set_nonincremental_init_from_string): If
7975 constructor_max_index is NULL, treat it as if tree_int_cst_lt
7976 returned false.
7977 (process_init_element): Likewise.
7978
eadd3d0d
JJ
79792012-12-20 Jakub Jelinek <jakub@redhat.com>
7980
7981 PR c++/55619
7982 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
7983 argument, don't call default_function_array_conversion
7984 nor c_fully_fold here.
7985 (c_parser_asm_statement): Adjust callers.
7986 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
7987 and outputs here, and call default_function_array_conversion
7988 on inputs that don't need to be addressable.
7989
f8a93a2e
JJ
79902012-12-18 Jakub Jelinek <jakub@redhat.com>
7991
7992 PR c/39464
7993 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
7994 warning require that both c_common_unsigned_type as well as
7995 c_common_signed_type is the same for both mvl and mvr types.
7996
9771b263
DN
79972012-11-16 Diego Novillo <dnovillo@google.com>
7998
7999 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8000
8001 * c-common.c: Use new vec API in vec.h.
8002 * c-common.h: Likewise.
8003 * c-gimplify.c: Likewise.
8004 * c-pragma.c: Likewise.
8005 * c-pretty-print.c: Likewise.
8006 * c-pretty-print.h: Likewise.
8007 * c-semantics.c: Likewise.
8008 * c-decl.c: Likewise.
8009 * c-parser.c: Likewise.
8010 * c-tree.h: Likewise.
8011 * c-typeck.c: Likewise.
8012
880661a4
JW
80132012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8014
8015 PR c++/54930
8016 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8017
077d1abe
MLI
80182012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8019
8020 PR c/53066
8021 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8022 shadows a function, unless the variable is a function or a
8023 pointer-to-function.
8024
3a785c97
JJ
80252012-10-12 Jakub Jelinek <jakub@redhat.com>
8026
8027 PR c/54381
8028 * c-parser.c (struct c_tree_loc_pair): Removed.
8029 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8030 add location_t * and tree * arguments, fill in array of 3
8031 sizeof_arg trees and corresponding locs.
8032 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8033 c_parser_expr_list callers.
8034 (c_parser_postfix_expression_after_primary): Likewise. Pass
8035 array of 3 sizeof_arg trees and locs (corresponding to first
8036 3 arguments) to sizeof_pointer_memaccess_warning.
8037
703c8606
LC
80382012-10-09 Lawrence Crowl <crowl@google.com>
8039
8040 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8041 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8042 hash table.
8043
5d9de0d0
PC
80442012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8045
8046 PR c++/54194
8047 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8048 call.
8049
a212e43f
MG
80502012-10-09 Marc Glisse <marc.glisse@inria.fr>
8051
8052 PR c++/54427
8053 * c-typeck.c: Include c-common.h.
8054 (enum stv_conv): Moved to c-common.h.
8055 (scalar_to_vector): Moved to c-common.c.
8056 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8057 * Make-lang.in: c-typeck.c depends on c-common.h.
8058
3b78de56
AC
80592012-10-04 Arnaud Charlet <charlet@adacore.com>
8060
8061 * c-decl.c (c_write_global_declarations): Fix handling of
8062 -fdump-ada-spec*.
8063
78c60e3d
SS
80642012-09-30 Sharad Singhai <singhai@google.com>
8065
8066 * c-decl.c (c_write_global_declarations): Use a different method
8067 to determine if the dump has ben initialized.
8068
9f33203d
JM
80692012-09-14 Joseph Myers <joseph@codesourcery.com>
8070
8071 PR c/54552
8072 * c-typeck.c (c_cast_expr): When casting to a type requiring
8073 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8074 c_fully_fold first.
8075
a27d595d
JM
80762012-09-14 Joseph Myers <joseph@codesourcery.com>
8077
8078 PR c/54103
8079 * c-typeck.c (build_unary_op): Pass original argument of
8080 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8081 any C_MAYBE_CONST_EXPR, if it has integer operands.
8082 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8083 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8084 to c_objc_common_truthvalue_conversion, then remove any
8085 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8086 c_objc_common_truthvalue_conversion not
8087 c_common_truthvalue_conversion.
8088 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8089 call note_integer_operands for arguments with integer operands
8090 that are not integer constants.
8091
9feb29df
JJ
80922012-09-13 Jakub Jelinek <jakub@redhat.com>
8093
8094 PR c/54559
8095 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8096 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8097
d409320c
JJ
80982012-08-31 Jakub Jelinek <jakub@redhat.com>
8099
8100 PR c/54428
8101 * c-convert.c (convert): Don't call fold_convert_loc if
8102 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8103 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8104 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8105
6265d07c
JJ
81062012-08-24 Jakub Jelinek <jakub@redhat.com>
8107
8108 PR c/54355
8109 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8110 for nested and empty_ok arguments in the call to
8111 c_parser_declaration_or_fndef.
8112
1a4049e7
JJ
81132012-08-17 Jakub Jelinek <jakub@redhat.com>
8114
8115 * c-tree.h (c_last_sizeof_arg): Declare.
8116 * c-parser.c (struct c_tree_loc_pair): New type.
8117 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8118 non-NULL.
8119 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8120 (c_parser_postfix_expression_after_primary): Likewise. Call
8121 sizeof_pointer_memaccess_warning if needed.
8122 (sizeof_ptr_memacc_comptypes): New function.
8123 * c-typeck.c (c_last_sizeof_arg): New global variable.
8124 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8125
0229aee9
UB
81262012-07-24 Uros Bizjak <ubizjak@gmail.com>
8127
8128 * c-lang.h (lang_decl): Add variable_size GTY option.
8129
7ee2468b
SB
81302012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8131
8132 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8133 * Make-lang.in: Fix dependencies.
8134
d4a10d0a
SB
81352012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8136
8137 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8138 and add language Makefile hooks.
8139 * config-lang.in: New file.
8140 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8141 add the required "normal" config-lang.in rules.
8142 * c-lang.h: Moved from gcc/ to here.
8143 * c-tree.h: Likewise.
8144 * c-objc-common.c: Likewise.
8145 * c-objc-common.h: Likewise.
8146 * c-typeck.c: Likewise.
8147 * c-convert.c: Likewise.
8148 * c-lang.c: Likewise.
8149 * c-aux-info.c: Likewise.
8150 * c-errors.c: Likewise.
8151 * gccspec.c: Likewise.
8152 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8153 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8154\f
c48514be 8155Copyright (C) 2012-2021 Free Software Foundation, Inc.
d4a10d0a
SB
8156
8157Copying and distribution of this file, with or without modification,
8158are permitted in any medium without royalty provided the copyright
8159notice and this notice are preserved.
This page took 3.369895 seconds and 5 git commands to generate.